1 |
commit: eadf9e483802d7a98ad61a60ae054b5cd42f9472 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 2 04:59:53 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 05:37:35 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eadf9e48 |
7 |
|
8 |
dev-games/godot: add 4.0_beta4 |
9 |
|
10 |
Also fix optimize usage, was fine in beta2 but in beta3 the |
11 |
meaning changed and =none isn't 'pass nothing' but rather -O0. |
12 |
The new optimize=custom is the one we want. |
13 |
|
14 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
15 |
|
16 |
dev-games/godot/Manifest | 1 + |
17 |
dev-games/godot/godot-4.0_beta4.ebuild | 255 +++++++++++++++++++++++++++++++++ |
18 |
2 files changed, 256 insertions(+) |
19 |
|
20 |
diff --git a/dev-games/godot/Manifest b/dev-games/godot/Manifest |
21 |
index d0338ddf87ab..78fe5b926575 100644 |
22 |
--- a/dev-games/godot/Manifest |
23 |
+++ b/dev-games/godot/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST godot-3.5.1-stable.tar.xz 24153448 BLAKE2B 9d61276a2d82ef4f4487ec1046b7fa58f2b3626640b2db25c1f98c3f8e2ff40eddcf943fd9ffaaf6814fbafbbe7ef1d3f642d77af953b87731cff570ac3a5473 SHA512 59e5ca88534f542562971efb83b76561705f9ca8761311f01b4453857e7ae046c17cadd0d5ca6f6f56e262b5031294a8b9ad970fa6ffc95e1a6a1e1bae48d55f |
26 |
DIST godot-4.0-beta3.tar.xz 31187404 BLAKE2B 98af9e1394b9d35286ff97ead83bd8fe2287b52b059589d7d35a349a00fd88aee8c58f4f391a2a7287dabe51e9e9d64d48883fb5bf464ffee608ec62bc1ab06a SHA512 14fa2d7b0c0c86d6a82022e48306a0b440c58fa7b0ddc24fd65833009afedbbca038ba43e796610ffee031c3e83cc071c80d11b9c91e5bfa7bebd81ad6621508 |
27 |
+DIST godot-4.0-beta4.tar.xz 31234960 BLAKE2B aef52b0171cc5dfbbe7393ee06db247812662b9e52d9bbb1a5fa6278a5245c3aa484c327b9238e863c6ffa51d3fc66e89bf4ea66c9369efc02cf41b525855e8e SHA512 8183d65fdde27e2ac111ec8509a1dc8f1eacf539d88782b131d0f4b480a8ae3f40ffea66cfb23b2b67d474565b7f87e3903c681b696e02d39dd5ca908240eb4a |
28 |
|
29 |
diff --git a/dev-games/godot/godot-4.0_beta4.ebuild b/dev-games/godot/godot-4.0_beta4.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..9a915964766b |
32 |
--- /dev/null |
33 |
+++ b/dev-games/godot/godot-4.0_beta4.ebuild |
34 |
@@ -0,0 +1,255 @@ |
35 |
+# Copyright 2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+PYTHON_COMPAT=( python3_{8..10} ) |
41 |
+inherit bash-completion-r1 desktop python-any-r1 scons-utils toolchain-funcs xdg |
42 |
+ |
43 |
+MY_P="${PN}-$(ver_rs 2 -)" |
44 |
+ |
45 |
+DESCRIPTION="Multi-platform 2D and 3D game engine with a feature-rich editor" |
46 |
+HOMEPAGE="https://godotengine.org/" |
47 |
+SRC_URI="https://downloads.tuxfamily.org/godotengine/$(ver_rs 2 /)/${MY_P}.tar.xz" |
48 |
+S="${WORKDIR}/${MY_P}" |
49 |
+ |
50 |
+LICENSE=" |
51 |
+ MIT |
52 |
+ Apache-2.0 BSD Boost-1.0 CC0-1.0 Unlicense ZLIB |
53 |
+ gui? ( CC-BY-4.0 ) tools? ( OFL-1.1 )" |
54 |
+SLOT="4" |
55 |
+KEYWORDS="~amd64" |
56 |
+# Enable roughly same as upstream by default so it works as expected, |
57 |
+# except raycast (tools-only heavy dependency), and deprecated. |
58 |
+IUSE=" |
59 |
+ +dbus debug deprecated +fontconfig +gui pulseaudio raycast |
60 |
+ +runner speech test +theora +tools +udev +upnp +webp" |
61 |
+# Disable tests until out of beta, tests themselves are new and can be volatile |
62 |
+RESTRICT="test" # "!test? ( test ) !tools? ( test ) !webp? ( test )" |
63 |
+ |
64 |
+# dlopen: alsa-lib,dbus,fontconfig,pulseaudio,speech-dispatcher,udev |
65 |
+RDEPEND=" |
66 |
+ app-arch/zstd:= |
67 |
+ dev-games/recastnavigation:= |
68 |
+ dev-libs/icu:= |
69 |
+ dev-libs/libpcre2:=[pcre32] |
70 |
+ media-libs/freetype[brotli,harfbuzz] |
71 |
+ media-libs/harfbuzz:=[icu] |
72 |
+ media-libs/libogg |
73 |
+ media-libs/libpng:= |
74 |
+ media-libs/libvorbis |
75 |
+ <net-libs/mbedtls-3:= |
76 |
+ net-libs/wslay |
77 |
+ sys-libs/zlib:= |
78 |
+ fontconfig? ( media-libs/fontconfig ) |
79 |
+ gui? ( |
80 |
+ dev-util/glslang |
81 |
+ media-libs/alsa-lib |
82 |
+ media-libs/libglvnd[X] |
83 |
+ media-libs/vulkan-loader[X] |
84 |
+ x11-libs/libX11 |
85 |
+ x11-libs/libXcursor |
86 |
+ x11-libs/libXext |
87 |
+ x11-libs/libXi |
88 |
+ x11-libs/libXinerama |
89 |
+ x11-libs/libXrandr |
90 |
+ x11-libs/libXrender |
91 |
+ dbus? ( sys-apps/dbus ) |
92 |
+ pulseaudio? ( media-libs/libpulse ) |
93 |
+ tools? ( raycast? ( media-libs/embree:3 ) ) |
94 |
+ udev? ( virtual/udev ) |
95 |
+ ) |
96 |
+ speech? ( app-accessibility/speech-dispatcher ) |
97 |
+ theora? ( media-libs/libtheora ) |
98 |
+ tools? ( app-misc/ca-certificates ) |
99 |
+ upnp? ( net-libs/miniupnpc:= ) |
100 |
+ webp? ( media-libs/libwebp:= )" |
101 |
+DEPEND=" |
102 |
+ ${RDEPEND} |
103 |
+ gui? ( |
104 |
+ dev-util/vulkan-headers |
105 |
+ x11-base/xorg-proto |
106 |
+ ) |
107 |
+ tools? ( test? ( dev-cpp/doctest ) )" |
108 |
+BDEPEND="virtual/pkgconfig" |
109 |
+ |
110 |
+PATCHES=( |
111 |
+ "${FILESDIR}"/${PN}-4.0-musl.patch |
112 |
+ "${FILESDIR}"/${PN}-4.0_alpha14-scons.patch |
113 |
+ "${FILESDIR}"/${PN}-4.0_beta3-headless-header.patch |
114 |
+) |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ default |
118 |
+ |
119 |
+ sed -i "1,5s/ godot/&${SLOT}/i" misc/dist/linux/godot.6 || die |
120 |
+ sed -i "/id/s/Godot/&${SLOT}/" misc/dist/linux/org.godotengine.Godot.appdata.xml || die |
121 |
+ sed -e "s/=godot/&${SLOT}/" -e "/^Name=/s/$/ ${SLOT}/" \ |
122 |
+ -i misc/dist/linux/org.godotengine.Godot.desktop || die |
123 |
+ |
124 |
+ sed -i "s|pkg-config |$(tc-getPKG_CONFIG) |" platform/linuxbsd/detect.py || die |
125 |
+ |
126 |
+ # use of builtin_ switches can be messy (see below), delete to be sure |
127 |
+ local unbundle=( |
128 |
+ doctest embree freetype glslang graphite harfbuzz icu4c libogg libpng |
129 |
+ libtheora libvorbis libwebp mbedtls miniupnpc pcre2 recastnavigation |
130 |
+ volk vulkan/include wslay zlib zstd |
131 |
+ # certs: unused by generated header, but scons panics if not found |
132 |
+ ) |
133 |
+ rm -r "${unbundle[@]/#/thirdparty/}" || die |
134 |
+ |
135 |
+ # do symlinks to avoid too much patching with hardcoded header paths |
136 |
+ mkdir thirdparty/lib{vorbis,ogg} || die |
137 |
+ ln -s "${ESYSROOT}"/usr/include thirdparty/zstd || die |
138 |
+ ln -s "${ESYSROOT}"/usr/include/doctest thirdparty/ || die |
139 |
+ ln -s "${ESYSROOT}"/usr/include/ogg thirdparty/libogg/ || die |
140 |
+ ln -s "${ESYSROOT}"/usr/include/vorbis thirdparty/libvorbis/ || die |
141 |
+} |
142 |
+ |
143 |
+src_compile() { |
144 |
+ local -x GODOT_VERSION_STATUS=$(ver_cut 3-4) # for dev versions only |
145 |
+ local -x BUILD_NAME=gentoo # replaces "custom_build" in version string |
146 |
+ |
147 |
+ local esconsargs=( |
148 |
+ AR="$(tc-getAR)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" |
149 |
+ |
150 |
+ progress=no |
151 |
+ verbose=yes |
152 |
+ |
153 |
+ deprecated=$(usex deprecated) |
154 |
+ #execinfo=$(usex !elibc_glibc) # libexecinfo is not packaged |
155 |
+ fontconfig=$(usex fontconfig) |
156 |
+ minizip=yes # uses a modified bundled copy |
157 |
+ opengl3=$(usex gui) |
158 |
+ pulseaudio=$(usex gui $(usex pulseaudio)) |
159 |
+ speechd=$(usex speech) |
160 |
+ udev=$(usex gui $(usex udev)) |
161 |
+ use_dbus=$(usex gui $(usex dbus)) |
162 |
+ use_volk=no # unnecessary when linking directly to libvulkan |
163 |
+ vulkan=$(usex gui) # hard-required and favored by upstream over gles3 |
164 |
+ x11=$(usex gui) |
165 |
+ |
166 |
+ system_certs_path="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt |
167 |
+ |
168 |
+ # platform/*/detect.py uses builtin_* switches to check if need |
169 |
+ # to link with system libraries, but ignores whether the dep is |
170 |
+ # actually used, so "enable" deleted builtins on disabled deps |
171 |
+ builtin_certs=no |
172 |
+ builtin_embree=$(usex !gui yes $(usex !tools yes $(usex !raycast))) |
173 |
+ builtin_enet=yes # bundled copy is patched for IPv6+DTLS support |
174 |
+ builtin_freetype=no |
175 |
+ builtin_glslang=$(usex !gui) |
176 |
+ builtin_graphite=no |
177 |
+ builtin_harfbuzz=no |
178 |
+ builtin_icu=no |
179 |
+ builtin_libogg=no |
180 |
+ builtin_libpng=no |
181 |
+ builtin_libtheora=$(usex !theora) |
182 |
+ builtin_libvorbis=no |
183 |
+ builtin_libwebp=$(usex !webp) |
184 |
+ builtin_mbedtls=no |
185 |
+ builtin_miniupnpc=$(usex !upnp) |
186 |
+ builtin_msdfgen=yes # not wired for unbundling nor packaged |
187 |
+ builtin_pcre2=no |
188 |
+ builtin_recast=no |
189 |
+ builtin_rvo2=yes # bundled copy has godot-specific changes |
190 |
+ builtin_squish=yes # ^ likewise, may not be safe to unbundle |
191 |
+ builtin_wslay=no |
192 |
+ builtin_xatlas=yes # not wired for unbundling nor packaged |
193 |
+ builtin_zlib=no |
194 |
+ builtin_zstd=no |
195 |
+ # also bundled but lacking a builtin_* switch: |
196 |
+ # amd-fsr, basis_universal, cvtt, etcpak, fonts, glad, |
197 |
+ # jpeg-compressor, meshoptimizer, minimp3, minizip (patched to |
198 |
+ # seek in archives), noise, oidn, openxr, spirv-reflect, thorvg, |
199 |
+ # tinyexr, vhacd, vulkan (minus include/) and the misc directory. |
200 |
+ |
201 |
+ # modules with optional dependencies, "possible" to disable more but |
202 |
+ # gets messy and breaks all sorts of features (expected enabled) |
203 |
+ module_glslang_enabled=$(usex gui) |
204 |
+ module_gridmap_enabled=$(usex deprecated) # fails without deprecated |
205 |
+ module_mono_enabled=no # unhandled |
206 |
+ # note raycast is only enabled on amd64+arm64, see raycast/config.py |
207 |
+ module_raycast_enabled=$(usex gui $(usex tools $(usex raycast))) |
208 |
+ module_theora_enabled=$(usex theora) |
209 |
+ module_upnp_enabled=$(usex upnp) |
210 |
+ module_webp_enabled=$(usex webp) |
211 |
+ |
212 |
+ # let *FLAGS handle these, e.g. can pass -flto as-is |
213 |
+ debug_symbols=no |
214 |
+ lto=none |
215 |
+ optimize=custom |
216 |
+ use_static_cpp=no |
217 |
+ ) |
218 |
+ |
219 |
+ if use runner && use tools; then |
220 |
+ # build alternate faster + ~60% smaller binary for running |
221 |
+ # games or servers without game development debug paths |
222 |
+ escons extra_suffix=runner target=template_release "${esconsargs[@]}" |
223 |
+ fi |
224 |
+ |
225 |
+ esconsargs+=( |
226 |
+ target=$(usex tools editor template_$(usex debug{,} release)) |
227 |
+ dev_build=$(usex debug) |
228 |
+ |
229 |
+ # harmless but note this bakes in --test in the final binary |
230 |
+ tests=$(usex tools $(usex test)) |
231 |
+ ) |
232 |
+ |
233 |
+ escons extra_suffix=main "${esconsargs[@]}" |
234 |
+} |
235 |
+ |
236 |
+src_test() { |
237 |
+ xdg_environment_reset |
238 |
+ bin/godot*.main --headless --test || die |
239 |
+} |
240 |
+ |
241 |
+src_install() { |
242 |
+ local s=godot${SLOT} |
243 |
+ |
244 |
+ newbin bin/godot*.main ${s} |
245 |
+ if use runner && use tools; then |
246 |
+ newbin bin/godot*.runner ${s}-runner |
247 |
+ else |
248 |
+ # always available, revdeps shouldn't depend on [runner] |
249 |
+ dosym ${s} /usr/bin/${s}-runner |
250 |
+ fi |
251 |
+ |
252 |
+ newman misc/dist/linux/godot.6 ${s}.6 |
253 |
+ dodoc AUTHORS.md CHANGELOG.md DONORS.md README.md |
254 |
+ |
255 |
+ if use gui; then |
256 |
+ newicon icon.svg ${s}.svg |
257 |
+ newmenu misc/dist/linux/org.godotengine.Godot.desktop \ |
258 |
+ org.godotengine.${s^}.desktop |
259 |
+ |
260 |
+ insinto /usr/share/metainfo |
261 |
+ newins misc/dist/linux/org.godotengine.Godot.appdata.xml \ |
262 |
+ org.godotengine.${s^}.appdata.xml |
263 |
+ |
264 |
+ insinto /usr/share/mime/application |
265 |
+ newins misc/dist/linux/org.godotengine.Godot.xml \ |
266 |
+ org.godotengine.${s^}.xml |
267 |
+ fi |
268 |
+ |
269 |
+ newbashcomp misc/dist/shell/godot.bash-completion ${s} |
270 |
+ bashcomp_alias ${s}{,-runner} |
271 |
+ |
272 |
+ insinto /usr/share/fish/vendor_completions.d |
273 |
+ newins misc/dist/shell/godot.fish ${s}.fish |
274 |
+ dosym ${s}.fish /usr/share/fish/vendor_completions.d/${s}-runner.fish |
275 |
+ |
276 |
+ insinto /usr/share/zsh/site-functions |
277 |
+ newins misc/dist/shell/_godot.zsh-completion _${s} |
278 |
+ dosym _${s} /usr/share/zsh/site-functions/_${s}-runner |
279 |
+} |
280 |
+ |
281 |
+pkg_postinst() { |
282 |
+ xdg_pkg_postinst |
283 |
+ |
284 |
+ if [[ ! ${REPLACING_VERSIONS} ]] && has_version ${CATEGORY}/${PN}:3; then |
285 |
+ elog |
286 |
+ elog "Remember to make backups before opening any Godot <=3.x projects in Godot 4." |
287 |
+ elog "Automated migration is only partial, and it would be difficult to revert." |
288 |
+ fi |
289 |
+} |