Solene Rapenne <[email protected]> writes:

> On Fri, Feb 28, 2020 at 08:51:45AM +0200, Timo Myyrä wrote:
>
>> Hi,
>> 
>> Here's an update to latest gzdoom, hopefully I got the patch right.
>> Slightly playtested on amd64.
>> 
>> timo
>> 
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/games/gzdoom/Makefile,v
>> retrieving revision 1.10
>> diff -u -p -u -p -r1.10 Makefile
>> --- Makefile 6 Dec 2019 17:40:23 -0000       1.10
>> +++ Makefile 28 Feb 2020 06:49:15 -0000
>> @@ -8,12 +8,12 @@ ONLY_FOR_ARCHS =   i386 amd64
>>  
>>  COMMENT =           OpenGL engine for idTech 1 games like 
>> doom,hexen,heretic...
>>  
>> -V =                 4.2.4
>> +V =                 4.3.3
>>  PKGNAME =           gzdoom-${V}
>>  
>>  GH_ACCOUNT =                coelckers
>>  GH_PROJECT =                gzdoom
>> -GH_TAGNAME =                g4.2.4
>> +GH_TAGNAME =                g4.3.3
>>  DISTNAME =          gzdoom-${GH_TAGNAME:S/g//}
>>  
>>  CATEGORIES=         games
>> Index: distinfo
>> ===================================================================
>> RCS file: /cvs/ports/games/gzdoom/distinfo,v
>> retrieving revision 1.4
>> diff -u -p -u -p -r1.4 distinfo
>> --- distinfo 6 Dec 2019 17:40:23 -0000       1.4
>> +++ distinfo 28 Feb 2020 06:49:15 -0000
>> @@ -1,2 +1,2 @@
>> -SHA256 (gzdoom-4.2.4.tar.gz) = DVtEH+f8RJ65NLh9kgwvdlKcMxdH60/myxzfGFRlxRw=
>> -SIZE (gzdoom-4.2.4.tar.gz) = 13683768
>> +SHA256 (gzdoom-4.3.3.tar.gz) = j+a/WQcdxgPmEenoIs2KaTTMSB0KKhmNkhr4gSZmG2A=
>> +SIZE (gzdoom-4.3.3.tar.gz) = 13704956
>> Index: patches/patch-CMakeLists_txt
>> ===================================================================
>> RCS file: patches/patch-CMakeLists_txt
>> diff -N patches/patch-CMakeLists_txt
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-CMakeLists_txt     28 Feb 2020 06:49:15 -0000
>> @@ -0,0 +1,14 @@
>> +$OpenBSD$
>> +
>> +Index: CMakeLists.txt
>> +--- CMakeLists.txt.orig
>> ++++ CMakeLists.txt
>> +@@ -271,7 +271,7 @@ else()
>> + 
>> +    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 )
>> +            if ( NOT HAVE_FTS )
>> +                    include ( FindPkgConfig )
>> +                    pkg_check_modules( MUSL_FTS musl-fts )
>> 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
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h 28 Feb 2020 
>> 06:49:15 -0000
>> @@ -0,0 +1,13 @@
>> +$OpenBSD$
>> +
>> +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
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ 
>> patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp   
>>     28 Feb 2020 06:49:15 -0000
>> @@ -0,0 +1,18 @@
>> +$OpenBSD$
>> +
>> +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
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-libraries_zmusic_zmusic_mididefs_h 28 Feb 2020 06:49:15 
>> -0000
>> @@ -0,0 +1,13 @@
>> +$OpenBSD$
>> +
>> +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
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-libraries_zmusic_zmusic_zmusic_h   28 Feb 2020 06:49:15 
>> -0000
>> @@ -0,0 +1,20 @@
>> +$OpenBSD$
>> +
>> +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
>> 
>
> some patches are incorrect, the following files got the patch added to the
> current files, so the diff was applied twice from same file:
>
> patches/patch-CMakeLists_txt
> patches/patch-libraries_wildmidi_wildmidi_wildmidi_lib_h
> patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp
>
>
>
> the game crash for me at start, I had same result with a local diff, not sure
> why it works for you... I tried removing my ~/.config.gzdoom folder with same
> result.
>
>
> solene@t480 /usr/ports/games/gzdoom $ egdb gzdoom
> GNU gdb (GDB) 7.12.1
> Copyright (C) 2017 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-unknown-openbsd6.6".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from gzdoom...(no debugging symbols found)...done.
> (gdb) run
> Starting program: /usr/local/bin/gzdoom
> GZDoom <unknown version> -  - SDL version
> Compiled on Feb 20 2020
>
> M_LoadDefaults: Load system defaults.
> W_Init: Init WADfiles.
>  adding /usr/local/share/games/doom/gzdoom.pk3, 612 lumps
>  adding /usr/local/share/games/doom/game_support.pk3, 2523 lumps
>  adding /usr/local/share/doom/DOOM2.WAD, 2919 lumps
> I_Init: Setting up machine state.
> CPU Vendor ID: GenuineIntel
>   Name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
>   Family 6, Model 142, Stepping 10
>   Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 HyperThreading
> V_Init: allocate screen.
> S_Init: Setting up sound.
> I_InitSound: Initializing OpenAL
>   Opened device SndIO Default
>   EFX enabled
> ST_Init: Init startup screen.
> Checking cmd-line parameters...
> S_InitData: Load sound definitions.
> G_ParseMapInfo: Load map definitions.
> Texman.Init: Init texture manager.
> ParseTeamInfo: Load team definitions.
> LoadActors: Load actor definitions.
> script parsing took 352.73 ms
> R_Init: Init Doom refresh subsystem.
> DecalLibrary: Load decals.
> M_Init: Init menus.
> P_Init: Init Playloop state.
> ParseSBarInfo: Loading custom status bar definition.
> D_CheckNetGame: Checking network game status.
> player 1 of 1 (1 nodes)
> Using video driver x11
> GL_VENDOR: Intel Open Source Technology Center
> GL_RENDERER: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)
> GL_VERSION: 4.5 (Core Profile) Mesa 19.2.8 (Core profile)
> GL_SHADING_LANGUAGE_VERSION: 4.50
>
> Max. texture size: 16384
> Max. texture units: 32
> Max. varying: 128
> Max. combined shader storage blocks: 72
> Max. vertex shader storage blocks: 12
> [New thread 122909]
> [New thread 255558]
> [New thread 365721]
>
> Thread 1 received signal SIGSEGV, Segmentation fault.
> 0x00000d589c64da29 in _Unwind_IteratePhdrCallback (info=<optimized out>, 
> size=32, ptr=0x7f7ffffcf420)
>     at /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2-fde.c:869
> 869     /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2-fde.c: No such 
> file or directory.
> (gdb) bt
> #0  0x00000d589c64da29 in _Unwind_IteratePhdrCallback (info=<optimized out>, 
> size=32,
>     ptr=0x7f7ffffcf420) at 
> /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2-fde.c:869
> #1  0x00000d593d90c70f in dl_iterate_phdr (
>     callback=callback@entry=0xd589c64d9a0 <_Unwind_IteratePhdrCallback>, 
> data=data@entry=0x7f7ffffcf420)
>     at /usr/src/libexec/ld.so/dlfcn.c:562
> #2  0x00000d589c64ec61 in _Unwind_Find_FDE (pc=0xd589c64c9cd 
> <_Unwind_RaiseException+61>,
>     bases=0x7f7ffffcf768) at 
> /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2-fde.c:229
> #3  0x00000d589c64b113 in uw_frame_state_for 
> (context=context@entry=0x7f7ffffcf6c0,
>     fs=fs@entry=0x7f7ffffcf510) at 
> /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2.c:1255
> #4  0x00000d589c64c1b0 in uw_init_context_1 
> (context=context@entry=0x7f7ffffcf6c0,
>     outer_cfa=outer_cfa@entry=0x7f7ffffcfa70, outer_ra=
>     0xd589c58d056 <__cxxabiv1::__cxa_throw(void*, std::type_info*, void 
> (*)(void*))+54>)
>     at /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2.c:1608
> #5  0x00000d589c64c9ce in _Unwind_RaiseException (exc=0xd596d4cd860)
>     at /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libgcc/unwind-dw2.c:1385
> #6  0x00000d589c58d056 in __cxxabiv1::__cxa_throw (obj=<optimized out>, 
> tinfo=0xd568fe857a8,
>     dest=0xd568f8ed790) at 
> /usr/obj/ports/gcc-8.3.0/gcc-8.3.0/libstdc++-v3/libsupc++/eh_throw.cc:68
> #7  0x00000d568f8ea377 in ?? ()

Ok, heres new diff which should work.
Playtested first level on Doom and Doom II on amd64.

Timo

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/gzdoom/Makefile,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 Makefile
--- Makefile    6 Dec 2019 17:40:23 -0000       1.10
+++ Makefile    28 Feb 2020 11:40:29 -0000
@@ -8,12 +8,12 @@ ONLY_FOR_ARCHS =      i386 amd64
 
 COMMENT =              OpenGL engine for idTech 1 games like 
doom,hexen,heretic...
 
-V =                    4.2.4
+V =                    4.3.3
 PKGNAME =              gzdoom-${V}
 
 GH_ACCOUNT =           coelckers
 GH_PROJECT =           gzdoom
-GH_TAGNAME =           g4.2.4
+GH_TAGNAME =           g4.3.3
 DISTNAME =             gzdoom-${GH_TAGNAME:S/g//}
 
 CATEGORIES=            games
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/gzdoom/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo    6 Dec 2019 17:40:23 -0000       1.4
+++ distinfo    28 Feb 2020 11:40:29 -0000
@@ -1,2 +1,2 @@
-SHA256 (gzdoom-4.2.4.tar.gz) = DVtEH+f8RJ65NLh9kgwvdlKcMxdH60/myxzfGFRlxRw=
-SIZE (gzdoom-4.2.4.tar.gz) = 13683768
+SHA256 (gzdoom-4.3.3.tar.gz) = j+a/WQcdxgPmEenoIs2KaTTMSB0KKhmNkhr4gSZmG2A=
+SIZE (gzdoom-4.3.3.tar.gz) = 13704956
Index: 
patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp
===================================================================
RCS file: 
/cvs/ports/games/gzdoom/patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 
patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp
--- patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp  
6 Dec 2019 17:40:24 -0000       1.1
+++ patches/patch-libraries_zmusic_mididevices_music_fluidsynth_mididevice_cpp  
28 Feb 2020 11:40:29 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-libraries_zmusic_mididev
 Index: libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp
 --- libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp.orig
 +++ libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp
-@@ -140,8 +140,12 @@ class FluidSynthMIDIDevice : public SoftSynthMIDIDevic
+@@ -141,8 +141,12 @@ class FluidSynthMIDIDevice : public SoftSynthMIDIDevic
  #define FLUIDSYNTHLIB1        "libfluidsynth.1.dylib"
  #define FLUIDSYNTHLIB2        "libfluidsynth.2.dylib"
  #else // !__APPLE__
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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libraries_zmusic_zmusic_zmusic_h      28 Feb 2020 11:40:29 
-0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+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



Reply via email to