summaryrefslogtreecommitdiff
path: root/dev-games/crystalspace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-games/crystalspace
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-games/crystalspace')
-rw-r--r--dev-games/crystalspace/Manifest9
-rw-r--r--dev-games/crystalspace/crystalspace-2.0-r1.ebuild142
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-gcc47.patch110
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch53
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch238
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-wxgtk.patch48
-rw-r--r--dev-games/crystalspace/metadata.xml33
7 files changed, 633 insertions, 0 deletions
diff --git a/dev-games/crystalspace/Manifest b/dev-games/crystalspace/Manifest
new file mode 100644
index 000000000000..4b1d0b784c06
--- /dev/null
+++ b/dev-games/crystalspace/Manifest
@@ -0,0 +1,9 @@
+AUX crystalspace-2.0-gcc47.patch 3489 SHA256 fea558bf8c13cd54339ceb3d870c453989fcb5ea536fbbd9c385b2361bc7a261 SHA512 1a28f708afc7d82747222aac2a835e0de0b9b6895b9f3121498cbed5806afae77c4ed13ffce044092da621481f756a0051091eab2e9f6352f625280142377562 WHIRLPOOL 8202cc23b7ab4d72379a5629d72d28a40df39d23aedbde9a01ad00ee9c73d3cfd948a5181556234980f8ed2a086bdbb72770dcd3e5a1894dbc64ab748d01e126
+AUX crystalspace-2.0-gcc52.patch 1622 SHA256 ad03d8e4842961135c0bb242341d5856cff408ccb15c107780a83b273f59465b SHA512 ed27985a9bd0d5022b9d545ecd74a07021e5ee939c4db3fc4c412055990907bf093fd7de6e2eadd7fc4dd41eafe202a2c4727d8c998b153717c8fbf862224f90 WHIRLPOOL 421dfc88ff2edf052027a912fdaabd424f89c993bbe23e6727cb3827b5315a9c204ea1f928e5743c85d7a20063a52f1554cc59dba93eeeb7f37cc33e17a62739
+AUX crystalspace-2.0-gcc6.patch 9490 SHA256 0abb7975c1812f104858e137a6e6740709dd497acf8f3b54c5749ea724110ddc SHA512 7033d7c9f1e6dfb33cb1834556e572a7e217ecd699bd82ad8bc1640c7c76dd10c0aff1a5c12276ccb2e6b2dffeba67660c0eb7afbd76b87a1aaf3720b3662635 WHIRLPOOL 243ac03bba39202291aa5c00ca85f3302a4ffab08bd2ca16bdd2ae12f78d56580f56bef75e4538cdac989c37b2e7f5156d1653735bfa936db2aa46d938694d85
+AUX crystalspace-2.0-wxgtk.patch 2139 SHA256 0e53fd8abc93576d9e6fb88db79627d30f60f4d62cba47d45625ea04704818e3 SHA512 5dab8c0243262f6c129b76e6ccdc2d388ddb1a9a0fec0ce7824049cf7c5a88caa0405988537e5df33c7e3630d0995215e7295e5fc7c428c387d84a5804c9a4a2 WHIRLPOOL ad332ec91b3ba411c0117de076e7146a9933e61e235d437af8088d333aca590175424675b92cc921977b2c728c339495a59473e38da1afc059ccfff5d7e4c285
+DIST crystalspace-src-2.0.tar.bz2 185925180 SHA256 f1cda74fd998e44088746803209b1ea6625e80e3d4fb72023d8bed6b677b7b6a SHA512 f09d40669268e26542a2854560ac5033e7f89d0bd5def870e5062e08611c36a0875666abe0c705bb5f9f37dafa619f33f900e358d5fe255746a86127a3899f97 WHIRLPOOL a1705cb88b64eb0e8f6a146c2a75baab01aa598d07b8d36ab0671a47d4092b5c9b53c13f46bb1e56663b2b228c4b95cee3a355554c1de92c3d931187e97c4ca1
+EBUILD crystalspace-2.0-r1.ebuild 3398 SHA256 414593d3da4e25b5780ccda4ce61a35811cd52eec34aaed5d1e96e85df377cbe SHA512 fcafffba9377ce1b1cb1d7283cd55bb9985ce46b23f2b955506cdf3675e50a82bdea00e2bd2429de748811c140a83ed508b4c5eacc2a2d132f56cd98156356e1 WHIRLPOOL 0055454032f63044193dcdf8245ed25b3f6b952382c529a47dad022a0be179558c7c0a5e085889438b242da2289343197da0e148d1eaeb011d2fac0052421f10
+MISC ChangeLog 3644 SHA256 ccd774f25556c61405af8040a0cbc100692c0bc9aa23cb2f4a5953e284726a6d SHA512 d1d561cb1f05b5e4d1b9d5f68ca3d3c69eef9075ba57b643c387f0f7ca8416212821fa0b2dcfc059742dac7e76f2eb04231b8f35cf90a5f1be0d39d396a6734a WHIRLPOOL 38cbdd38cfefefef9abecc69fe4f2cc609bbd162b137c14fe58614da51f7ab6249b11d4d7a85ab4e53d6593e228d2debea657e04d9d382a650df0d010124602f
+MISC ChangeLog-2015 9861 SHA256 21653c75fb452f1a3b4deec81f7471d8f341a15793b379ed9fdf3322319b3de9 SHA512 7035aeb40f180dc04550b3e20bf86c90c386cc0e8784e04ccd95b3704b5fd060ed466051fdd6e4e89475aa31f8a4a8036d1a8c42ebeb718b981c1770ffe3a832 WHIRLPOOL 302fef2757acb334a7073a824383231592c033da19342d1aafb883478760ce29311acf0d8ff44f69650dd682ffddc07fdb22a72566dd32fc752ad1bb81683466
+MISC metadata.xml 1464 SHA256 a20b0374aa7ec76970d2b15e841845b9cfb21766c1cee78376a8075152b700cd SHA512 82d9f6f517de261a4175e1de10b2596a2f82d828622681d64b4707cf7c0ac19d9a07230f3fd39e277a1dd3a92f14f95455aa0d57c68e7b015542c31bce47aea2 WHIRLPOOL ff96c31db61630ea6f1b3a13fc45a6d42e03593d8312e1eb9dfeab1ba258a3bdd67d1ef384ba996aa4f11122d4be3365c18d105328d6d285dc76ea917ee89b8e
diff --git a/dev-games/crystalspace/crystalspace-2.0-r1.ebuild b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild
new file mode 100644
index 000000000000..aa286aa0752a
--- /dev/null
+++ b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit flag-o-matic java-pkg-opt-2 autotools wxwidgets versionator multiprocessing
+
+MY_P=${PN}-src-${PV}
+PATH_P=${PN}-$(get_version_component_range 1-2)
+
+DESCRIPTION="Portable 3D Game Development Kit written in C++"
+HOMEPAGE="http://crystal.sourceforge.net/"
+SRC_URI="mirror://sourceforge/crystal/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="3ds alsa bullet cal3d cegui cg doc java jpeg mng ode png speex truetype vorbis wxwidgets"
+
+COMMON_DEP="
+ virtual/opengl
+ media-libs/openal
+ x11-libs/libXt
+ x11-libs/libXxf86vm
+ sys-libs/zlib
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ ode? ( <dev-games/ode-0.12 )
+ cal3d? ( >=media-libs/cal3d-0.11 )
+ jpeg? ( virtual/jpeg:0 )
+ bullet? ( sci-physics/bullet )
+ vorbis? ( media-libs/libvorbis )
+ speex? ( media-libs/libogg
+ media-libs/speex )
+ truetype? ( >=media-libs/freetype-2.1 )
+ alsa? ( media-libs/alsa-lib )
+ mng? ( media-libs/libmng )
+ png? ( media-libs/libpng:0= )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+ cegui? ( >=dev-games/cegui-0.5.0 )
+ 3ds? ( media-libs/lib3ds )
+"
+RDEPEND="${COMMON_DEP}
+ java? ( >=virtual/jre-1.5 )
+"
+DEPEND="${COMMON_DEP}
+ java? ( >=virtual/jdk-1.5
+ dev-java/ant-core )
+ dev-util/ftjam
+ <dev-lang/swig-3
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-gcc52.patch
+ "${FILESDIR}"/${P}-wxgtk.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+)
+
+src_prepare() {
+ default
+
+ # Installing doc conflict with dodoc on src_install
+ # Removing conflicting target
+ sed -i \
+ -e "/^InstallDoc/d" \
+ Jamfile.in \
+ docs/Jamfile || die
+
+ use wxwidgets && append-libs -lGL
+
+ AT_M4DIR=mk/autoconf \
+ eautoreconf
+}
+
+src_configure() {
+ if use wxwidgets; then
+ need-wxwidgets unicode
+ fi
+
+ econf \
+ --disable-as-needed \
+ --enable-cpu-specific-optimizations=no \
+ --disable-separate-debug-info \
+ --without-lcms \
+ --without-jackasyn \
+ --without-perl \
+ $(use_with java) \
+ --disable-make-emulation \
+ $(use_with bullet) \
+ --without-python \
+ $(use_with png) \
+ $(use_with jpeg) \
+ $(use_with mng) \
+ $(use_with vorbis) \
+ $(use_with speex) \
+ $(use_with 3ds) \
+ $(use_with ode) \
+ $(use_with truetype freetype2) \
+ $(use_with cal3d) \
+ $(use_with wxwidgets wx) \
+ $(use_with cegui CEGUI) \
+ $(use_with cg Cg) \
+ $(use_with alsa asound)
+ #remove unwanted CFLAGS added by ./configure
+ sed -i -e '/COMPILER\.CFLAGS\.optimize/d' \
+ Jamconfig || die
+}
+
+src_compile() {
+ jam -q -dx -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ for installTarget in bin plugin lib include data config bindings
+ do
+ jam -q -s DESTDIR="${D}" install_${installTarget} || die
+ done
+ if use doc; then
+ jam -q -s DESTDIR="${D}" install_doc || die
+ fi
+ dodoc README docs/history*
+
+ echo "CRYSTAL_PLUGIN=/usr/$(get_libdir)/${PATH_P}" > 90crystalspace
+ echo "CRYSTAL_CONFIG=/etc/${PATH_P}" >> 90crystalspace
+ doenvd 90crystalspace
+}
+
+pkg_postinst() {
+ elog "Examples coming with this package, need correct light calculation"
+ elog "Do the following commands, with the root account, to fix that:"
+ # Fill cache directory for the examples
+ local dir
+ for dir in castle flarge isomap parallaxtest partsys r3dtest stenciltest \
+ terrain terrainf;
+ do
+ elog "cslight -video=null /usr/share/${PATH_P}/data/maps/${dir}"
+ done
+}
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc47.patch b/dev-games/crystalspace/files/crystalspace-2.0-gcc47.patch
new file mode 100644
index 000000000000..5b76b2e94707
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc47.patch
@@ -0,0 +1,110 @@
+https://bugs.gentoo.org/426870
+https://bugs.gentoo.org/459440
+
+ include/csplugincommon/rendermanager/render.h | 6 +++---
+ include/csutil/blockallocator.h | 6 +++---
+ include/csutil/parray.h | 2 +-
+ include/csutil/redblacktree.h | 4 ++--
+ include/csutil/refarr.h | 2 +-
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+
+--- a/include/csplugincommon/rendermanager/render.h
++++ b/include/csplugincommon/rendermanager/render.h
+@@ -194,7 +194,7 @@ namespace RenderManager
+ || (mesh.preCopyNum != 0))
+ {
+ // Render the latest batch of meshes
+- RenderMeshes (context, node->meshes, lastShader, lastTicket, lastRenderedMesh, m);
++ this->RenderMeshes (context, node->meshes, lastShader, lastTicket, lastRenderedMesh, m);
+ lastRenderedMesh = m;
+
+ lastShader = shader;
+@@ -208,7 +208,7 @@ namespace RenderManager
+ }
+ }
+
+- RenderMeshes (context, node->meshes, lastShader, lastTicket, lastRenderedMesh, node->meshes.GetSize ());
++ this->RenderMeshes (context, node->meshes, lastShader, lastTicket, lastRenderedMesh, node->meshes.GetSize ());
+ }
+ };
+
+@@ -242,7 +242,7 @@ namespace RenderManager
+ iShader* shader = context.shaderArray[mesh.contextLocalId+layerOffset];
+
+ size_t ticket = context.ticketArray[mesh.contextLocalId+layerOffset];
+- RenderMeshes (context, node->meshes, shader, ticket, m, m+1);
++ this->RenderMeshes (context, node->meshes, shader, ticket, m, m+1);
+ }
+ }
+ }
+--- a/include/csutil/blockallocator.h
++++ b/include/csutil/blockallocator.h
+@@ -193,7 +193,7 @@ public:
+ ~csBlockAllocator()
+ {
+ ObjectDispose dispose (*this, false);
+- DisposeAll (dispose);
++ this->DisposeAll (dispose);
+ }
+
+ /**
+@@ -204,7 +204,7 @@ public:
+ void Empty ()
+ {
+ ObjectDispose dispose (*this, true);
+- FreeAll (dispose);
++ this->FreeAll (dispose);
+ }
+
+ /**
+@@ -215,7 +215,7 @@ public:
+ void DeleteAll ()
+ {
+ ObjectDispose dispose (*this, true);
+- DisposeAll (dispose);
++ this->DisposeAll (dispose);
+ }
+
+ /**
+--- a/include/csutil/parray.h
++++ b/include/csutil/parray.h
+@@ -112,7 +112,7 @@ public:
+ {
+ CS_ASSERT (this->GetSize () > 0);
+ T* ret = GetAndClear (this->GetSize () - 1); // see *1*
+- Truncate (this->GetSize () - 1);
++ this->Truncate (this->GetSize () - 1);
+ return ret;
+ }
+
+--- a/include/csutil/redblacktree.h
++++ b/include/csutil/redblacktree.h
+@@ -1155,7 +1155,7 @@ public:
+ T* Put (const K& key, const T &value)
+ {
+ csRedBlackTreePayload<K, T>* payload = (csRedBlackTreePayload<K, T>*)
+- Insert (csRedBlackTreePayload<K, T>(key, value));
++ this->Insert (csRedBlackTreePayload<K, T>(key, value));
+ return (payload != 0) ? &payload->GetValue() : 0;
+ }
+ /**
+@@ -1194,7 +1194,7 @@ public:
+ */
+ const T& Get (const K& key, const T& fallback) const
+ {
+- const csRedBlackTreePayload<K, T>* payload = Find (key);
++ const csRedBlackTreePayload<K, T>* payload = this->Find (key);
+ if (payload == 0) return fallback;
+ return payload->GetValue();
+ }
+--- a/include/csutil/refarr.h
++++ b/include/csutil/refarr.h
+@@ -111,7 +111,7 @@ public:
+ {
+ CS_ASSERT (this->GetSize () > 0);
+ csRef<T> ret = this->Get (this->GetSize () - 1); // see *1*
+- SetSize (this->GetSize () - 1);
++ this->SetSize (this->GetSize () - 1);
+ return ret;
+ }
+ };
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch
new file mode 100644
index 000000000000..96b6aa712340
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch
@@ -0,0 +1,53 @@
+--- a/include/csgfx/imagememory.h.old 2016-04-17 09:09:31.497152401 +0200
++++ b/include/csgfx/imagememory.h 2016-04-17 09:12:13.838355158 +0200
+@@ -179,8 +179,8 @@
+ /// Get a pointer to the alpha data that can be changed.
+ uint8* GetAlphaPtr ();
+
+- virtual const void* GetImageData () { return GetImagePtr (); }
+- virtual int GetWidth () const { return Width; }
++ virtual const void* GetImageData ();
++ virtual int GetWidth () const;
+ virtual int GetHeight () const { return Height; }
+ virtual int GetDepth () const { return Depth; }
+
+--- a/libs/csgfx/imagememory.cpp.old 2016-04-17 09:07:19.555451540 +0200
++++ b/libs/csgfx/imagememory.cpp 2016-04-17 09:13:09.339398463 +0200
+@@ -208,6 +208,23 @@
+ EnsureImage();
+ return (void*)databuf->GetData ();
+ }
++
++const void* csImageMemory::GetImageData ()
++{
++ return GetImagePtr ();
++}
++
++int csImageMemory::GetWidth () const
++{
++ return Width;
++}
++
++void csImageBase::SetName (const char* iName)
++{
++ cs_free (fName);
++ fName = CS::StrDup (iName);
++}
++
+ csRGBpixel* csImageMemory::GetPalettePtr ()
+ {
+ EnsureImage();
+--- a/include/csgfx/imagebase.h.old 2016-04-17 09:59:09.211101864 +0200
++++ b/include/csgfx/imagebase.h 2016-04-17 09:59:20.041919599 +0200
+@@ -61,10 +61,7 @@
+ // Most images are 2D, so provide a sensible default
+ virtual int GetDepth () const { return 1; }
+
+- virtual void SetName (const char* iName)
+- {
+- cs_free (fName); fName = CS::StrDup (iName);
+- }
++ virtual void SetName (const char* iName);
+ virtual const char* GetName () const { return fName; }
+
+ /* Commented out: should be implemented by all descendants.
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch b/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch
new file mode 100644
index 000000000000..f0b099a3e3d4
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch
@@ -0,0 +1,238 @@
+--- crystalspace-src-2.0/include/csutil/redblacktree.h.old 2016-09-20 22:06:36.732698058 -0400
++++ crystalspace-src-2.0/include/csutil/redblacktree.h 2016-09-20 22:09:08.437064011 -0400
+@@ -37,7 +37,7 @@
+ * @{ */
+
+ template <typename K, typename Allocator,
+- template<typename K, typename K2> class Ordering>
++ template<typename K1, typename K2> class Ordering>
+ class csRedBlackTree;
+
+ template <typename K, typename T>
+@@ -237,7 +237,7 @@
+ template <typename K,
+ typename Allocator =
+ CS::Container::DefaultRedBlackTreeAllocator<K>,
+- template<typename K, typename K2> class Ordering =
++ template<typename K1, typename K2> class Ordering =
+ CS::Container::RedBlackTreeOrderingTotal>
+ class csRedBlackTree
+ {
+--- crystalspace-src-2.0/plugins/terraformer/pagingformer/pagingformer.cpp.old 2016-09-20 22:10:54.287917849 -0400
++++ crystalspace-src-2.0/plugins/terraformer/pagingformer/pagingformer.cpp 2016-09-20 22:12:31.684739007 -0400
+@@ -1159,7 +1159,7 @@
+ else
+ {
+ // Something we can't return was requested
+- return false;
++ return NULL;
+ }
+ }
+
+--- crystalspace-src-2.0/plugins/documentsystem/xmlread/characters.cpp.old 2016-09-20 22:13:28.794863758 -0400
++++ crystalspace-src-2.0/plugins/documentsystem/xmlread/characters.cpp 2016-09-20 22:22:26.124668024 -0400
+@@ -46,20 +46,20 @@
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 00-0f
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 10-1f
+- CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,S,S,0), // 20-2f
+- CHAR_ROW(S,S,S,S,S,S,S,S,S,S,F,0,0,0,0,0), // 30-3f
+- CHAR_ROW(0,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // 40-4f
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,0,0,0,0,F), // 50-5f
+- CHAR_ROW(0,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // 60-6f
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,0,0,0,0,0), // 70-7f
++ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,(uint32)S,(uint32)S,0), // 20-2f
++ CHAR_ROW((uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)F,0,0,0,0,0), // 30-3f
++ CHAR_ROW(0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // 40-4f
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,0,0,0,(uint32)F), // 50-5f
++ CHAR_ROW(0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // 60-6f
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,0,0,0,0), // 70-7f
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 80-8f
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 90-9f
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // a0-af
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // b0-bf
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // c0-cf
+- CHAR_ROW(F,F,F,F,F,F,F,0,F,F,F,F,F,F,F,F), // d0-df
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // e0-ef
+- CHAR_ROW(F,F,F,F,F,F,F,0,F,F,F,F,F,F,F,F), // f0-ff
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // c0-cf
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // d0-df
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // e0-ef
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // f0-ff
+ };
+
+ #undef CHAR_ROW
+--- crystalspace-src-2.0/plugins/mesh/protomesh/object/protomesh.cpp.old 2016-09-20 22:13:51.298710883 -0400
++++ crystalspace-src-2.0/plugins/mesh/protomesh/object/protomesh.cpp 2016-09-20 22:24:27.087156627 -0400
+@@ -141,7 +141,7 @@
+ {
+ n = 0;
+
+- if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return false;
++ if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return NULL;
+
+ SetupObject ();
+
+--- crystalspace-src-2.0/plugins/terraformer/simpleformer/simpleformer.cpp.old 2016-09-20 22:14:11.555573385 -0400
++++ crystalspace-src-2.0/plugins/terraformer/simpleformer/simpleformer.cpp 2016-09-20 22:25:57.007048574 -0400
+@@ -1012,7 +1012,7 @@
+ else
+ {
+ // Something we can't return was requested
+- return false;
++ return NULL;
+ }
+ }
+
+--- crystalspace-src-2.0/plugins/mesh/skeleton/persist/standard/skelldr.cpp.old 2016-09-20 22:14:28.534458231 -0400
++++ crystalspace-src-2.0/plugins/mesh/skeleton/persist/standard/skelldr.cpp 2016-09-20 22:28:15.857616492 -0400
+@@ -157,7 +157,7 @@
+ {
+ csVector3 v;
+ if (!SyntaxService->ParseVector (vector_node, v))
+- return false;
++ return NULL;
+ bone->GetTransform ().SetOrigin (v);
+ }
+
+@@ -166,7 +166,7 @@
+ {
+ csMatrix3 m;
+ if (!SyntaxService->ParseMatrix (matrix_node, m))
+- return false;
++ return NULL;
+ bone->GetTransform ().SetO2T (m);
+ }
+ }
+@@ -201,7 +201,7 @@
+ {
+ csVector3 v;
+ if (!SyntaxService->ParseVector (vector_node, v))
+- return false;
++ return NULL;
+ socket_transform.SetOrigin (v);
+ }
+
+@@ -210,7 +210,7 @@
+ {
+ csMatrix3 m;
+ if (!SyntaxService->ParseMatrix (matrix_node, m))
+- return false;
++ return NULL;
+ socket_transform.SetO2T (m);
+ }
+ socket->SetTransform(socket_transform);
+@@ -550,7 +550,7 @@
+ {
+ csVector3 v;
+ if (!SyntaxService->ParseVector (vector_node, v))
+- return false;
++ return NULL;
+ key_transform.SetOrigin (v);
+ }
+
+@@ -559,7 +559,7 @@
+ {
+ csMatrix3 m;
+ if (!SyntaxService->ParseMatrix (matrix_node, m))
+- return false;
++ return NULL;
+ key_transform.SetO2T (m);
+ }
+ }
+--- crystalspace-src-2.0/plugins/mesh/animesh/persist/skeleton2/skeleton2ldr.cpp.old 2016-09-20 22:14:53.609288299 -0400
++++ crystalspace-src-2.0/plugins/mesh/animesh/persist/skeleton2/skeleton2ldr.cpp 2016-09-20 22:29:41.797284147 -0400
+@@ -516,7 +516,7 @@
+ if (!name)
+ {
+ synldr->ReportError (msgid, node, "No name set for animation");
+- return false;
++ return NULL;
+ }
+
+ CS::Animation::iSkeletonAnimation* fact = packet->CreateAnimation (name);
+@@ -524,7 +524,7 @@
+ {
+ synldr->ReportError (msgid, node,
+ "Could not create animation, another animation with same name already exist");
+- return false;
++ return NULL;
+ }
+
+ if (node->GetAttributeValueAsBool ("bindspace", false))
+--- crystalspace-src-2.0/plugins/mesh/watermesh/object/watermesh.cpp.old 2016-09-20 22:15:10.911171145 -0400
++++ crystalspace-src-2.0/plugins/mesh/watermesh/object/watermesh.cpp 2016-09-20 22:30:58.603396904 -0400
+@@ -363,7 +363,7 @@
+ {
+ n = 0;
+
+- if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return false;
++ if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return NULL;
+
+ iCamera* camera = rview->GetCamera ();
+
+--- crystalspace-src-2.0/plugins/csparser/csparser.cpp.old 2016-09-20 22:15:32.086027857 -0400
++++ crystalspace-src-2.0/plugins/csparser/csparser.cpp 2016-09-20 22:36:18.576856714 -0400
+@@ -571,7 +571,7 @@
+ break;
+ case XMLTOKEN_KEY:
+ if (!ParseKey (child, &Keys))
+- return false;
++ return NULL;
+ break;
+ case XMLTOKEN_HALO:
+ {
+@@ -779,7 +779,7 @@
+ {
+ csMatrix3 m;
+ if (!SyntaxService->ParseMatrix (matrix_node, m))
+- return false;
++ return NULL;
+ light_transf.SetO2T (m);
+ }
+ csRef<iDocumentNode> vector_node = child->GetNode ("v");
+@@ -787,7 +787,7 @@
+ {
+ csVector3 v;
+ if (!SyntaxService->ParseVector (vector_node, v))
+- return false;
++ return NULL;
+ use_light_transf_vector = true;
+ light_transf.SetO2TTranslation (v);
+ }
+@@ -830,7 +830,7 @@
+ {
+ bool flag;
+ if (!SyntaxService->ParseBool (child, flag, true))
+- return false;
++ return NULL;
+ lightFlags.SetBool (CS_LIGHT_NOSHADOWS, flag);
+ }
+ break;
+@@ -1193,7 +1193,7 @@
+ {
+ csColor c;
+ if (!SyntaxService->ParseColor (child, c))
+- return false;
++ return NULL;
+ sector->SetDynamicAmbientLight (c);
+ }
+ break;
+@@ -1387,7 +1387,7 @@
+ iRenderLoop* loop = ParseRenderLoop (child, set);
+ if (!loop)
+ {
+- return false;
++ return NULL;
+ }
+ if (set)
+ {
+@@ -1569,7 +1569,7 @@
+ return 0;
+ case XMLTOKEN_KEY:
+ if (!ParseKey (child, pNode->QueryObject()))
+- return false;
++ return NULL;
+ break;
+ case XMLTOKEN_POSITION:
+ if (!SyntaxService->ParseVector (child, pos))
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-wxgtk.patch b/dev-games/crystalspace/files/crystalspace-2.0-wxgtk.patch
new file mode 100644
index 000000000000..740f22eaa24a
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-wxgtk.patch
@@ -0,0 +1,48 @@
+Description: Fix to build with wxwidgets3.0
+Author: Olly Betts <olly@survex.com>
+Last-Update: 2014-06-14
+
+--- crystalspace-2.0+dfsg.orig/plugins/video/canvas/wxgl/GLWXDriver2D.cpp
++++ crystalspace-2.0+dfsg/plugins/video/canvas/wxgl/GLWXDriver2D.cpp
+@@ -292,7 +292,7 @@ bool csGraphics2DWX::Open()
+ {
+ Display* dpy = (Display*) wxGetDisplay ();
+ GLXContext active_GLContext = glXGetCurrentContext();
+- XVisualInfo *xvis = (XVisualInfo*)theCanvas->m_vi;
++ XVisualInfo *xvis = theCanvas->GetXVisualInfo();
+
+ Report (CS_REPORTER_SEVERITY_NOTIFY, "Video driver GL/X version %s",
+ glXIsDirect (dpy, active_GLContext) ? "(direct renderer)" :
+@@ -705,8 +705,8 @@ static bool wxCodeToCSCode(int wxkey, ut
+ MAP (MENU, CONTEXT, CONTEXT)
+ MAP (PAUSE, PAUSE, PAUSE)
+ MAP (CAPITAL, CAPSLOCK, CAPSLOCK)
+- MAP (PRIOR, PGUP, PGUP)
+- MAP (NEXT, PGDN, PGDN)
++ MAP (PAGEUP, PGUP, PGUP)
++ MAP (PAGEDOWN, PGDN, PGDN)
+ MAP (END, END, END)
+ MAP (HOME, HOME, HOME)
+ MAP (LEFT, LEFT, LEFT)
+@@ -722,10 +722,7 @@ static bool wxCodeToCSCode(int wxkey, ut
+ MAPC (NUMPAD2, PAD2, '2')
+ MAP (NUMPAD_DOWN, PAD2, DOWN)
+ MAPC (NUMPAD3, PAD3, '3')
+- MAP (NUMPAD_NEXT, PAD3, PGDN)
+-#if wxVERSION_NUMBER < 2700
+ MAP (NUMPAD_PAGEDOWN, PAD3, PGDN)
+-#endif
+ MAPC (NUMPAD4, PAD4, '4')
+ MAP (NUMPAD_LEFT, PAD4, LEFT)
+ MAPC (NUMPAD5, PAD5, '5')
+@@ -736,10 +733,7 @@ static bool wxCodeToCSCode(int wxkey, ut
+ MAPC (NUMPAD8, PAD8, '8')
+ MAP (NUMPAD_UP, PAD8, UP)
+ MAPC (NUMPAD9, PAD9, '9')
+- MAP (NUMPAD_PRIOR, PAD9, PGUP)
+-#if wxVERSION_NUMBER < 2700
+ MAP (NUMPAD_PAGEUP, PAD9, PGUP)
+-#endif
+ MAPC (MULTIPLY, PADMULT, '*')
+ MAPC (NUMPAD_MULTIPLY,PADMULT, '*')
+ MAPC (ADD, PADPLUS, '+')
diff --git a/dev-games/crystalspace/metadata.xml b/dev-games/crystalspace/metadata.xml
new file mode 100644
index 000000000000..d51e9062a2e6
--- /dev/null
+++ b/dev-games/crystalspace/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+Crystal Space is a free (LGPL) and portable 3D Game
+Development Kit written in C++. It supports: true six degrees
+of freedom, colored lighting, lightmapped and stencil based
+lighting, shader support, mipmapping, portals, mirrors, alpha
+transparency, reflective surfaces, 3D sprites (frame based or
+with skeletal animation, also using cal3d animation library),
+procedural textures, particle systems, halos, volumetric fog,
+scripting (using Python, Perl, Java, or potentially other
+languages), 16-bit and 32-bit display support, OpenGL, and
+software renderer, font support, hierarchical
+transformations, physics plugin based on ODE, ... See the
+extensive list of features for more details.
+</longdescription>
+ <use>
+ <flag name="3ds">Enables support for .3DS files in CrystalSpace</flag>
+ <flag name="bullet">include support for Bullet library</flag>
+ <flag name="cal3d">include support for skeleton animation</flag>
+ <flag name="cegui">include support for Crazy Eddie GUI</flag>
+ <flag name="cg">NVIDIA toolkit plugin</flag>
+ <flag name="ode">include support for Open Dynamics Engine</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">crystal</remote-id>
+ </upstream>
+</pkgmetadata>