From 55e3f3c2f860cddea54c7b3a2b1f2526ed0f9889 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Sun, 2 Jul 2023 09:17:28 +0200 Subject: [PATCH] godot: update to 4.0.3. --- srcpkgs/godot/INSTALL.msg | 6 ++ srcpkgs/godot/patches/10-fix-musl.patch | 2 +- srcpkgs/godot/patches/ppc.patch | 87 ------------------------- srcpkgs/godot/template | 61 ++++++++++------- 4 files changed, 43 insertions(+), 113 deletions(-) create mode 100644 srcpkgs/godot/INSTALL.msg delete mode 100644 srcpkgs/godot/patches/ppc.patch diff --git a/srcpkgs/godot/INSTALL.msg b/srcpkgs/godot/INSTALL.msg new file mode 100644 index 000000000000..c05923f489a3 --- /dev/null +++ b/srcpkgs/godot/INSTALL.msg @@ -0,0 +1,6 @@ +If your graphics card does not support Vulkan, you need to use +the OpenGL 3 renderer: + +$ godot --rendering-driver opengl3 + +More details: https://github.com/godotengine/godot/issues/58927 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..956fe154b59d 100644 --- a/srcpkgs/godot/template +++ b/srcpkgs/godot/template @@ -1,41 +1,49 @@ # Template file for 'godot' pkgname=godot -version=3.5.1 +version=4.0.3 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" +# Build currently fails with embree-4.X +make_build_args="platform=linuxbsd target=editor progress=no production=yes + builtin_embree=true 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 harfbuzz-devel libzstd-devel + speech-dispatcher-devel" +depends="speech-dispatcher" 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=8d629aa4910bd0b13354a3b96c253fb62df130ff8acb510c81e23cd100bfdc9f nocross=https://build.voidlinux.org/builders/armv7l_builder/builds/6342/steps/shell_3/logs/stdio CFLAGS+=" -fPIE -fPIC" 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 -} +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + makedepends+=" libexecinfo-devel" + depends+=" libexecinfo" +fi + +case "$XBPS_TARGET_MACHINE" in + i686*) arch="x86_32" ;; + x86_64*) arch="x86_64" ;; + aarch64*) arch="arm64" ;; + armv7*) arch="arm32" ;; + ppc64*) arch="ppc64" ;; +esac + +make_build_args+=" arch=$arch" pre_build() { export CXXFLAGS=" $CXXFLAGS " @@ -46,9 +54,12 @@ do_install() { vinstall ${FILESDIR}/godot.desktop 644 /usr/share/applications/ 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*) vbin bin/godot.linuxbsd.editor.x86_64 godot;; + i686*) vbin bin/godot.linuxbsd.editor.x86_32 godot;; + aarch64*) vbin bin/godot.linuxbsd.editor.arm64 godot;; + armv7*) vbin bin/godot.linuxbsd.editor.arm32 godot;; + ppc64*) vbin bin/godot.linuxbsd.editor.ppc64 godot;; esac }