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