update to Godot 3.3, from maintainer Omar Polo, thanks!
This commit is contained in:
parent
9d71341b23
commit
61efb5fbbd
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.17 2020/11/15 22:05:10 gkoehler Exp $
|
||||
# $OpenBSD: Makefile,v 1.18 2021/05/03 19:10:24 thfr Exp $
|
||||
|
||||
COMMENT = 2D and 3D game engine
|
||||
|
||||
V = 3.2.3
|
||||
V = 3.3
|
||||
DISTNAME = godot-${V}-stable
|
||||
PKGNAME = godot-${V}
|
||||
REVISION = 0
|
||||
CATEGORIES = games
|
||||
HOMEPAGE = https://godotengine.org/
|
||||
MAINTAINER = Omar Polo <op@omarpolo.com>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (godot-3.2.3-stable.tar.xz) = hf1z10LMZIhwVqIy+PemIhEueLUfMdTQjbD5guXzoCM=
|
||||
SIZE (godot-3.2.3-stable.tar.xz) = 14360332
|
||||
SHA256 (godot-3.3-stable.tar.xz) = /LvGqqsWBZ5mIkgsM1jVgJjTTtUeCZyFTsCtefRm1VU=
|
||||
SIZE (godot-3.3-stable.tar.xz) = 20581028
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: audio_driver_sndio.cpp,v 1.1 2020/09/06 10:34:19 thfr Exp $ */
|
||||
/* $OpenBSD: audio_driver_sndio.cpp,v 1.2 2021/05/03 19:10:24 thfr Exp $ */
|
||||
/*************************************************************************/
|
||||
/* audio_driver_sndio.cpp */
|
||||
/*************************************************************************/
|
||||
@ -70,8 +70,7 @@ Error AudioDriverSndio::init() {
|
||||
|
||||
samples.resize(period_size * channels);
|
||||
|
||||
mutex = Mutex::create();
|
||||
thread = Thread::create(AudioDriverSndio::thread_func, this);
|
||||
thread.start(AudioDriverSndio::thread_func, this);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@ -116,30 +115,16 @@ AudioDriver::SpeakerMode AudioDriverSndio::get_speaker_mode() const {
|
||||
}
|
||||
|
||||
void AudioDriverSndio::lock() {
|
||||
if (!thread || !mutex)
|
||||
return;
|
||||
mutex->lock();
|
||||
mutex.lock();
|
||||
}
|
||||
|
||||
void AudioDriverSndio::unlock() {
|
||||
if (!thread || !mutex)
|
||||
return;
|
||||
mutex->unlock();
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
void AudioDriverSndio::finish() {
|
||||
if (thread) {
|
||||
exit_thread = true;
|
||||
Thread::wait_to_finish(thread);
|
||||
|
||||
memdelete(thread);
|
||||
thread = NULL;
|
||||
}
|
||||
|
||||
if (mutex) {
|
||||
memdelete(mutex);
|
||||
mutex = NULL;
|
||||
}
|
||||
exit_thread = true;
|
||||
thread.wait_to_finish();
|
||||
|
||||
if (handle) {
|
||||
sio_close(handle);
|
||||
@ -148,8 +133,6 @@ void AudioDriverSndio::finish() {
|
||||
}
|
||||
|
||||
AudioDriverSndio::AudioDriverSndio() {
|
||||
mutex = NULL;
|
||||
thread = NULL;
|
||||
}
|
||||
|
||||
AudioDriverSndio::~AudioDriverSndio() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: audio_driver_sndio.h,v 1.1 2020/09/06 10:34:19 thfr Exp $ */
|
||||
/* $OpenBSD: audio_driver_sndio.h,v 1.2 2021/05/03 19:10:24 thfr Exp $ */
|
||||
/*************************************************************************/
|
||||
/* audio_driver_sndio.h */
|
||||
/*************************************************************************/
|
||||
@ -34,8 +34,8 @@
|
||||
#include <sndio.h>
|
||||
|
||||
class AudioDriverSndio : public AudioDriver {
|
||||
Thread *thread;
|
||||
Mutex *mutex;
|
||||
Thread thread;
|
||||
Mutex mutex;
|
||||
|
||||
Vector<int32_t> samples;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-core_project_settings_cpp,v 1.4 2020/09/19 06:37:23 thfr Exp $
|
||||
$OpenBSD: patch-core_project_settings_cpp,v 1.5 2021/05/03 19:10:24 thfr Exp $
|
||||
|
||||
revert long-distance matching in zstd which is based on private functions and
|
||||
doesn't compile if archivers/zstd is installed
|
||||
@ -19,7 +19,7 @@ Index: core/project_settings.cpp
|
||||
|
||||
Compression::zlib_level = GLOBAL_GET("compression/formats/zlib/compression_level");
|
||||
|
||||
@@ -1210,12 +1208,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");
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
$OpenBSD: patch-core_safe_refcount_h,v 1.2 2020/07/19 13:02:38 thfr Exp $
|
||||
|
||||
hppa, ppc: use __atomic functions as 64-bit __sync operators
|
||||
are not supported, from:
|
||||
https://github.com/godotengine/godot/pull/31321
|
||||
|
||||
Index: core/safe_refcount.h
|
||||
--- core/safe_refcount.h.orig
|
||||
+++ core/safe_refcount.h
|
||||
@@ -55,33 +55,26 @@ static _ALWAYS_INLINE_ T atomic_conditional_increment(
|
||||
template <class T>
|
||||
static _ALWAYS_INLINE_ T atomic_decrement(volatile T *pw) {
|
||||
|
||||
- (*pw)--;
|
||||
-
|
||||
- return *pw;
|
||||
+ return __atomic_sub_fetch(pw, 1, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static _ALWAYS_INLINE_ T atomic_increment(volatile T *pw) {
|
||||
|
||||
- (*pw)++;
|
||||
-
|
||||
- return *pw;
|
||||
+ return __atomic_add_fetch(pw, 1, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
static _ALWAYS_INLINE_ T atomic_sub(volatile T *pw, volatile V val) {
|
||||
|
||||
- (*pw) -= val;
|
||||
|
||||
- return *pw;
|
||||
+ return __atomic_sub_fetch(pw, val, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
static _ALWAYS_INLINE_ T atomic_add(volatile T *pw, volatile V val) {
|
||||
|
||||
- (*pw) += val;
|
||||
-
|
||||
- return *pw;
|
||||
+ return __atomic_add_fetch(pw, val, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
@@ -97,8 +90,8 @@ static _ALWAYS_INLINE_ T atomic_exchange_if_greater(vo
|
||||
|
||||
/* Implementation for GCC & Clang */
|
||||
|
||||
-// GCC guarantees atomic intrinsics for sizes of 1, 2, 4 and 8 bytes.
|
||||
-// Clang states it supports GCC atomic builtins.
|
||||
+#include <stdbool.h>
|
||||
+#include <atomic>
|
||||
|
||||
template <class T>
|
||||
static _ALWAYS_INLINE_ T atomic_conditional_increment(volatile T *pw) {
|
||||
@@ -107,7 +100,7 @@ static _ALWAYS_INLINE_ T atomic_conditional_increment(
|
||||
T tmp = static_cast<T const volatile &>(*pw);
|
||||
if (tmp == 0)
|
||||
return 0; // if zero, can't add to it anymore
|
||||
- if (__sync_val_compare_and_swap(pw, tmp, tmp + 1) == tmp)
|
||||
+ if (__atomic_compare_exchange_n(pw, &tmp, tmp + 1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) == true)
|
||||
return tmp + 1;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +136,7 @@ static _ALWAYS_INLINE_ T atomic_exchange_if_greater(vo
|
||||
T tmp = static_cast<T const volatile &>(*pw);
|
||||
if (tmp >= val)
|
||||
return tmp; // already greater, or equal
|
||||
- if (__sync_val_compare_and_swap(pw, tmp, val) == tmp)
|
||||
+ if (__atomic_compare_exchange_n(pw, &tmp, val, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) == true)
|
||||
return val;
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-drivers_unix_os_unix_cpp,v 1.5 2020/09/19 06:37:23 thfr Exp $
|
||||
$OpenBSD: patch-drivers_unix_os_unix_cpp,v 1.6 2021/05/03 19:10:24 thfr Exp $
|
||||
|
||||
hardcode executable path
|
||||
|
||||
Index: drivers/unix/os_unix.cpp
|
||||
--- drivers/unix/os_unix.cpp.orig
|
||||
+++ drivers/unix/os_unix.cpp
|
||||
@@ -512,7 +512,7 @@ String OS_Unix::get_executable_path() const {
|
||||
#elif defined(__OpenBSD__)
|
||||
@@ -501,7 +501,7 @@ String OS_Unix::get_executable_path() const {
|
||||
#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
char resolved_path[MAXPATHLEN];
|
||||
|
||||
- realpath(OS::get_executable_path().utf8().get_data(), resolved_path);
|
||||
|
@ -1,34 +1,40 @@
|
||||
$OpenBSD: patch-platform_x11_detect_py,v 1.3 2020/09/06 10:34:19 thfr Exp $
|
||||
$OpenBSD: patch-platform_x11_detect_py,v 1.4 2021/05/03 19:10:25 thfr Exp $
|
||||
|
||||
remove hardcoded -O2, found by bcallah@. Add sndio
|
||||
|
||||
Index: platform/x11/detect.py
|
||||
--- platform/x11/detect.py.orig
|
||||
+++ platform/x11/detect.py
|
||||
@@ -85,21 +85,12 @@ def configure(env):
|
||||
@@ -87,26 +87,9 @@ def get_flags():
|
||||
def configure(env):
|
||||
## Build type
|
||||
|
||||
if env["target"] == "release":
|
||||
- if env["target"] == "release":
|
||||
- if env["optimize"] == "speed": # optimize for speed (default)
|
||||
- env.Prepend(CCFLAGS=["-O3"])
|
||||
- else: # optimize for size
|
||||
- elif env["optimize"] == "size": # optimize for size
|
||||
- env.Prepend(CCFLAGS=["-Os"])
|
||||
-
|
||||
if env["debug_symbols"] == "yes":
|
||||
env.Prepend(CCFLAGS=["-g1"])
|
||||
if env["debug_symbols"] == "full":
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
- if env["debug_symbols"]:
|
||||
- env.Prepend(CCFLAGS=["-g2"])
|
||||
-
|
||||
- elif env["target"] == "release_debug":
|
||||
- if env["optimize"] == "speed": # optimize for speed (default)
|
||||
- env.Prepend(CCFLAGS=["-O2"])
|
||||
- else: # optimize for size
|
||||
- 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"] == "yes":
|
||||
@@ -302,6 +293,10 @@ def configure(env):
|
||||
env.ParseConfig("pkg-config alsa --libs")
|
||||
- if env["debug_symbols"]:
|
||||
- env.Prepend(CCFLAGS=["-g2"])
|
||||
-
|
||||
elif env["target"] == "debug":
|
||||
env.Prepend(CCFLAGS=["-ggdb"])
|
||||
env.Prepend(CCFLAGS=["-g3"])
|
||||
@@ -318,6 +301,10 @@ def configure(env):
|
||||
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
|
||||
else:
|
||||
print("ALSA libraries not found, disabling driver")
|
||||
+
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-platform_x11_os_x11_cpp,v 1.4 2020/09/19 06:37:23 thfr Exp $
|
||||
$OpenBSD: patch-platform_x11_os_x11_cpp,v 1.5 2021/05/03 19:10:25 thfr Exp $
|
||||
|
||||
fix libXrandr library name and load sndio
|
||||
|
||||
Index: platform/x11/os_x11.cpp
|
||||
--- platform/x11/os_x11.cpp.orig
|
||||
+++ platform/x11/os_x11.cpp
|
||||
@@ -160,10 +160,10 @@ Error OS_X11::initialize(const VideoMode &p_desired, i
|
||||
@@ -160,7 +160,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);
|
||||
@ -13,12 +13,8 @@ Index: platform/x11/os_x11.cpp
|
||||
+ xrandr_handle = dlopen("libXrandr.so", RTLD_LAZY);
|
||||
if (!xrandr_handle) {
|
||||
err = dlerror();
|
||||
- fprintf(stderr, "could not load libXrandr.so.2, Error: %s\n", err);
|
||||
+ fprintf(stderr, "could not load libXrandr.so, Error: %s\n", err);
|
||||
} else {
|
||||
XRRQueryVersion(x11_display, &xrandr_major, &xrandr_minor);
|
||||
if (((xrandr_major << 8) | xrandr_minor) >= 0x0105) {
|
||||
@@ -3564,6 +3564,10 @@ void OS_X11::update_real_mouse_position() {
|
||||
// For some arcane reason, NetBSD now ships libXrandr.so.3 while the rest of the world has libXrandr.so.2...
|
||||
@@ -3972,6 +3972,10 @@ void OS_X11::update_real_mouse_position() {
|
||||
}
|
||||
|
||||
OS_X11::OS_X11() {
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-platform_x11_os_x11_h,v 1.2 2020/09/19 06:37:23 thfr Exp $
|
||||
$OpenBSD: patch-platform_x11_os_x11_h,v 1.3 2021/05/03 19:10:25 thfr Exp $
|
||||
|
||||
load sndio
|
||||
|
||||
Index: platform/x11/os_x11.h
|
||||
--- platform/x11/os_x11.h.orig
|
||||
+++ platform/x11/os_x11.h
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "crash_handler_x11.h"
|
||||
#include "drivers/alsa/audio_driver_alsa.h"
|
||||
#include "drivers/alsamidi/midi_driver_alsamidi.h"
|
||||
@ -13,7 +13,7 @@ Index: platform/x11/os_x11.h
|
||||
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
|
||||
#include "drivers/unix/os_unix.h"
|
||||
#include "joypad_linux.h"
|
||||
@@ -184,6 +185,10 @@ class OS_X11 : public OS_Unix {
|
||||
@@ -206,6 +207,10 @@ class OS_X11 : public OS_Unix {
|
||||
|
||||
#ifdef ALSAMIDI_ENABLED
|
||||
MIDIDriverALSAMidi driver_alsamidi;
|
||||
|
Loading…
Reference in New Issue
Block a user