Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/0ad/
Date: Thu, 17 Jun 2021 23:24:40
Message-Id: 1623972217.3b9c5b501e5eba7b2de982c676891504b8aeddcd.sam@gentoo
1 commit: 3b9c5b501e5eba7b2de982c676891504b8aeddcd
2 Author: Nils Freydank <holgersson <AT> posteo <DOT> de>
3 AuthorDate: Thu Jun 17 20:11:54 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 17 23:23:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b9c5b50
7
8 games-strategy/0ad: Remove the broken version
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Nils Freydank <holgersson <AT> posteo.de>
12 Closes: https://github.com/gentoo/gentoo/pull/21292
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 games-strategy/0ad/0ad-0.0.24b_alpha.ebuild | 228 ----------------------------
16 1 file changed, 228 deletions(-)
17
18 diff --git a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild b/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild
19 deleted file mode 100644
20 index e8ce2ce4f62..00000000000
21 --- a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild
22 +++ /dev/null
23 @@ -1,228 +0,0 @@
24 -# Copyright 2014-2021 Gentoo Authors
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -EAPI=7
28 -
29 -WX_GTK_VER="3.0-gtk3"
30 -PYTHON_COMPAT=( python3_{7..9} )
31 -inherit desktop toolchain-funcs multiprocessing python-any-r1 wxwidgets xdg
32 -
33 -if [[ ${PV} == 9999 ]]; then
34 - inherit git-r3
35 -
36 - EGIT_REPO_URI="https://github.com/0ad/0ad"
37 -elif [[ ${PV} == *_pre* ]]; then
38 - ZEROAD_GIT_REVISION="c7d07d3979f969b969211a5e5748fa775f6768a7"
39 -else
40 - MY_P="0ad-${PV/_/-}"
41 -fi
42 -
43 -DESCRIPTION="A free, real-time strategy game"
44 -HOMEPAGE="https://play0ad.com/"
45 -
46 -if [[ ${PV} == 9999 ]]; then
47 - S="${WORKDIR}/${P}"
48 -elif [[ ${PV} == *_pre* ]]; then
49 - SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz"
50 - S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}"
51 -else
52 - SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
53 - SRC_URI+=" https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz"
54 - S="${WORKDIR}/${MY_P}"
55 -fi
56 -
57 -LICENSE="CC-BY-SA-3.0 GPL-2 LGPL-2.1 MIT ZLIB BitstreamVera LPPL-1.3c"
58 -SLOT="0"
59 -KEYWORDS="~amd64 ~arm64 ~x86"
60 -IUSE="editor +lobby nvtt pch test"
61 -RESTRICT="test"
62 -
63 -# virtual/rust is for bundled SpiderMonkey
64 -# Build-time Python dependency is for SM too
65 -# TODO: Unbundle premake5
66 -# See bug #773472 which may help (bump for it)
67 -BDEPEND="
68 - ${PYTHON_DEPS}
69 - virtual/pkgconfig
70 - virtual/rust
71 - test? ( dev-lang/perl )
72 -"
73 -# Removed dependency on nvtt as we use the bundled one
74 -# bug #768930
75 -DEPEND="
76 - dev-libs/boost:=
77 - dev-libs/icu:=
78 - dev-libs/libfmt:0=
79 - dev-libs/libsodium
80 - dev-libs/libxml2
81 - media-libs/libpng:0
82 - media-libs/libsdl2[X,opengl,video]
83 - media-libs/libvorbis
84 - media-libs/openal
85 - net-libs/enet:1.3
86 - net-libs/miniupnpc:=
87 - net-misc/curl
88 - sys-libs/zlib
89 - virtual/opengl
90 - x11-libs/libX11
91 - editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
92 - lobby? ( >=net-libs/gloox-1.0.20 )
93 -"
94 -RDEPEND="
95 - ${DEPEND}
96 - !games-strategy/0ad-data
97 -"
98 -
99 -PATCHES=(
100 - "${FILESDIR}"/${PN}-0.0.24_alpha_pre20210116040036-build.patch
101 - "${FILESDIR}"/${PN}-0.0.24b_alpha-rust-1.50.patch
102 - "${FILESDIR}"/${PN}-0.0.24b_alpha-respect-tc.patch
103 -)
104 -
105 -pkg_setup() {
106 - use editor && setup-wxwidgets
107 -}
108 -
109 -src_prepare() {
110 - default
111 -
112 - # SpiderMonkey's configure no longer recognises --build for
113 - # the build tuple
114 - sed -i -e "/--build/d" libraries/source/spidermonkey/build.sh || die
115 -
116 - # Originally from 0ad-data
117 - rm binaries/data/tools/fontbuilder/fonts/*.txt || die
118 -}
119 -
120 -src_configure() {
121 - local myconf=(
122 - --minimal-flags
123 - $(usex nvtt "" "--without-nvtt")
124 - $(usex pch "" "--without-pch")
125 - $(usex test "" "--without-tests")
126 - $(usex editor "--atlas" "")
127 - $(usex lobby "" "--without-lobby")
128 - --bindir="/usr/bin"
129 - --libdir="/usr/$(get_libdir)"/${PN}
130 - --datadir="/usr/share/${PN}"
131 - )
132 -
133 - tc-export AR CC CXX RANLIB
134 -
135 - # Stock premake5 does not work, use the shipped one
136 - # TODO: revisit this, see above BDEPEND note re premake5
137 - emake -C "${S}"/build/premake/premake5/build/gmake2.unix
138 -
139 - # Regenerate scripts.c so our patch applies
140 - cd "${S}"/build/premake/premake5 || die
141 - "${S}"/build/premake/premake5/bin/release/premake5 embed || die
142 -
143 - # Rebuild premake again
144 - emake -C "${S}"/build/premake/premake5/build/gmake2.unix clean
145 - emake -C "${S}"/build/premake/premake5/build/gmake2.unix
146 -
147 - # Run premake to create build scripts
148 - cd "${S}"/build/premake || die
149 - "${S}"/build/premake/premake5/bin/release/premake5 \
150 - --file="premake5.lua" \
151 - --outpath="../workspaces/gcc/" \
152 - --os=linux \
153 - "${myconf[@]}" \
154 - gmake2 \
155 - || die "Premake failed"
156 -}
157 -
158 -src_compile() {
159 - # Build 3rd party fcollada
160 - einfo "Building bundled fcollada"
161 - emake -C libraries/source/fcollada/src
162 -
163 - # Build bundled NVTT
164 - # nvtt is abandoned upstream and 0ad have forked it and added fixes.
165 - # Use their copy. bug #768930
166 - if use nvtt ; then
167 - cd libraries/source/nvtt || die
168 - elog "Building bundled NVTT (bug #768930)"
169 - JOBS="-j$(makeopts_jobs)" ./build.sh || die "Failed to build bundled NVTT"
170 - cd "${S}" || die
171 - fi
172 -
173 - # Build bundled SpiderMonkey
174 - # We really can't use the system SpiderMonkey right now.
175 - # Breakages occur even on minor bumps in upstream SM,
176 - # e.g. bug #768840.
177 - cd libraries/source/spidermonkey || die
178 - elog "Building bundled SpiderMonkey (bug #768840)"
179 - XARGS="${EPREFIX}/usr/bin/xargs" \
180 - JOBS="-j$(makeopts_jobs)" \
181 - ./build.sh \
182 - || die "Failed to build bundled SpiderMonkey"
183 -
184 - cd "${S}" || die
185 -
186 - # Build 0ad itself!
187 - elog "Building 0ad"
188 - JOBS="-j$(makeopts_jobs)" emake -C build/workspaces/gcc verbose=1
189 -
190 - # Build assets
191 - # (We only do this if we're using a snapshot/non-release)
192 - # See bug #771147 (comment 3) and the old 0ad-data ebuild
193 - # Warning: fragile!
194 - if [[ ${PV} == 9999 || ${PV} == *_pre* ]]; then
195 - # source/lib/sysdep/os/linux/ldbg.cpp:debug_SetThreadName() tries to open /proc/self/task/${TID}/comm for writing.
196 - addpredict /proc/self/task
197 -
198 - # Based on source/tools/dist/build-archives.sh used by source/tools/dist/build.sh.
199 - local archivebuild_input archivebuild_output mod_name
200 - for archivebuild_input in binaries/data/mods/[A-Za-z0-9]*; do
201 - mod_name="${archivebuild_input##*/}"
202 - archivebuild_output="archives/${mod_name}"
203 -
204 - mkdir -p "${archivebuild_output}" || die
205 -
206 - einfo pyrogenesis -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip"
207 - LD_LIBRARY_PATH="binaries/system" binaries/system/pyrogenesis \
208 - -archivebuild="${archivebuild_input}" \
209 - -archivebuild-output="${archivebuild_output}/${mod_name}.zip" \
210 - || die "Failed to build assets"
211 -
212 - if [[ -f "${archivebuild_input}/mod.json" ]]; then
213 - cp "${archivebuild_input}/mod.json" "${archivebuild_output}" || die
214 - fi
215 -
216 - rm -r "${archivebuild_input}" || die
217 - mv "${archivebuild_output}" "${archivebuild_input}" || die
218 - done
219 -
220 - # Based on source/tools/dist/build-unix-win32.sh used by source/tools/dist/build.sh.
221 - rm binaries/data/config/dev.cfg || die
222 - rm -r binaries/data/mods/_test.* || die
223 - fi
224 -}
225 -
226 -src_test() {
227 - cd binaries/system || die
228 - ./test -libdir "${S}/binaries/system" || die "Failed tests"
229 -}
230 -
231 -src_install() {
232 - newbin binaries/system/pyrogenesis 0ad
233 - use editor && newbin binaries/system/ActorEditor 0ad-ActorEditor
234 -
235 - # Merged from 0ad-data
236 - # bug #771147 (comment 3)
237 - insinto /usr/share/${PN}
238 - doins -r binaries/data/{l10n,config,mods,tools}
239 -
240 - # Install bundled SpiderMonkey and nvtt
241 - # bug #771147 (comment 1)
242 - exeinto /usr/$(get_libdir)/${PN}
243 - doexe binaries/system/{libCollada,libmozjs78-ps-release}.so
244 -
245 - use nvtt && doexe binaries/system/{libnvtt,libnvcore,libnvimage,libnvmath}.so
246 - use editor && doexe binaries/system/libAtlasUI.so
247 -
248 - dodoc binaries/system/readme.txt
249 - doicon -s 128 build/resources/${PN}.png
250 - make_desktop_entry ${PN}
251 -}