1 |
commit: a36823d5f86a959f46ff6d01b05e2de1bf4ee12e |
2 |
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 26 17:31:40 2015 +0000 |
4 |
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 26 17:32:28 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a36823d5 |
7 |
|
8 |
games-strategy/0ad: use x11-libs/wxGTK:3.0 |
9 |
|
10 |
Gentoo-Bug: 563328 |
11 |
|
12 |
games-strategy/0ad/0ad-0.0.18_alpha-r3.ebuild | 154 ++++++++++++++++++++++++++ |
13 |
1 file changed, 154 insertions(+) |
14 |
|
15 |
diff --git a/games-strategy/0ad/0ad-0.0.18_alpha-r3.ebuild b/games-strategy/0ad/0ad-0.0.18_alpha-r3.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..8052103 |
18 |
--- /dev/null |
19 |
+++ b/games-strategy/0ad/0ad-0.0.18_alpha-r3.ebuild |
20 |
@@ -0,0 +1,154 @@ |
21 |
+# Copyright 1999-2015 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+WX_GTK_VER="3.0" |
28 |
+ |
29 |
+PYTHON_COMPAT=( python2_7 ) |
30 |
+PYTHON_REQ_USE="threads,ssl" |
31 |
+ |
32 |
+inherit eutils wxwidgets toolchain-funcs gnome2-utils python-any-r1 games |
33 |
+ |
34 |
+MY_P=0ad-${PV/_/-} |
35 |
+DESCRIPTION="A free, real-time strategy game" |
36 |
+HOMEPAGE="http://play0ad.com/" |
37 |
+SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz" |
38 |
+ |
39 |
+LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~amd64 ~x86" |
42 |
+IUSE="editor +lobby nvtt pch sound test" |
43 |
+RESTRICT="test" |
44 |
+ |
45 |
+RDEPEND=" |
46 |
+ dev-libs/boost |
47 |
+ dev-libs/icu:= |
48 |
+ dev-libs/libxml2 |
49 |
+ dev-libs/nspr |
50 |
+ ~games-strategy/0ad-data-${PV} |
51 |
+ media-libs/libpng:0 |
52 |
+ media-libs/libsdl2[X,opengl,video] |
53 |
+ net-libs/enet:1.3 |
54 |
+ net-libs/miniupnpc:= |
55 |
+ net-misc/curl |
56 |
+ sys-libs/zlib |
57 |
+ virtual/jpeg:62 |
58 |
+ virtual/opengl |
59 |
+ x11-libs/libX11 |
60 |
+ x11-libs/libXcursor |
61 |
+ editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] ) |
62 |
+ lobby? ( net-libs/gloox ) |
63 |
+ nvtt? ( media-gfx/nvidia-texture-tools ) |
64 |
+ sound? ( media-libs/libvorbis |
65 |
+ media-libs/openal )" |
66 |
+DEPEND="${RDEPEND} |
67 |
+ ${PYTHON_DEPS} |
68 |
+ virtual/pkgconfig |
69 |
+ test? ( dev-lang/perl )" |
70 |
+ |
71 |
+S=${WORKDIR}/${MY_P} |
72 |
+ |
73 |
+pkg_setup() { |
74 |
+ games_pkg_setup |
75 |
+ python-any-r1_pkg_setup |
76 |
+} |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ epatch "${FILESDIR}"/${P}-gentoo.patch |
80 |
+ epatch "${FILESDIR}"/${P}-miniupnpc14.patch |
81 |
+} |
82 |
+ |
83 |
+src_configure() { |
84 |
+ local myconf=( |
85 |
+ --with-system-nvtt |
86 |
+ --with-system-miniupnpc |
87 |
+ --minimal-flags |
88 |
+ --sdl2 |
89 |
+ $(usex nvtt "" "--without-nvtt") |
90 |
+ $(usex pch "" "--without-pch") |
91 |
+ $(usex test "" "--without-tests") |
92 |
+ $(usex sound "" "--without-audio") |
93 |
+ $(usex editor "--atlas" "") |
94 |
+ $(usex lobby "" "--without-lobby") |
95 |
+ --collada |
96 |
+ --bindir="${GAMES_BINDIR}" |
97 |
+ --libdir="$(games_get_libdir)"/${PN} |
98 |
+ --datadir="${GAMES_DATADIR}"/${PN} |
99 |
+ ) |
100 |
+ |
101 |
+ # stock premake4 does not work, use the shipped one |
102 |
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix |
103 |
+ |
104 |
+ # regenerate scripts.c so our patch applies |
105 |
+ cd "${S}"/build/premake/premake4 || die |
106 |
+ "${S}"/build/premake/premake4/bin/release/premake4 embed || die |
107 |
+ |
108 |
+ # rebuild premake again... this is the most stupid build system |
109 |
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix clean |
110 |
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix |
111 |
+ |
112 |
+ # run premake to create build scripts |
113 |
+ cd "${S}"/build/premake || die |
114 |
+ "${S}"/build/premake/premake4/bin/release/premake4 \ |
115 |
+ --file="premake4.lua" \ |
116 |
+ --outpath="../workspaces/gcc/" \ |
117 |
+ --platform=$(usex amd64 "x64" "x32") \ |
118 |
+ --os=linux \ |
119 |
+ "${myconf[@]}" \ |
120 |
+ gmake || die "Premake failed" |
121 |
+} |
122 |
+ |
123 |
+src_compile() { |
124 |
+ tc-export AR |
125 |
+ |
126 |
+ # build bundled and patched spidermonkey |
127 |
+ cd libraries/source/spidermonkey || die |
128 |
+ JOBS="${MAKEOPTS}" ./build.sh || die |
129 |
+ cd "${S}" || die |
130 |
+ |
131 |
+ # build 3rd party fcollada |
132 |
+ emake -C libraries/source/fcollada/src |
133 |
+ |
134 |
+ # build 0ad |
135 |
+ emake -C build/workspaces/gcc verbose=1 |
136 |
+} |
137 |
+ |
138 |
+src_test() { |
139 |
+ cd binaries/system || die |
140 |
+ ./test -libdir "${S}/binaries/system" || die "test phase failed" |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ newgamesbin binaries/system/pyrogenesis 0ad |
145 |
+ use editor && newgamesbin binaries/system/ActorEditor 0ad-ActorEditor |
146 |
+ |
147 |
+ insinto "${GAMES_DATADIR}"/${PN} |
148 |
+ doins -r binaries/data/l10n |
149 |
+ |
150 |
+ exeinto "$(games_get_libdir)"/${PN} |
151 |
+ doexe binaries/system/libCollada.so |
152 |
+ doexe libraries/source/spidermonkey/lib/*.so |
153 |
+ use editor && doexe binaries/system/libAtlasUI.so |
154 |
+ |
155 |
+ dodoc binaries/system/readme.txt |
156 |
+ doicon -s 128 build/resources/${PN}.png |
157 |
+ make_desktop_entry ${PN} |
158 |
+ |
159 |
+ prepgamesdirs |
160 |
+} |
161 |
+ |
162 |
+pkg_preinst() { |
163 |
+ games_pkg_preinst |
164 |
+ gnome2_icon_savelist |
165 |
+} |
166 |
+ |
167 |
+pkg_postinst() { |
168 |
+ games_pkg_postinst |
169 |
+ gnome2_icon_cache_update |
170 |
+} |
171 |
+ |
172 |
+pkg_postrm() { |
173 |
+ gnome2_icon_cache_update |
174 |
+} |