1 |
commit: 0db072a63b8b3ad4297a2fd7ff5a44b2736ec00e |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 28 22:41:11 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 28 23:04:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0db072a6 |
7 |
|
8 |
games-strategy/0ad: further formatting/style changes |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
games-strategy/0ad/0ad-0.0.24b_alpha.ebuild | 76 +++++++++++++---------------- |
13 |
1 file changed, 33 insertions(+), 43 deletions(-) |
14 |
|
15 |
diff --git a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild b/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild |
16 |
index 2c02a47343b..49ac259e569 100644 |
17 |
--- a/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild |
18 |
+++ b/games-strategy/0ad/0ad-0.0.24b_alpha.ebuild |
19 |
@@ -21,26 +21,26 @@ fi |
20 |
DESCRIPTION="A free, real-time strategy game" |
21 |
HOMEPAGE="https://play0ad.com/" |
22 |
if [[ ${PV} == 9999 ]]; then |
23 |
- SRC_URI="" |
24 |
+ S="${WORKDIR}/${P}" |
25 |
elif [[ ${PV} == *_pre* ]]; then |
26 |
SRC_URI="https://github.com/0ad/0ad/archive/${ZEROAD_GIT_REVISION}.tar.gz -> ${P}.tar.gz" |
27 |
+ S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}" |
28 |
else |
29 |
SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz" |
30 |
SRC_URI+=" https://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz" |
31 |
+ S="${WORKDIR}/${MY_P}" |
32 |
fi |
33 |
|
34 |
-# merged with 0ad-data |
35 |
-# addresses comment #3 |
36 |
-# bug #771147 |
37 |
LICENSE="CC-BY-SA-3.0 GPL-2 LGPL-2.1 MIT ZLIB BitstreamVera LPPL-1.3c" |
38 |
SLOT="0" |
39 |
KEYWORDS="~amd64 ~x86" |
40 |
IUSE="editor +lobby nvtt pch test" |
41 |
RESTRICT="test" |
42 |
|
43 |
-BDEPEND="virtual/pkgconfig |
44 |
- test? ( dev-lang/perl )" |
45 |
- |
46 |
+BDEPEND=" |
47 |
+ virtual/pkgconfig |
48 |
+ test? ( dev-lang/perl ) |
49 |
+" |
50 |
# Removed dependency on nvtt as we use the bundled one |
51 |
# bug #768930 |
52 |
DEPEND=" |
53 |
@@ -60,21 +60,12 @@ DEPEND=" |
54 |
virtual/opengl |
55 |
x11-libs/libX11 |
56 |
editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] ) |
57 |
- lobby? ( >=net-libs/gloox-1.0.20 )" |
58 |
- |
59 |
-# add block on 0ad-data, as it is no longer needed. |
60 |
-# addresses comment #3 |
61 |
-# bug #771147 |
62 |
-RDEPEND="${DEPEND} |
63 |
- !games-strategy/0ad-data" |
64 |
- |
65 |
-if [[ ${PV} == 9999 ]]; then |
66 |
- S="${WORKDIR}/${P}" |
67 |
-elif [[ ${PV} == *_pre* ]]; then |
68 |
- S="${WORKDIR}/${PN}-${ZEROAD_GIT_REVISION}" |
69 |
-else |
70 |
- S="${WORKDIR}/${MY_P}" |
71 |
-fi |
72 |
+ lobby? ( >=net-libs/gloox-1.0.20 ) |
73 |
+" |
74 |
+RDEPEND=" |
75 |
+ ${DEPEND} |
76 |
+ !games-strategy/0ad-data |
77 |
+" |
78 |
|
79 |
PATCHES=( |
80 |
"${FILESDIR}/${PN}-0.0.24_alpha_pre20210116040036-build.patch" |
81 |
@@ -87,11 +78,11 @@ pkg_setup() { |
82 |
src_prepare() { |
83 |
default |
84 |
|
85 |
+ # SpiderMonkey's configure no longer recognises --build for |
86 |
+ # the build tuple |
87 |
sed -i -e "/--build/d" libraries/source/spidermonkey/build.sh || die |
88 |
|
89 |
- # merged from 0ad-data |
90 |
- # addresses comment #3 |
91 |
- # bug #771147 |
92 |
+ # Originally from 0ad-data |
93 |
rm binaries/data/tools/fontbuilder/fonts/*.txt || die |
94 |
} |
95 |
|
96 |
@@ -110,18 +101,18 @@ src_configure() { |
97 |
|
98 |
tc-export CC CXX |
99 |
|
100 |
- # stock premake5 does not work, use the shipped one |
101 |
+ # Stock premake5 does not work, use the shipped one |
102 |
emake -C "${S}"/build/premake/premake5/build/gmake2.unix |
103 |
|
104 |
- # regenerate scripts.c so our patch applies |
105 |
+ # Regenerate scripts.c so our patch applies |
106 |
cd "${S}"/build/premake/premake5 || die |
107 |
"${S}"/build/premake/premake5/bin/release/premake5 embed || die |
108 |
|
109 |
- # rebuild premake again... this is the most stupid build system |
110 |
+ # Rebuild premake again |
111 |
emake -C "${S}"/build/premake/premake5/build/gmake2.unix clean |
112 |
emake -C "${S}"/build/premake/premake5/build/gmake2.unix |
113 |
|
114 |
- # run premake to create build scripts |
115 |
+ # Run premake to create build scripts |
116 |
cd "${S}"/build/premake || die |
117 |
"${S}"/build/premake/premake5/bin/release/premake5 \ |
118 |
--file="premake5.lua" \ |
119 |
@@ -135,23 +126,22 @@ src_configure() { |
120 |
src_compile() { |
121 |
tc-export AR |
122 |
|
123 |
- # build 3rd party fcollada |
124 |
+ # Build 3rd party fcollada |
125 |
einfo "Building bundled fcollada" |
126 |
emake -C libraries/source/fcollada/src |
127 |
|
128 |
- # build bundled nvtt |
129 |
- # nvtt is abandoned upstream and 0ad have forked it |
130 |
- # and added fixes. Use their copy. |
131 |
- # bug #768930 |
132 |
+ # Build bundled NVTT |
133 |
+ # nvtt is abandoned upstream and 0ad have forked it and added fixes. |
134 |
+ # Use their copy. bug #768930 |
135 |
if use nvtt ; then |
136 |
cd libraries/source/nvtt || die |
137 |
- elog "Building bundled nvtt (bug #768930)" |
138 |
- ./build.sh JOBS="-j$(makeopts_jobs)" || die "Failed to build bundled nvtt" |
139 |
+ elog "Building bundled NVTT (bug #768930)" |
140 |
+ ./build.sh JOBS="-j$(makeopts_jobs)" || die "Failed to build bundled NVTT" |
141 |
cd "${S}" || die |
142 |
fi |
143 |
|
144 |
- # build bundled spidermonkey |
145 |
- # We genuinely can't use the system SpiderMonkey right now. |
146 |
+ # Build bundled SpiderMonkey |
147 |
+ # We really can't use the system SpiderMonkey right now. |
148 |
# Breakages occur even on minor bumps in upstream SM, |
149 |
# e.g. bug #768840. |
150 |
cd libraries/source/spidermonkey || die |
151 |
@@ -159,14 +149,14 @@ src_compile() { |
152 |
XARGS="${EPREFIX}/usr/bin/xargs" ./build.sh JOBS="-j(makeopts_jobs)" || die "Failed to build bundled SpiderMonkey" |
153 |
cd "${S}" || die |
154 |
|
155 |
- # build 0ad |
156 |
+ # Build 0ad itself! |
157 |
elog "Building 0ad" |
158 |
emake -C build/workspaces/gcc verbose=1 JOBS="-j$(makeopts_jobs)" |
159 |
|
160 |
- # Merged from 0ad-data |
161 |
- # bug #771147 (comment 3) |
162 |
- # We're building the assets from source if we're not using a release |
163 |
- # Warning: fragile |
164 |
+ # Build assets |
165 |
+ # (We only do this if we're using a snapshot/non-release) |
166 |
+ # See bug #771147 (comment 3) and the old 0ad-data ebuild |
167 |
+ # Warning: fragile! |
168 |
if [[ ${PV} == 9999 || ${PV} == *_pre* ]]; then |
169 |
# source/lib/sysdep/os/linux/ldbg.cpp:debug_SetThreadName() tries to open /proc/self/task/${TID}/comm for writing. |
170 |
addpredict /proc/self/task |