update to godot 3.0.6, fixing CVE-2018-1000224. Disables non-working audio backend for the moment. ok sthen@
This commit is contained in:
parent
c6268faeb4
commit
f29b2661f1
@ -1,13 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2018/06/05 07:32:39 bentley Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
COMMENT = 2D and 3D game engine
|
||||
|
||||
V = 3.0.2
|
||||
V = 3.0.6
|
||||
DISTNAME = godot-${V}-stable
|
||||
PKGNAME = godot-${V}
|
||||
CATEGORIES = games
|
||||
HOMEPAGE = https://godotengine.org/
|
||||
MAINTAINER = Thomas Frohwein <frohwein@ymail.com>
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
@ -15,15 +15,17 @@ PERMIT_PACKAGE_CDROM = Yes
|
||||
WANTLIB += ${COMPILER_LIBCXX}
|
||||
WANTLIB += GL X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr
|
||||
WANTLIB += Xrender c crypto enet execinfo freetype intl m mpcdec
|
||||
WANTLIB += ogg opus opusfile png pulse pulse-simple ssl theora
|
||||
WANTLIB += theoradec vorbis vorbisfile webp xcb z
|
||||
WANTLIB += pcre2-32 vpx zstd
|
||||
WANTLIB += ogg opus opusfile png ssl theora theoradec vorbis vorbisfile
|
||||
WANTLIB += webp xcb z pcre2-32 vpx zstd
|
||||
|
||||
MASTER_SITES = https://downloads.tuxfamily.org/godotengine/${V}/
|
||||
EXTRACT_SUFX = .tar.xz
|
||||
|
||||
MODULES = devel/scons
|
||||
# Can't disable builtin_bullet until devel/bullet has been updated to 2.88
|
||||
# Building with module_mono_enabled requires msbuild (which we don't have
|
||||
# yet) and to fix the sharedlib_ext in modules/mono/config.py to '.so.1.0'
|
||||
# Disable pulseaudio which is currently not working
|
||||
MODSCONS_FLAGS = CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CFLAGS="${CFLAGS}" \
|
||||
@ -44,16 +46,17 @@ MODSCONS_FLAGS = CC="${CC}" \
|
||||
builtin_pcre2=no \
|
||||
builtin_zlib=no \
|
||||
builtin_zstd=no \
|
||||
dev=yes \
|
||||
platform=x11 \
|
||||
progress=no \
|
||||
target=release_debug \
|
||||
verbose=yes \
|
||||
warnings=all
|
||||
pulseaudio=no \
|
||||
target=release_debug
|
||||
LIB_DEPENDS = archivers/zstd \
|
||||
audio/libvorbis \
|
||||
audio/musepack \
|
||||
audio/opusfile \
|
||||
audio/pulseaudio \
|
||||
devel/gettext \
|
||||
devel/libexecinfo \
|
||||
devel/pcre2 \
|
||||
graphics/libwebp \
|
||||
graphics/png \
|
||||
@ -63,7 +66,7 @@ LIB_DEPENDS = archivers/zstd \
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
pre-build:
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/drivers/unix/os_unix.cpp
|
||||
|
||||
do-install:
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (godot-3.0.2-stable.tar.xz) = 7qkKO9kY80nR0Q/qp9QjaHK7mpm1r0mU5Fu5ThLyDy8=
|
||||
SIZE (godot-3.0.2-stable.tar.xz) = 12433456
|
||||
SHA256 (godot-3.0.6-stable.tar.xz) = LfHLNqAMaHrnShHX31vcEyyBapNOJpbswzgnAI/5xrk=
|
||||
SIZE (godot-3.0.6-stable.tar.xz) = 12517428
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-core_project_settings_cpp,v 1.1.1.1 2018/04/27 07:32:53 bentley Exp $
|
||||
$OpenBSD: patch-core_project_settings_cpp,v 1.2 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
revert long-distance matching in zstd which is based on private functions and
|
||||
doesn't compile if archivers/zstd is installed
|
||||
@ -9,7 +9,7 @@ based on github issue #17374
|
||||
Index: core/project_settings.cpp
|
||||
--- core/project_settings.cpp.orig
|
||||
+++ core/project_settings.cpp
|
||||
@@ -1038,14 +1038,11 @@ ProjectSettings::ProjectSettings() {
|
||||
@@ -1041,14 +1041,11 @@ ProjectSettings::ProjectSettings() {
|
||||
GLOBAL_DEF("debug/settings/profiler/max_functions", 16384);
|
||||
|
||||
//assigning here, because using GLOBAL_GET on every block for compressing can be slow
|
||||
|
@ -1,21 +1,11 @@
|
||||
$OpenBSD: patch-drivers_unix_os_unix_cpp,v 1.2 2018/05/09 20:26:08 sthen Exp $
|
||||
$OpenBSD: patch-drivers_unix_os_unix_cpp,v 1.3 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
- fix with clang6 on ILP32 arches
|
||||
- hardcode executable path
|
||||
|
||||
Index: drivers/unix/os_unix.cpp
|
||||
--- drivers/unix/os_unix.cpp.orig
|
||||
+++ drivers/unix/os_unix.cpp
|
||||
@@ -235,7 +235,7 @@ OS::TimeZoneInfo OS_Unix::get_time_zone_info() const {
|
||||
|
||||
void OS_Unix::delay_usec(uint32_t p_usec) const {
|
||||
|
||||
- struct timespec rem = { p_usec / 1000000, (p_usec % 1000000) * 1000 };
|
||||
+ struct timespec rem = { p_usec / 1000000, static_cast<long>((p_usec % 1000000) * 1000) };
|
||||
while (nanosleep(&rem, &rem) == EINTR) {
|
||||
}
|
||||
}
|
||||
@@ -456,7 +456,7 @@ String OS_Unix::get_executable_path() const {
|
||||
@@ -462,7 +462,7 @@ String OS_Unix::get_executable_path() const {
|
||||
#elif defined(__OpenBSD__)
|
||||
char resolved_path[MAXPATHLEN];
|
||||
|
||||
|
18
games/godot/patches/patch-main_main_cpp
Normal file
18
games/godot/patches/patch-main_main_cpp
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-main_main_cpp,v 1.1 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
log on falling back to dummy audio driver
|
||||
|
||||
Index: main/main.cpp
|
||||
--- main/main.cpp.orig
|
||||
+++ main/main.cpp
|
||||
@@ -938,6 +938,10 @@ Error Main::setup(const char *execpath, int argc, char
|
||||
audio_driver = GLOBAL_DEF("audio/driver", OS::get_singleton()->get_audio_driver_name(0));
|
||||
}
|
||||
|
||||
+ if (audio_driver == "Dummy") {
|
||||
+ print_line("Failed to attach audio driver. Falling back to dummy driver.");
|
||||
+ }
|
||||
+
|
||||
for (int i = 0; i < OS::get_singleton()->get_audio_driver_count(); i++) {
|
||||
|
||||
if (audio_driver == OS::get_singleton()->get_audio_driver_name(i)) {
|
16
games/godot/patches/patch-platform_x11_detect_py
Normal file
16
games/godot/patches/patch-platform_x11_detect_py
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-platform_x11_detect_py,v 1.1 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
remove hardcoded -O2, found by bcallah@
|
||||
|
||||
Index: platform/x11/detect.py
|
||||
--- platform/x11/detect.py.orig
|
||||
+++ platform/x11/detect.py
|
||||
@@ -84,7 +84,7 @@ def configure(env):
|
||||
env.Prepend(CCFLAGS=['-g2'])
|
||||
|
||||
elif (env["target"] == "release_debug"):
|
||||
- env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
|
||||
+ env.Prepend(CCFLAGS=['-ffast-math', '-DDEBUG_ENABLED'])
|
||||
if (env["debug_symbols"] == "yes"):
|
||||
env.Prepend(CCFLAGS=['-g1'])
|
||||
if (env["debug_symbols"] == "full"):
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-scene_gui_rich_text_label_cpp,v 1.1.1.1 2018/04/27 07:32:53 bentley Exp $
|
||||
|
||||
fix the invalid/undefined assignment to nullptr of int type (clang6?)
|
||||
|
||||
Index: scene/gui/rich_text_label.cpp
|
||||
--- scene/gui/rich_text_label.cpp.orig
|
||||
+++ scene/gui/rich_text_label.cpp
|
||||
@@ -829,9 +829,9 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event
|
||||
// Erase previous selection.
|
||||
if (selection.active) {
|
||||
selection.from = NULL;
|
||||
- selection.from_char = NULL;
|
||||
+ selection.from_char = '\0';
|
||||
selection.to = NULL;
|
||||
- selection.to_char = NULL;
|
||||
+ selection.to_char = '\0';
|
||||
selection.active = false;
|
||||
|
||||
update();
|
46
games/godot/patches/patch-servers_audio_server_cpp
Normal file
46
games/godot/patches/patch-servers_audio_server_cpp
Normal file
@ -0,0 +1,46 @@
|
||||
$OpenBSD: patch-servers_audio_server_cpp,v 1.1 2018/08/25 19:20:29 thfr Exp $
|
||||
|
||||
add dummy audio driver to AudioDriverManager list
|
||||
(github issue #20986)
|
||||
|
||||
Index: servers/audio_server.cpp
|
||||
--- servers/audio_server.cpp.orig
|
||||
+++ servers/audio_server.cpp
|
||||
@@ -119,14 +119,19 @@ AudioDriver::AudioDriver() {
|
||||
_mix_amount = 0;
|
||||
}
|
||||
|
||||
-AudioDriver *AudioDriverManager::drivers[MAX_DRIVERS];
|
||||
-int AudioDriverManager::driver_count = 0;
|
||||
AudioDriverDummy AudioDriverManager::dummy_driver;
|
||||
+AudioDriver *AudioDriverManager::drivers[MAX_DRIVERS] = {
|
||||
+ &AudioDriverManager::dummy_driver,
|
||||
+};
|
||||
+int AudioDriverManager::driver_count = 1;
|
||||
|
||||
void AudioDriverManager::add_driver(AudioDriver *p_driver) {
|
||||
|
||||
ERR_FAIL_COND(driver_count >= MAX_DRIVERS);
|
||||
- drivers[driver_count++] = p_driver;
|
||||
+ drivers[driver_count - 1] = p_driver;
|
||||
+
|
||||
+ // Last driver is always our dummy driver
|
||||
+ drivers[driver_count++] = &AudioDriverManager::dummy_driver;
|
||||
}
|
||||
|
||||
int AudioDriverManager::get_driver_count() {
|
||||
@@ -158,14 +163,6 @@ void AudioDriverManager::initialize(int p_driver) {
|
||||
drivers[i]->set_singleton();
|
||||
return;
|
||||
}
|
||||
- }
|
||||
-
|
||||
- // Fallback to our dummy driver
|
||||
- if (dummy_driver.init() == OK) {
|
||||
- ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver");
|
||||
- dummy_driver.set_singleton();
|
||||
- } else {
|
||||
- ERR_PRINT("AudioDriverManager: dummy driver failed to init()");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user