Omar Polo <o...@omarpolo.com> writes:
> Hello ports@, > > This time upstream was faster than usual, with only two RC before the > release. The release notes are available here[0] and the full changelog > here[1]. I've quickly tested with hive time, joyspring and oddventure: > everything seems to work as usual (sndio audio backend included.) > > Quoting the release notes: > >> Godot 3.4 is compatible with Godot 3.3.x projects and is a recommended >> upgrade for all 3.3.x users. Updated diff that unbreaks various arches too. Thanks jca@ for building it on sparc64 and riscv64! (I'm still sneaking it the plist update with the README ;-) Cheers, Omar Polo Index: Makefile =================================================================== RCS file: /home/cvs/ports/games/godot/Makefile,v retrieving revision 1.28 diff -u -p -r1.28 Makefile --- Makefile 29 Oct 2021 21:07:02 -0000 1.28 +++ Makefile 10 Nov 2021 11:04:30 -0000 @@ -1,17 +1,13 @@ # $OpenBSD: Makefile,v 1.28 2021/10/29 21:07:02 thfr Exp $ BROKEN-powerpc = fails at runtime, the UI is totally blank -BROKEN-powerpc64 = Unknown ISA -BROKEN-riscv64 = Unknown ISA -BROKEN-mips64 = Unknown ISA COMMENT = 2D and 3D game engine -V = 3.3.4 +V = 3.4 GODOTSTEAM_V = g333-s151-g397 DISTNAME = godot-${V}-stable PKGNAME = godot-${V} -REVISION = 0 CATEGORIES = games HOMEPAGE = https://godotengine.org/ MAINTAINER = Omar Polo <o...@omarpolo.com> @@ -66,6 +62,13 @@ MODSCONS_FLAGS = CC="${CC}" \ verbose=yes \ warnings=extra \ werror=no + +# The raycast module requires embree which is enabled on all 64bit +# arches but actually supports only amd64. +.if ! ${MACHINE_ARCH:Mamd64} +MODSCONS_FLAGS += module_raycast_enabled="false" +.endif + LIB_DEPENDS = archivers/zstd \ audio/libvorbis \ audio/musepack \ Index: distinfo =================================================================== RCS file: /home/cvs/ports/games/godot/distinfo,v retrieving revision 1.10 diff -u -p -r1.10 distinfo --- distinfo 29 Oct 2021 21:07:02 -0000 1.10 +++ distinfo 8 Nov 2021 14:02:29 -0000 @@ -1,4 +1,4 @@ -SHA256 (godot-3.3.4/g333-s151-g397.tar.gz) = Wqzzcwh+u0r5PZZd5WgJCZ3dFhdJs8ZCbNNS5Ln5V9w= -SHA256 (godot-3.3.4/godot-3.3.4-stable.tar.xz) = n1On1tY/Tp15PEGtG++JUYYZ8+Hw3dCJplIfLV7cWFk= -SIZE (godot-3.3.4/g333-s151-g397.tar.gz) = 149576 -SIZE (godot-3.3.4/godot-3.3.4-stable.tar.xz) = 20682120 +SHA256 (godot-3.4/g333-s151-g397.tar.gz) = Wqzzcwh+u0r5PZZd5WgJCZ3dFhdJs8ZCbNNS5Ln5V9w= +SHA256 (godot-3.4/godot-3.4-stable.tar.xz) = GwGqPO+axBwQM9A2XF5M506i2VR/MzqoGATmDTPftOY= +SIZE (godot-3.4/g333-s151-g397.tar.gz) = 149576 +SIZE (godot-3.4/godot-3.4-stable.tar.xz) = 22647212 Index: files/sndio/audio_driver_sndio.cpp =================================================================== RCS file: /home/cvs/ports/games/godot/files/sndio/audio_driver_sndio.cpp,v retrieving revision 1.2 diff -u -p -r1.2 audio_driver_sndio.cpp --- files/sndio/audio_driver_sndio.cpp 3 May 2021 19:10:24 -0000 1.2 +++ files/sndio/audio_driver_sndio.cpp 8 Nov 2021 14:35:50 -0000 @@ -94,7 +94,7 @@ void AudioDriverSndio::thread_func(void size_t bytes = ad->period_size * ad->channels * sizeof(int32_t); if (sio_write(ad->handle, ad->samples.ptr(), bytes) != bytes) { - ERR_PRINTS("sndio: fatal error"); + ERR_PRINT("sndio: fatal error"); ad->exit_thread = true; } } Index: patches/patch-core_io_compression_cpp =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-core_io_compression_cpp,v retrieving revision 1.3 diff -u -p -r1.3 patch-core_io_compression_cpp --- patches/patch-core_io_compression_cpp 22 Aug 2021 01:43:49 -0000 1.3 +++ patches/patch-core_io_compression_cpp 8 Nov 2021 14:15:57 -0000 @@ -9,7 +9,7 @@ based on github issue #17374 Index: core/io/compression.cpp --- core/io/compression.cpp.orig +++ core/io/compression.cpp -@@ -80,16 +80,8 @@ int Compression::compress(uint8_t *p_dst, const uint8_ +@@ -77,16 +77,8 @@ int Compression::compress(uint8_t *p_dst, const uint8_ } break; case MODE_ZSTD: { @@ -27,7 +27,7 @@ Index: core/io/compression.cpp } break; } -@@ -175,13 +167,7 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_ +@@ -167,13 +159,7 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_ return total; } break; case MODE_ZSTD: { @@ -42,9 +42,10 @@ Index: core/io/compression.cpp } break; } -@@ -191,5 +177,3 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_ +@@ -272,6 +258,4 @@ int Compression::decompress_dynamic(PoolVector<uint8_t int Compression::zlib_level = Z_DEFAULT_COMPRESSION; int Compression::gzip_level = Z_DEFAULT_COMPRESSION; int Compression::zstd_level = 3; -bool Compression::zstd_long_distance_matching = false; -int Compression::zstd_window_log_size = 27; // ZSTD_WINDOWLOG_LIMIT_DEFAULT + int Compression::gzip_chunk = 16384; Index: patches/patch-core_io_compression_h =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-core_io_compression_h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-core_io_compression_h --- patches/patch-core_io_compression_h 27 Apr 2018 07:32:53 -0000 1.1.1.1 +++ patches/patch-core_io_compression_h 8 Nov 2021 14:15:57 -0000 @@ -15,6 +15,6 @@ Index: core/io/compression.h static int zstd_level; - static bool zstd_long_distance_matching; - static int zstd_window_log_size; + static int gzip_chunk; enum Mode { - MODE_FASTLZ, Index: patches/patch-core_project_settings_cpp =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-core_project_settings_cpp,v retrieving revision 1.6 diff -u -p -r1.6 patch-core_project_settings_cpp --- patches/patch-core_project_settings_cpp 22 Aug 2021 01:43:49 -0000 1.6 +++ patches/patch-core_project_settings_cpp 8 Nov 2021 14:15:57 -0000 @@ -9,9 +9,9 @@ based on github issue #17374 Index: core/project_settings.cpp --- core/project_settings.cpp.orig +++ core/project_settings.cpp -@@ -483,9 +483,7 @@ Error ProjectSettings::setup(const String &p_path, con - } - } +@@ -495,9 +495,7 @@ Error ProjectSettings::setup(const String &p_path, con + project_data_dir_name = (use_hidden_directory ? "." : "") + PROJECT_DATA_DIR_NAME_SUFFIX; + // Using GLOBAL_GET on every block for compressing can be slow, so assigning here. - Compression::zstd_long_distance_matching = GLOBAL_GET("compression/formats/zstd/long_distance_matching"); Compression::zstd_level = GLOBAL_GET("compression/formats/zstd/compression_level"); @@ -19,7 +19,7 @@ Index: core/project_settings.cpp Compression::zlib_level = GLOBAL_GET("compression/formats/zlib/compression_level"); -@@ -1232,12 +1230,8 @@ ProjectSettings::ProjectSettings() { +@@ -1233,12 +1231,8 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("debug/settings/profiler/max_functions", 16384); custom_prop_info["debug/settings/profiler/max_functions"] = PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1"); Index: patches/patch-core_ustring_h =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-core_ustring_h,v retrieving revision 1.1 diff -u -p -r1.1 patch-core_ustring_h --- patches/patch-core_ustring_h 3 Aug 2020 18:41:08 -0000 1.1 +++ patches/patch-core_ustring_h 8 Nov 2021 14:15:57 -0000 @@ -6,7 +6,7 @@ https://github.com/godotengine/godot/pul Index: core/ustring.h --- core/ustring.h.orig +++ core/ustring.h -@@ -68,6 +68,8 @@ class CharProxy { (public) +@@ -69,6 +69,8 @@ class CharProxy { (public) _FORCE_INLINE_ void operator=(const CharProxy<T> &other) const { _cowdata.set(_index, other.operator T()); } Index: patches/patch-drivers_unix_os_unix_cpp =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-drivers_unix_os_unix_cpp,v retrieving revision 1.6 diff -u -p -r1.6 patch-drivers_unix_os_unix_cpp --- patches/patch-drivers_unix_os_unix_cpp 3 May 2021 19:10:24 -0000 1.6 +++ patches/patch-drivers_unix_os_unix_cpp 8 Nov 2021 14:15:57 -0000 @@ -5,7 +5,7 @@ hardcode executable path Index: drivers/unix/os_unix.cpp --- drivers/unix/os_unix.cpp.orig +++ drivers/unix/os_unix.cpp -@@ -501,7 +501,7 @@ String OS_Unix::get_executable_path() const { +@@ -485,7 +485,7 @@ String OS_Unix::get_executable_path() const { #elif defined(__OpenBSD__) || defined(__NetBSD__) char resolved_path[MAXPATHLEN]; Index: patches/patch-platform_uwp_export_export_cpp =================================================================== RCS file: patches/patch-platform_uwp_export_export_cpp diff -N patches/patch-platform_uwp_export_export_cpp --- patches/patch-platform_uwp_export_export_cpp 19 Jul 2020 13:02:38 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-platform_uwp_export_export_cpp,v 1.1 2020/07/19 13:02:38 thfr Exp $ - -comparisons of integers with different signs - -Index: platform/uwp/export/export.cpp ---- platform/uwp/export/export.cpp.orig -+++ platform/uwp/export/export.cpp -@@ -554,7 +554,7 @@ Error AppxPackager::add_file(String p_file_name, const - //package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before); - int start = file_buffer.size(); - file_buffer.resize(file_buffer.size() + (strm.total_out - total_out_before)); -- for (uint64_t i = 0; i < (strm.total_out - total_out_before); i++) -+ for (int64_t i = 0; i < (strm.total_out - total_out_before); i++) - file_buffer.write[start + i] = strm_out[i]; - - deflateEnd(&strm); Index: patches/patch-platform_x11_detect_py =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-platform_x11_detect_py,v retrieving revision 1.6 diff -u -p -r1.6 patch-platform_x11_detect_py --- patches/patch-platform_x11_detect_py 22 Aug 2021 01:43:49 -0000 1.6 +++ patches/patch-platform_x11_detect_py 8 Nov 2021 14:15:57 -0000 @@ -5,7 +5,7 @@ remove hardcoded -O2, found by bcallah@. Index: platform/x11/detect.py --- platform/x11/detect.py.orig +++ platform/x11/detect.py -@@ -87,26 +87,9 @@ def get_flags(): +@@ -89,29 +89,6 @@ def get_flags(): def configure(env): ## Build type @@ -24,19 +24,21 @@ Index: platform/x11/detect.py - elif env["optimize"] == "size": # optimize for size - env.Prepend(CCFLAGS=["-Os"]) - -+ if env["target"] == "release_debug": - env.Prepend(CPPDEFINES=["DEBUG_ENABLED"]) - - if env["debug_symbols"]: - env.Prepend(CCFLAGS=["-g2"]) - - elif env["target"] == "debug": - env.Prepend(CCFLAGS=["-ggdb"]) - env.Prepend(CCFLAGS=["-g3"]) -@@ -323,6 +306,10 @@ def configure(env): +- elif env["target"] == "debug": +- env.Prepend(CCFLAGS=["-ggdb"]) +- env.Prepend(CCFLAGS=["-g3"]) +- env.Append(LINKFLAGS=["-rdynamic"]) +- + ## Architecture + + is64 = sys.maxsize > 2 ** 32 +@@ -330,6 +307,10 @@ def configure(env): env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"]) else: - print("ALSA libraries not found, disabling driver") + print("Warning: ALSA libraries not found. Disabling the ALSA audio driver.") + + print("Enabling sndio") + env.Append(CPPDEFINES=["SNDIO_ENABLED"]) Index: patches/patch-platform_x11_os_x11_cpp =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-platform_x11_os_x11_cpp,v retrieving revision 1.6 diff -u -p -r1.6 patch-platform_x11_os_x11_cpp --- patches/patch-platform_x11_os_x11_cpp 22 Aug 2021 01:43:49 -0000 1.6 +++ patches/patch-platform_x11_os_x11_cpp 8 Nov 2021 14:15:57 -0000 @@ -5,7 +5,7 @@ fix libXrandr library name and load sndi Index: platform/x11/os_x11.cpp --- platform/x11/os_x11.cpp.orig +++ platform/x11/os_x11.cpp -@@ -160,7 +160,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, i +@@ -157,7 +157,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, i int xrandr_minor = 0; int event_base, error_base; xrandr_ext_ok = XRRQueryExtension(x11_display, &event_base, &error_base); @@ -14,7 +14,7 @@ Index: platform/x11/os_x11.cpp if (!xrandr_handle) { err = dlerror(); // For some arcane reason, NetBSD now ships libXrandr.so.3 while the rest of the world has libXrandr.so.2... -@@ -3973,6 +3973,10 @@ void OS_X11::update_real_mouse_position() { +@@ -4053,6 +4053,11 @@ void OS_X11::update_real_mouse_position() { } OS_X11::OS_X11() { @@ -22,6 +22,7 @@ Index: platform/x11/os_x11.cpp +#ifdef SNDIO_ENABLED + AudioDriverManager::add_driver(&driver_sndio); +#endif - ++ #ifdef PULSEAUDIO_ENABLED AudioDriverManager::add_driver(&driver_pulseaudio); + #endif Index: patches/patch-thirdparty_embree_common_math_math_h =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-thirdparty_embree_common_math_math_h,v retrieving revision 1.1 diff -u -p -r1.1 patch-thirdparty_embree_common_math_math_h --- patches/patch-thirdparty_embree_common_math_math_h 9 Jun 2021 15:56:32 -0000 1.1 +++ patches/patch-thirdparty_embree_common_math_math_h 8 Nov 2021 14:15:57 -0000 @@ -7,7 +7,7 @@ call. Index: thirdparty/embree/common/math/math.h --- thirdparty/embree/common/math/math.h.orig +++ thirdparty/embree/common/math/math.h -@@ -242,6 +242,7 @@ namespace embree +@@ -168,6 +168,7 @@ namespace embree __forceinline T twice(const T& a) { return a+a; } __forceinline int min(int a, int b) { return a<b ? a:b; } @@ -15,7 +15,7 @@ Index: thirdparty/embree/common/math/mat __forceinline unsigned min(unsigned a, unsigned b) { return a<b ? a:b; } __forceinline int64_t min(int64_t a, int64_t b) { return a<b ? a:b; } __forceinline float min(float a, float b) { return a<b ? a:b; } -@@ -259,6 +260,7 @@ namespace embree +@@ -185,6 +186,7 @@ namespace embree template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d, const T& e) { return mini(mini(mini(a,b),mini(c,d)),e); } __forceinline int max(int a, int b) { return a<b ? b:a; } Index: patches/patch-thirdparty_embree_common_sys_sysinfo_cpp =================================================================== RCS file: /home/cvs/ports/games/godot/patches/patch-thirdparty_embree_common_sys_sysinfo_cpp,v retrieving revision 1.1 diff -u -p -r1.1 patch-thirdparty_embree_common_sys_sysinfo_cpp --- patches/patch-thirdparty_embree_common_sys_sysinfo_cpp 9 Jun 2021 15:56:32 -0000 1.1 +++ patches/patch-thirdparty_embree_common_sys_sysinfo_cpp 8 Nov 2021 14:15:57 -0000 @@ -7,7 +7,7 @@ $OpenBSD: patch-thirdparty_embree_common Index: thirdparty/embree/common/sys/sysinfo.cpp --- thirdparty/embree/common/sys/sysinfo.cpp.orig +++ thirdparty/embree/common/sys/sysinfo.cpp -@@ -595,6 +595,26 @@ namespace embree +@@ -572,6 +572,26 @@ namespace embree #endif @@ -34,12 +34,12 @@ Index: thirdparty/embree/common/sys/sysi //////////////////////////////////////////////////////////////////////////////// /// Mac OS X Platform //////////////////////////////////////////////////////////////////////////////// -@@ -643,7 +663,7 @@ namespace embree - static int nThreads = -1; - if (nThreads != -1) return nThreads; +@@ -622,7 +642,7 @@ namespace embree + // -- GODOT start -- + // #if defined(__MACOSX__) -#if defined(__MACOSX__) || defined(__ANDROID__) +#if defined(__MACOSX__) || defined(__ANDROID__) || defined(__OpenBSD__) + // -- GODOT end -- nThreads = sysconf(_SC_NPROCESSORS_ONLN); // does not work in Linux LXC container assert(nThreads); - #else Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/games/godot/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST --- pkg/PLIST 27 Apr 2018 07:32:53 -0000 1.1.1.1 +++ pkg/PLIST 1 Nov 2021 11:11:29 -0000 @@ -1,2 +1,3 @@ @comment $OpenBSD: PLIST,v 1.1.1.1 2018/04/27 07:32:53 bentley Exp $ @bin bin/godot +share/doc/pkg-readmes/${PKGSTEM}