summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2012-04-27 22:14:53 +0200
committerSven Eden <sven.eden@gmx.de>2012-04-27 22:14:53 +0200
commit6cb247d1b70846fa1691143fbb603da44089977e (patch)
tree13cd808486768227fa25f32c06cc2589f9595dee
parentQuick fix for CS-2.0 - Broken epatch line (diff)
downloadseden-6cb247d1b70846fa1691143fbb603da44089977e.tar.gz
seden-6cb247d1b70846fa1691143fbb603da44089977e.tar.bz2
seden-6cb247d1b70846fa1691143fbb603da44089977e.zip
Crystalspace: First set of (finished?) patches for 2.0beta3
-rw-r--r--dev-games/crystalspace/Manifest22
-rw-r--r--dev-games/crystalspace/crystalspace-1.4.0-r2.ebuild135
-rw-r--r--dev-games/crystalspace/crystalspace-2.0_beta3-r4.ebuild (renamed from dev-games/crystalspace/crystalspace-2.0_beta3-r3.ebuild)88
-rw-r--r--dev-games/crystalspace/crystalspace-2.1_pre9999-r1.ebuild174
-rw-r--r--dev-games/crystalspace/files/crystalspace-1.4.0-bullet.patch12
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-add_custom_mode.patch97
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-add_custom_variant.patch14
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-add_usr_lib_to_cs-config.patch78
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-add_var_trimmer.patch56
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-cs-config.patch54
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-data_add_missing.patch59
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-data_sky_add_missing.patch12
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-fix_vfs_template.patch20
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-maps_flarge_add_missing.patch17
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_compiler_funcs.patch52
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_01.patch249
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_02.patch72
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_03.patch40
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_04.patch81
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_05.patch53
-rw-r--r--dev-games/crystalspace/files/crystalspace-2.0-remove_hardcoded_libpath.patch48
21 files changed, 1008 insertions, 425 deletions
diff --git a/dev-games/crystalspace/Manifest b/dev-games/crystalspace/Manifest
index 450a345..cdbde95 100644
--- a/dev-games/crystalspace/Manifest
+++ b/dev-games/crystalspace/Manifest
@@ -1,9 +1,19 @@
-AUX crystalspace-1.4.0-bullet.patch 501 RMD160 8a5c37029c5c1470d1c73b5e0b38df0936e2a85a SHA1 d65deefa25dc49a6e4b7f3d641b9f8ab36565368 SHA256 0dc5ecb64d9a9a07a3da9e89c51080952beb1a4daed40e6b3eccc64ab9e4677f
-AUX crystalspace-2.0-cs-config.patch 1329 RMD160 11b2fdefae6fbd779ffe0b3f1ad3f22e8ff39050 SHA1 496e22220250936c8cede34884a31189e107b3f1 SHA256 48498ff5ae4d1f37e5e766ed4483886e20bf417aef054819ac2f09c604a8a3f4
-DIST crystalspace-src-1.4.0.tar.bz2 45670477 RMD160 af89e74a96bac7f55079a6cdad7fd938a38af602 SHA1 10f4dd50c654ad9292602a91189a0ee78a8fe353 SHA256 a8e1bfc9328470121bfbc6cf98f2c310a34f6998978065aa2f6df7e02a0101ba
+AUX crystalspace-2.0-add_custom_mode.patch 5224 RMD160 a128cea320ce6f622099fdff71256c8405740a09 SHA1 efefdf02eb8e5155f61bb69c29df783d683ffda9 SHA256 ea64ba09c0c53670c847b606ce4649de0c7ee92acb89b7377e05a4f7323c7814
+AUX crystalspace-2.0-add_custom_variant.patch 555 RMD160 a454007293a0ca40a90a5618cd4dbae56120226a SHA1 b13608447f10e4eab51057f21ea0cbcbcc24ea3e SHA256 04d9b216e716ce3a84ad0f78e255b055de2d979defaa3dca44f6c72c428b7434
+AUX crystalspace-2.0-add_usr_lib_to_cs-config.patch 2283 RMD160 0dbb74f07d490ad2cb2419471b265c6d58a41dd8 SHA1 4d6e90875ecc817fcddeb3b777919b58efe709c7 SHA256 766b4965fb2589991af8caf62d121545cd80e5116e1bc7fe8996469bfa1d9c2e
+AUX crystalspace-2.0-add_var_trimmer.patch 2459 RMD160 de6adcc4402a5b7d4de9911d473abc5bc73615ec SHA1 f0064ad4c8bd76b1473cefa1dfca257b6882f78e SHA256 24f6ce73a8678c28ffc78d580b6d7fde7c24e0fbba24d47ad0cf945fea573297
+AUX crystalspace-2.0-data_add_missing.patch 1642 RMD160 5eddbb90b861eeb48494fa9214412850b106f46e SHA1 d45160dacf97397157384d240f657deae075bab5 SHA256 b3f5c4115b55e34e8cd4e973936375914cbebf5fa426b8423da1131b4bd20271
+AUX crystalspace-2.0-data_sky_add_missing.patch 413 RMD160 8ae9916d33eea54377d5cb61b767d9ad420e2164 SHA1 b09a8b3592b1644ac58676cefd4622b31814ec50 SHA256 08cacf066f69378a2b4e53f716218ddcb02f16f5da07966e947b2e3fc23dd6cb
+AUX crystalspace-2.0-fix_vfs_template.patch 967 RMD160 f42979a3c3722056c69fbf54a0e5711a22a41e7a SHA1 c4441fcf3c0a1e0ca317b24b434318f6c4d6e5bd SHA256 25f77a13160fc4a7ccfdde705597c8694144789f094154d0a7c7e78ae3b7573e
+AUX crystalspace-2.0-maps_flarge_add_missing.patch 982 RMD160 fcb2069a2cced6c5dc73bd84590425e1cab56993 SHA1 18044e9a311c65f8d29c65ce0a9ffa885265881a SHA256 7c09f6c6187b66fdc2c055224bd1ef37824046eb04359b13ebefc75639f5f3b0
+AUX crystalspace-2.0-remove_emit_from_compiler_funcs.patch 2201 RMD160 38193c6cb00d3edb1bfdc0b2a6ad99ba571e4339 SHA1 044dfbec050a30abd1b37348eb926ecc7f26e61f SHA256 ac26c26b26d98eb28617ba126fb16780a02931a92807f0a92364425f7e98f7d6
+AUX crystalspace-2.0-remove_emit_from_configure_ac_01.patch 11511 RMD160 a851b0246168b4b8f86f0a2203d96335553cc0c2 SHA1 9ca4950a1b2a53d1556688ef799f4925c3e47799 SHA256 d2f48c2817210cfc221e2eeafab8975047898352040775e119175b6d88ce2f92
+AUX crystalspace-2.0-remove_emit_from_configure_ac_02.patch 3038 RMD160 750871037a9025b21ea1d9de10586c3109c75b3d SHA1 a909e80fe0cbf9591074ebb2f48a150e33fd6bf0 SHA256 a996bf68e6d803fc286a80ce0fb60f3734b2c68d698d0e033b7ea5ada17a0db7
+AUX crystalspace-2.0-remove_emit_from_configure_ac_03.patch 1708 RMD160 5c865bf384895e984ba4a090beb411c30f86f479 SHA1 d495ce13d41e4f241612af9b8043a4123a46e509 SHA256 7e1b8e19c1dd58886d63ac73e87e0500df5bafb13bfab57e2ed20496db3de56a
+AUX crystalspace-2.0-remove_emit_from_configure_ac_04.patch 3620 RMD160 ca6ca27947aae75e20d85dbf8c785ca084b57e2c SHA1 cdec0aebc63ec31e79fcaf4be46310650455af4a SHA256 84e6762c5b0c42751f8c5cf92a5b01cc5a6f0e4a68a5edbffb4bc6180d4820f9
+AUX crystalspace-2.0-remove_emit_from_configure_ac_05.patch 2472 RMD160 b401e51e54e2a544b889af4c45332ff99505f622 SHA1 ba8e61049ddd2204ad05a7b18a5453d696f1ed17 SHA256 400b7f9270da4b321471bebba194a92cfce75fce53c101e79265896b75f73016
+AUX crystalspace-2.0-remove_hardcoded_libpath.patch 2347 RMD160 35a4f5a09315e8ed8cbe632654feceaa9a0e4fe6 SHA1 f7727885903c890c3c5555eb790a6411cb31c387 SHA256 62e3d9d868c188a1b5a9828cb877bf55d031fc0475c268adb62eb96e746368bb
DIST crystalspace-src-2.0beta3.tar.bz2 189457618 RMD160 826686d65651bf2b7e8cbd7a1930d9c6b71d69fe SHA1 1d594a055a39c23da2dd10ab0ba527772ee5faf7 SHA256 e1c97f2937f091c73c4d55276586094544f4ef32d7cc2e0a1999fe2dc3fbd9e9
-EBUILD crystalspace-1.4.0-r2.ebuild 3499 RMD160 aa8e97669720b3b3fe53672d46ff2352116a402b SHA1 3666a937bcf83e8d3cba582f9a661b691f18a6f8 SHA256 4fb1ca5b6921bbf182adfb80336c21e4f83fdd6b7f16dd35f17c9effc856cbbc
-EBUILD crystalspace-2.0_beta3-r3.ebuild 5550 RMD160 c5a0a06974a239146edbe861db056dfdfc0b10f9 SHA1 93dbfa0a6da6dfa5d5f38e0546c4f69c7b44ef05 SHA256 6df6094af0bd9b0dde051b9d3db62921e8adb72e0ef1e8f1ab9bb8850b09cbd4
-EBUILD crystalspace-2.1_pre9999-r1.ebuild 5229 RMD160 cfb27839a6bfa6d55a730c33399a351b1affbd36 SHA1 5aa4777dfc27c71f563eb7247cf18dee4ac2236f SHA256 5bf8eb98c99466f0cb8a5f6cf444116840f4b2b839c190284c2caaa15010d43c
+EBUILD crystalspace-2.0_beta3-r4.ebuild 5892 RMD160 472ab8b7f380c5f98427ba17e752c0818206fc14 SHA1 49a77f8e75664c07f369f2f08f01da7e25febb92 SHA256 e924816cb2452becbd9d43b8f28ff0e4b828b2ab9978ce5ef66e7b4e4e5a9870
MISC ChangeLog 1820 RMD160 ba4c2380e1a1e63ab6594c0e6383a121b2d4789e SHA1 e3ca13ff06be86365970323ed4f99fac7e74c153 SHA256 defdf631218213f8bd2558423592793a1a14436f9f4ba4279e4a31f0df4d8213
MISC metadata.xml 897 RMD160 59e6eddca113690915fb17277d4ed3125f7599f2 SHA1 5e114681013e6ede57ecc30814b40e91948ce3d8 SHA256 82b3c21f6c5fb6b66310dc663f6bdd3ad3ca2b0e1d70ee056ce48eb92ef747ed
diff --git a/dev-games/crystalspace/crystalspace-1.4.0-r2.ebuild b/dev-games/crystalspace/crystalspace-1.4.0-r2.ebuild
deleted file mode 100644
index fea439e..0000000
--- a/dev-games/crystalspace/crystalspace-1.4.0-r2.ebuild
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=2
-inherit eutils flag-o-matic multilib java-pkg-opt-2 autotools wxwidgets versionator
-
-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"
-KEYWORDS="~amd64 ~x86"
-IUSE="3ds alsa bullet cal3d cegui cg doc java jpeg mng ode png sdl speex truetype vorbis wxwidgets"
-
-SLOT="0"
-
-COMMON_DEP="virtual/opengl
- media-libs/openal
- x11-libs/libXt
- x11-libs/libXxf86vm
- cg? ( media-gfx/nvidia-cg-toolkit )
- ode? ( dev-games/ode )
- cal3d? ( >=media-libs/cal3d-0.11 )
- jpeg? ( media-libs/jpeg )
- bullet? ( sci-physics/bullet )
- sdl? ( media-libs/libsdl )
- 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 )
- wxwidgets? ( x11-libs/wxGTK:2.8[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
- dev-util/pkgconfig"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- # Installing doc conflict with dodoc on src_install
- # Removing conflicting target
- sed -i \
- -e "/^InstallDoc/d" \
- Jamfile.in \
- docs/Jamfile \
- || die "sed failed"
- epatch "${FILESDIR}"/${P}-bullet.patch
- AT_M4DIR=mk/autoconf
- eautoreconf
-}
-
-src_configure() {
- if use wxwidgets; then
- WX_GTK_VER="2.8"
- need-wxwidgets gtk2
- fi
-
- econf --enable-cpu-specific-optimizations=no \
- --disable-separate-debug-info \
- --without-lcms \
- --without-caca \
- --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 sdl) \
- $(use_with wxwidgets wx) \
- $(use_with wxwidgets GTK) \
- $(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 "sed failed"
-}
-
-src_compile() {
- local jamopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")
- jam -q ${jamopts} || die "compile failed"
-}
-
-src_install() {
- for installTarget in bin plugin lib include data config bindings
- do
- jam -q -s DESTDIR="${D}" install_${installTarget} \
- || die "jam install_${installTarget} failed"
- done
- if use doc; then
- jam -q -s DESTDIR="${D}" install_doc || die "jam install_doc failed"
- 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/crystalspace-2.0_beta3-r3.ebuild b/dev-games/crystalspace/crystalspace-2.0_beta3-r4.ebuild
index 2fc537b..c761838 100644
--- a/dev-games/crystalspace/crystalspace-2.0_beta3-r3.ebuild
+++ b/dev-games/crystalspace/crystalspace-2.0_beta3-r4.ebuild
@@ -17,8 +17,8 @@ RESTRICT="mirror"
LICENSE="LGPL-2.1"
KEYWORDS="~amd64 ~x86"
-IUSE="3ds alsa bullet cal3d cegui cg debug doc java jpeg lcms +march-native mng ode \
- +optimize perl png profile +python static-plugins speex truetype vorbis wxwidgets +X"
+IUSE="3ds alsa bullet cal3d cegui cg debug doc java jpeg lcms mng ode \
+ perl png +python static-plugins speex truetype vorbis wxwidgets +X"
SLOT="0"
@@ -55,6 +55,45 @@ DEPEND="${COMMON_DEP}
S=${WORKDIR}/${PN}-src-${MY_PV}${MY_BETA}
src_prepare() {
+ # configure.ac forces /usr/local/lib (and /usr/local/include if present) upon
+ # users, which is a bad thing to do. Patch in a check to not do this if the
+ # --prefix, --libdir and/or --includedir options lead to default paths.
+ epatch "${FILESDIR}"/${MY_P}-remove_hardcoded_libpath.patch
+
+ # The maintainers enforce a mode of optimize, profile or debug upon users,
+ # enabling all sorts of C[XX]/LDFLAGS which might clash horribly with make.conf.
+ # Solution: Path a new mode "custom" in which is activated unless a user sets
+ # the use flag "debug"
+ epatch "${FILESDIR}"/${MY_P}-add_custom_mode.patch
+ epatch "${FILESDIR}"/${MY_P}-add_custom_variant.patch
+
+ # Before the new custom mode can be put into action, two additional changes are
+ # needed:
+ # A) Add two functions to add only content to shell variables that is not present
+ # yet (used on all tries to modify C[XX]/LFLAGS.*), and
+ # B) Change configure.ac to NOT dump Jam vars until everything is set.
+ # C) Change m4 functions to not dump Jam vars we save and use elsewhere.
+ # A:
+ epatch "${FILESDIR}"/${MY_P}-add_var_trimmer.patch
+ # B:
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_configure_ac_01.patch
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_configure_ac_02.patch
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_configure_ac_03.patch
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_configure_ac_04.patch
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_configure_ac_05.patch
+ # C:
+ epatch "${FILESDIR}"/${MY_P}-remove_emit_from_compiler_funcs.patch
+
+ # data/[*/]Jamfile seem to miss some entries - not updated, yet?
+ epatch "${FILESDIR}"/${MY_P}-data_add_missing.patch
+ epatch "${FILESDIR}"/${MY_P}-data_sky_add_missing.patch
+ epatch "${FILESDIR}"/${MY_P}-maps_flarge_add_missing.patch
+
+ # vfs.cfg lists an old zip, that doesn't seem to exist any more
+ epatch "${FILESDIR}"/${MY_P}-fix_vfs_template.patch
+
+ # cs-config doesn't look into /usr/lib[32|64], yet, so patch it in:
+ epatch "${FILESDIR}"/${MY_P}-add_usr_lib_to_cs-config.patch
# Installing doc conflict with dodoc on src_install
# Removing conflicting target
@@ -76,44 +115,11 @@ src_configure() {
need-wxwidgets gtk2
fi
- # As flags are managed by debug, optimize and profile USE flags,
- # they need to be removed first. If we do not do this, the calling
- # lines grow so large, that jam segfaults.
- CFLAGS=""
- CXXFLAGS=""
- LDFLAGS=""
- # This is quite contrary to the "gentoo way", but the configuration
- # script runs in exactly one mode, optimize (default), profile or
- # debug. All of these enable different CFLAGS and LDFLAGS. And to
- # make this even more complicated, configure knows a bunch of arguments
- # for a lot of LDFLAGS, too. I have not found a way to disable them
- # all, ending up with a lot of redundant or even negating flag
- # arrangements.
-
# debug profile and optimize are mutually exclusive
if use debug ; then
- myconf="--enable-debug --disable-optimize --disable-profile"
- if use optimize ; then
- ewarn "debug version chosen, optimize USE flag ignored."
- fi
- if use profile ; then
- ewarn "debug version chosen, profile USE flag ignored."
- fi
- elif use profile ; then
- myconf="--disable-debug --disable-optimize --enable-profile"
- if use optimize ; then
- ewarn "profile version chosen, optimize USE flag ignored."
- fi
- elif use optimize ; then
- myconf="--disable-debug --enable-optimize --disable-profile"
+ myconf="--enable-debug"
else
- # optimize is the default anyway
- myconf="--disable-debug --enable-optimize --disable-profile"
- fi
-
- # add -march=native configure flag if wanted
- if use march-native ; then
- myconf="${myconf} --enable-cpu-specific-optimizations=native"
+ myconf="--enable-custom"
fi
myconf="${myconf} --without-jackasyn \
@@ -139,9 +145,6 @@ src_compile() {
jam -q ${jamopts} staticplugins \
|| die "staticplugins compile failed (jam -q ${jamopts})"
fi
-
- # No cs-config-2.0 script is ready, but contains some defects that are to be patched away:
- epatch "${FILESDIR}"/${MY_P}-cs-config.patch
}
src_install() {
@@ -169,12 +172,9 @@ src_install() {
dodoc README docs/history*
PF=${oldPF}
+ echo "CRYSTAL=/usr/share/${MY_P}" >> 90crystalspace
echo "CRYSTAL_PLUGIN=/usr/$(get_libdir)/${MY_P}" > 90crystalspace
echo "CRYSTAL_CONFIG=/etc/${MY_P}" >> 90crystalspace
- # "CRYSTAL" seems to be an env var that is now important, although it
- # existed already in CS-1.4 and was never actually needed for CS to
- # work properly
- echo "CRYSTAL=/usr/share/${MY_P}" >> 90crystalspace
doenvd 90crystalspace
# Applications that do not read CRYSTAL_CONFIG need vfs.cfg in $CRYSTAL:
diff --git a/dev-games/crystalspace/crystalspace-2.1_pre9999-r1.ebuild b/dev-games/crystalspace/crystalspace-2.1_pre9999-r1.ebuild
deleted file mode 100644
index a5c5ed1..0000000
--- a/dev-games/crystalspace/crystalspace-2.1_pre9999-r1.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=2
-
-inherit autotools eutils flag-o-matic multilib java-pkg-opt-2 subversion wxwidgets versionator
-
-MY_PV=$(get_version_component_range 1-2)
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Portable 3D Game Development Kit written in C++"
-HOMEPAGE="http://www.crystalspace3d.org/"
-ESVN_REPO_URI="https://crystal.svn.sourceforge.net/svnroot/crystal/CS/trunk"
-
-LICENSE="LGPL-2.1"
-KEYWORDS="~amd64 ~x86"
-IUSE="3ds alsa bullet cal3d cegui cg debug doc java jpeg mng ode +optimize \
- png profile python static-plugins speex truetype vorbis wxwidgets"
-
-SLOT="0"
-
-COMMON_DEP="virtual/opengl
- media-libs/openal
- x11-libs/libXt
- x11-libs/libXxf86vm
- cg? ( media-gfx/nvidia-cg-toolkit )
- ode? ( dev-games/ode )
- cal3d? ( >=media-libs/cal3d-0.11 )
- jpeg? ( media-libs/jpeg )
- 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 )
- wxwidgets? ( x11-libs/wxGTK:2.8[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-lang/swig
- dev-util/pkgconfig
- dev-util/ftjam"
-
-S=${WORKDIR}/${MY_P}
-
-
-src_prepare() {
- # As flags are managed by debug, optimize and profile USE flags,
- # they need to be stripped first. If we do not do this, the calling
- # lines grow so large, that jam segfaults.
- strip-flags
-
- # Installing doc conflict with dodoc on src_install
- # Removing conflicting target
- sed -i \
- -e "/^InstallDoc/d" \
- Jamfile.in \
- docs/Jamfile \
- || die "sed failed"
-
- AT_M4DIR=mk/autoconf
- eautoreconf
-}
-
-src_configure() {
- local myconf
-
- if use wxwidgets ; then
- WX_GTK_VER="2.8"
- need-wxwidgets gtk2
- fi
-
- # debug profile and optimize are mutually exclusive
- if use debug ; then
- myconf="--enable-debug --disable-optimize --disable-profile"
- if use optimize ; then
- ewarn "debug version chosen, optimize USE flag ignored."
- fi
- if use profile ; then
- ewarn "debug version chosen, profile USE flag ignored."
- fi
- elif use profile ; then
- myconf="--disable-debug --disable-optimize --enable-profile"
- if use optimize ; then
- ewarn "profile version chosen, optimize USE flag ignored."
- fi
- elif use optimize ; then
- myconf="--disable-debug --enable-optimize --disable-profile"
- else
- # optimize is the default anyway
- myconf="--disable-debug --enable-optimize --disable-profile"
- ewarn "optimize is the CS default and thus chosen."
- fi
-
- myconf="${myconf} --without-lcms --without-jackasyn \
- --with-x --with-mesa --disable-make-emulation --without-perl \
- --with-python --disable-separate-debug-info \
- --disable-optimize-mode-debug-info \
- $(use_with truetype freetype2) \
- $(use_with wxwidgets wx) \
- $(use_with wxwidgets GTK) \
- $(use_with cegui CEGUI) \
- $(use_with cg Cg) \
- $(use_with alsa asound) "
- for myuse in java bullet png jpeg mng vorbis speex 3ds ode cal3d; do
- myconf="${myconf} $(use_with ${myuse})"
- done
- econf ${myconf} || die "configure failed."
-}
-
-src_compile() {
- local jamopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")
- jam -q ${jamopts} || die "compile failed (jam -q ${jamopts})"
-
- if use static-plugins; then
- jam -q ${jamopts} staticplugins \
- || die "staticplugins compile failed (jam -q ${jamopts})"
- fi
-}
-
-src_install() {
- for installTarget in bin bindings config data include lib plugin
- do
- jam -q -s DESTDIR="${D}" install_${installTarget} \
- || die "jam install_${installTarget} failed"
- done
- if use static-plugins; then
- jam -q -s DESTDIR="${D}" install_staticplugins \
- || die "jam install_staticplugins failed"
- fi
- if use doc; then
- jam -q -s DESTDIR="${D}" install_doc || die "jam install_doc failed"
- fi
-
- # As the target install_doc uses crystalspace-${MY_PV} as target, but dodoc
- # uses ${PF}, this said var has to be manipulated first.
- local oldPF=${PF}
- PF=${MY_P}
- dodoc README docs/history*
- PF=${oldPF}
-
- echo "CRYSTAL_PLUGIN=/usr/$(get_libdir)/${MY_P}" > 90crystalspace
- echo "CRYSTAL_CONFIG=/etc/${MY_P}" >> 90crystalspace
- # "CRYSTAL" seems to be an env var that is now important, althoug it
- # existed already in CS-1.4 and was never actually needed for CS to
- # work properly
- echo "CRYSTAL=/usr/share/${MY_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
- # Update in 2.1-r1: Let's give users a "ready to use" loop instead
- # single commands:
- elog "--- cut and paste ---"
- echo "for map in castle isomap parallaxtest r3dtest stenciltest terrain terrainf ; do"
- # new in 2.1: Thanks to the CRYSTAL env var, the path to the maps does
- # not need to be given. As a matter of fact it is important to *not*
- # use the map name with a full path.
- echo " lighter2 --simpletui \$map"
- echo "done"
- elog "--- cut and paste ---"
-}
diff --git a/dev-games/crystalspace/files/crystalspace-1.4.0-bullet.patch b/dev-games/crystalspace/files/crystalspace-1.4.0-bullet.patch
deleted file mode 100644
index 2fd0f20..0000000
--- a/dev-games/crystalspace/files/crystalspace-1.4.0-bullet.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- configure.ac.old 2010-06-19 21:50:21.000000000 +0200
-+++ configure.ac 2010-06-19 22:00:50.000000000 +0200
-@@ -1318,8 +1318,7 @@
- btDefaultCollisionConfiguration* c;
- btDynamicsWorld* world = new btDiscreteDynamicsWorld (d, b, s, c)])],
- [], [C++], [], [],
-- [], [], [-lbulletdynamics -lbulletcollision -lbulletmath],
-- [bulletdynamics])
-+ [])
-
- AS_IF([test $cs_cv_libbullet = yes],
- [CS_CHECK_BUILD([if bullet is sufficiently recent (>=2.68)], [cs_cv_bullet_recent],
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-add_custom_mode.patch b/dev-games/crystalspace/files/crystalspace-2.0-add_custom_mode.patch
new file mode 100644
index 0000000..921ca63
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-add_custom_mode.patch
@@ -0,0 +1,97 @@
+--- configure.ac 2012-04-26 07:05:20.069141755 +0200
++++ configure.ac 2012-04-26 07:17:10.785820884 +0200
+@@ -647,15 +647,15 @@
+ AC_MSG_CHECKING([whether to use CPU-specific optimizations])
+ AC_ARG_ENABLE([cpu-specific-optimizations],
+ [AC_HELP_STRING([--enable-cpu-specific-optimizations=level],
+- [enable CPU-specific optimizations; recognized levels are `no',
+- `minimum' or `min', `maximum' or `max', `native' (default MINIMUM);
+- the `minimum' option selects optimizations which are likely to be
+- supported by reasonably modern hardware, thus making the resulting
+- executables fairly portable; use the `maximum' option with caution
+- since code for one processor will not work with earlier processors
+- (for example, Intel 686-specific code will not work with a 586). The
+- `native' option select optimizations specific for the compiling machine
+- (thus giving a fairly unportable executable).])],
++ [enable CPU-specific optimizations; this option is ignored in `custom'
++ build mode. Recognized levels are `no', `minimum' or `min', `maximum'
++ or `max', `native' (default MINIMUM); the `minimum' option selects
++ optimizations which are likely to be supported by reasonably modern
++ hardware, thus making the resulting executables fairly portable; use
++ the `maximum' option with caution since code for one processor will not
++ work with earlier processors (for example, Intel 686-specific code will
++ not work with a 586). The `native' option select optimizations specific
++ for the compiling machine (thus giving a fairly unportable executable).])],
+ [case $enable_cpu_specific_optimizations in
+ yes|min) enable_cpu_specific_optimizations=minimum ;;
+ max) enable_cpu_specific_optimizations=maximum ;;
+@@ -668,8 +668,7 @@
+ *) CS_MSG_ERROR([unrecognized option; use `no', `minimum', `maximum' or `native'])
+ ;;
+ esac
+-
+-AS_IF([test $enable_cpu_specific_optimizations != no],
++AS_IF([test $enable_cpu_specific_optimizations != no -a "$cs_build_mode$" = !"custom"],
+ [AC_CACHE_CHECK([for code generation flags], [cs_cv_prog_cxx_code_gen],
+ [cs_cv_prog_cxx_code_gen=no
+ AS_IF([test $enable_cpu_specific_optimizations = native],
+@@ -779,6 +778,14 @@
+ #------------------------------------------------------------------------------
+ # Determine build mode; either "optimize", "debug", or "profile".
+ #------------------------------------------------------------------------------
++# Update, 2012-04-24, Sven Eden:
++# On source based distributions like Gentoo Linux, CFLAGS, CXXFLAGS and LDFLAGS
++# are handled globally. Extending them with presets is a bad idea, as those
++# flags can become very lengthy, eventually crashing Jam.
++# Solution: Add a "custom" mode, that only sets what is absolutely necessary
++# and thus relies on user input. "optimize", however, should stay being the
++# default.
++#------------------------------------------------------------------------------
+ AC_ARG_ENABLE([optimize], [AC_HELP_STRING([--enable-optimize],
+ [build with optimizations enabled (default YES);
+ same as --enable-mode=optimize])],
+@@ -794,14 +801,19 @@
+ same as --enable-mode=profile])],
+ [test "$enableval" = "yes" && cs_build_mode=profile])
+
++AC_ARG_ENABLE([custom], [AC_HELP_STRING([--enable-custom],
++ [build without special C[XX]FLAGS (default NO);
++ same as --enable-mode=custom])],
++ [test "$enableval" = "yes" && cs_build_mode=custom])
++
+ AC_ARG_ENABLE([mode], [AC_HELP_STRING([--enable-mode=mode],
+- [set build mode; recognized modes are `optimize', `debug', `profile'
++ [set build mode; recognized modes are `optimize', `debug', `profile', `custom'
+ (default OPTIMIZE)])],
+ [case $enableval in
+- optimize|debug|profile) cs_build_mode=$enableval ;;
++ optimize|debug|profile|custom) cs_build_mode=$enableval ;;
+ *) CS_MSG_ERROR([m4_text_wrap(
+ [unrecognized mode --enable-mode=$enableval;
+- use `optimize', `debug', or `profile'], [ ], [[]], [60])]) ;;
++ use `optimize', `debug', `profile' or `custom'], [ ], [[]], [60])]) ;;
+ esac])
+
+ AC_MSG_CHECKING([build mode])
+@@ -820,10 +832,10 @@
+ AC_ARG_ENABLE([separate-debug-info],
+ [AC_HELP_STRING([--enable-separate-debug-info],
+ [split debug information into separate files. (default YES if
+- binutils >= 2.17 and build mode not 'profile',
++ binutils >= 2.17 and build mode not 'profile' or 'custom',
+ otherwise default NO)])])
+ AS_IF([test -z "$enable_separate_debug_info"],
+- [AS_IF([test "$cs_build_mode$" = "profile"],
++ [AS_IF([test "$cs_build_mode$" = "profile" -o "$cs_build_mode$" = "custom"],
+ [enable_separate_debug_info=no],
+ [AS_IF([test -z `uname | grep -i CYGWIN`],
+ [enable_separate_debug_info=$cs_cv_binutils_2_17],
+@@ -850,7 +862,7 @@
+ AS_IF([test -z "$enable_optimize_mode_debug_info"],
+ [enable_optimize_mode_debug_info=$enable_separate_debug_info])
+ AC_MSG_RESULT([$enable_optimize_mode_debug_info])
+-AS_IF([test "$enable_optimize_mode_debug_info" != "no"],
++AS_IF([test "$enable_optimize_mode_debug_info" != "no" -a "$cs_build_mode$" != "custom"],
+ [CS_EMIT_BUILD_FLAGS([how to enable optimize mode debugging symbols],
+ [cs_cv_prog_cxx_debug_symbols_normal],
+ [CS_CREATE_TUPLE([-g2]) CS_CREATE_TUPLE([-g])],
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-add_custom_variant.patch b/dev-games/crystalspace/files/crystalspace-2.0-add_custom_variant.patch
new file mode 100644
index 0000000..9d83e22
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-add_custom_variant.patch
@@ -0,0 +1,14 @@
+--- mk/jam/variant.jam 2012-04-27 20:49:21.256202254 +0200
++++ mk/jam/variant.jam 2012-04-27 20:50:56.272873856 +0200
+@@ -23,9 +23,9 @@
+ VARIANT = $(MODE) ;
+ }
+
+-if $(VARIANT) != "debug" && $(VARIANT) != "optimize" && $(VARIANT) != "profile"
++if $(VARIANT) != "debug" && $(VARIANT) != "optimize" && $(VARIANT) != "profile" && $(VARIANT) != "custom"
+ {
+- exit "Invalid modus set, please set VARIANT to debug, profile or optimize" ;
++ exit "Invalid modus set, please set VARIANT to debug, profile, optimize or custom" ;
+ }
+
+ # Set modus related flags
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-add_usr_lib_to_cs-config.patch b/dev-games/crystalspace/files/crystalspace-2.0-add_usr_lib_to_cs-config.patch
new file mode 100644
index 0000000..af7e7f5
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-add_usr_lib_to_cs-config.patch
@@ -0,0 +1,78 @@
+--- ./scripts/cs-config/cs-config.temppost 2012-04-24 06:53:26.269812856 +0200
++++ ./scripts/cs-config/cs-config.temppost 2012-04-24 07:02:39.263175118 +0200
+@@ -4,36 +4,46 @@
+ lflags=""
+
+ for libname in lib${libcrystalspace}.so \
+- lib${libcrystalspace}.dylib \
+- lib${libcrystalspace}.a \
+- ; do
+- if test -r "$prefix/Jamfile" && \
+- test -r "$prefix/$makeout/libs/$libname"; then
+- libdir="$prefix/$makeout/libs"
+- lflags="-L$libdir"
+- elif test -z "$libdir" && test -r "${exec_prefix}/lib/$libname"; then
+- libdir="${exec_prefix}/lib"
+- lflags="-L${exec_prefix}/lib"
+- else
+- my_IFS=$IFS; IFS=$PATH_SEPARATOR
+- for p in $_CRYSTAL_ACTUAL
+- do
+- if test -r "$p/Jamfile" && \
+- test -r "$p/$makeout/libs/$libname"; then
+- libdir="$p/$makeout/libs"
+- lflags="-L$libdir"
+- break
+- elif test -z "$libdir" && test -r "${p}/lib/$libname"; then
+- libdir="${p}/lib"
+- lflags="-L$libdir"
+- break
+- fi
+- done
+- IFS=$my_IFS
+- fi
+- if test -n "$lflags" ; then
++ lib${libcrystalspace}.dylib \
++ lib${libcrystalspace}.a \
++ ; do
++ if test -r "$prefix/Jamfile" && \
++ test -r "$prefix/$makeout/libs/$libname"; then
++ libdir="$prefix/$makeout/libs"
++ lflags="-L$libdir"
++ elif test -z "$libdir" && \
++ test -r "${exec_prefix}/lib/$libname"; then
++ libdir="${exec_prefix}/lib"
++ lflags="-L${exec_prefix}/lib"
++ # Test default locations for cases where CS is installed using a package manager
++ elif test -z "$libdir"; then
++ for p in lib lib64 lib32 ; do
++ if test -r "/usr/${p}/$libname"; then
++ libdir="/usr/${p}"
++ lflags="-L$libdir"
+ break
+- fi
++ fi
++ done
++ else
++ my_IFS=$IFS; IFS=$PATH_SEPARATOR
++ for p in $_CRYSTAL_ACTUAL ; do
++ if test -r "$p/Jamfile" && \
++ test -r "$p/$makeout/libs/$libname"; then
++ libdir="$p/$makeout/libs"
++ lflags="-L$libdir"
++ break
++ elif test -z "$libdir" && \
++ test -r "${p}/lib/$libname"; then
++ libdir="${p}/lib"
++ lflags="-L$libdir"
++ break
++ fi
++ done
++ IFS=$my_IFS
++ fi
++ if test -n "$lflags" ; then
++ break
++ fi
+ done
+
+ # Look for build tools such as relaytool
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-add_var_trimmer.patch b/dev-games/crystalspace/files/crystalspace-2.0-add_var_trimmer.patch
new file mode 100644
index 0000000..5702ae6
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-add_var_trimmer.patch
@@ -0,0 +1,56 @@
+--- mk/autoconf/trim.m4 2012-04-26 07:21:42.859168666 +0200
++++ mk/autoconf/trim.m4 2012-04-26 07:39:40.795891383 +0200
+@@ -25,3 +25,53 @@
+ # runs of multiple spaces to a single space.
+ #------------------------------------------------------------------------------
+ AC_DEFUN([CS_TRIM], [`echo x$1 | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'`])
++
++#------------------------------------------------------------------------------
++# CS_TRIM_OPT(shell var)
++# Remove leading dashes
++#------------------------------------------------------------------------------
++AC_DEFUN([CS_TRIM_OPT], [`echo x$1 | sed 's/^x//;s/^-*//g'`])
++
++#------------------------------------------------------------------------------
++# CS_APPEND_TRIMMED(named shell var, STRING)
++# Go through all entries in STRING and append those that are not present in the
++# given named shell variable.
++#------------------------------------------------------------------------------
++AC_DEFUN([CS_APPEND_TRIMMED],
++ [AS_IF([test -n "$2"],
++ [append_text="$$1"
++ append_values="CS_TRIM([$2])"
++ for value in $append_values ; do
++ append_found=''
++ AS_IF([test -n "$append_text"],
++ [chkVal="CS_TRIM_OPT([$value])"
++ append_found="`echo -n "$append_text" | grep -o "$chkVal"`"])
++ AS_IF([test -z "$append_found"],
++ [$1="${$1} ${value}"
++ append_text="$$1"])
++ done])])
++
++#------------------------------------------------------------------------------
++# CS_PREPEND_TRIMMED(named shell var, STRING)
++# Go through all entries in STRING and prepend those that are not present in
++# the given named shell variable.
++#------------------------------------------------------------------------------
++AC_DEFUN([CS_PREPEND_TRIMMED],
++ [AS_IF([test -n "$2"],
++ [prepend_text="$$1"
++ prepend_values="CS_TRIM([$2])"
++ for value in $prepend_values ; do
++ prepend_found=''
++ AS_IF([test -n "$prepend_text"],
++ [chkVal="CS_TRIM_OPT([$value])"
++ prepend_found="`echo -n "$prepend_text" | grep -o "$chkVal"`"])
++ AS_IF([test -z "$prepend_found"],
++ [$1="${value} ${$1}"
++ prepend_text="$$1"])
++ done])])
++
++#------------------------------------------------------------------------------
++# CS_ERASE_VAR(named shell var)
++# Simply set the named shell var to an empty string
++#------------------------------------------------------------------------------
++AC_DEFUN([CS_ERASE_VAR], [AS_IF([test -n "$1"], [$1=''])])
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-cs-config.patch b/dev-games/crystalspace/files/crystalspace-2.0-cs-config.patch
deleted file mode 100644
index 060eaa7..0000000
--- a/dev-games/crystalspace/files/crystalspace-2.0-cs-config.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- cs-config-2.0 2012-04-20 15:46:07.652756874 +0200
-+++ cs-config-2.0 2012-04-20 16:00:40.872802423 +0200
-@@ -91,7 +91,7 @@
- then
- includedir="/usr/include/crystalspace-2.0"
- fi
--syslibs=" -lc -lm -ldl -lnsl -L/usr/local/lib "
-+syslibs=" -lc -lm -ldl -lnsl "
- common_cflags=" "
- common_cxxflags=" "
- staticdeps="crystalspace_staticplugins.jam"
-@@ -106,7 +106,7 @@
- EXE=
- DLL=.so
- LIBS.EXE.PLATFORM=-ldl -lm -lnsl
--LFLAGS.GENERAL=$(LFLAGS.L)/usr/local/lib -lpthread
-+LFLAGS.GENERAL=$(LFLAGS.L)/usr/lib -lpthread
- LFLAGS.DLL=-shared -Wl,-soname -Wl,$@
-
- __EOF__
-@@ -156,14 +156,12 @@
- esac
- }
-
--liblist=" crystalspace crystalspace_opengl
--"
--liblist_opt=" crystalspace_staticplugins
--"
-+liblist=" crystalspace crystalspace_opengl"
-+liblist_opt=" crystalspace_staticplugins"
-
- libcrystalspace=crystalspace-2.0
-- libcrystalspace_opengl=crystalspace_opengl-2.0
-- libcrystalspace_staticplugins=crystalspace_staticplugins-2.0
-+libcrystalspace_opengl=crystalspace_opengl-2.0
-+libcrystalspace_staticplugins=crystalspace_staticplugins-2.0
-
-
-
-@@ -223,6 +221,14 @@
- fi
- done
-
-+# Patch: On Gentoo they are always there:
-+if test "x$lflags" = "x"
-+then
-+ libdir="/usr/lib"
-+ lflags="-L$libdir"
-+fi
-+
-+
- # Look for build tools such as relaytool
- tools_sentinel=relaytool
- if test -x "$prefix/bin/$tools_sentinel" ; then
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-data_add_missing.patch b/dev-games/crystalspace/files/crystalspace-2.0-data_add_missing.patch
new file mode 100644
index 0000000..88422fe
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-data_add_missing.patch
@@ -0,0 +1,59 @@
+--- data/Jamfile 2012-04-23 17:12:32.953141311 +0200
++++ data/Jamfile 2012-04-23 17:33:29.893158458 +0200
+@@ -24,25 +24,38 @@
+ FileListEntriesData $(RUNTIME_DATA) : : data-runtime ;
+
+ maps =
++ bias
++ colladatest
++ island
+ isomap
++ lodtest
++ oceantest
+ parallaxtest
+- particles
+ partsys
++ projectortest
++ r3dsmtest
+ r3dtest
++ space
+ stenciltest
+ terrain
+- terrainf ;
++ terraina
++ terrainf
++ terraini ;
+ for map in $(maps)
+ {
+ local files =
+- [ Wildcard $(map) : *.lib *.jpg *.png *.map *.tga *.dds *.spr world ] ;
++ [ Wildcard $(map) : *.cslib *.lib *.jpg *.png *.map *.tga *.dds *.spr *.zip world ] ;
+ local lmfiles =
+ [ Wildcard $(map) lightmaps : *.png ] ;
++ local mffiles =
++ [ Wildcard $(map) factories : *.cslib *.meshfact ] ;
+ InstallData $(files) : data maps $(map) ;
+ InstallData $(lmfiles) : data maps $(map) lightmaps ;
++ InstallData $(mffiles) : data maps $(map) factories ;
+
+ FileListEntriesData $(files) : $(map) : data-demo-maps ;
+ FileListEntriesData $(lmfiles) : $(map) lightmaps : data-demo-maps ;
++ FileListEntriesData $(mffiles) : $(map) factories : data-demo-maps ;
+ }
+
+ SubInclude TOP data castle ;
+@@ -55,12 +68,13 @@
+ SubInclude TOP data flarge ;
+ SubInclude TOP data frankie ;
+ SubInclude TOP data hairtest ;
+-SubInclude TOP data sky ;
+ SubInclude TOP data krystal ;
+ SubInclude TOP data posteffects ;
+ SubInclude TOP data renderlayers ;
+ SubInclude TOP data shader ;
+ SubInclude TOP data shader-old ;
+ SubInclude TOP data shader-snippets ;
++SubInclude TOP data sky ;
++SubInclude TOP data smoketest ;
+ SubInclude TOP data varia ;
+ SubInclude TOP data viewmesh ;
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-data_sky_add_missing.patch b/dev-games/crystalspace/files/crystalspace-2.0-data_sky_add_missing.patch
new file mode 100644
index 0000000..ab63790
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-data_sky_add_missing.patch
@@ -0,0 +1,12 @@
+--- data/sky/Jamfile 2012-04-23 21:22:04.833271060 +0200
++++ data/sky/Jamfile 2012-04-23 21:23:55.199944160 +0200
+@@ -1,4 +1,7 @@
+ SubDir TOP data sky ;
+
+-InstallData [ Wildcard *.layout *.xml ] : data sky ;
+-FileListEntriesData [ Wildcard *.layout *.xml ] : sky : data-demo ;
++{
++local files = library [ Wildcard *.png ] ;
++InstallData $(files) : data sky ;
++FileListEntriesData $(files) : sky : data-demo ;
++}
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-fix_vfs_template.patch b/dev-games/crystalspace/files/crystalspace-2.0-fix_vfs_template.patch
new file mode 100644
index 0000000..f4ee8e1
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-fix_vfs_template.patch
@@ -0,0 +1,20 @@
+--- plugins/filesys/vfs/vfs.cfg.template 2012-01-14 04:39:58.000000000 +0100
++++ plugins/filesys/vfs/vfs.cfg.template 2012-04-23 21:29:26.793294787 +0200
+@@ -42,7 +42,7 @@
+ VFS.Mount.lev/projectortest = $(CS_MAPDIR)$/projectortest$/
+ VFS.Mount.lev/parallaxtest = $(CS_MAPDIR)$/parallaxtest$/
+ VFS.Mount.lev/stenciltest = $(CS_MAPDIR)$/stenciltest$/
+-VFS.Mount.lev/isomap = $(CS_MAPDIR)$/isomap.zip, $(CS_MAPDIR)$/isomap$/
++VFS.Mount.lev/isomap = $(CS_MAPDIR)$/isomap$/
+ VFS.Mount.lev/partsys = $(CS_MAPDIR)$/partsys$/
+ VFS.Mount.lev/space = $(CS_MAPDIR)$/space$/space.zip
+ VFS.Mount.lev/terrain = $(CS_MAPDIR)$/terrain$/
+@@ -71,7 +71,7 @@
+ VFS.Mount.lib/sintel = $(CS_DATADIR)$/sintel$/
+ VFS.Mount.lib/startme = $(CS_DATADIR)$/startme.zip
+ VFS.Mount.lib/hairtest = $(CS_DATADIR)$/hairtest$/
+-VFS.Mount.lib/sky = $(CS_MAPDIR)$/sky$/
++VFS.Mount.lib/sky = $(CS_DATADIR)$/sky$/
+
+ ; General CEGUI data
+ VFS.Mount.cegui = $(CS_DATADIR)$/cegui$/
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-maps_flarge_add_missing.patch b/dev-games/crystalspace/files/crystalspace-2.0-maps_flarge_add_missing.patch
new file mode 100644
index 0000000..68dda4b
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-maps_flarge_add_missing.patch
@@ -0,0 +1,17 @@
+--- data/flarge/Jamfile 2012-04-23 17:38:46.486508351 +0200
++++ data/flarge/Jamfile 2012-04-23 17:38:46.489841685 +0200
+@@ -1,10 +1,9 @@
+ SubDir TOP data flarge ;
+
+-InstallData world [ Wildcard *.png *.dds ] : data maps flarge ;
+-InstallData [ Wildcard factories : thing* ] : data maps flarge factories ;
++InstallData world [ Wildcard *.png *.dds *.cslib ] : data maps flarge ;
++InstallData [ Wildcard factories : *.meshfact ] : data maps flarge factories ;
+ InstallData [ Wildcard lightmaps : *.png ] : data maps flarge lightmaps ;
+
+-FileListEntriesData world [ Wildcard *.png *.dds ] : flarge : data-demo-maps ;
+-FileListEntriesData [ Wildcard factories : thing* ] : flarge factories : data-demo-maps ;
++FileListEntriesData world [ Wildcard *.png *.dds *.cslib ] : flarge : data-demo-maps ;
++FileListEntriesData [ Wildcard factories : *.meshfact ] : flarge factories : data-demo-maps ;
+ FileListEntriesData [ Wildcard lightmaps : *.png ] : flarge lightmaps : data-demo-maps ;
+-
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_compiler_funcs.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_compiler_funcs.patch
new file mode 100644
index 0000000..c5c30cf
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_compiler_funcs.patch
@@ -0,0 +1,52 @@
+--- mk/autoconf/compiler.m4 2012-04-27 20:54:23.302884670 +0200
++++ mk/autoconf/compiler.m4 2012-04-27 21:05:29.549586201 +0200
+@@ -104,7 +104,6 @@
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AS_IF([test -n "$CC"],[
+ CS_EMIT_BUILD_PROPERTY([CMD.CC], [$CC])
+- CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$CPPFLAGS $CFLAGS], [+])
+ _CS_COMPILER_NAME([$CC], [C], [$ac_compiler_gnu])
+ AC_MSG_CHECKING([for C compiler version])
+ _CS_COMPILER_VERSION([$CC], [C])
+@@ -113,8 +112,9 @@
+ [AC_MSG_RESULT([$_CS_COMPILER_VERSION_SH([C])])])
+
+ # Check if compiler recognizes -pipe directive.
+- CS_EMIT_BUILD_FLAGS([if $CC accepts -pipe], [cs_cv_prog_cc_pipe],
+- [CS_CREATE_TUPLE([-pipe])], [C], [COMPILER.CFLAGS], [append])
++ CS_CHECK_BUILD_FLAGS([if $CC accepts -pipe], [cs_cv_prog_cc_pipe],
++ [CS_CREATE_TUPLE([-pipe])], [C],
++ [CS_APPEND_TRIMMED([cs_cflags], [cs_cv_prog_cc_pipe])])
+
+ # Check if compiler recognizes Sparc v9 CPU. Ugly to pollute
+ # project-agnostic C compiler check, but it is needed by assembly code
+@@ -122,10 +122,10 @@
+ # hurt if the option is not recognized.
+ case $host_cpu in
+ sparc*)
+- CS_EMIT_BUILD_FLAGS([if $CC handles Sparc v9],
++ CS_CHECK_BUILD_FLAGS([if $CC handles Sparc v9],
+ [cs_cv_prog_cc_sparc_v9],
+- [CS_CREATE_TUPLE([-mcpu=v9])], [C], [COMPILER.CFLAGS],
+- [append])
++ [CS_CREATE_TUPLE([-mcpu=v9])], [C],
++ [CS_APPEND_TRIMMED([cs_cflags], [cs_cv_prog_cc_sparc_v9])])
+ ;;
+ esac
+
+@@ -161,7 +161,6 @@
+ AC_REQUIRE([AC_PROG_CXX])
+ AS_IF([test -n "$CXX"],[
+ CS_EMIT_BUILD_PROPERTY([CMD.C++], [$CXX])
+- CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CPPFLAGS $CXXFLAGS], [+])
+ _CS_COMPILER_NAME([$CXX], [C++], [$ac_compiler_gnu])
+ AC_MSG_CHECKING([for C++ compiler version])
+ _CS_COMPILER_VERSION([$CXX], [C++])
+@@ -273,7 +272,6 @@
+ CS_CHECK_TOOLS([LD], [ld])
+ CS_EMIT_BUILD_PROPERTY([CMD.LD], [$LD])
+
+- CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+])
+
+ # Check if compiler/linker recognizes -shared directive which is needed for
+ # linking plugin modules. Unfortunately, the Apple compiler (and possibly
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_01.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_01.patch
new file mode 100644
index 0000000..436f4f1
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_01.patch
@@ -0,0 +1,249 @@
+--- configure.ac 2012-04-27 19:14:14.745903867 +0200
++++ configure.ac 2012-04-27 19:17:01.585912459 +0200
+@@ -134,6 +134,18 @@
+
+
+ #------------------------------------------------------------------------------
++# Save current CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS for th custom mode
++#------------------------------------------------------------------------------
++CS_APPEND_TRIMMED([cs_cflags_custom], [$CPPFLAGS $CFLAGS])
++CS_APPEND_TRIMMED([cs_cxxflags_custom], [$CPPFLAGS $CXXFLAGS])
++CS_APPEND_TRIMMED([cs_ldflags_custom], [$LDFLAGS])
++CS_ERASE_VAR(CFLAGS)
++CS_ERASE_VAR(CPPFLAGS)
++CS_ERASE_VAR(CXXFLAGS)
++CS_ERASE_VAR(LDFLAGS)
++
++
++#------------------------------------------------------------------------------
+ # The cs-win32libs package is a convenience archive made available to Windows
+ # users of Crystal Space. It contains common libraries, headers, and tools
+ # (such as zlib, libjpeg, cal3d, etc.) usable by MSVC, Mingw/MSYS, and Cygwin
+@@ -145,12 +157,11 @@
+
+
+ #------------------------------------------------------------------------------
+-# Use the CPPFLAGS, CXXFLAGS, CFLAGS, and LDFLAGS passed to configure, as well
+-# as any additional flags provided by cs-win32libs.
++# Use the CPPFLAGS, CXXFLAGS, CFLAGS, and LDFLAGS provided by cs-win32libs.
+ #------------------------------------------------------------------------------
+-CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$CPPFLAGS $CFLAGS], [+])
+-CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CPPFLAGS $CXXFLAGS], [+])
+-CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+])
++CS_APPEND_TRIMMED([cs_cflags], [$CPPFLAGS $CFLAGS])
++CS_APPEND_TRIMMED([cs_cxxflags], [$CPPFLAGS $CXXFLAGS])
++CS_APPEND_TRIMMED([cs_ldflags], [$LDFLAGS])
+
+
+
+@@ -175,7 +186,7 @@
+
+ #------------------------------------------------------------------------------
+ # Check for pthread. Also check if pthread implementation supports the
+-# recursive mutex extension and `atfork' functionality.
++# recursive mutex extension and 'atfork' functionality.
+ #------------------------------------------------------------------------------
+ CS_CHECK_PTHREAD([cygwin*])
+ CS_EMIT_BUILD_RESULT([cs_cv_sys_pthread], [PTHREAD])
+@@ -201,10 +212,11 @@
+ [], [enable_static_baselibs=no])
+ AC_MSG_RESULT([$enable_static_baselibs])
+ AS_IF([test $enable_static_baselibs = yes],
+- [CS_EMIT_BUILD_FLAGS([for -static-libgcc],
++ [CS_CHECK_BUILD_FLAGS([for -static-libgcc],
+ [cs_cv_prog_link_static_libgcc], [CS_CREATE_TUPLE([-static-libgcc])],
+- [C], [COMPILER.LFLAGS], [+])
+- libstdcxx=`$CXX -print-file-name=libstdc++.a`
++ [C],
++ [CS_APPEND_TRIMMED([cs_ldflags], [$cs_cv_prog_link_static_libgcc])])
++ libstdcxx='$CXX -print-file-name=libstdc++.a'
+ CS_EMIT_BUILD_FLAGS([for static libstdc++],
+ [cs_cv_prog_link_static_libstdcxx],
+ CS_CREATE_TUPLE([$libstdcxx]),
+@@ -375,8 +387,7 @@
+ # diagnostics from warning to error status.
+ #------------------------------------------------------------------------------
+ CS_COMPILER_WARNINGS([C++], [cs_cv_prog_cxx_enable_warnings],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [$cs_cv_prog_cxx_enable_warnings], [+])])
++ [CS_APPEND_TRIMMED([cs_cflags], [$cs_cv_prog_cxx_enable_warnings])])
+
+ CS_COMPILER_ERRORS([C++], [cs_cv_prog_cxx_enable_errors])
+
+@@ -389,13 +400,12 @@
+ [$cs_cv_prog_cxx_ignore_uninitialized])])
+
+ CS_COMPILER_IGNORE_PRAGMAS([C++], [cs_cv_prog_cxx_ignore_unknown_pragmas],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [$cs_cv_prog_cxx_ignore_unknown_pragmas], [+])])
++ [CS_APPEND_TRIMMED([cs_cflags], [$cs_cv_prog_cxx_ignore_unknown_pragmas])])
+
+-# On MacOS/X, use of `long double' in csutil/formatter.h causes complaints.
++# On MacOS/X, use of 'long double' in csutil/formatter.h causes complaints.
+ CS_COMPILER_IGNORE_LONG_DOUBLE([C++], [cs_cv_prog_cxx_ignore_long_double],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.MANDATORY],
+- [$cs_cv_prog_cxx_ignore_long_double], [+])])
++ [CS_APPEND_TRIMMED([cs_cflags_mandatory],
++ [$cs_cv_prog_cxx_ignore_long_double])])
+
+ CS_COMPILER_IGNORE_NON_VIRTUAL_DTOR([C++],
+ [cs_cv_prog_cxx_ignore_non_virtual_dtor],
+@@ -429,15 +439,14 @@
+ CS_EMIT_BUILD_FLAGS([how to disable C++ exceptions],
+ [cs_cv_prog_cxx_disable_exceptions], [CS_CREATE_TUPLE([-fno-exceptions])],
+ [C++], [COMPILER.C++FLAGS.EXCEPTIONS.DISABLE], [],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS],
+- [$cs_cv_prog_cxx_disable_exceptions], [+])])
++ [CS_APPEND_TRIMMED([cs_cppflags], [$cs_cv_prog_cxx_disable_exceptions])])
+
+
+
+ #------------------------------------------------------------------------------
+ # Check how to make compiler comply strongly with the official C++ language
+ # specification. Crystal Space itself can not abide 100% by the standard (for
+-# instance, we employ `long long', which is not part of the present
++# instance, we employ 'long long', which is not part of the present
+ # specification), however, some external projects do so (by using gcc's -ansi
+ # and -pedantic options, for instance). Because such projects may utilize
+ # Crystal Space, we must ensure that our public headers likewise comply with
+@@ -452,7 +461,7 @@
+ #------------------------------------------------------------------------------
+ # Check if the linker recognizes "-force_cpusubtype_ALL". This is required on
+ # MacOS/X since the Crystal Space's PowerPC implementation of csQsqrt() uses
+-# the `frsqrte' instruction which is only valid when the -force_cpusubtype_ALL
++# the 'frsqrte' instruction which is only valid when the -force_cpusubtype_ALL
+ # flag is present. This flag is marked "mandatory" because it is required even
+ # for external projects if they use csQsqrt().
+ #------------------------------------------------------------------------------
+@@ -462,8 +471,8 @@
+ [CS_CREATE_TUPLE([], [-force_cpusubtype_ALL])])])
+
+ CS_CHECK_FORCE_CPUSUBTYPE_ALL
+-CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.MANDATORY],
+- [$cs_cv_prog_cxx_force_cpusubtype_all], [+])
++CS_APPEND_TRIMMED([cs_cflags_mandatory],
++ [$cs_cv_prog_cxx_force_cpusubtype_all])
+
+
+
+@@ -478,10 +487,11 @@
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ case $host_os in
+ darwin*)
+- CS_EMIT_BUILD_FLAGS([if -fno-common is needed],
++ CS_CHECK_BUILD_FLAGS([if -fno-common is needed],
+ [cs_cv_prog_cxx_no_common],
+ [CS_CREATE_TUPLE([], [-fno-common])], [C++],
+- [COMPILER.CFLAGS.MANDATORY], [+])
++ [CS_APPEND_TRIMMED([cs_cflags_mandatory],
++ [$cs_cv_prog_cxx_no_common])])
+ ;;
+ esac])
+
+@@ -592,12 +602,12 @@
+ # Check how to declare symbol visibility.
+ #------------------------------------------------------------------------------
+ CS_VISIBILITY_FLAG_INLINES_HIDDEN(
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS],
+- [$cs_prog_cxx_visibility_inlines_hidden], [+])])
++ [CS_APPEND_TRIMMED([cs_cxxflags],
++ [$cs_prog_cxx_visibility_inlines_hidden])])
+
+ CS_VISIBILITY_FLAG_HIDDEN([C], [],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [$cs_cv_prog_c_visibility_hidden], [+])])
++ [CS_APPEND_TRIMMED([cs_cflags],
++ [$cs_cv_prog_c_visibility_hidden])])
+
+ CS_VISIBILITY_FLAG_DEFAULT([C], [],
+ [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.VISIBILITY_DEFAULT],
+@@ -647,14 +657,14 @@
+ AC_MSG_CHECKING([whether to use CPU-specific optimizations])
+ AC_ARG_ENABLE([cpu-specific-optimizations],
+ [AC_HELP_STRING([--enable-cpu-specific-optimizations=level],
+- [enable CPU-specific optimizations; this option is ignored in `custom'
+- build mode. Recognized levels are `no', `minimum' or `min', `maximum'
+- or `max', `native' (default MINIMUM); the `minimum' option selects
++ [enable CPU-specific optimizations; this option is ignored in 'custom'
++ build mode. Recognized levels are 'no', 'minimum' or 'min', 'maximum'
++ or 'max', 'native' (default MINIMUM); the 'minimum' option selects
+ optimizations which are likely to be supported by reasonably modern
+ hardware, thus making the resulting executables fairly portable; use
+- the `maximum' option with caution since code for one processor will not
++ the 'maximum' option with caution since code for one processor will not
+ work with earlier processors (for example, Intel 686-specific code will
+- not work with a 586). The `native' option select optimizations specific
++ not work with a 586). The 'native' option select optimizations specific
+ for the compiling machine (thus giving a fairly unportable executable).])],
+ [case $enable_cpu_specific_optimizations in
+ yes|min) enable_cpu_specific_optimizations=minimum ;;
+@@ -665,7 +675,7 @@
+
+ case $enable_cpu_specific_optimizations in
+ no|minimum|maximum|native) ;;
+- *) CS_MSG_ERROR([unrecognized option; use `no', `minimum', `maximum' or `native'])
++ *) CS_MSG_ERROR([unrecognized option; use 'no', 'minimum', 'maximum' or 'native'])
+ ;;
+ esac
+ AS_IF([test $enable_cpu_specific_optimizations != no -a "$cs_build_mode$" = !"custom"],
+@@ -709,8 +719,7 @@
+ CS_CHECK_CODE_GEN_FLAG([alpha], [-mieee])])
+
+ AS_IF([test "$cs_cv_prog_cxx_code_gen" != no],
+- [CS_EMIT_BUILD_PROPERTY(
+- [COMPILER.CFLAGS], [$cs_cv_prog_cxx_code_gen], [+])])])
++ [CS_APPEND_TRIMMED([cs_cflags], [$cs_cv_prog_cxx_code_gen])])])
+
+
+
+@@ -728,8 +737,7 @@
+ [append])], [], [$cs_cv_prog_cxx_code_gen])
+ CS_CHECK_BUILD_FLAGS([for -mfpmath=sse flag], [cs_cv_prog_cc_mfpmath_sse],
+ [CS_CREATE_TUPLE([-mfpmath=sse])], [],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$cs_cv_prog_cc_mfpmath_sse],
+- [append])], [],
++ [CS_APPEND_TRIMMED([cs_cflags], [$cs_cv_prog_cc_mfpmath_sse])], [],
+ [$cs_cv_prog_cxx_code_gen $cs_cv_prog_cxx_enable_errors])
+
+ AS_IF([test -n "$cs_cv_prog_cc_mmmx"],
+@@ -807,13 +815,13 @@
+ [test "$enableval" = "yes" && cs_build_mode=custom])
+
+ AC_ARG_ENABLE([mode], [AC_HELP_STRING([--enable-mode=mode],
+- [set build mode; recognized modes are `optimize', `debug', `profile', `custom'
++ [set build mode; recognized modes are 'optimize', 'debug', 'profile', 'custom'
+ (default OPTIMIZE)])],
+ [case $enableval in
+ optimize|debug|profile|custom) cs_build_mode=$enableval ;;
+ *) CS_MSG_ERROR([m4_text_wrap(
+ [unrecognized mode --enable-mode=$enableval;
+- use `optimize', `debug', `profile' or `custom'], [ ], [[]], [60])]) ;;
++ use 'optimize', 'debug', 'profile' or 'custom'], [ ], [[]], [60])]) ;;
+ esac])
+
+ AC_MSG_CHECKING([build mode])
+@@ -837,7 +845,7 @@
+ AS_IF([test -z "$enable_separate_debug_info"],
+ [AS_IF([test "$cs_build_mode$" = "profile" -o "$cs_build_mode$" = "custom"],
+ [enable_separate_debug_info=no],
+- [AS_IF([test -z `uname | grep -i CYGWIN`],
++ [AS_IF([test -z 'uname | grep -i CYGWIN'],
+ [enable_separate_debug_info=$cs_cv_binutils_2_17],
+ [enable_separate_debug_info=$cs_cv_binutils_true_2_17])])])
+ AC_MSG_RESULT([$enable_separate_debug_info])
+@@ -904,12 +912,12 @@
+
+
+ AS_IF([test -n "$cs_cv_prog_cpp_local_include"],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [$cs_cv_prog_cpp_local_include], [+])
++ [CS_APPEND_TRIMMED([cs_cflags], [$cs_cv_prog_cpp_local_include])
++ CS_APPEND_TRIMMED([cs_cxxflags], [$cs_cv_prog_cpp_local_include])
+ CPPFLAGS="$CPPFLAGS $cs_cv_prog_cpp_local_include"])
+
+ AS_IF([test -d $libdir],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [-L$libdir], [+])
++ [CS_APPEND_TRIMMED([cs_ldflags], [-L$libdir])
+ LDFLAGS="$LDFLAGS -L$libdir"
+ AS_IF([test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"],
+ [LD_LIBRARY_PATH="$LD_LIBRARY_PATH$PATH_SEPARATOR$libdir"
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_02.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_02.patch
new file mode 100644
index 0000000..3a09faf
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_02.patch
@@ -0,0 +1,72 @@
+--- configure.ac 2012-04-27 19:37:08.235975562 +0200
++++ configure.ac 2012-04-27 19:42:06.112657828 +0200
+@@ -1624,7 +1624,7 @@
+
+ CS_CHECK_LIBMINGWX
+ AS_IF([test $cs_cv_libmingwex = yes],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [-lmingwex], [+])])
++ [CS_APPEND_TRIMMED([cs_ldflags], [-lmingwex])])
+
+
+
+@@ -2656,7 +2656,7 @@
+ [AC_MSG_CHECKING([whether to use checking allocations])
+ AC_ARG_ENABLE([checking-allocations],
+ [AC_HELP_STRING([--enable-checking-allocations],
+- [make allocations by default `checking' if the extensive memory
++ [make allocations by default 'checking' if the extensive memory
+ debugger is enabled (default NO)])],
+ [], [enable_checking_allocations=no])
+ AC_MSG_RESULT([$enable_checking_allocations])
+@@ -2729,8 +2729,8 @@
+ [], [enable_valgrind=$enable_valgrind_default])
+ AC_MSG_RESULT([$enable_valgrind])
+ AS_IF([test $enable_valgrind = no],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [-DNVALGRIND], [+])
+- CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [-DNVALGRIND], [+])])
++ [CS_APPEND_TRIMMED([cs_cflags], [-DNVALGRIND])
++ CS_APPEND_TRIMMED([cs_cxxflags], [-DNVALGRIND])])
+ AC_CHECK_HEADERS([valgrind/valgrind.h],
+ [CS_HEADER_PROPERTY([CS_HAVE_VALGRIND_VALGRIND_H])])
+ AC_CHECK_HEADERS([valgrind/memcheck.h],
+@@ -2763,14 +2763,27 @@
+ AC_MSG_CHECKING([whether to emulate makefiles])
+ AC_ARG_ENABLE([make-emulation],
+ [AC_HELP_STRING([--enable-make-emulation],
+- [enable emulation layer allowing project to be built with `make', in
+- addition to `jam' (default YES)])],
++ [enable emulation layer allowing project to be built with 'make', in
++ addition to 'jam' (default YES)])],
+ [], [enable_make_emulation=yes])
+ AC_MSG_RESULT([$enable_make_emulation])
+
+
+
+ #------------------------------------------------------------------------------
++# Put FLAGS together
++#------------------------------------------------------------------------------
++CS_APPEND_TRIMMED([CFLAGS], [$cs_cflags])
++CS_APPEND_TRIMMED([CPPFLAGS], [$cs_cppflags])
++CS_APPEND_TRIMMED([CXXFLAGS], [$cs_cxxflags])
++CS_APPEND_TRIMMED([LDFLAGS], [$cs_ldflags])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$CFLAGS], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CPPFLAGS], [$CPPFLAGS], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CXXFLAGS], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+])
++
++
++#------------------------------------------------------------------------------
+ # Boilerplate: csconfig.h
+ #------------------------------------------------------------------------------
+ CS_HEADER_PREPEND(
+@@ -2792,10 +2805,6 @@
+ #------------------------------------------------------------------------------
+ # Boilerplate: Jamconfig
+ #------------------------------------------------------------------------------
+-CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [AS_ESCAPE([$(COMPILER.CFLAGS.MANDATORY)])], [+])
+-CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS],
+- [AS_ESCAPE([$(COMPILER.C++FLAGS.MANDATORY)])], [+])
+ CS_EMIT_PACKAGEINFO
+ CS_OUTPUT_INSTALLDIRS
+
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_03.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_03.patch
new file mode 100644
index 0000000..5e3f91f
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_03.patch
@@ -0,0 +1,40 @@
+--- configure.ac 2012-04-27 20:52:34.876212336 +0200
++++ configure.ac 2012-04-27 21:10:11.002934257 +0200
+@@ -33,6 +33,18 @@
+
+
+ #------------------------------------------------------------------------------
++# Save current CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS for the custom mode.
++#------------------------------------------------------------------------------
++CS_APPEND_TRIMMED([cs_cflags_custom], [$CPPFLAGS $CFLAGS])
++CS_APPEND_TRIMMED([cs_cxxflags_custom], [$CPPFLAGS $CXXFLAGS])
++CS_APPEND_TRIMMED([cs_ldflags_custom], [$LDFLAGS])
++CS_ERASE_VAR(CFLAGS)
++CS_ERASE_VAR(CPPFLAGS)
++CS_ERASE_VAR(CXXFLAGS)
++CS_ERASE_VAR(LDFLAGS)
++
++
++#------------------------------------------------------------------------------
+ # Check for compilers and linker.
+ #------------------------------------------------------------------------------
+ CS_CHECK_MNO_CYGWIN
+@@ -134,18 +146,6 @@
+
+
+ #------------------------------------------------------------------------------
+-# Save current CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS for th custom mode
+-#------------------------------------------------------------------------------
+-CS_APPEND_TRIMMED([cs_cflags_custom], [$CPPFLAGS $CFLAGS])
+-CS_APPEND_TRIMMED([cs_cxxflags_custom], [$CPPFLAGS $CXXFLAGS])
+-CS_APPEND_TRIMMED([cs_ldflags_custom], [$LDFLAGS])
+-CS_ERASE_VAR(CFLAGS)
+-CS_ERASE_VAR(CPPFLAGS)
+-CS_ERASE_VAR(CXXFLAGS)
+-CS_ERASE_VAR(LDFLAGS)
+-
+-
+-#------------------------------------------------------------------------------
+ # The cs-win32libs package is a convenience archive made available to Windows
+ # users of Crystal Space. It contains common libraries, headers, and tools
+ # (such as zlib, libjpeg, cal3d, etc.) usable by MSVC, Mingw/MSYS, and Cygwin
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_04.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_04.patch
new file mode 100644
index 0000000..793c09d
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_04.patch
@@ -0,0 +1,81 @@
+--- configure.ac 2012-04-27 21:15:01.336282799 +0200
++++ configure.ac 2012-04-27 21:26:45.032986227 +0200
+@@ -552,8 +552,8 @@
+ #------------------------------------------------------------------------------
+ CS_CHECK_BUILD_FLAGS([how to export all dynamic symbols],
+ [cs_cv_prog_link_export_dynamic], [CS_CREATE_TUPLE([-Wl,-E])],
+- [C++], [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.debug],
+- [$cs_cv_prog_link_export_dynamic], [+])],
++ [C++], [CS_APPEND_TRIMMED([cs_ldflags_debug],
++ [$cs_cv_prog_link_export_dynamic])],
+ [], [], [$cs_cv_prog_link_enable_errors])
+
+
+@@ -760,24 +760,25 @@
+
+ cs_optimize_flags=''
+
+- CS_EMIT_BUILD_FLAGS([how to enable optimizations],
++ CS_CHECK_BUILD_FLAGS([how to enable optimizations],
+ [cs_cv_prog_cxx_optimize],
+ [CS_CREATE_TUPLE([-O3]) CS_CREATE_TUPLE([-O2]) CS_CREATE_TUPLE([-O])],
+- [C++], [COMPILER.CFLAGS.optimize], [+],
+- [cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_optimize"])
++ [C++], [CS_APPEND_TRIMMED([cs_cflags_optimize], [$cs_cv_prog_cxx_optimize])
++ cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_optimize"])
+
+- CS_EMIT_BUILD_FLAGS([if -fomit-frame-pointer is accepted],
++ CS_CHECK_BUILD_FLAGS([if -fomit-frame-pointer is accepted],
+ [cs_cv_prog_cxx_omit_frame_pointer],
+ [CS_CREATE_TUPLE([-fomit-frame-pointer])],
+- [C++], [COMPILER.CFLAGS.optimize], [+],
+- [cs_optimize_flags="$cs_optimize_flags \
++ [C++],
++ [CS_APPEND_TRIMMED([cs_cflags_optimize], [$cs_cv_prog_cxx_omit_frame_pointer])
++ cs_optimize_flags="$cs_optimize_flags \
+ $cs_cv_prog_cxx_omit_frame_pointer"])
+
+ CS_EMIT_BUILD_FLAGS([if -ffast-math is accepted],
+ [cs_cv_prog_cxx_fast_math],
+ [CS_CREATE_TUPLE([-ffast-math])], [C++],
+- [COMPILER.CFLAGS.optimize], [+],
+- [cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_fast_math"])])
++ [CS_APPEND_TRIMMED([cs_cflags_optimize], [$cs_cv_prog_cxx_fast_math])
++ cs_optimize_flags="$cs_optimize_flags $cs_cv_prog_cxx_fast_math"])])
+
+ CS_CHECK_OPTIMIZE_FLAGS
+
+@@ -853,12 +854,12 @@
+ CS_EMIT_BUILD_PROPERTY([LINK.DEBUG.INFO.SEPARATE],
+ [$enable_separate_debug_info])
+
+-CS_EMIT_BUILD_FLAGS([how to enable debug mode debugging symbols],
++CS_CHECK_BUILD_FLAGS([how to enable debug mode debugging symbols],
+ [cs_cv_prog_cxx_debug_symbols_extra],
+ [CS_CREATE_TUPLE([-g3]) CS_CREATE_TUPLE([-g2]) CS_CREATE_TUPLE([-g])],
+- [C++], [COMPILER.CFLAGS.debug], [+],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.debug],
+- [$cs_cv_prog_cxx_debug_symbols_extra], [+])])
++ [C++],
++ [CS_APPEND_TRIMMED([cs_cflags_debug], [$cs_cv_prog_cxx_debug_symbols_extra])
++ CS_APPEND_TRIMMED([cs_ldflags_debug], [$cs_cv_prog_cxx_debug_symbols_extra])])
+
+ AC_MSG_CHECKING([whether to enable debug information in optimize mode])
+ AC_ARG_ENABLE([optimize-mode-debug-info],
+@@ -871,12 +872,12 @@
+ [enable_optimize_mode_debug_info=$enable_separate_debug_info])
+ AC_MSG_RESULT([$enable_optimize_mode_debug_info])
+ AS_IF([test "$enable_optimize_mode_debug_info" != "no" -a "$cs_build_mode$" != "custom"],
+- [CS_EMIT_BUILD_FLAGS([how to enable optimize mode debugging symbols],
++ [CS_CHECK_BUILD_FLAGS([how to enable optimize mode debugging symbols],
+ [cs_cv_prog_cxx_debug_symbols_normal],
+ [CS_CREATE_TUPLE([-g2]) CS_CREATE_TUPLE([-g])],
+- [C++], [COMPILER.CFLAGS.optimize], [+],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.optimize],
+- [$cs_cv_prog_cxx_debug_symbols_normal], [+])])])
++ [C++],
++ [CS_APPEND_TRIMMED([cs_cflags_optimize], [$cs_cv_prog_cxx_debug_symbols_normal])
++ CS_APPEND_TRIMMED([cs_cflags_optimize], [$cs_cv_prog_cxx_debug_symbols_normal])])])
+
+
+
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_05.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_05.patch
new file mode 100644
index 0000000..6f9bf97
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_emit_from_configure_ac_05.patch
@@ -0,0 +1,53 @@
+--- configure.ac 2012-04-27 21:27:38.556322395 +0200
++++ configure.ac 2012-04-27 21:36:42.666350846 +0200
+@@ -2773,7 +2773,19 @@
+
+ #------------------------------------------------------------------------------
+ # Put FLAGS together
++# To remove cruft we first move everything now set in the ENV vars to shell
++# vars and then move them back.
+ #------------------------------------------------------------------------------
++CS_APPEND_TRIMMED([cs_cflags], [$CFLAGS])
++CS_APPEND_TRIMMED([cs_cxxflags], [$CXXFLAGS])
++CS_APPEND_TRIMMED([cs_cppflags], [$CPPFLAGS])
++CS_APPEND_TRIMMED([cs_ldflags], [$LDFLAGS])
++CS_ERASE_VAR(CFLAGS)
++CS_ERASE_VAR(CPPFLAGS)
++CS_ERASE_VAR(CXXFLAGS)
++CS_ERASE_VAR(LDFLAGS)
++
++# Set ENV FLAGS
+ CS_APPEND_TRIMMED([CFLAGS], [$cs_cflags])
+ CS_APPEND_TRIMMED([CPPFLAGS], [$cs_cppflags])
+ CS_APPEND_TRIMMED([CXXFLAGS], [$cs_cxxflags])
+@@ -2783,6 +2795,30 @@
+ CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CXXFLAGS], [+])
+ CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+])
+
++# Set debug flags
++CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.debug], [$cs_cflags_debug], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CPPFLAGS.debug], [$cs_cppflags_debug], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS.debug], [$cs_cxxflags_debug], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.debug], [$cs_ldflags_debug], [+])
++
++# Set optimize flags
++CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.optimize], [$cs_cflags_optimize], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CPPFLAGS.optimize], [$cs_cppflags_optimize], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS.optimize], [$cs_cxxflags_optimize], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.optimize], [$cs_ldflags_optimize], [+])
++
++# Set profile flags
++CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.profile], [$cs_cflags_profile], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CPPFLAGS.profile], [$cs_cppflags_profile], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS.profile], [$cs_cxxflags_profile], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.profile], [$cs_ldflags_profile], [+])
++
++# Set custom flags
++CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS.custom], [$cs_cflags_custom], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.CPPFLAGS.custom], [$cs_cppflags_custom], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS.custom], [$cs_cxxflags_custom], [+])
++CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS.custom], [$cs_ldflags_custom], [+])
++
+
+ #------------------------------------------------------------------------------
+ # Boilerplate: csconfig.h
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-remove_hardcoded_libpath.patch b/dev-games/crystalspace/files/crystalspace-2.0-remove_hardcoded_libpath.patch
new file mode 100644
index 0000000..9a968b4
--- /dev/null
+++ b/dev-games/crystalspace/files/crystalspace-2.0-remove_hardcoded_libpath.patch
@@ -0,0 +1,48 @@
+--- configure.ac 2012-04-24 08:32:35.536552189 +0200
++++ configure.ac 2012-04-24 08:51:56.386613019 +0200
+@@ -874,23 +874,34 @@
+ # attempts to run a test program. Without augmenting LD_LIBRARY_PATH, the test
+ # program would fail to run, citing inability to locate libstdc++.so.
+ #------------------------------------------------------------------------------
+-AS_IF([test -d /usr/local/include],
+- [CS_CHECK_BUILD_FLAGS([if -I/usr/local/include is usable],
+- [cs_cv_prog_cpp_local_include],
+- [CS_CREATE_TUPLE([-I/usr/local/include])], [C++], [], [],
+- [$cs_cv_prog_cxx_enable_warnings $cs_cv_prog_cxx_enable_errors])],
++# Update, 2012-04-24, Sven Eden:
++# If the user adds a specific includedir or libdir or those directories are
++# changed by the --prefix option, it is a nuisance to have /usr/local/foo added
++# all over the place. Thus do not do anything unless the configure options say
++# so. Furthermore the user is allowed to use any --prefix they like, so do not
++# Hardcode the default path here.
++#------------------------------------------------------------------------------
++AS_IF([test "x$includedir" != "x/usr/include"],
++ AS_IF([test -d $includedir],
++ [CS_CHECK_BUILD_FLAGS([if -I$includedir is usable],
++ [cs_cv_prog_cpp_local_include],
++ [CS_CREATE_TUPLE([-I$includedir])], [C++], [], [],
++ [$cs_cv_prog_cxx_enable_warnings $cs_cv_prog_cxx_enable_errors])],
++ [cs_cv_prog_cpp_local_include='']),
+ [cs_cv_prog_cpp_local_include=''])
+
++
+ AS_IF([test -n "$cs_cv_prog_cpp_local_include"],
+ [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
+- [$cs_cv_prog_cpp_local_include], [+])
++ [$cs_cv_prog_cpp_local_include], [+])
+ CPPFLAGS="$CPPFLAGS $cs_cv_prog_cpp_local_include"])
+
+-AS_IF([test -d /usr/local/lib],
+- [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [-L/usr/local/lib], [+])
+- LDFLAGS="$LDFLAGS -L/usr/local/lib"
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH$PATH_SEPARATOR/usr/local/lib"
+- export LD_LIBRARY_PATH])
++AS_IF([test -d $libdir],
++ [CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [-L$libdir], [+])
++ LDFLAGS="$LDFLAGS -L$libdir"
++ AS_IF([test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"],
++ [LD_LIBRARY_PATH="$LD_LIBRARY_PATH$PATH_SEPARATOR$libdir"
++ export LD_LIBRARY_PATH])])
+
+
+