diff options
author | Igor Ulyanov <disinbox@gmail.com> | 2012-03-25 19:46:51 +0400 |
---|---|---|
committer | Igor Ulyanov <disinbox@gmail.com> | 2012-03-25 19:46:51 +0400 |
commit | 6a0cb459abcf25d5d423dd134b45fff0bca003d6 (patch) | |
tree | d73d2409143c1b23517cc5eef1207725ec6a3c5d | |
parent | manifest added (diff) | |
download | displacer-6a0cb459abcf25d5d423dd134b45fff0bca003d6.tar.gz displacer-6a0cb459abcf25d5d423dd134b45fff0bca003d6.tar.bz2 displacer-6a0cb459abcf25d5d423dd134b45fff0bca003d6.zip |
0ad added
-rw-r--r-- | games-strategy/0ad/0ad-10803.ebuild | 144 | ||||
-rw-r--r-- | games-strategy/0ad/Manifest | 5 | ||||
-rw-r--r-- | games-strategy/0ad/files/premake-archless.patch | 36 | ||||
-rw-r--r-- | games-strategy/0ad/files/premake-script-archless.patch | 31 |
4 files changed, 216 insertions, 0 deletions
diff --git a/games-strategy/0ad/0ad-10803.ebuild b/games-strategy/0ad/0ad-10803.ebuild new file mode 100644 index 0000000..b56c23f --- /dev/null +++ b/games-strategy/0ad/0ad-10803.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit eutils wxwidgets games + +MY_P="0ad-r${PV}-alpha" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="0 A.D. is a free, real-time strategy game currently under development by Wildfire Games." +HOMEPAGE="http://wildfiregames.com/0ad/" +SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz + mirror://sourceforge/zero-ad/${MY_P}-unix-data.tar.xz" + +LICENSE="GPL-2 CCPL-Attribution-ShareAlike-3.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug editor nvtt pch test" + +RDEPEND=">=dev-lang/spidermonkey-1.8.5 + dev-libs/boost + dev-libs/libxml2 + media-libs/devil + media-libs/openal + media-libs/libogg + media-libs/libpng + media-libs/libsdl[X,joystick] + media-libs/libvorbis + net-libs/enet:1.3 + net-misc/curl + sys-libs/zlib + virtual/fam + virtual/jpeg + virtual/opengl + editor? ( x11-libs/wxGTK:2.8 ) + nvtt? ( dev-util/nvidia-texture-tools )" + +DEPEND="${RDEPEND} + app-arch/zip + dev-lang/nasm + dev-util/cmake" + +RESTRICT="strip mirror" + +dir=${GAMES_PREFIX_OPT}/${PN} + +pkg_setup() { + games_pkg_setup + if use editor ; then + WX_GTK_VER=2.8 need-wxwidgets unicode + fi +} + +src_prepare() { + epatch "${FILESDIR}"/premake-archless.patch + epatch "${FILESDIR}"/premake-script-archless.patch +} + +src_compile() { + UPDATE_ARGS="--with-system-enet --with-system-mozjs185" + +# if ! use pch ; then +# UPDATE_ARGS="${UPDATE_ARGS} --without-pch" +# fi + + if ! use editor ; then + UPDATE_ARGS="${UPDATE_ARGS} --disable-atlas" + fi + + if use nvtt ; then + UPDATE_ARGS="${UPDATE_ARGS} --with-system-nvtt" + fi + + cd "${S}/build/workspaces" + einfo "Running update-workspaces.sh with ${UPDATE_ARGS}" + ./update-workspaces.sh ${UPDATE_ARGS} || die "update-workspaces.sh failed" + cd gcc + + TARGETS="pyrogenesis Collada" + if use test ; then + TARGETS="${TARGETS} test" + fi + if use editor ; then + TARGETS="${TARGETS} AtlasUI" + fi + if use debug ; then + CONFIG=Debug + else + CONFIG=Release + fi + CONFIG=${CONFIG} emake ${TARGETS} || die "Can't build" +} + +src_test() { + cd "${S}/binaries/system" + if use debug ; then + ./test_dbg || die "Tests failed" + else + ./test || die "Tests failed" + fi +} + +src_install() { + cd "${S}"/binaries + insinto "${dir}" + doins -r data || die "doins -r failed" + + insinto "${dir}"/system + + #we install build-in nvtt + if use !nvtt ; then + doins "${S}"/binaries/system/libnvcore.so || die "doins failed" + doins "${S}"/binaries/system/libnvimage.so || die "doins failed" + doins "${S}"/binaries/system/libnvmath.so || die "doins failed" + doins "${S}"/binaries/system/libnvtt.so || die "doins failed" + fi + + if use debug ; then +# doins "${S}"/binaries/system/libmozjs185-ps-debug.so.1.0 || die "doins failed" + doins "${S}"/binaries/system/libCollada_dbg.so || die "doins failed" + if use editor ; then + doins "${S}"/binaries/system/libAtlasUI_dbg.so || die "doins failed" + fi + EXE_NAME=pyrogenesis_dbg + else +# doins "${S}"/binaries/system/libmozjs185-ps-release.so.1.0 || die "doins failed" + doins "${S}"/binaries/system/libCollada.so || die "doins failed" + if use editor ; then + doins "${S}"/binaries/system/libAtlasUI.so || die "doins failed" + fi + EXE_NAME=pyrogenesis + fi + + exeinto "${dir}"/system + doexe "${S}"/binaries/system/${EXE_NAME} || die "doexe failed" + + games_make_wrapper ${PN} ./system/${EXE_NAME} ${dir} + doicon "${S}"/build/resources/0ad.png + make_desktop_entry "${dir}"/system/${EXE_NAME} "0 A.D." + + prepgamesdirs +} diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest new file mode 100644 index 0000000..24c0942 --- /dev/null +++ b/games-strategy/0ad/Manifest @@ -0,0 +1,5 @@ +AUX premake-archless.patch 1560 RMD160 b2a4455994e91f02cf4b34b62db9035ca547765f SHA1 628836500c3c81b291b40f0d8631b1a31b711799 SHA256 85fc1ad2ef098d181f26fd78038ad90f7e1e2e948fe903664747494d129a3083 +AUX premake-script-archless.patch 1582 RMD160 00d7e6e7befc07a3bd2c4802ef7506b26effbe44 SHA1 3d7be337df4a3ff1b364e0efb1599eb18583b072 SHA256 0904c211595919bab0367b5e86c218a01b42c96df4b49c47a03c125ed3a2aada +DIST 0ad-r10803-alpha-unix-build.tar.xz 8609092 RMD160 bab976f5f4b04c6256418293758a19fc6471fc40 SHA1 9c9ee04bf1327bfd9161f51b18180ec8d3c6547b SHA256 fbf91d8482267384f8fb3fdd8a71e79ed71d73489c531f814fca70840043b928 +DIST 0ad-r10803-alpha-unix-data.tar.xz 264532800 RMD160 5dcdc8c2e01c6880b4a695e5380bc6824b8ecc42 SHA1 98d17a118d0a5cfe79140ddb2a24bfd3a376c28a SHA256 cb4d2b4c4ce1eadff4d34127664a6de02f9b062007275507d80d9ee6ebbae7d9 +EBUILD 0ad-10803.ebuild 3447 RMD160 3b5833ac29f410825d4af685407a1d23635648fd SHA1 dd1f11419bbac28bcdc4281226f75e5e1ac026e4 SHA256 2370914dbda8857481cdca10a640ede244308c2378a6fa5459fac2e065f37b18 diff --git a/games-strategy/0ad/files/premake-archless.patch b/games-strategy/0ad/files/premake-archless.patch new file mode 100644 index 0000000..2b87d04 --- /dev/null +++ b/games-strategy/0ad/files/premake-archless.patch @@ -0,0 +1,36 @@ +diff -Naur build/premake/premake4.orig/build/gmake.unix/Premake4.make build/premake/premake4/build/gmake.unix/Premake4.make +--- build/premake/premake4.orig/build/gmake.unix/Premake4.make 2010-11-16 06:29:14.000000000 -0500 ++++ build/premake/premake4/build/gmake.unix/Premake4.make 2011-04-18 07:24:59.374986001 -0400 +@@ -26,13 +26,12 @@ + DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.1.4/src + CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) +- CFLAGS += $(CPPFLAGS) $(ARCH) -Wall -Os +- CXXFLAGS += $(CFLAGS) +- LDFLAGS += -s -rdynamic ++ CFLAGS += $(CPPFLAGS) -Wall ++ LDFLAGS += -rdynamic + LIBS += -lm -ldl + RESFLAGS += $(DEFINES) $(INCLUDES) + LDDEPS += +- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS) ++ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(LIBS) + define PREBUILDCMDS + endef + define PRELINKCMDS +@@ -48,13 +47,12 @@ + DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -I../../src/host/lua-5.1.4/src + CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) +- CFLAGS += $(CPPFLAGS) $(ARCH) -Wall -g +- CXXFLAGS += $(CFLAGS) ++ CFLAGS += $(CPPFLAGS) -Wall -g + LDFLAGS += -rdynamic + LIBS += -lm -ldl + RESFLAGS += $(DEFINES) $(INCLUDES) + LDDEPS += +- LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS) ++ LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(LIBS) + define PREBUILDCMDS + endef + define PRELINKCMDS diff --git a/games-strategy/0ad/files/premake-script-archless.patch b/games-strategy/0ad/files/premake-script-archless.patch new file mode 100644 index 0000000..7195feb --- /dev/null +++ b/games-strategy/0ad/files/premake-script-archless.patch @@ -0,0 +1,31 @@ +--- build/premake/premake4/src/actions/make/make_cpp.lua.orig 2011-12-17 20:59:29.000000000 +0800 ++++ build/premake/premake4/src/actions/make/make_cpp.lua 2011-12-25 07:27:40.268759001 +0800 +@@ -248,7 +248,7 @@ + -- set up precompiled headers + _.pchconfig(cfg) + +- _p(' CFLAGS += $(CPPFLAGS) $(ARCH) %s', table.concat(table.join(cc.getcflags(cfg), cfg.buildoptions), " ")) ++ _p(' CFLAGS += $(CPPFLAGS) %s', table.concat(table.join(cc.getcflags(cfg), cfg.buildoptions), " ")) + _p(' CXXFLAGS += $(CFLAGS) %s', table.concat(cc.getcxxflags(cfg), " ")) + _p(' LDFLAGS += %s', table.concat(table.join(cc.getldflags(cfg), cfg.linkoptions, cc.getlibdirflags(cfg)), " ")) + _p(' LIBS += %s %s', table.concat(cc.getlinkflags(cfg), " "), table.concat(cfg.gnuexternals, " ")) +@@ -272,7 +272,7 @@ + else + lddeps = '-Xlinker --start-group $(LDDEPS) -Xlinker --end-group' + end +- _p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) %s $(LIBS)', ++ _p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) %s $(LIBS)', + iif(cfg.language == "C", "CC", "CXX"), lddeps) + end + +--- build/workspaces/update-workspaces.sh.orig 2011-11-15 00:10:41.000000000 +0800 ++++ build/workspaces/update-workspaces.sh 2011-12-25 07:30:39.729759000 +0800 +@@ -62,6 +62,8 @@ + # Now build premake and run it to create the makefiles + cd ../premake/premake4 + make -C build/gmake.unix ${JOBS} || die "Premake build failed" ++./bin/release/premake4 embed ++make -C build/gmake.unix ${JOBS} || die "Premake build failed" + + echo + |