diff --git a/common/shlibs b/common/shlibs
index 2661d1263de..4a45ae2b55b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2483,3 +2483,4 @@ liblttng-ust-tracepoint.so.0 lttng-ust-2.7.2_1
 libtwaindsm.so.2 twaindsm-2.3.0_1
 libspnav.so.0 libspnav-0.2.3_1
 libsimage.so.20 simage-1.7.0_1
+libCoin.so.60 coin3-3.1.3_1
diff --git a/srcpkgs/coin3-devel b/srcpkgs/coin3-devel
new file mode 120000
index 00000000000..1348a5ba44e
--- /dev/null
+++ b/srcpkgs/coin3-devel
@@ -0,0 +1 @@
+coin3
\ No newline at end of file
diff --git a/srcpkgs/coin3-doc b/srcpkgs/coin3-doc
new file mode 120000
index 00000000000..1348a5ba44e
--- /dev/null
+++ b/srcpkgs/coin3-doc
@@ -0,0 +1 @@
+coin3
\ No newline at end of file
diff --git a/srcpkgs/coin3/patches/0005-gcc-4.7.patch b/srcpkgs/coin3/patches/0005-gcc-4.7.patch
new file mode 100644
index 00000000000..e2d16652445
--- /dev/null
+++ b/srcpkgs/coin3/patches/0005-gcc-4.7.patch
@@ -0,0 +1,28 @@
+Source: http://pkgs.fedoraproject.org/cgit/rpms/Coin3.git/plain/0005-gcc-4.7.patch
+
+From a5bf6656215837a9bdf4d70cdce4be0fedd522e0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu@corsepiu.home>
+Date: Fri, 4 May 2012 13:30:20 +0200
+Subject: [PATCH 05/10] gcc-4.7.
+
+---
+ include/Inventor/SbBasic.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/Inventor/SbBasic.h b/include/Inventor/SbBasic.h
+index d038bb1..2ee6b70 100644
+--- a/include/Inventor/SbBasic.h
++++ b/include/Inventor/SbBasic.h
+@@ -25,6 +25,9 @@
+ \**************************************************************************/
+ 
+ #include <Inventor/C/basic.h>
++#ifndef NDEBUG
++#include <Inventor/C/errors/debugerror.h>
++#endif // !NDEBUG
+ 
+ /* ********************************************************************** */
+ /* Trap people trying to use Inventor headers while compiling C source code.
+-- 
+1.8.1.4
+
diff --git a/srcpkgs/coin3/patches/0010-GCC-4.8.0-fixes.patch b/srcpkgs/coin3/patches/0010-GCC-4.8.0-fixes.patch
new file mode 100644
index 00000000000..bc5167e8f13
--- /dev/null
+++ b/srcpkgs/coin3/patches/0010-GCC-4.8.0-fixes.patch
@@ -0,0 +1,40 @@
+Source: http://pkgs.fedoraproject.org/cgit/rpms/Coin3.git/plain/0010-GCC-4.8.0-fixes.patch
+
+From 9f5d96a2b9a71ab539237d2dab4c54fc46fc5c5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu@corsepiu.home>
+Date: Thu, 18 Apr 2013 19:17:06 +0200
+Subject: [PATCH 10/10] GCC-4.8.0 fixes
+
+---
+ src/fonts/freetype.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/fonts/freetype.cpp b/src/fonts/freetype.cpp
+index 760b88b..e705d3a 100644
+--- a/src/fonts/freetype.cpp
++++ b/src/fonts/freetype.cpp
+@@ -32,18 +32,18 @@
+ 
+    20050613 mortene. */
+ 
+-#include "fonts/freetype.h"
+-
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
+-#include <stdlib.h>
++#include <cstdlib>
+ #include <assert.h>
+ 
+ #include "glue/freetype.h"
+ #include "glue/GLUWrapper.h"
+ 
++#include "fonts/freetype.h"
++
+ /* ************************************************************************* */
+ 
+ #ifdef __cplusplus
+-- 
+1.8.1.4
+
diff --git a/srcpkgs/coin3/patches/0012-memhandler-initialization.patch b/srcpkgs/coin3/patches/0012-memhandler-initialization.patch
new file mode 100644
index 00000000000..7ad4dc68116
--- /dev/null
+++ b/srcpkgs/coin3/patches/0012-memhandler-initialization.patch
@@ -0,0 +1,22 @@
+Source: http://pkgs.fedoraproject.org/cgit/rpms/Coin3.git/plain/0012-memhandler-initialization.patch
+Additional information: https://bugzilla.redhat.com/show_bug.cgi?id=1323159
+--- Coin-3.1.3/src/misc/SbHash.h.init	2010-03-02 22:20:09.000000000 +0900
++++ Coin-3.1.3/src/misc/SbHash.h	2016-04-22 16:52:39.888883757 +0900
+@@ -89,6 +89,8 @@
+     cc_memalloc_deallocate(entry->memhandler, ptr);
+   }
+   SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {}
++  SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler) 
++		: key(key), obj(obj), memhandler(memhandler) {}
+ 
+   Key key;
+   Type obj;
+@@ -218,7 +220,7 @@
+     /* Key not already in the hash table; insert a new
+      * entry as the first element in the bucket
+      */
+-    entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj);
++    entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler);
+     entry->next = this->buckets[i];
+     this->buckets[i] = entry;
+ 
diff --git a/srcpkgs/coin3/template b/srcpkgs/coin3/template
new file mode 100644
index 00000000000..34f9518c0d2
--- /dev/null
+++ b/srcpkgs/coin3/template
@@ -0,0 +1,70 @@
+# Template file for 'coin3'
+pkgname=coin3
+version=3.1.3
+revision=1
+wrksrc="Coin-${version}"
+patch_args="-Np1"
+build_style=gnu-configure
+configure_args="--includedir=/usr/include/Coin3 --disable-dependency-tracking
+ --disable-static --enable-threadsafe --enable-exceptions
+ --disable-dl-simage --disable-dl-glu --disable-dl-libbzip2
+ --disable-dl-zlib --disable-dl-freetype --disable-dl-fontconfig
+ --enable-3ds-import --enable-html"
+hostmakedepends="pkg-config doxygen perl"
+makedepends="freetype-devel glu-devel zlib-devel bzip2-devel
+ fontconfig-devel boost-devel simage-devel"
+
+# depends on script simage-config
+nocross=yes
+
+short_desc="High-level 3D graphics toolkit"
+maintainer="yopito <pierre.bourgin@free.fr>"
+
+# HomePage tells BSD 3-Clause license, but tarball is GPLv2
+license="GPL-2"
+homepage="https://bitbucket.org/Coin3D/coin/wiki/Home"
+distfiles="https://bitbucket.org/Coin3D/coin/downloads/Coin-${version}.tar.gz"
+checksum=583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417
+
+post_extract() {
+	# remove bundled boost headers
+	rm -rf ${wrksrc}/include/boost
+}
+
+do_configure() {
+	# only way to compute and point freetype2 stuff to configure
+	: ${configure_script:=./configure}
+	CPPFLAGS+="$(pkg-config --cflags freetype2)" ${configure_script} ${configure_args}
+}
+
+post_configure() {
+	case "$XBPS_TARGET_MACHINE" in
+	*-musl)
+		# configure checks are awfull
+		sed -i -e 's,^#define SIM_TIMEVAL_TV_SEC_T { },#define SIM_TIMEVAL_TV_SEC_T time_t,' \
+		       -e 's,^#define SIM_TIMEVAL_TV_USEC_T { },#define SIM_TIMEVAL_TV_USEC_T suseconds_t,' \
+		       ${wrksrc}/src/config.h
+		;;
+	esac
+}
+
+coin3-devel_package() {
+	short_desc+=" - development files"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/bin/coin-config
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+		vmove usr/share/aclocal
+		vmove usr/share/man
+	}
+}
+
+coin3-doc_package() {
+	short_desc+=" - documentation"
+	noarch=yes
+	pkg_install() {
+		vmove usr/share/doc
+	}
+}