From 8d2154f483d832fe835735f6861f5039ad089a98 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Wed, 1 Mar 2023 19:17:28 +0100 Subject: [PATCH] godot: update to 4.0. --- srcpkgs/godot/patches/10-fix-musl.patch | 2 +- srcpkgs/godot/patches/ppc.patch | 87 ------------------------- srcpkgs/godot/template | 40 +++++------- 3 files changed, 19 insertions(+), 110 deletions(-) delete mode 100644 srcpkgs/godot/patches/ppc.patch diff --git a/srcpkgs/godot/patches/10-fix-musl.patch b/srcpkgs/godot/patches/10-fix-musl.patch index ed32914e0708..42e6111c6afe 100644 --- a/srcpkgs/godot/patches/10-fix-musl.patch +++ b/srcpkgs/godot/patches/10-fix-musl.patch @@ -1,5 +1,5 @@ --- a/joystick_linux.cpp 2017-12-12 21:28:08.263329050 +0100 -+++ b/platform/x11/joypad_linux.cpp 2017-12-12 21:29:25.500336429 +0100 ++++ b/platform/linuxbsd/joypad_linux.cpp 2017-12-12 21:29:25.500336429 +0100 @@ -42,6 +42,10 @@ #include #endif diff --git a/srcpkgs/godot/patches/ppc.patch b/srcpkgs/godot/patches/ppc.patch deleted file mode 100644 index a6e4d3638fd4..000000000000 --- a/srcpkgs/godot/patches/ppc.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 9ae32c08a4cab0a77eed682c9fb188ce7fc6f85a Mon Sep 17 00:00:00 2001 -From: q66 -Date: Mon, 1 Nov 2021 21:05:31 +0100 -Subject: [PATCH] add ppc detection - ---- - core/os/os.cpp | 14 ++++++++++++++ - modules/lightmapper_cpu/config.py | 3 +++ - modules/raycast/config.py | 3 +++ - platform/x11/detect.py | 8 ++++++++ - 4 files changed, 28 insertions(+) - -diff --git a/core/os/os.cpp b/core/os/os.cpp -index 35896d8..948c79a 100644 ---- a/core/os/os.cpp -+++ b/core/os/os.cpp -@@ -699,6 +699,20 @@ bool OS::has_feature(const String &p_feature) { - if (p_feature == "arm") { - return true; - } -+#elif defined(__powerpc__) -+#if defined(__powerpc64__) -+#if defined(__LITTLE_ENDIAN__) -+ if (p_feature == "ppc64le") { -+ return true; -+ } -+#endif -+ if (p_feature == "ppc64") { -+ return true; -+ } -+#endif -+ if (p_feature == "ppc") { -+ return true; -+ } - #endif - - if (_check_internal_feature_support(p_feature)) -diff --git a/modules/lightmapper_cpu/config.py b/modules/lightmapper_cpu/config.py -index a3a33b3..842f9ae 100644 ---- a/modules/lightmapper_cpu/config.py -+++ b/modules/lightmapper_cpu/config.py -@@ -15,6 +15,9 @@ def can_build(env, platform): - if env["bits"] == "32": - return False - -+ if env["arch"].startswith("ppc"): -+ return False -+ - return True - - -diff --git a/modules/raycast/config.py b/modules/raycast/config.py -index 6ea8e0a..bc2d40c 100644 ---- a/modules/raycast/config.py -+++ b/modules/raycast/config.py -@@ -14,6 +14,9 @@ def can_build(env, platform): - if env["bits"] == "32": - return False - -+ if env["arch"].startswith("ppc"): -+ return False -+ - return True - - -diff --git a/platform/x11/detect.py b/platform/x11/detect.py -index b6472e2..c1858a7 100644 ---- a/platform/x11/detect.py -+++ b/platform/x11/detect.py -@@ -119,6 +119,14 @@ def configure(env): - if env["bits"] == "default": - env["bits"] = "64" if is64 else "32" - -+ if env["arch"] == "": -+ if platform.machine() == "ppc64le": -+ env["arch"] = "ppc64le" -+ elif platform.machine() == "ppc64": -+ env["arch"] = "ppc64" -+ elif platform.machine() == "ppc": -+ env["arch"] = "ppc" -+ - ## Compiler configuration - - if "CXX" in env and "clang" in os.path.basename(env["CXX"]): --- -2.33.0 - diff --git a/srcpkgs/godot/template b/srcpkgs/godot/template index aa4fb90e11fc..79278349b8d6 100644 --- a/srcpkgs/godot/template +++ b/srcpkgs/godot/template @@ -1,32 +1,28 @@ # Template file for 'godot' pkgname=godot -version=3.5.1 +version=4.0 revision=1 archs="x86_64* i686* aarch64* armv7* ppc64*" build_style=scons -# Godot contains private copies of libraries -# that already have been packaged elsewhere. -# Use builtin bullet for now as it's too old in repos (needs 2.89) -# Toggle to not use builtin once bullet has been updated -make_build_args="platform=x11 tools=yes target=release_debug dev=no progress=no - builtin_bullet=false builtin_libpng=false builtin_libvpx=false - builtin_libwebp=false builtin_libogg=false builtin_libtheora=false - builtin_opus=false builtin_libvorbis=false builtin_enet=false - builtin_zlib=false builtin_freetype=false builtin_mbedtls=false - builtin_miniupnpc=false builtin_pcre2=false" +make_build_args="platform=linuxbsd target=editor progress=no production=yes + optimize=speed deprecated=no builtin_embree=false builtin_enet=false + builtin_freetype=false builtin_graphite=false builtin_harfbuzz=false + builtin_libogg=false builtin_libpng=false builtin_libtheora=false + builtin_libvorbis=false builtin_libwebp=false builtin_mbedtls=false + builtin_miniupnpc=false builtin_pcre2=false builtin_zlib=false + builtin_zstd=false" hostmakedepends="pkg-config clang" -makedepends=" - alsa-lib-devel freetype-devel glu-devel libXcursor-devel libXi-devel - libXinerama-devel libXrender-devel libXrandr-devel libX11-devel - bullet-devel libpng-devel libvpx-devel libwebp-devel libogg-devel libtheora-devel - opus-devel opusfile-devel libvorbis-devel libenet-devel zlib-devel mbedtls-devel - miniupnpc-devel pcre2-devel pulseaudio-devel" +makedepends="alsa-lib-devel freetype-devel mesa glu-devel libXcursor-devel + libXi-devel libXinerama-devel libXrender-devel libXrandr-devel libX11-devel + libpng-devel libwebp-devel libogg-devel libtheora-devel libvorbis-devel + libenet-devel zlib-devel mbedtls-devel miniupnpc-devel pcre2-devel + pulseaudio-devel graphite-devel embree-devel harfbuzz-devel libzstd-devel" short_desc="Multiplatform 2D and 3D engine" maintainer="Nick Hahn " license="MIT" homepage="https://www.godotengine.org/" distfiles="https://github.com/godotengine/godot/archive/${version}-stable.tar.gz" -checksum=164523c1c8aef0b69b135645794f5bece3f63788556a56aa293c118cde457023 +checksum=e6cf28411ae4196db0bcd608f77bcafc0c019ea6dd6cc8c750ca3cc3755df547 nocross=https://build.voidlinux.org/builders/armv7l_builder/builds/6342/steps/shell_3/logs/stdio CFLAGS+=" -fPIE -fPIC" @@ -34,7 +30,7 @@ LDFLAGS+=" -pie" post_extract() { vsed -e 's/#ifdef CRASH_HANDLER_ENABLED/#if defined(CRASH_HANDLER_ENABLED) \&\& defined(__GLIBC__)/' \ - -i platform/x11/crash_handler_x11.cpp + -i platform/linuxbsd/crash_handler_linuxbsd.cpp } pre_build() { @@ -47,8 +43,8 @@ do_install() { vinstall ${wrksrc}/icon.png 644 /usr/share/pixmaps/ godot.png case "$XBPS_TARGET_MACHINE" in - x86_64*|aarch64*) vbin bin/godot.x11.opt.tools.64 godot;; - ppc64*) vbin bin/godot.x11.opt.tools.ppc64 godot;; - *) vbin bin/godot.x11.opt.tools.32 godot;; + x86_64*|aarch64*) vbin bin/godot.linuxbsd.editor.x86_64 godot;; + ppc64*) vbin bin/godot.linuxbsd.editor.ppc64 godot;; + *) vbin bin/godot.linuxbsd.editor.x86_32 godot;; esac }