Timo Myyrä <timo.myyra@bittivirhe.fi> [2022-07-10, 20:12 +0300]:
> Omar Polo <op@openbsd.org> [2022-07-08, 10:43 +0200]:
>
>> Hello,
>>
>> Timo Myyrä <timo.myyra@bittivirhe.fi> wrote:
>>> Hi,
>>>
>>> Here's companion for the audio/zmusic diff to bring gzdoom to latest
>>> release. Seemed to work on quick test on amd64.
>>
>> It seems to automatically picks up multimedia/libvpx if installed,
>> should we add it as dependency or disable it?
>>
>
> I'd say it should be added as LIB_DEPENDS, quick glance at the source
> would tell it is used by movie playback.
>
>> It fails to start for me: it pops up a windwo with "Cannot find
>> gzdoom.pk3" and that's it. Looking at ktrace it does
>>
>> 8005 gzdoom CALL stat(0x9e670681cb0,0x7f7fffff6fc8)
>> 8005 gzdoom NAMI "./gzdoom.pk3"
>> 8005 gzdoom RET stat -1 errno 2 No such file or directory
>> 8005 gzdoom CALL stat(0x9e66f2a06c0,0x7f7fffff6fc8)
>> 8005 gzdoom NAMI "gzdoom.pk3"
>> 8005 gzdoom RET stat -1 errno 2 No such file or directory
>>
>> However, if i run it from /usr/local/games/gzdoom it works as expected
>> (gzdoom.pk3 is installed there.) Any idea why is doing that?
>>
>>
>> Thanks,
>>
>> Omar Polo
>
> Asked about it and there is an open bug for it:
> https://github.com/coelckers/gzdoom/issues/1615
>
> Let's wait until that is fixed before updating the gzdoom port.
>
> timo
Actually found a simple patch on archlinux's port of gzdoom which seems
to fix the 'cannot find gzdoom.pk3' error.
Here's updated diff:
- explicitly disable OpenMP for now so it won't pick it up if found
- added multimedia/libvpx to LIB_DEPENDS (port complains its unused but ldd lists it in gzdoom binary )
- patch progdir in i_main.cpp so gzdoom.pk3 is found
timo
diff 603e76dd58833a7b9423e59292778e6e145a472f /usr/ports
blob - 3fac26e1bd4e6c193a372d0f4f2bbaf423d98108
file + games/gzdoom/Makefile
--- games/gzdoom/Makefile
+++ games/gzdoom/Makefile
@@ -6,7 +6,7 @@ ONLY_FOR_ARCHS = i386 amd64
COMMENT = OpenGL engine for idTech 1 games like doom,hexen,heretic...
-V = 4.7.1
+V = 4.8.2
GH_ACCOUNT = coelckers
GH_PROJECT = gzdoom
GH_TAGNAME = g${V}
@@ -32,6 +32,7 @@ MODULES = devel/cmake
CONFIGURE_ARGS += -DNO_GTK=ON
CONFIGURE_ARGS += -DDYN_OPENAL=NO
CONFIGURE_ARGS += -DHAVE_STDINT_H=1
+CONFIGURE_ARGS += -DNO_OPENMP=ON
CXXFLAGS += -I. -I${LOCALBASE}/include
@@ -39,8 +40,12 @@ LIB_DEPENDS = audio/openal \
audio/zmusic \
archivers/bzip2 \
graphics/jpeg \
- devel/sdl2
+ devel/sdl2 \
+ multimedia/libvpx
NO_TEST = Yes
+pre-configure:
+ ${SUBST_CMD} ${WRKSRC}/src/common/platform/posix/sdl/i_main.cpp
+
.include <bsd.port.mk>
blob - 6202659488a2b382b898f9d0d323437b3b71ba72
file + games/gzdoom/distinfo
--- games/gzdoom/distinfo
+++ games/gzdoom/distinfo
@@ -1,2 +1,2 @@
-SHA256 (gzdoom-4.7.1.tar.gz) = RUJXWCvgV2UB7vHvyZ/n6nDxxNeZNUnbPLxwnOdfwQI=
-SIZE (gzdoom-4.7.1.tar.gz) = 19562412
+SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
+SIZE (gzdoom-4.8.2.tar.gz) = 24247668
blob - a9570e7e1c6555bd1f22655ea44c360a54663331
file + games/gzdoom/patches/patch-CMakeLists_txt
--- games/gzdoom/patches/patch-CMakeLists_txt
+++ games/gzdoom/patches/patch-CMakeLists_txt
@@ -1,7 +1,7 @@
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -271,7 +271,7 @@ else()
+@@ -272,7 +272,7 @@ else()
if ( UNIX )
include(CheckSymbolExists)
blob - be01fd6c393eb8966d784b53469e75e6ae95ed2c
file + /dev/null
--- games/gzdoom/patches/patch-src_CMakeLists_txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: src/CMakeLists.txt
---- src/CMakeLists.txt.orig
-+++ src/CMakeLists.txt
-@@ -356,7 +360,7 @@ CHECK_CXX_SOURCE_COMPILES("thread_local int i; int mai
- HAVE_THREAD_LOCAL)
-
- if( NOT HAVE_THREAD_LOCAL )
-- message( SEND_ERROR "C++ compiler doesn't support thread_local storage duration specifier" )
-+ message( STATUS "C++ compiler doesn't support thread_local storage duration specifier" )
- endif()
-
- # Check for functions that may or may not exist.
blob - /dev/null
file + games/gzdoom/patches/patch-src_common_platform_posix_sdl_i_main_cpp
--- /dev/null
+++ games/gzdoom/patches/patch-src_common_platform_posix_sdl_i_main_cpp
@@ -0,0 +1,24 @@
+Index: src/common/platform/posix/sdl/i_main.cpp
+--- src/common/platform/posix/sdl/i_main.cpp.orig
++++ src/common/platform/posix/sdl/i_main.cpp
+@@ -175,19 +175,7 @@ int main (int argc, char **argv)
+ Args = new FArgs(argc, argv);
+
+ // Should we even be doing anything with progdir on Unix systems?
+- char program[PATH_MAX];
+- if (realpath (argv[0], program) == NULL)
+- strcpy (program, argv[0]);
+- char *slash = strrchr (program, '/');
+- if (slash != NULL)
+- {
+- *(slash + 1) = '\0';
+- progdir = program;
+- }
+- else
+- {
+- progdir = "./";
+- }
++ progdir = "${LOCALBASE}/share/games/doom/";
+
+ I_StartupJoysticks();
+
blob - /dev/null
file + games/gzdoom/patches/patch-src_common_scripting_vm_vmframe_cpp
--- /dev/null
+++ games/gzdoom/patches/patch-src_common_scripting_vm_vmframe_cpp
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/common/scripting/vm/vmframe.cpp
+--- src/common/scripting/vm/vmframe.cpp.orig
++++ src/common/scripting/vm/vmframe.cpp
+@@ -45,7 +45,7 @@
+ #include "version.h"
+
+ #ifdef HAVE_VM_JIT
+-#ifdef __DragonFly__
++#ifdef __DragonFly__ || __OpenBSD__
+ CUSTOM_CVAR(Bool, vm_jit, false, CVAR_NOINITCALL)
+ #else
+ CUSTOM_CVAR(Bool, vm_jit, true, CVAR_NOINITCALL)
No comments:
Post a Comment