Wednesday, December 15, 2021

Re: [maintainer update] gzdoom-4.7.1

Timo Myyrä <timo.myyra@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

> [...]
> - 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)

> [...]

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"


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


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"
-+

No comments:

Post a Comment