Omar Polo <o...@openbsd.org> [2021-12-15, 20:44 +0100]: > Timo Myyrä <timo.my...@bittivirhe.fi> writes: > >> Hi, >> >> A bit delayed update to gzdoom. The upstream have made chopped the music >> part as standalone library which I sent to ports@ earlier (audio/zmusic) >> which is needed by this update. >> >> Quickly tested on doom1 which appeared to be working. >> >>[...] >> >> CONFIGURE_ARGS += -DNO_GTK=ON >> -CONFIGURE_ARGS += -DDYN_OPENAL=NO -DDYN_MPG123=NO -DDYN_SNDFILE=NO >> -CONFIGURE_ARGS += -DFLUIDSYNTHLIB1="libfluidsynth.so" >> +CONFIGURE_ARGS += -DDYN_OPENAL=NO >> +# Sync with audio/fluidsynth >> +CONFIGURE_ARGS += -DFLUIDSYNTHLIB1="libfluidsynth.so.2.0" > > this bit (and the relative patch to the CMakeList.txt) is no more needed > since the audio is moved to zmusic, and I can't find other instances of > FLUIDSYNTHLIB1, so they can be dropped >
ah, good point. A grepped the sources but did not notice the FLUIDSYNTHLIB1 was added by local patch so I kept that. >> [...] >> - if ( UNIX ) >> - include(CheckSymbolExists) >> -- check_symbol_exists( "fts_set" "fts.h" HAVE_FTS ) >> -+ check_symbol_exists( "fts_set" "sys/types.h;sys/stat.h;fts.h" >> HAVE_FTS ) > > this is still needed otherwise it doesn't find fts_set (there's > virtually the same patch on zmusic too) > Good catch. >> [...] > > It breaks the build if graphics/glslang is installed. gzdoom uses its > own bundled version of the vulkan sdk but the compiler ends up including > the system header instead of the bundled one. There are different > solution for this: > > 1. cherry-pick this diff > > https://github.com/alexey-lysiuk/gzdoom/commit/5c9fb205d9231abbd8a3bf744850db02c0754057 > > (see https://github.com/coelckers/gzdoom/issues/1382) > > 2. add `CONFIGURE_ARGS += -DHAVE_VULKAN=OFF' to completely disable > vulkan, or > > 3. use the same trick sdk@ used for net/tdlib-purple: > > CONFIGURE_ARGS += -DCMAKE_CXX_FLAGS="${CXXFLAGS} -I. -I${LOCALBASE}/include" > > Yeah, I think we can go with the third option. > 1) is probably overkill for us, 2) is what I initially did but 3) is > probably the more pragmatic solution. I went with the third option in > the diff below, but either is fine I guess. > > I'm also re-attaching the tweaked audio/zmusic tarball for convenience > (which is ok op@ to import if someone wants to). see > https://marc.info/?l=openbsd-ports&m=163916682506561&w=2 > > Tested on amdgpu with the shareware IWAD file mentioned in README and > works fine! > > Thanks, > > Omar Polo Ok from me for these fixes. Timo > > Index: Makefile > =================================================================== > RCS file: /home/cvs/ports/games/gzdoom/Makefile,v > retrieving revision 1.13 > diff -u -p -r1.13 Makefile > --- Makefile 25 Oct 2021 07:19:59 -0000 1.13 > +++ Makefile 15 Dec 2021 19:59:09 -0000 > @@ -8,12 +8,11 @@ ONLY_FOR_ARCHS = i386 amd64 > > COMMENT = OpenGL engine for idTech 1 games like > doom,hexen,heretic... > > -V = 4.3.3 > +V = 4.7.1 > GH_ACCOUNT = coelckers > GH_PROJECT = gzdoom > GH_TAGNAME = g${V} > DISTNAME = gzdoom-${V} > -REVISION = 1 > > CATEGORIES= games > > @@ -24,21 +23,21 @@ MAINTAINER = Timo Myyra <timo.myyra@bit > # GPLv3 > PERMIT_PACKAGE = Yes > > -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m mpg123 > -WANTLIB += openal sndfile z > +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m > +WANTLIB += openal z zmusic > > +# C++17 > COMPILER = base-clang ports-gcc > > MODULES = devel/cmake > > CONFIGURE_ARGS += -DNO_GTK=ON > -CONFIGURE_ARGS += -DDYN_OPENAL=NO -DDYN_MPG123=NO -DDYN_SNDFILE=NO > -CONFIGURE_ARGS += -DFLUIDSYNTHLIB1="libfluidsynth.so" > +CONFIGURE_ARGS += -DDYN_OPENAL=NO > CONFIGURE_ARGS += -DHAVE_STDINT_H=1 > +CONFIGURE_ARGS += -DCMAKE_CXX_FLAGS="${CXXFLAGS} -I. > -I${LOCALBASE}/include" > > -LIB_DEPENDS = audio/libsndfile \ > - audio/mpg123 \ > - audio/openal \ > +LIB_DEPENDS = audio/openal \ > + audio/zmusic \ > archivers/bzip2 \ > graphics/jpeg \ > devel/sdl2 > Index: distinfo > =================================================================== > RCS file: /home/cvs/ports/games/gzdoom/distinfo,v > retrieving revision 1.5 > diff -u -p -r1.5 distinfo > --- distinfo 9 Mar 2020 12:18:50 -0000 1.5 > +++ distinfo 15 Dec 2021 18:03:21 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (gzdoom-4.3.3.tar.gz) = j+a/WQcdxgPmEenoIs2KaTTMSB0KKhmNkhr4gSZmG2A= > -SIZE (gzdoom-4.3.3.tar.gz) = 13704956 > +SHA256 (gzdoom-4.7.1.tar.gz) = RUJXWCvgV2UB7vHvyZ/n6nDxxNeZNUnbPLxwnOdfwQI= > +SIZE (gzdoom-4.7.1.tar.gz) = 19562412 > Index: patches/patch-libraries_glslang_glslang_Include_PoolAlloc_h > =================================================================== > RCS file: patches/patch-libraries_glslang_glslang_Include_PoolAlloc_h > diff -N patches/patch-libraries_glslang_glslang_Include_PoolAlloc_h > --- patches/patch-libraries_glslang_glslang_Include_PoolAlloc_h 6 Aug > 2020 11:11:12 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,18 +0,0 @@ > -$OpenBSD: patch-libraries_glslang_glslang_Include_PoolAlloc_h,v 1.1 > 2020/08/06 11:11:12 edd Exp $ > - > -Fix build on base Clang 10. > - > -It's the same fix as this: > -https://github.com/KhronosGroup/glslang/pull/2010/commits/24b3e8384e93f3e73b6aa14ea00a30574112f9ba > - > -Index: libraries/glslang/glslang/Include/PoolAlloc.h > ---- libraries/glslang/glslang/Include/PoolAlloc.h.orig > -+++ libraries/glslang/glslang/Include/PoolAlloc.h > -@@ -304,7 +304,6 @@ class pool_allocator { (public) > - size_type max_size() const { return static_cast<size_type>(-1) / > sizeof(T); } > - size_type max_size(int size) const { return static_cast<size_type>(-1) > / size; } > - > -- void setAllocator(TPoolAllocator* a) { allocator = *a; } > - TPoolAllocator& getAllocator() const { return allocator; } > - > - protected: > Index: patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h > =================================================================== > RCS file: patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h > diff -N patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h > --- patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h 6 Dec 2019 > 17:40:24 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,13 +0,0 @@ > -$OpenBSD: patch-libraries_wildmidi_wildmidi_wildmidi_lib_h,v 1.1 2019/12/06 > 17:40:24 solene Exp $ > - > -Index: libraries/wildmidi/wildmidi/wildmidi_lib.h > ---- libraries/wildmidi/wildmidi/wildmidi_lib.h.orig > -+++ libraries/wildmidi/wildmidi/wildmidi_lib.h > -@@ -28,6 +28,7 @@ > - #define WILDMIDI_LIB_H > - > - #include "../../music_common/fileio.h" > -+#include <stdarg.h> > - > - namespace WildMidi > - { > Index: > patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp > =================================================================== > RCS file: > patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp > diff -N > patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp > --- > patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp > 9 Mar 2020 12:18:50 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,18 +0,0 @@ > -$OpenBSD: > patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp,v 1.2 > 2020/03/09 12:18:50 solene Exp $ > - > -Index: libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp > ---- libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp.orig > -+++ libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp > -@@ -141,8 +141,12 @@ class FluidSynthMIDIDevice : public SoftSynthMIDIDevic > - #define FLUIDSYNTHLIB1 "libfluidsynth.1.dylib" > - #define FLUIDSYNTHLIB2 "libfluidsynth.2.dylib" > - #else // !__APPLE__ > -+#ifndef FLUIDSYNTHLIB1 > - #define FLUIDSYNTHLIB1 "libfluidsynth.so.1" > -+#endif > -+#ifndef FLUIDSYNTHLIB2 > - #define FLUIDSYNTHLIB2 "libfluidsynth.so.2" > -+#endif > - #endif // __APPLE__ > - #endif > - > Index: patches/patch-libraries_zmusic_zmusic_mididefs_h > =================================================================== > RCS file: patches/patch-libraries_zmusic_zmusic_mididefs_h > diff -N patches/patch-libraries_zmusic_zmusic_mididefs_h > --- patches/patch-libraries_zmusic_zmusic_mididefs_h 6 Dec 2019 17:40:24 > -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,13 +0,0 @@ > -$OpenBSD: patch-libraries_zmusic_zmusic_mididefs_h,v 1.1 2019/12/06 17:40:24 > solene Exp $ > - > -Index: libraries/zmusic/zmusic/mididefs.h > ---- libraries/zmusic/zmusic/mididefs.h.orig > -+++ libraries/zmusic/zmusic/mididefs.h > -@@ -1,6 +1,7 @@ > - #pragma once > - > - #include <stdint.h> > -+#include <stdarg.h> > - > - enum > - { > Index: patches/patch-libraries_zmusic_zmusic_zmusic_h > =================================================================== > RCS file: patches/patch-libraries_zmusic_zmusic_zmusic_h > diff -N patches/patch-libraries_zmusic_zmusic_zmusic_h > --- patches/patch-libraries_zmusic_zmusic_zmusic_h 9 Mar 2020 12:18:50 > -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,20 +0,0 @@ > -$OpenBSD: patch-libraries_zmusic_zmusic_zmusic_h,v 1.1 2020/03/09 12:18:50 > solene Exp $ > - > -Index: libraries/zmusic/zmusic/zmusic.h > ---- libraries/zmusic/zmusic/zmusic.h.orig > -+++ libraries/zmusic/zmusic/zmusic.h > -@@ -4,6 +4,7 @@ > - #include <stdint.h> > - #include <vector> > - #include <string> > -+#include <stdarg.h> > - > - // These constants must match the corresponding values of the Windows > headers > - // to avoid readjustment in the native Windows device's playback functions > -@@ -314,4 +315,4 @@ inline bool ChangeMusicSetting(EStringConfigKey key, Z > - return ChangeMusicSettingString(key, song, value); > - } > - > --#endif > -\ No newline at end of file > -+#endif > Index: patches/patch-src_CMakeLists_txt > =================================================================== > RCS file: /home/cvs/ports/games/gzdoom/patches/patch-src_CMakeLists_txt,v > retrieving revision 1.3 > diff -u -p -r1.3 patch-src_CMakeLists_txt > --- patches/patch-src_CMakeLists_txt 6 Dec 2019 17:40:24 -0000 1.3 > +++ patches/patch-src_CMakeLists_txt 15 Dec 2021 18:36:52 -0000 > @@ -3,18 +3,7 @@ $OpenBSD: patch-src_CMakeLists_txt,v 1.3 > Index: src/CMakeLists.txt > --- src/CMakeLists.txt.orig > +++ src/CMakeLists.txt > -@@ -39,6 +39,10 @@ if( NOT ZDOOM_LIBS ) > - set( ZDOOM_LIBS "" ) > - endif() > - > -+# add override for dynamic library name > -+set(FLUIDSYNTHLIB1 "libfluidsynth.so.0" CACHE STRING "Library name for > Fluidsynth") > -+add_definitions( -DFLUIDSYNTHLIB1="${FLUIDSYNTHLIB1}" ) > -+ > - if( WIN32 ) > - if( X64 ) > - set( WIN_TYPE Win64 ) > -@@ -386,7 +390,7 @@ CHECK_CXX_SOURCE_COMPILES("thread_local int i; int mai > +@@ -356,7 +360,7 @@ CHECK_CXX_SOURCE_COMPILES("thread_local int i; int mai > HAVE_THREAD_LOCAL) > > if( NOT HAVE_THREAD_LOCAL ) > Index: patches/patch-src_scripting_vm_vmframe_cpp > =================================================================== > RCS file: patches/patch-src_scripting_vm_vmframe_cpp > diff -N patches/patch-src_scripting_vm_vmframe_cpp > --- patches/patch-src_scripting_vm_vmframe_cpp 26 Jun 2019 07:12:04 > -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,16 +0,0 @@ > -$OpenBSD: patch-src_scripting_vm_vmframe_cpp,v 1.2 2019/06/26 07:12:04 > solene Exp $ > - > -disable JIT so it's W^X compatible > - > -Index: src/scripting/vm/vmframe.cpp > ---- src/scripting/vm/vmframe.cpp.orig > -+++ src/scripting/vm/vmframe.cpp > -@@ -45,7 +45,7 @@ > - #include "version.h" > - > - #ifdef HAVE_VM_JIT > --CUSTOM_CVAR(Bool, vm_jit, true, CVAR_NOINITCALL) > -+CUSTOM_CVAR(Bool, vm_jit, false, CVAR_NOINITCALL) > - { > - Printf("You must restart " GAMENAME " for this change to take > effect.\n"); > - Printf("This cvar is currently not saved. You must specify it on the > command line."); > Index: pkg/PLIST > =================================================================== > RCS file: /home/cvs/ports/games/gzdoom/pkg/PLIST,v > retrieving revision 1.2 > diff -u -p -r1.2 PLIST > --- pkg/PLIST 6 Dec 2019 17:40:24 -0000 1.2 > +++ pkg/PLIST 15 Dec 2021 18:03:21 -0000 > @@ -18,6 +18,12 @@ share/doc/pkg-readmes/${PKGSTEM} > share/games/ > share/games/doom/ > share/games/doom/brightmaps.pk3 > +share/games/doom/fm_banks/ > +share/games/doom/fm_banks/GENMIDI.GS.wopl > +share/games/doom/fm_banks/gs-by-papiezak-and-sneakernets.wopn > share/games/doom/game_support.pk3 > +share/games/doom/game_widescreen_gfx.pk3 > share/games/doom/gzdoom.pk3 > share/games/doom/lights.pk3 > +share/games/doom/soundfonts/ > +share/games/doom/soundfonts/gzdoom.sf2