summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2014-05-21 18:09:13 +0000
committerJulian Ospald <hasufell@gentoo.org>2014-05-21 18:09:13 +0000
commitb420236cce97a557613bed3986b98859258f6032 (patch)
treec8131ff840209b80aa24395423c71c19a90e40b9 /games-strategy/0ad
parentinitial import wrt #278541 (diff)
downloadgentoo-2-b420236cce97a557613bed3986b98859258f6032.tar.gz
gentoo-2-b420236cce97a557613bed3986b98859258f6032.tar.bz2
gentoo-2-b420236cce97a557613bed3986b98859258f6032.zip
initial import wrt #278541
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Diffstat (limited to 'games-strategy/0ad')
-rw-r--r--games-strategy/0ad/0ad-0.0.16_alpha.ebuild135
-rw-r--r--games-strategy/0ad/ChangeLog10
-rw-r--r--games-strategy/0ad/Manifest5
-rw-r--r--games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch93
-rw-r--r--games-strategy/0ad/metadata.xml12
5 files changed, 255 insertions, 0 deletions
diff --git a/games-strategy/0ad/0ad-0.0.16_alpha.ebuild b/games-strategy/0ad/0ad-0.0.16_alpha.ebuild
new file mode 100644
index 000000000000..36d2b5c68baf
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.16_alpha.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/0ad/0ad-0.0.16_alpha.ebuild,v 1.1 2014/05/21 18:09:13 hasufell Exp $
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit eutils wxwidgets toolchain-funcs gnome2-utils games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="http://wildfiregames.com/0ad/"
+SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor fam pch sound test"
+
+RDEPEND="
+ dev-lang/spidermonkey:24
+ dev-libs/boost
+ dev-libs/icu
+ dev-libs/libxml2
+ ~games-strategy/0ad-data-${PV}
+ media-gfx/nvidia-texture-tools
+ media-libs/libpng:0
+ media-libs/libsdl[X,opengl,video]
+ net-libs/enet:1.3
+ net-libs/miniupnpc
+ net-libs/gloox
+ net-misc/curl
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXcursor
+ editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+ sound? ( media-libs/libogg
+ media-libs/libvorbis
+ media-libs/openal )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-lang/perl )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ local myconf=(
+ --with-system-nvtt
+ --with-system-enet
+ --with-system-miniupnpc
+ --with-system-mozjs24
+ --minimal-flags
+ $(usex pch "" "--without-pch")
+ $(usex test "" "--without-tests")
+ $(usex sound "" "--without-audio")
+ $(usex editor "--atlas" "")
+ --collada
+ --bindir="${GAMES_BINDIR}"
+ --libdir="$(games_get_libdir)"/${PN}
+ --datadir="${GAMES_DATADIR}"/${PN}
+ )
+
+ # stock premake4 does not work, use the shipped one
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # regenerate scripts.c so our patch applies
+ cd "${S}"/build/premake/premake4 || die
+ "${S}"/build/premake/premake4/bin/release/premake4 embed || die
+
+ # rebuild premake again... this is the most stupid build system
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # run premake to create build scripts
+ cd "${S}"/build/premake || die
+ "${S}"/build/premake/premake4/bin/release/premake4 \
+ --file="premake4.lua" \
+ --outpath="../workspaces/gcc/" \
+ --platform=$(usex amd64 "x64" "x32") \
+ --os=linux \
+ "${myconf[@]}" \
+ gmake || die "Premake failed"
+}
+
+src_compile() {
+ # build 3rd party fcollada
+ emake -C libraries/source/fcollada/src
+
+ # build 0ad
+ emake -C build/workspaces/gcc verbose=1
+}
+
+src_test() {
+ cd binaries/system || die
+ ./test -libdir "${S}/binaries/system" || die "test phase failed"
+}
+
+src_install() {
+ dogamesbin binaries/system/pyrogenesis
+
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r binaries/data/l10n
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe binaries/system/libCollada.so
+ use editor && doexe binaries/system/libAtlasUI.so
+
+ dodoc binaries/system/readme.txt
+ doicon -s 128 build/resources/${PN}.png
+ games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
+ make_desktop_entry ${PN}
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/0ad/ChangeLog b/games-strategy/0ad/ChangeLog
new file mode 100644
index 000000000000..a7e9f120e004
--- /dev/null
+++ b/games-strategy/0ad/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-strategy/0ad
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/0ad/ChangeLog,v 1.1 2014/05/21 18:09:13 hasufell Exp $
+
+*0ad-0.0.16_alpha (21 May 2014)
+
+ 21 May 2014; Julian Ospald <hasufell@gentoo.org> +0ad-0.0.16_alpha.ebuild,
+ +files/0ad-0.0.16_alpha-gentoo.patch, +metadata.xml:
+ initial import wrt #278541
+
diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
new file mode 100644
index 000000000000..7bcf07da4c3b
--- /dev/null
+++ b/games-strategy/0ad/Manifest
@@ -0,0 +1,5 @@
+AUX 0ad-0.0.16_alpha-gentoo.patch 3176 SHA256 0631ab138fc937380b3c565a8aabe00c7b339ed6d1eef74a3e661aa277f7cd9b SHA512 8f1e5798257f814a4140f818fe30278ee2301c0130a79a46dbc3360b5cfe91db0a32dc62ed4fcb1db18962cb3a8a2b061553aaa2d70efb18806a76d32d745306 WHIRLPOOL 452351a0b43286e77cdd2b6f82730795a57f141fc56ea2fcc00f76e87d8a8a8af5288cdaf7d1149f74d74a4d15787f67cf5d88cd9f3631c815502718d3fa1e71
+DIST 0ad-0.0.16-alpha-unix-build.tar.xz 20019680 SHA256 cb965ef7e292bc3a2f1f598a9695e16ff4d786398f384a1ec7d5f9bfe2626de5 SHA512 9fe3440233d9827895b91ade1873afe977d62386a5dd6042d8169b153d576b462381bfc97e637f0b183aff034236380ca6d552ea2755cf08398143ad67121031 WHIRLPOOL 0e2f1ac9799a4b4d4588c2370a78195f2cc415fb2043be815ed2a2f9f179ccd856c405e7c0323f2033d3a6a4d63c08d8d5c8a05b50769ae3b9219717218edef6
+EBUILD 0ad-0.0.16_alpha.ebuild 3117 SHA256 65d8de5ed8de54004966292968cee15ed6dcb2279a43a6e50be094ba426c4538 SHA512 ae45047915e127311dd9473508ecbdb1abf7a45c0abfc161594a5f5a23c03dbb9083f4710c34c62a9f8834a66f843a15660504ac6255511ebd2064052204aae6 WHIRLPOOL c263a44bf2e549e5a65e8619e6056b8e4d4f0bfc591c490193ff5c4965433908faf7fe4b68a7030fd71d28e342c643ebe0c5a9910e22858d6c5f8e7d76dacf70
+MISC ChangeLog 314 SHA256 f9717d3fe4e4db2e56009aa7c248d9340dbcd60e4c9829eec240627b1dee8ae9 SHA512 db2dca2752bff6198959bf656455fae43432310fdf1fc0d58f78445fc68832e3538db810a49c017d3086eac80dd5a674090cf9e48042e05a462f092282bd695c WHIRLPOOL 4b7012a26be68980197a973cc1123ab8e3ef083d29e5eeee51a34fe2f27dada941c15a54711ec015d74607093159128c9dd7b1f7b4b5920f07dae9c6e7062343
+MISC metadata.xml 337 SHA256 843518014b94cce560bb06b3aade8251427bd47f1d6ac724cc4185e8b0cb06f5 SHA512 1293447cda760f098035b1bb9509d0f8e79fcfd7ddc9fe49d680393fdffef147615442f71848cfe9bef8f06313a996fec10ba39fbb4314ff701b874583be94ed WHIRLPOOL 6fc73b10515f0817c9f3f2570c76f77e117d6a2b0d74dfc29000858183bea82ae6f56a79efb30c5237cfec0967af83217b1f5c3c311bba75197084aa4670986c
diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
new file mode 100644
index 000000000000..30192fbccd56
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
@@ -0,0 +1,93 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jun 24 18:32:38 UTC 2012
+Subject: build system
+
+respect flags
+let stripping be handled by the system
+
+fix minimal-flags option:
+ leave -fvisibility=hidden active
+ leave conditional -fpc-preprocess active
+
+--- build/premake/premake4.lua
++++ build/premake/premake4.lua
+@@ -145,7 +145,7 @@
+
+ function project_set_build_flags()
+
+- flags { "Symbols", "NoEditAndContinue" }
++ flags { "NoEditAndContinue" }
+ if not _OPTIONS["icc"] and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
+ -- adds the -Wall compiler flag
+ flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
+@@ -337,13 +337,11 @@
+ end
+ end
+
+- if not _OPTIONS["minimal-flags"] then
+ buildoptions {
+ -- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
+ -- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
+ "-fvisibility=hidden"
+ }
+- end
+
+ if _OPTIONS["bindir"] then
+ defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
+--- libraries/source/fcollada/src/Makefile
++++ libraries/source/fcollada/src/Makefile
+@@ -9,8 +9,8 @@
+
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
+-CXXFLAGS_RELEASE := -O1 -DNDEBUG -DRETAIL
++CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
++CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
+ # (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1 until gcc >4.3 is typical.)
+ CXXFLAGS_TEST := -O0 -g -D_DEBUG
+ LIBS += `pkg-config libxml-2.0 --libs`
+--- build/premake/premake4/src/tools/gcc.lua
++++ build/premake/premake4/src/tools/gcc.lua
+@@ -136,8 +136,6 @@
+ if not cfg.flags.Symbols then
+ if cfg.system == "macosx" then
+ table.insert(result, "-Wl,-x")
+- else
+- table.insert(result, "-s")
+ end
+ end
+
+--- build/premake/premake4/build/gmake.unix/Premake4.make
++++ build/premake/premake4/build/gmake.unix/Premake4.make
+@@ -26,9 +26,9 @@
+ DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+ INCLUDES += -I../../src/host/lua-5.1.4/src
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+- CFLAGS += $(CPPFLAGS) -Wall -Os
+- CXXFLAGS += $(CPPFLAGS) -Wall -Os
+- LDFLAGS += -s -rdynamic
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
++ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+ LDDEPS +=
+@@ -48,8 +48,8 @@
+ 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) -Wall -g
+- CXXFLAGS += $(CPPFLAGS) -Wall -g
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
+ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+@@ -302,4 +302,4 @@
+ $(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
+
+ -include $(OBJECTS:%.o=%.d)
+--include $(GCH:%.h.gch=%.h.d)
+\ No newline at end of file
++-include $(GCH:%.h.gch=%.h.d)
diff --git a/games-strategy/0ad/metadata.xml b/games-strategy/0ad/metadata.xml
new file mode 100644
index 000000000000..14504b9a6f39
--- /dev/null
+++ b/games-strategy/0ad/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <use>
+ <flag name="editor">Include Atlas scenario editor projects</flag>
+ </use>
+</pkgmetadata>