git: 5ce30817806f - main - devel/godot2: Fix build with llvm16 and openssl3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Aug 2023 18:30:44 UTC
The branch main has been updated by bofh:
URL: https://cgit.FreeBSD.org/ports/commit/?id=5ce30817806f36fb55b5ffee52f20802fdd7855a
commit 5ce30817806f36fb55b5ffee52f20802fdd7855a
Author: Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-06 17:25:03 +0000
Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-06 18:30:37 +0000
devel/godot2: Fix build with llvm16 and openssl3
- Refresh patches
Approved by: portmgr (blanket)
Sponsored by: The FreeBSD Foundation
---
devel/godot2/Makefile | 6 ++++--
devel/godot2/files/patch-SConstruct | 4 ++--
devel/godot2/files/patch-drivers_SCsub | 4 ++--
.../patch-drivers_rtaudio_audio__driver__rtaudio.cpp | 4 ++--
devel/godot2/files/patch-drivers_unix_os__unix.cpp | 6 +++---
.../patch-modules_openssl_stream__peer__openssl.cpp | 12 ++++++++++++
devel/godot2/files/patch-platform_x11_detect.py | 18 +++++++++---------
7 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/devel/godot2/Makefile b/devel/godot2/Makefile
index ef5dbfd63812..551d1edf9423 100644
--- a/devel/godot2/Makefile
+++ b/devel/godot2/Makefile
@@ -16,8 +16,6 @@ LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.txt
DEPRECATED= Requires legacy OpenSSL 1.1.1 so use devel/godot
EXPIRATION_DATE= 2023-07-08
-BROKEN_SSL= openssl30 openssl31
-BROKEN_SSL_REASON= Fails to build with undefined symbol: ERR_load_BIO_strings
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
@@ -92,6 +90,10 @@ LIB_DEPENDS+= libvpx.so:multimedia/libvpx
MAKE_ARGS+= builtin_libvpx=False
.endif
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+CXXFLAGS+= -Dregister=
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|custom_build|${OPSYS}_Ports_build|' \
${WRKSRC}/methods.py
diff --git a/devel/godot2/files/patch-SConstruct b/devel/godot2/files/patch-SConstruct
index b73a2b71f708..653fed2d4ab7 100644
--- a/devel/godot2/files/patch-SConstruct
+++ b/devel/godot2/files/patch-SConstruct
@@ -1,7 +1,7 @@
---- SConstruct.orig 2016-11-15 18:44:21 UTC
+--- SConstruct.orig 2019-07-08 12:01:42 UTC
+++ SConstruct
@@ -65,7 +65,7 @@ elif (os.name == "nt"):
- if (os.getenv("VSINSTALLDIR") == None or platform_arg == "android"):
+ if (os.getenv("VCINSTALLDIR") == None or platform_arg == "android" or platform_arg == "javascript"):
custom_tools = ['mingw']
-env_base = Environment(tools=custom_tools)
diff --git a/devel/godot2/files/patch-drivers_SCsub b/devel/godot2/files/patch-drivers_SCsub
index ada05634533e..f04d9e18c919 100644
--- a/devel/godot2/files/patch-drivers_SCsub
+++ b/devel/godot2/files/patch-drivers_SCsub
@@ -1,4 +1,4 @@
---- drivers/SCsub.orig 2016-11-30 21:41:21 UTC
+--- drivers/SCsub.orig 2019-07-08 12:01:42 UTC
+++ drivers/SCsub
@@ -14,7 +14,7 @@ SConscript('windows/SCsub')
# Sounds drivers
@@ -7,5 +7,5 @@
-if (env["platform"] == "windows"):
+if (env["platform"] == "windows") or (env["platform"] == "x11"):
SConscript("rtaudio/SCsub")
+ SConscript("wasapi/SCsub")
- # Graphics drivers
diff --git a/devel/godot2/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp b/devel/godot2/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp
index 39fbefd0727f..93d5b7a4959b 100644
--- a/devel/godot2/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp
+++ b/devel/godot2/files/patch-drivers_rtaudio_audio__driver__rtaudio.cpp
@@ -1,6 +1,6 @@
---- drivers/rtaudio/audio_driver_rtaudio.cpp.orig 2016-08-09 07:52:15 UTC
+--- drivers/rtaudio/audio_driver_rtaudio.cpp.orig 2019-07-08 12:01:42 UTC
+++ drivers/rtaudio/audio_driver_rtaudio.cpp
-@@ -35,8 +35,14 @@ const char* AudioDriverRtAudio::get_name
+@@ -38,8 +38,14 @@ const char *AudioDriverRtAudio::get_name() const {
#ifdef OSX_ENABLED
return "RtAudio-OSX";
diff --git a/devel/godot2/files/patch-drivers_unix_os__unix.cpp b/devel/godot2/files/patch-drivers_unix_os__unix.cpp
index 1180857446fd..60d52a05a749 100644
--- a/devel/godot2/files/patch-drivers_unix_os__unix.cpp
+++ b/devel/godot2/files/patch-drivers_unix_os__unix.cpp
@@ -1,4 +1,4 @@
---- drivers/unix/os_unix.cpp.orig 2017-08-28 01:55:12 UTC
+--- drivers/unix/os_unix.cpp.orig 2019-07-08 12:01:42 UTC
+++ drivers/unix/os_unix.cpp
@@ -51,6 +51,7 @@
@@ -8,7 +8,7 @@
#endif
#include "globals.h"
#include <assert.h>
-@@ -375,17 +376,7 @@ Error OS_Unix::execute(const String &p_p
+@@ -379,17 +380,7 @@ Error OS_Unix::execute(const String &p_path, const Lis
args.push_back((char *)cs[i].get_data()); // shitty C cast
args.push_back(0);
@@ -26,7 +26,7 @@
// still alive? something failed..
fprintf(stderr, "**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n", p_path.utf8().get_data());
abort();
-@@ -499,12 +490,24 @@ String OS_Unix::get_executable_path() co
+@@ -503,12 +494,24 @@ String OS_Unix::get_executable_path() const {
return OS::get_executable_path();
}
return b;
diff --git a/devel/godot2/files/patch-modules_openssl_stream__peer__openssl.cpp b/devel/godot2/files/patch-modules_openssl_stream__peer__openssl.cpp
new file mode 100644
index 000000000000..8f3b2da6e94d
--- /dev/null
+++ b/devel/godot2/files/patch-modules_openssl_stream__peer__openssl.cpp
@@ -0,0 +1,12 @@
+--- modules/openssl/stream_peer_openssl.cpp.orig 2023-08-06 17:18:41 UTC
++++ modules/openssl/stream_peer_openssl.cpp
+@@ -596,7 +596,9 @@ void StreamPeerOpenSSL::initialize_ssl() {
+ #endif
+ SSL_library_init(); // Initialize OpenSSL's SSL libraries
+ SSL_load_error_strings(); // Load SSL error strings
++#if OPENSSL_VERSION_NUMBER < 0x30000000L
+ ERR_load_BIO_strings(); // Load BIO error strings
++#endif
+ OpenSSL_add_all_algorithms(); // Load all available encryption algorithms
+ String certs_path = GLOBAL_DEF("ssl/certificates", "");
+ Globals::get_singleton()->set_custom_property_info("ssl/certificates", PropertyInfo(Variant::STRING, "ssl/certificates", PROPERTY_HINT_FILE, "*.crt"));
diff --git a/devel/godot2/files/patch-platform_x11_detect.py b/devel/godot2/files/patch-platform_x11_detect.py
index efa93447d436..748b31f4ca16 100644
--- a/devel/godot2/files/patch-platform_x11_detect.py
+++ b/devel/godot2/files/patch-platform_x11_detect.py
@@ -1,4 +1,4 @@
---- platform/x11/detect.py.orig 2018-07-29 00:47:52 UTC
+--- platform/x11/detect.py.orig 2019-07-08 12:01:42 UTC
+++ platform/x11/detect.py
@@ -56,7 +56,9 @@ def get_opts():
('use_sanitizer', 'Use llvm compiler sanitize address', 'no'),
@@ -11,7 +11,7 @@
('udev', 'Use udev for gamepad connection callbacks', 'no'),
('debug_release', 'Add debug symbols to release version', 'no'),
('touch', 'Enable touch events', 'yes'),
-@@ -85,10 +87,6 @@ def configure(env):
+@@ -80,10 +82,6 @@ def configure(env):
env.Append(CPPPATH=['#platform/x11'])
if (env["use_llvm"] == "yes"):
@@ -22,7 +22,7 @@
env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND'])
env.extra_suffix = ".llvm"
elif (os.system("gcc --version > /dev/null 2>&1") == 0): # GCC
-@@ -126,19 +124,14 @@ def configure(env):
+@@ -121,19 +119,14 @@ def configure(env):
env.Append(LINKFLAGS=['-pipe'])
if (env["target"] == "release"):
@@ -46,7 +46,7 @@
env.Append(LINKFLAGS=['-rdynamic'])
env.ParseConfig('pkg-config x11 --cflags --libs')
-@@ -155,7 +148,12 @@ def configure(env):
+@@ -150,7 +143,12 @@ def configure(env):
env.Append(CPPFLAGS=['-DTOUCH_ENABLED'])
if (env['builtin_openssl'] == 'no'):
@@ -60,7 +60,7 @@
if (env['builtin_libwebp'] == 'no'):
env.ParseConfig('pkg-config libwebp --cflags --libs')
-@@ -200,12 +198,13 @@ def configure(env):
+@@ -195,12 +193,13 @@ def configure(env):
if (env['builtin_glew'] == 'no'):
env.ParseConfig('pkg-config glew --cflags --libs')
@@ -80,15 +80,15 @@
if (platform.system() == "Linux"):
env.Append(CPPFLAGS=["-DJOYDEV_ENABLED"])
-@@ -220,6 +219,11 @@ def configure(env):
+@@ -214,6 +213,11 @@ def configure(env):
+ env.ParseConfig('pkg-config libudev --cflags --libs')
else:
print("libudev development libraries not found, disabling udev support")
-
++
+ if (env["oss"]=="yes"):
+ print("Enabling OSS Audio")
+ env.Append(CPPFLAGS=["-DOSS_ENABLED"])
+ env.Append(CCFLAGS=['-Ithirdparty/rtaudio'])
-+
+
if (env["pulseaudio"] == "yes"):
if not os.system("pkg-config --exists libpulse-simple"):
- print("Enabling PulseAudio")