Re: GZDoom update, next attempt

2023-11-23 Thread Timo Myyrä
On Thu, Nov 23 2023, Thomas Frohwein wrote:

> On Wed, Nov 22, 2023 at 07:51:28AM +0100, Stefan Hagen wrote:
>
> [...]
>
>> > So I think the values in the README are correct for OpenBSD. But if
>> > you're uneasy with this, we can also write something like:
>> > 
>> > "Valid backenend values are 0-3, play around with them until you find one
>> > that works."
>> > 
>> > Diff with updated README below.
>> 
>> I just found your earlier comment:
>> 
>> > I'm on an Intel Tigerlake system and OpenGL (vid_preferbackend=0) and
>> > GLES2 (vid_preferbackend=3) work, but vulkan segfaults.
>> 
>> So appearently, GLES2 is available on intel based machines. I added the
>> value to the list.
>
> ok thfr@
>
>> 
>> Index: games/gzdoom/Makefile
>> ===
>> RCS file: /cvs/ports/games/gzdoom/Makefile,v
>> diff -u -p -u -p -r1.17 Makefile
>> --- games/gzdoom/Makefile18 Jul 2022 08:27:45 -  1.17
>> +++ games/gzdoom/Makefile22 Nov 2023 06:49:27 -
>> @@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =   i386 amd64
>>  
>>  COMMENT =   OpenGL engine for idTech 1 games like 
>> doom,hexen,heretic...
>>  
>> -V = 4.8.2
>> -GH_ACCOUNT =coelckers
>> -GH_PROJECT =gzdoom
>> -GH_TAGNAME =g${V}
>> -DISTNAME =  gzdoom-${V}
>> +V = 4.11.3
>> +
>> +DIST_TUPLE =github ZDoom gzdoom g${V} .
>> +PKGNAME =   gzdoom-${V}
>>  
>>  CATEGORIES= games
>>  
>> @@ -21,8 +20,8 @@ MAINTAINER =   Timo Myyra >  # GPLv3
>>  PERMIT_PACKAGE =Yes
>>  
>> -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
>> -WANTLIB += openal vpx z zmusic
>> +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
>> +WANTLIB += openal vpx webp webpdemux webpmux zmusic
>>  
>>  # C++17
>>  COMPILER =  base-clang ports-gcc
>> @@ -34,13 +33,14 @@ CONFIGURE_ARGS +=-DDYN_OPENAL=NO
>>  CONFIGURE_ARGS +=   -DHAVE_STDINT_H=1
>>  CONFIGURE_ARGS +=   -DNO_OPENMP=ON
>>  
>> -CXXFLAGS +=  -I. -I${LOCALBASE}/include
>> +CFLAGS +=   -I${X11BASE}/include
>> +CXXFLAGS += -I. -I${LOCALBASE}/include
>>  
>>  LIB_DEPENDS =   archivers/bzip2 \
>>  audio/openal \
>>  audio/zmusic \
>>  devel/sdl2 \
>> -graphics/jpeg \
>> +graphics/libwebp \
>>  multimedia/libvpx
>>  
>>  NO_TEST =   Yes
>> Index: games/gzdoom/distinfo
>> ===
>> RCS file: /cvs/ports/games/gzdoom/distinfo,v
>> diff -u -p -u -p -r1.7 distinfo
>> --- games/gzdoom/distinfo18 Jul 2022 08:27:45 -  1.7
>> +++ games/gzdoom/distinfo22 Nov 2023 06:49:27 -
>> @@ -1,2 +1,2 @@
>> -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
>> -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
>> +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
>> WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
>> +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
>> Index: games/gzdoom/patches/patch-CMakeLists_txt
>> ===
>> RCS file: /cvs/ports/games/gzdoom/patches/patch-CMakeLists_txt,v
>> diff -u -p -u -p -r1.3 patch-CMakeLists_txt
>> --- games/gzdoom/patches/patch-CMakeLists_txt18 Jul 2022 08:27:46 
>> -  1.3
>> +++ games/gzdoom/patches/patch-CMakeLists_txt22 Nov 2023 06:49:27 
>> -
>> @@ -1,7 +1,7 @@
>>  Index: CMakeLists.txt
>>  --- CMakeLists.txt.orig
>>  +++ CMakeLists.txt
>> -@@ -272,7 +272,7 @@ else()
>> +@@ -301,7 +301,7 @@ else()
>>   
>>  if ( UNIX )
>>  include(CheckSymbolExists)
>> Index: games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
>> ===
>> RCS file: games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
>> diff -N games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
>> --- /dev/null1 Jan 1970 00:00:00 -
>> +++ games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt  22 Nov 
>> 2023 06:49:27 -
>> @@ -0,0 +1,12 @@
>> +Index: libraries/ZVulkan/CMakeLists.txt
>> +--- libraries/ZVulkan/CMakeLists.txt.orig
>>  libraries/ZVulkan/CMakeLists.txt
>> +@@ -188,7 +188,7 @@ if(WIN32)
>> +add_definitions(-DUNICODE -D_UNICODE)
>> + else()
>> +set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
>> +-   set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
>> ++   set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
>> +add_definitions(-DUNIX -D_UNIX)
>> +add_link_options(-pthread)
>> + endif()
>> Index: games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
>> ===
>> RCS file: games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
>> diff -N games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
>> 

Re: GZDoom update, next attempt

2023-11-23 Thread Thomas Frohwein
On Wed, Nov 22, 2023 at 07:51:28AM +0100, Stefan Hagen wrote:

[...]

> > So I think the values in the README are correct for OpenBSD. But if
> > you're uneasy with this, we can also write something like:
> > 
> > "Valid backenend values are 0-3, play around with them until you find one
> > that works."
> > 
> > Diff with updated README below.
> 
> I just found your earlier comment:
> 
> > I'm on an Intel Tigerlake system and OpenGL (vid_preferbackend=0) and
> > GLES2 (vid_preferbackend=3) work, but vulkan segfaults.
> 
> So appearently, GLES2 is available on intel based machines. I added the
> value to the list.

ok thfr@

> 
> Index: games/gzdoom/Makefile
> ===
> RCS file: /cvs/ports/games/gzdoom/Makefile,v
> diff -u -p -u -p -r1.17 Makefile
> --- games/gzdoom/Makefile 18 Jul 2022 08:27:45 -  1.17
> +++ games/gzdoom/Makefile 22 Nov 2023 06:49:27 -
> @@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =i386 amd64
>  
>  COMMENT =OpenGL engine for idTech 1 games like 
> doom,hexen,heretic...
>  
> -V =  4.8.2
> -GH_ACCOUNT = coelckers
> -GH_PROJECT = gzdoom
> -GH_TAGNAME = g${V}
> -DISTNAME =   gzdoom-${V}
> +V =  4.11.3
> +
> +DIST_TUPLE = github ZDoom gzdoom g${V} .
> +PKGNAME =gzdoom-${V}
>  
>  CATEGORIES=  games
>  
> @@ -21,8 +20,8 @@ MAINTAINER =Timo Myyra   # GPLv3
>  PERMIT_PACKAGE = Yes
>  
> -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
> -WANTLIB += openal vpx z zmusic
> +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
> +WANTLIB += openal vpx webp webpdemux webpmux zmusic
>  
>  # C++17
>  COMPILER =   base-clang ports-gcc
> @@ -34,13 +33,14 @@ CONFIGURE_ARGS += -DDYN_OPENAL=NO
>  CONFIGURE_ARGS +=-DHAVE_STDINT_H=1
>  CONFIGURE_ARGS +=-DNO_OPENMP=ON
>  
> -CXXFLAGS +=   -I. -I${LOCALBASE}/include
> +CFLAGS +=-I${X11BASE}/include
> +CXXFLAGS +=  -I. -I${LOCALBASE}/include
>  
>  LIB_DEPENDS =archivers/bzip2 \
>   audio/openal \
>   audio/zmusic \
>   devel/sdl2 \
> - graphics/jpeg \
> + graphics/libwebp \
>   multimedia/libvpx
>  
>  NO_TEST =Yes
> Index: games/gzdoom/distinfo
> ===
> RCS file: /cvs/ports/games/gzdoom/distinfo,v
> diff -u -p -u -p -r1.7 distinfo
> --- games/gzdoom/distinfo 18 Jul 2022 08:27:45 -  1.7
> +++ games/gzdoom/distinfo 22 Nov 2023 06:49:27 -
> @@ -1,2 +1,2 @@
> -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
> -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
> +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
> WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
> +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
> Index: games/gzdoom/patches/patch-CMakeLists_txt
> ===
> RCS file: /cvs/ports/games/gzdoom/patches/patch-CMakeLists_txt,v
> diff -u -p -u -p -r1.3 patch-CMakeLists_txt
> --- games/gzdoom/patches/patch-CMakeLists_txt 18 Jul 2022 08:27:46 -  
> 1.3
> +++ games/gzdoom/patches/patch-CMakeLists_txt 22 Nov 2023 06:49:27 -
> @@ -1,7 +1,7 @@
>  Index: CMakeLists.txt
>  --- CMakeLists.txt.orig
>  +++ CMakeLists.txt
> -@@ -272,7 +272,7 @@ else()
> +@@ -301,7 +301,7 @@ else()
>   
>   if ( UNIX )
>   include(CheckSymbolExists)
> Index: games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
> ===
> RCS file: games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
> diff -N games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt   22 Nov 
> 2023 06:49:27 -
> @@ -0,0 +1,12 @@
> +Index: libraries/ZVulkan/CMakeLists.txt
> +--- libraries/ZVulkan/CMakeLists.txt.orig
>  libraries/ZVulkan/CMakeLists.txt
> +@@ -188,7 +188,7 @@ if(WIN32)
> + add_definitions(-DUNICODE -D_UNICODE)
> + else()
> + set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
> +-set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> ++set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
> + add_definitions(-DUNIX -D_UNIX)
> + add_link_options(-pthread)
> + endif()
> Index: games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
> ===
> RCS file: games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
> diff -N games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt
> --- games/gzdoom/patches/patch-libraries_discordrpc_CMakeLists_txt31 Jul 
> 2022 20:50:40 -  1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,15 +0,0 @@
> -don't pick up 

Re: GZDoom update, next attempt

2023-11-21 Thread Stefan Hagen
Stefan Hagen wrote (2023-11-22 07:36 CET):
> Thomas Frohwein wrote (2023-11-22 03:47 CET):
> > On Tue, Nov 21, 2023 at 08:20:16AM +0100, Stefan Hagen wrote:
> > 
> > [...]
> > 
> > > - added more details about supported games (the ones I know that work)
> > > - added ~/.config/gzdoom as wad installation dir
> > > - updated sha256 for doom-1.8 wad (what the heck happened there?)
> > > - added reference to games/freedoom
> > > - added information about GL backends and how to change them in case of
> > >   a crash/freeze.
> > 
> > see below for comments.
> >
> > > +Supported are data files from:
> > > +- Doom 1 (doom1.wad) and 2 (doom2.wad)
> > > +- Freedoom (freedoom1.wad, freedoom2.wad)
> > > +- Heretic (heretic.wad)
> > > +- Hexen (hexen.wad)
> > > +- Vomitoreum (vomitoreum.ipk3)
> > > +- Apocalyptic Vibes (AVBuild.ipk3)
> > 
> > There are way more and I don't think the README is the right place to
> > try to enumerate them all, especially as those are actively being
> > released, including probably dozens in 2023 alone. I'm okay with a
> > limited selection of something like Doom 1&2, Freedoom, Heretic, and
> > Hexen - that is pretty much the original content plus Freedoom which
> > is useful for testing given its license/availability.
> 
> Fair point. I thought it's useful to add some that are not ending in .wad.
> But there's official documentation for that. I removed the last two and
> added a link to the official documentation.
> 
> > > +If you do not possess any of those, you can install the freedoom
> > > +package or use the shareware IWAD which is available at:
> > >  
> > >  
> > > ftp://ftp.fu-berlin.de/pc/msdos/games/idgames/idstuff/doom/doom-1.8.wad.gz
> > > -SHA256 (doom-1.8.wad.gz) = WM9qVjtjGkdWFjCvpidthTwnB5NC95aewwBpZdqFV6E=
> > > +SHA256 (doom-1.8.wad.gz) = 
> > > 58cf6a563b631a47561630afa6276d853c27079342f7969ec3006965da8557a1
> > > +
> > > +Rename the file as "doom.wad" to one of the mentioned locations.
> > 
> > "Rename" is strange here, what about:
> > Rename the file to "doom.wad" and move it to one of the above-mentioned
> > locations.
> 
> Yes, that's better.
> 
> > > +[GlobalSettings]
> > > +vid_preferbackend=1
> > > +
> > > +Supported values are: 0 (OpenGL), 1 (Vulkan) or 2 (OpenGL ES)
> > 
> > I'm not sure that's correct. Looking at the documentation at [1], it
> > seems to me that 3 is GL ES, and 2 seems to be for a Direct3D Windows-
> > related backend.
> > 
> > [1] https://zdoom.org/wiki/CVARs:Display
> 
> I'm seeing the documentation - but the mentioned values are correct on
> my system. Value 3 lets the game start, but the backend option in game
> shows "Unknown".
> 
> On OpenBSD (Posix System) only the left column is relevant. I think we
> don't build with GLES2, and the documentation mentiones 0 and 2 as
> "OpenGL". The latter one is probably OpenGL ES.
> 
> So I think the values in the README are correct for OpenBSD. But if
> you're uneasy with this, we can also write something like:
> 
> "Valid backenend values are 0-3, play around with them until you find one
> that works."
> 
> Diff with updated README below.

I just found your earlier comment:

> I'm on an Intel Tigerlake system and OpenGL (vid_preferbackend=0) and
> GLES2 (vid_preferbackend=3) work, but vulkan segfaults.

So appearently, GLES2 is available on intel based machines. I added the
value to the list.

Index: games/gzdoom/Makefile
===
RCS file: /cvs/ports/games/gzdoom/Makefile,v
diff -u -p -u -p -r1.17 Makefile
--- games/gzdoom/Makefile   18 Jul 2022 08:27:45 -  1.17
+++ games/gzdoom/Makefile   22 Nov 2023 06:49:27 -
@@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =  i386 amd64
 
 COMMENT =  OpenGL engine for idTech 1 games like 
doom,hexen,heretic...
 
-V =4.8.2
-GH_ACCOUNT =   coelckers
-GH_PROJECT =   gzdoom
-GH_TAGNAME =   g${V}
-DISTNAME = gzdoom-${V}
+V =4.11.3
+
+DIST_TUPLE =   github ZDoom gzdoom g${V} .
+PKGNAME =  gzdoom-${V}
 
 CATEGORIES=games
 
@@ -21,8 +20,8 @@ MAINTAINER =  Timo Myyra https://github.com/coelckers/gzdoom/pull/1665
-
-Index: src/d_main.cpp
 src/d_main.cpp.orig
-+++ src/d_main.cpp
-@@ -3534,6 +3534,8 @@ static int D_DoomMain_Internal (void)
-   
-   std::set_new_handler(NewFailure);
-   const char *batchout = Args->CheckValue("-errorlog");
-+
-+  D_DoomInit();
-   
-   // [RH] Make sure zdoom.pk3 is always loaded,
-   // as it contains magic stuff we need.
-@@ -3567,8 +3569,6 @@ static int D_DoomMain_Internal (void)
-   }
- 
-   if (!batchrun) Printf(PRINT_LOG, "%s version %s\n", GAMENAME, 
GetVersionString());
--
--  D_DoomInit();
- 
-   extern void D_ConfirmSendStats();
-   D_ConfirmSendStats();
Index: games/gzdoom/pkg/README
===
RCS file: 

Re: GZDoom update, next attempt

2023-11-21 Thread Stefan Hagen
Thomas Frohwein wrote (2023-11-22 03:47 CET):
> On Tue, Nov 21, 2023 at 08:20:16AM +0100, Stefan Hagen wrote:
> 
> [...]
> 
> > - added more details about supported games (the ones I know that work)
> > - added ~/.config/gzdoom as wad installation dir
> > - updated sha256 for doom-1.8 wad (what the heck happened there?)
> > - added reference to games/freedoom
> > - added information about GL backends and how to change them in case of
> >   a crash/freeze.
> 
> see below for comments.
>
> > +Supported are data files from:
> > +- Doom 1 (doom1.wad) and 2 (doom2.wad)
> > +- Freedoom (freedoom1.wad, freedoom2.wad)
> > +- Heretic (heretic.wad)
> > +- Hexen (hexen.wad)
> > +- Vomitoreum (vomitoreum.ipk3)
> > +- Apocalyptic Vibes (AVBuild.ipk3)
> 
> There are way more and I don't think the README is the right place to
> try to enumerate them all, especially as those are actively being
> released, including probably dozens in 2023 alone. I'm okay with a
> limited selection of something like Doom 1&2, Freedoom, Heretic, and
> Hexen - that is pretty much the original content plus Freedoom which
> is useful for testing given its license/availability.

Fair point. I thought it's useful to add some that are not ending in .wad.
But there's official documentation for that. I removed the last two and
added a link to the official documentation.

> > +If you do not possess any of those, you can install the freedoom
> > +package or use the shareware IWAD which is available at:
> >  
> >  ftp://ftp.fu-berlin.de/pc/msdos/games/idgames/idstuff/doom/doom-1.8.wad.gz
> > -SHA256 (doom-1.8.wad.gz) = WM9qVjtjGkdWFjCvpidthTwnB5NC95aewwBpZdqFV6E=
> > +SHA256 (doom-1.8.wad.gz) = 
> > 58cf6a563b631a47561630afa6276d853c27079342f7969ec3006965da8557a1
> > +
> > +Rename the file as "doom.wad" to one of the mentioned locations.
> 
> "Rename" is strange here, what about:
> Rename the file to "doom.wad" and move it to one of the above-mentioned
> locations.

Yes, that's better.

> > +[GlobalSettings]
> > +vid_preferbackend=1
> > +
> > +Supported values are: 0 (OpenGL), 1 (Vulkan) or 2 (OpenGL ES)
> 
> I'm not sure that's correct. Looking at the documentation at [1], it
> seems to me that 3 is GL ES, and 2 seems to be for a Direct3D Windows-
> related backend.
> 
> [1] https://zdoom.org/wiki/CVARs:Display

I'm seeing the documentation - but the mentioned values are correct on
my system. Value 3 lets the game start, but the backend option in game
shows "Unknown".

On OpenBSD (Posix System) only the left column is relevant. I think we
don't build with GLES2, and the documentation mentiones 0 and 2 as
"OpenGL". The latter one is probably OpenGL ES.

So I think the values in the README are correct for OpenBSD. But if
you're uneasy with this, we can also write something like:

"Valid backenend values are 0-3, play around with them until you find one
that works."

Diff with updated README below.

Index: games/gzdoom/Makefile
===
RCS file: /cvs/ports/games/gzdoom/Makefile,v
diff -u -p -u -p -r1.17 Makefile
--- games/gzdoom/Makefile   18 Jul 2022 08:27:45 -  1.17
+++ games/gzdoom/Makefile   22 Nov 2023 06:32:27 -
@@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =  i386 amd64
 
 COMMENT =  OpenGL engine for idTech 1 games like 
doom,hexen,heretic...
 
-V =4.8.2
-GH_ACCOUNT =   coelckers
-GH_PROJECT =   gzdoom
-GH_TAGNAME =   g${V}
-DISTNAME = gzdoom-${V}
+V =4.11.3
+
+DIST_TUPLE =   github ZDoom gzdoom g${V} .
+PKGNAME =  gzdoom-${V}
 
 CATEGORIES=games
 
@@ -21,8 +20,8 @@ MAINTAINER =  Timo Myyra https://github.com/coelckers/gzdoom/pull/1665
-
-Index: src/d_main.cpp
 src/d_main.cpp.orig
-+++ src/d_main.cpp
-@@ -3534,6 +3534,8 @@ static int D_DoomMain_Internal (void)
-   
-   std::set_new_handler(NewFailure);
-   const char *batchout = Args->CheckValue("-errorlog");
-+
-+  D_DoomInit();
-   
-   // [RH] Make sure zdoom.pk3 is always loaded,
-   // as it contains magic stuff we need.
-@@ -3567,8 +3569,6 @@ static int D_DoomMain_Internal (void)
-   }
- 
-   if (!batchrun) Printf(PRINT_LOG, "%s version %s\n", GAMENAME, 
GetVersionString());
--
--  D_DoomInit();
- 
-   extern void D_ConfirmSendStats();
-   D_ConfirmSendStats();
Index: games/gzdoom/pkg/README
===
RCS file: /cvs/ports/games/gzdoom/pkg/README,v
diff -u -p -u -p -r1.2 README
--- games/gzdoom/pkg/README 11 Mar 2022 19:04:32 -  1.2
+++ games/gzdoom/pkg/README 22 Nov 2023 06:32:27 -
@@ -1,14 +1,53 @@
-You will need an IWAD for gzdoom to be fully functional.  An IWAD is
-the main data file containing the graphics and levels for Doom.  If
-you have a copy of one of the original Doom games, simply copy your
-Doom, Doom 2, Ultimate Doom, or Final Doom IWAD (doom.wad, 

Re: GZDoom update, next attempt

2023-11-21 Thread Thomas Frohwein
On Tue, Nov 21, 2023 at 08:20:16AM +0100, Stefan Hagen wrote:

[...]

> Attached the same diff, but I rewrote the README.
> 
> - add usual readme header

I think that's a good thing.

> - added more details about supported games (the ones I know that work)
> - added ~/.config/gzdoom as wad installation dir
> - updated sha256 for doom-1.8 wad (what the heck happened there?)
> - added reference to games/freedoom
> - added information about GL backends and how to change them in case of
>   a crash/freeze.

see below for comments.

> Portwise OK sdk@
> 
> Index: games/gzdoom/Makefile

[...]

> Index: games/gzdoom/pkg/README
> ===
> RCS file: /cvs/ports/games/gzdoom/pkg/README,v
> diff -u -p -u -p -r1.2 README
> --- games/gzdoom/pkg/README   11 Mar 2022 19:04:32 -  1.2
> +++ games/gzdoom/pkg/README   21 Nov 2023 07:15:51 -
> @@ -1,14 +1,55 @@
> -You will need an IWAD for gzdoom to be fully functional.  An IWAD is
> -the main data file containing the graphics and levels for Doom.  If
> -you have a copy of one of the original Doom games, simply copy your
> -Doom, Doom 2, Ultimate Doom, or Final Doom IWAD (doom.wad, doom2.wad,
> -tnt.wad, and plutonia.wad respectively) to ${PREFIX}/share/doom/.
> -If you do not possess any of those, you can use the shareware IWAD
> -which is available at:
> ++---
> +| Running ${PKGSTEM} on OpenBSD
> ++---
> +
> +Installing Data Files
> +=
> +
> +You will need an IWAD for gzdoom to be fully functional. An IWAD is
> +the main data file containing the graphics and levels for Doom. If
> +you have a copy of one of the original Doom games, or any other game,
> +based on the same engine, you can copy them to the following locations
> +for gzdoom to find:
> +
> +- System wide: ${PREFIX}/share/doom/
> +- User wide: ~/.config/gzdoom/
> +
> +Supported are data files from:
> +- Doom 1 (doom1.wad) and 2 (doom2.wad)
> +- Freedoom (freedoom1.wad, freedoom2.wad)
> +- Heretic (heretic.wad)
> +- Hexen (hexen.wad)
> +- Vomitoreum (vomitoreum.ipk3)
> +- Apocalyptic Vibes (AVBuild.ipk3)

There are way more and I don't think the README is the right place to
try to enumerate them all, especially as those are actively being
released, including probably dozens in 2023 alone. I'm okay with a
limited selection of something like Doom 1&2, Freedoom, Heretic, and
Hexen - that is pretty much the original content plus Freedoom which
is useful for testing given its license/availability.

> +
> +If you do not possess any of those, you can install the freedoom
> +package or use the shareware IWAD which is available at:
>  
>  ftp://ftp.fu-berlin.de/pc/msdos/games/idgames/idstuff/doom/doom-1.8.wad.gz
> -SHA256 (doom-1.8.wad.gz) = WM9qVjtjGkdWFjCvpidthTwnB5NC95aewwBpZdqFV6E=
> +SHA256 (doom-1.8.wad.gz) = 
> 58cf6a563b631a47561630afa6276d853c27079342f7969ec3006965da8557a1
> +
> +Rename the file as "doom.wad" to one of the mentioned locations.

"Rename" is strange here, what about:
Rename the file to "doom.wad" and move it to one of the above-mentioned
locations.

> -Install it to ${PREFIX}/share/doom as "doom.wad".
> +Optional Dependencies
> +=
>  
>  In case fluidsynth backend is needed the user needs to setup soundfont for 
> it.
> +
> +Known Problems
> +==
> +
> +Gzdoom supports three GL backends (OpenGL, OpenGL ES, Vulkan). Some work
> +better than others depending on the graphic hardware in the system.
> +
> +In case gzdoom freezes or crashes before you can reach the in-game menu
> +to select a different backend, you can modify ~/.config/gzdoom/gzdoom.ini
> +manually and change the vid_preferbackend value:
> +
> +[GlobalSettings]
> +vid_preferbackend=1
> +
> +Supported values are: 0 (OpenGL), 1 (Vulkan) or 2 (OpenGL ES)

I'm not sure that's correct. Looking at the documentation at [1], it
seems to me that 3 is GL ES, and 2 seems to be for a Direct3D Windows-
related backend.

[1] https://zdoom.org/wiki/CVARs:Display 



Re: GZDoom update, next attempt

2023-11-20 Thread Stefan Hagen
Thomas Frohwein wrote (2023-11-17 02:43 CET):
> On Wed, Nov 15, 2023 at 08:32:39AM +0100, Stefan Hagen wrote:
> > Timo Myyrä wrote (2023-11-14 17:50 CET):
> > > On Fri, Nov 10 2023, Stefan Hagen wrote:
> > > 
> > > > Thomas Frohwein wrote (2023-11-09 21:16 CET):
> > > >> Here is an update to GZDoom 4.11.3. It works to run mods like the
> > > >> recently released Beyond Sunset.
> > > >> 
> > > >> Of note, you may need to switch the video backend to opengl as I
> > > >> outlined after previous concerns:
> > > >> 
> > > >> https://marc.info/?l=openbsd-ports=169132550927983=2
> > > >> 
> > > >> Of note, we are several versions behind upstream - the current version
> > > >> in ports is 4.8.2.
> > > >
> > > > What's the deal with:
> > > >> +- set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> > > >> ++ #set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> > > >
> > > > It builds and works fine with
> > > > set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
> > > >
> > > > There doesn't seem to be a difference at runtime. At least on my
> > > > machine (amd), vulkan runs fine with and without this line.
> > > >
> > > > (I haven't diffed the build logs to figure out if it has picked up
> > > > something differently)
> > > >
> > > > Regarding:
> > > >> https://marc.info/?l=openbsd-ports=169132550927983=2
> > > >>  After changing that back to default opengl (0),
> > > >
> > > > It seems to be untrue that opengl is the default backend. If I remove
> > > > gzdoom.ini and start the game, the vulkan backend is automatically
> > > > selected.
> > > >
> > > > If we have issues with the vulkan backend on more than a few machines,
> > > > should we change the default? And/Or described the issue in the README?
> > > >
> > > 
> > > How about this diff? Bumps minor version a bit and sets the vulkan bits.
> > > Works for me with ryzen thinkpad.
> > 
> > Hmm. Vulkan and OpenGL ES works. When I select OpenGL it gets stuck on
> > the loading screen and gzdoom keeps consuming 60% CPU and X ~15/20%.
> > 
> > Does this happen for you too?
> 
> I'm on an Intel Tigerlake system and OpenGL (vid_preferbackend=0) and
> GLES2 (vid_preferbackend=3) work, but vulkan segfaults.
> 
> I tested with Freedoom, as well as the commercial gzdoom games Supplice
> and Beyond Sunset.
> 
> To me, this looks like it might not be straightforward to figure out
> all the video backend issues, but as multiple are available and it seems
> to work with some for everyone, I'm ok thfr@ with the update.

Sure, not problem. But then we should document it.

Attached the same diff, but I rewrote the README.

- add usual readme header
- added more details about supported games (the ones I know that work)
- added ~/.config/gzdoom as wad installation dir
- updated sha256 for doom-1.8 wad (what the heck happened there?)
- added reference to games/freedoom
- added information about GL backends and how to change them in case of
  a crash/freeze.

Portwise OK sdk@

Index: games/gzdoom/Makefile
===
RCS file: /cvs/ports/games/gzdoom/Makefile,v
diff -u -p -u -p -r1.17 Makefile
--- games/gzdoom/Makefile   18 Jul 2022 08:27:45 -  1.17
+++ games/gzdoom/Makefile   21 Nov 2023 07:15:51 -
@@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =  i386 amd64
 
 COMMENT =  OpenGL engine for idTech 1 games like 
doom,hexen,heretic...
 
-V =4.8.2
-GH_ACCOUNT =   coelckers
-GH_PROJECT =   gzdoom
-GH_TAGNAME =   g${V}
-DISTNAME = gzdoom-${V}
+V =4.11.3
+
+DIST_TUPLE =   github ZDoom gzdoom g${V} .
+PKGNAME =  gzdoom-${V}
 
 CATEGORIES=games
 
@@ -21,8 +20,8 @@ MAINTAINER =  Timo Myyra ftp://ftp.fu-berlin.de/pc/msdos/games/idgames/idstuff/doom/doom-1.8.wad.gz
-SHA256 (doom-1.8.wad.gz) = WM9qVjtjGkdWFjCvpidthTwnB5NC95aewwBpZdqFV6E=
+SHA256 (doom-1.8.wad.gz) = 
58cf6a563b631a47561630afa6276d853c27079342f7969ec3006965da8557a1
+
+Rename the file as "doom.wad" to one of the mentioned locations.
 
-Install it to ${PREFIX}/share/doom as "doom.wad".
+Optional Dependencies
+=
 
 In case fluidsynth backend is needed the user needs to setup soundfont for it.
+
+Known Problems
+==
+
+Gzdoom supports three GL backends (OpenGL, OpenGL ES, Vulkan). Some work
+better than others depending on the graphic hardware in the system.
+
+In case gzdoom freezes or crashes before you can reach the in-game menu
+to select a different backend, you can modify ~/.config/gzdoom/gzdoom.ini
+manually and change the vid_preferbackend value:
+
+[GlobalSettings]
+vid_preferbackend=1
+
+Supported values are: 0 (OpenGL), 1 (Vulkan) or 2 (OpenGL ES)
+
+
+
+



Re: GZDoom update, next attempt

2023-11-16 Thread Thomas Frohwein
On Wed, Nov 15, 2023 at 08:32:39AM +0100, Stefan Hagen wrote:
> Timo Myyrä wrote (2023-11-14 17:50 CET):
> > On Fri, Nov 10 2023, Stefan Hagen wrote:
> > 
> > > Thomas Frohwein wrote (2023-11-09 21:16 CET):
> > >> Here is an update to GZDoom 4.11.3. It works to run mods like the
> > >> recently released Beyond Sunset.
> > >> 
> > >> Of note, you may need to switch the video backend to opengl as I
> > >> outlined after previous concerns:
> > >> 
> > >> https://marc.info/?l=openbsd-ports=169132550927983=2
> > >> 
> > >> Of note, we are several versions behind upstream - the current version
> > >> in ports is 4.8.2.
> > >
> > > What's the deal with:
> > >> +-   set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> > >> ++   #set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> > >
> > > It builds and works fine with
> > > set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
> > >
> > > There doesn't seem to be a difference at runtime. At least on my
> > > machine (amd), vulkan runs fine with and without this line.
> > >
> > > (I haven't diffed the build logs to figure out if it has picked up
> > > something differently)
> > >
> > > Regarding:
> > >> https://marc.info/?l=openbsd-ports=169132550927983=2
> > >>  After changing that back to default opengl (0),
> > >
> > > It seems to be untrue that opengl is the default backend. If I remove
> > > gzdoom.ini and start the game, the vulkan backend is automatically
> > > selected.
> > >
> > > If we have issues with the vulkan backend on more than a few machines,
> > > should we change the default? And/Or described the issue in the README?
> > >
> > 
> > How about this diff? Bumps minor version a bit and sets the vulkan bits.
> > Works for me with ryzen thinkpad.
> 
> Hmm. Vulkan and OpenGL ES works. When I select OpenGL it gets stuck on
> the loading screen and gzdoom keeps consuming 60% CPU and X ~15/20%.
> 
> Does this happen for you too?

I'm on an Intel Tigerlake system and OpenGL (vid_preferbackend=0) and
GLES2 (vid_preferbackend=3) work, but vulkan segfaults.

I tested with Freedoom, as well as the commercial gzdoom games Supplice
and Beyond Sunset.

To me, this looks like it might not be straightforward to figure out
all the video backend issues, but as multiple are available and it seems
to work with some for everyone, I'm ok thfr@ with the update.

> 
> > diff /usr/ports
> > commit - 9213cea3ba80fcc2debf29c883db9b8e42c07622
> > path + /usr/ports
> > blob - e08c43f0bf6074d7afac5b1c384ceb55e065c6fc
> > file + games/gzdoom/Makefile
> > --- games/gzdoom/Makefile
> > +++ games/gzdoom/Makefile
> > @@ -6,12 +6,11 @@ ONLY_FOR_ARCHS =  i386 amd64
> >  
> >  COMMENT =  OpenGL engine for idTech 1 games like 
> > doom,hexen,heretic...
> >  
> > -V =4.8.2
> > -GH_ACCOUNT =   coelckers
> > -GH_PROJECT =   gzdoom
> > -GH_TAGNAME =   g${V}
> > -DISTNAME = gzdoom-${V}
> > +V =4.11.3
> >  
> > +DIST_TUPLE =   github ZDoom gzdoom g${V} .
> > +PKGNAME =  gzdoom-${V}
> > +
> >  CATEGORIES=games
> >  
> >  HOMEPAGE = https://zdoom.org
> > @@ -21,8 +20,8 @@ MAINTAINER =  Timo Myyra 
> > 
> >  # GPLv3
> >  PERMIT_PACKAGE =   Yes
> >  
> > -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
> > -WANTLIB += openal vpx z zmusic
> > +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
> > +WANTLIB += openal vpx webp webpdemux webpmux zmusic
> >  
> >  # C++17
> >  COMPILER = base-clang ports-gcc
> > @@ -34,13 +33,14 @@ CONFIGURE_ARGS +=   -DDYN_OPENAL=NO
> >  CONFIGURE_ARGS +=  -DHAVE_STDINT_H=1
> >  CONFIGURE_ARGS +=  -DNO_OPENMP=ON
> >  
> > -CXXFLAGS += -I. -I${LOCALBASE}/include
> > +CFLAGS +=  -I${X11BASE}/include
> > +CXXFLAGS +=-I. -I${LOCALBASE}/include
> >  
> >  LIB_DEPENDS =  archivers/bzip2 \
> > audio/openal \
> > audio/zmusic \
> > devel/sdl2 \
> > -   graphics/jpeg \
> > +   graphics/libwebp \
> > multimedia/libvpx
> >  
> >  NO_TEST =  Yes
> > blob - fffa78bdc838438fde2a24aea4f98f67711f36aa
> > file + games/gzdoom/distinfo
> > --- games/gzdoom/distinfo
> > +++ games/gzdoom/distinfo
> > @@ -1,2 +1,2 @@
> > -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
> > -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
> > +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
> > WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
> > +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
> > blob - 0f5f1a7bc01e286e168f93809d4a8c6c8357cc3e
> > 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
> > -@@ -272,7 +272,7 @@ else()
> > +@@ -301,7 +301,7 @@ else()
> >   
> > if ( UNIX )
> > 

Re: GZDoom update, next attempt

2023-11-14 Thread Stefan Hagen
Timo Myyrä wrote (2023-11-14 17:50 CET):
> On Fri, Nov 10 2023, Stefan Hagen wrote:
> 
> > Thomas Frohwein wrote (2023-11-09 21:16 CET):
> >> Here is an update to GZDoom 4.11.3. It works to run mods like the
> >> recently released Beyond Sunset.
> >> 
> >> Of note, you may need to switch the video backend to opengl as I
> >> outlined after previous concerns:
> >> 
> >> https://marc.info/?l=openbsd-ports=169132550927983=2
> >> 
> >> Of note, we are several versions behind upstream - the current version
> >> in ports is 4.8.2.
> >
> > What's the deal with:
> >> +- set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> >> ++ #set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> >
> > It builds and works fine with
> > set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
> >
> > There doesn't seem to be a difference at runtime. At least on my
> > machine (amd), vulkan runs fine with and without this line.
> >
> > (I haven't diffed the build logs to figure out if it has picked up
> > something differently)
> >
> > Regarding:
> >> https://marc.info/?l=openbsd-ports=169132550927983=2
> >>  After changing that back to default opengl (0),
> >
> > It seems to be untrue that opengl is the default backend. If I remove
> > gzdoom.ini and start the game, the vulkan backend is automatically
> > selected.
> >
> > If we have issues with the vulkan backend on more than a few machines,
> > should we change the default? And/Or described the issue in the README?
> >
> 
> How about this diff? Bumps minor version a bit and sets the vulkan bits.
> Works for me with ryzen thinkpad.

Hmm. Vulkan and OpenGL ES works. When I select OpenGL it gets stuck on
the loading screen and gzdoom keeps consuming 60% CPU and X ~15/20%.

Does this happen for you too?

> diff /usr/ports
> commit - 9213cea3ba80fcc2debf29c883db9b8e42c07622
> path + /usr/ports
> blob - e08c43f0bf6074d7afac5b1c384ceb55e065c6fc
> file + games/gzdoom/Makefile
> --- games/gzdoom/Makefile
> +++ games/gzdoom/Makefile
> @@ -6,12 +6,11 @@ ONLY_FOR_ARCHS =i386 amd64
>  
>  COMMENT =OpenGL engine for idTech 1 games like 
> doom,hexen,heretic...
>  
> -V =  4.8.2
> -GH_ACCOUNT = coelckers
> -GH_PROJECT = gzdoom
> -GH_TAGNAME = g${V}
> -DISTNAME =   gzdoom-${V}
> +V =  4.11.3
>  
> +DIST_TUPLE = github ZDoom gzdoom g${V} .
> +PKGNAME =gzdoom-${V}
> +
>  CATEGORIES=  games
>  
>  HOMEPAGE =   https://zdoom.org
> @@ -21,8 +20,8 @@ MAINTAINER =Timo Myyra 
> 
>  # GPLv3
>  PERMIT_PACKAGE = Yes
>  
> -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
> -WANTLIB += openal vpx z zmusic
> +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
> +WANTLIB += openal vpx webp webpdemux webpmux zmusic
>  
>  # C++17
>  COMPILER =   base-clang ports-gcc
> @@ -34,13 +33,14 @@ CONFIGURE_ARGS += -DDYN_OPENAL=NO
>  CONFIGURE_ARGS +=-DHAVE_STDINT_H=1
>  CONFIGURE_ARGS +=-DNO_OPENMP=ON
>  
> -CXXFLAGS +=   -I. -I${LOCALBASE}/include
> +CFLAGS +=-I${X11BASE}/include
> +CXXFLAGS +=  -I. -I${LOCALBASE}/include
>  
>  LIB_DEPENDS =archivers/bzip2 \
>   audio/openal \
>   audio/zmusic \
>   devel/sdl2 \
> - graphics/jpeg \
> + graphics/libwebp \
>   multimedia/libvpx
>  
>  NO_TEST =Yes
> blob - fffa78bdc838438fde2a24aea4f98f67711f36aa
> file + games/gzdoom/distinfo
> --- games/gzdoom/distinfo
> +++ games/gzdoom/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
> -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
> +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
> WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
> +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
> blob - 0f5f1a7bc01e286e168f93809d4a8c6c8357cc3e
> 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
> -@@ -272,7 +272,7 @@ else()
> +@@ -301,7 +301,7 @@ else()
>   
>   if ( UNIX )
>   include(CheckSymbolExists)
> blob - /dev/null
> file + games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt (mode 644)
> --- /dev/null
> +++ games/gzdoom/patches/patch-libraries_ZVulkan_CMakeLists_txt
> @@ -0,0 +1,12 @@
> +Index: libraries/ZVulkan/CMakeLists.txt
> +--- libraries/ZVulkan/CMakeLists.txt.orig
>  libraries/ZVulkan/CMakeLists.txt
> +@@ -188,7 +188,7 @@ if(WIN32)
> + add_definitions(-DUNICODE -D_UNICODE)
> + else()
> + set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
> +-set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> ++set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
> + add_definitions(-DUNIX -D_UNIX)
> + add_link_options(-pthread)
> + endif()
> blob - 89f07cd487ce6fca5e38f2137f3fcb216658cef7
> 

Re: GZDoom update, next attempt

2023-11-14 Thread Timo Myyrä
On Fri, Nov 10 2023, Stefan Hagen wrote:

> Thomas Frohwein wrote (2023-11-09 21:16 CET):
>> Here is an update to GZDoom 4.11.3. It works to run mods like the
>> recently released Beyond Sunset.
>> 
>> Of note, you may need to switch the video backend to opengl as I
>> outlined after previous concerns:
>> 
>> https://marc.info/?l=openbsd-ports=169132550927983=2
>> 
>> Of note, we are several versions behind upstream - the current version
>> in ports is 4.8.2.
>
> What's the deal with:
>> +-   set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
>> ++   #set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
>
> It builds and works fine with
> set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
>
> There doesn't seem to be a difference at runtime. At least on my
> machine (amd), vulkan runs fine with and without this line.
>
> (I haven't diffed the build logs to figure out if it has picked up
> something differently)
>
> Regarding:
>> https://marc.info/?l=openbsd-ports=169132550927983=2
>>  After changing that back to default opengl (0),
>
> It seems to be untrue that opengl is the default backend. If I remove
> gzdoom.ini and start the game, the vulkan backend is automatically
> selected.
>
> If we have issues with the vulkan backend on more than a few machines,
> should we change the default? And/Or described the issue in the README?
>
> Best regards,
> Stefan
>
>> Index: Makefile
>> ===
>> RCS file: /cvs/ports/games/gzdoom/Makefile,v
>> retrieving revision 1.17
>> diff -u -p -r1.17 Makefile
>> --- Makefile 18 Jul 2022 08:27:45 -  1.17
>> +++ Makefile 9 Nov 2023 20:12:53 -
>> @@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =   i386 amd64
>>  
>>  COMMENT =   OpenGL engine for idTech 1 games like 
>> doom,hexen,heretic...
>>  
>> -V = 4.8.2
>> -GH_ACCOUNT =coelckers
>> -GH_PROJECT =gzdoom
>> -GH_TAGNAME =g${V}
>> -DISTNAME =  gzdoom-${V}
>> +V = 4.11.3
>> +
>> +DIST_TUPLE =github ZDoom gzdoom g${V} .
>> +PKGNAME =   gzdoom-${V}
>>  
>>  CATEGORIES= games
>>  
>> @@ -21,8 +20,8 @@ MAINTAINER =   Timo Myyra >  # GPLv3
>>  PERMIT_PACKAGE =Yes
>>  
>> -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
>> -WANTLIB += openal vpx z zmusic
>> +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
>> +WANTLIB += openal vpx webp webpdemux webpmux zmusic
>>  
>>  # C++17
>>  COMPILER =  base-clang ports-gcc
>> @@ -34,13 +33,14 @@ CONFIGURE_ARGS +=-DDYN_OPENAL=NO
>>  CONFIGURE_ARGS +=   -DHAVE_STDINT_H=1
>>  CONFIGURE_ARGS +=   -DNO_OPENMP=ON
>>  
>> -CXXFLAGS +=  -I. -I${LOCALBASE}/include
>> +CFLAGS +=   -I${X11BASE}/include
>> +CXXFLAGS += -I. -I${LOCALBASE}/include
>>  
>>  LIB_DEPENDS =   archivers/bzip2 \
>>  audio/openal \
>>  audio/zmusic \
>>  devel/sdl2 \
>> -graphics/jpeg \
>> +graphics/libwebp \
>>  multimedia/libvpx
>>  
>>  NO_TEST =   Yes
>> Index: distinfo
>> ===
>> RCS file: /cvs/ports/games/gzdoom/distinfo,v
>> retrieving revision 1.7
>> diff -u -p -r1.7 distinfo
>> --- distinfo 18 Jul 2022 08:27:45 -  1.7
>> +++ distinfo 9 Nov 2023 20:12:53 -
>> @@ -1,2 +1,2 @@
>> -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
>> -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
>> +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
>> WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
>> +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
>> Index: patches/patch-CMakeLists_txt
>> ===
>> RCS file: /cvs/ports/games/gzdoom/patches/patch-CMakeLists_txt,v
>> retrieving revision 1.3
>> diff -u -p -r1.3 patch-CMakeLists_txt
>> --- patches/patch-CMakeLists_txt 18 Jul 2022 08:27:46 -  1.3
>> +++ patches/patch-CMakeLists_txt 9 Nov 2023 20:12:53 -
>> @@ -1,7 +1,7 @@
>>  Index: CMakeLists.txt
>>  --- CMakeLists.txt.orig
>>  +++ CMakeLists.txt
>> -@@ -272,7 +272,7 @@ else()
>> +@@ -301,7 +301,7 @@ else()
>>   
>>  if ( UNIX )
>>  include(CheckSymbolExists)
>> Index: patches/patch-libraries_ZVulkan_CMakeLists_txt
>> ===
>> RCS file: patches/patch-libraries_ZVulkan_CMakeLists_txt
>> diff -N patches/patch-libraries_ZVulkan_CMakeLists_txt
>> --- /dev/null1 Jan 1970 00:00:00 -
>> +++ patches/patch-libraries_ZVulkan_CMakeLists_txt   9 Nov 2023 20:12:53 
>> -
>> @@ -0,0 +1,12 @@
>> +Index: libraries/ZVulkan/CMakeLists.txt
>> +--- libraries/ZVulkan/CMakeLists.txt.orig
>>  libraries/ZVulkan/CMakeLists.txt
>> +@@ -188,7 +188,7 @@ if(WIN32)
>> +add_definitions(-DUNICODE -D_UNICODE)
>> + else()
>> +set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} 

Re: GZDoom update, next attempt

2023-11-10 Thread Stefan Hagen
Thomas Frohwein wrote (2023-11-09 21:16 CET):
> Here is an update to GZDoom 4.11.3. It works to run mods like the
> recently released Beyond Sunset.
> 
> Of note, you may need to switch the video backend to opengl as I
> outlined after previous concerns:
> 
> https://marc.info/?l=openbsd-ports=169132550927983=2
> 
> Of note, we are several versions behind upstream - the current version
> in ports is 4.8.2.

What's the deal with:
> +-set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> ++#set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)

It builds and works fine with
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})

There doesn't seem to be a difference at runtime. At least on my
machine (amd), vulkan runs fine with and without this line.

(I haven't diffed the build logs to figure out if it has picked up
something differently)

Regarding:
> https://marc.info/?l=openbsd-ports=169132550927983=2
>  After changing that back to default opengl (0),

It seems to be untrue that opengl is the default backend. If I remove
gzdoom.ini and start the game, the vulkan backend is automatically
selected.

If we have issues with the vulkan backend on more than a few machines,
should we change the default? And/Or described the issue in the README?

Best regards,
Stefan

> Index: Makefile
> ===
> RCS file: /cvs/ports/games/gzdoom/Makefile,v
> retrieving revision 1.17
> diff -u -p -r1.17 Makefile
> --- Makefile  18 Jul 2022 08:27:45 -  1.17
> +++ Makefile  9 Nov 2023 20:12:53 -
> @@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =i386 amd64
>  
>  COMMENT =OpenGL engine for idTech 1 games like 
> doom,hexen,heretic...
>  
> -V =  4.8.2
> -GH_ACCOUNT = coelckers
> -GH_PROJECT = gzdoom
> -GH_TAGNAME = g${V}
> -DISTNAME =   gzdoom-${V}
> +V =  4.11.3
> +
> +DIST_TUPLE = github ZDoom gzdoom g${V} .
> +PKGNAME =gzdoom-${V}
>  
>  CATEGORIES=  games
>  
> @@ -21,8 +20,8 @@ MAINTAINER =Timo Myyra   # GPLv3
>  PERMIT_PACKAGE = Yes
>  
> -WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo jpeg m
> -WANTLIB += openal vpx z zmusic
> +WANTLIB += ${COMPILER_LIBCXX} SDL2 bz2 c execinfo m
> +WANTLIB += openal vpx webp webpdemux webpmux zmusic
>  
>  # C++17
>  COMPILER =   base-clang ports-gcc
> @@ -34,13 +33,14 @@ CONFIGURE_ARGS += -DDYN_OPENAL=NO
>  CONFIGURE_ARGS +=-DHAVE_STDINT_H=1
>  CONFIGURE_ARGS +=-DNO_OPENMP=ON
>  
> -CXXFLAGS +=   -I. -I${LOCALBASE}/include
> +CFLAGS +=-I${X11BASE}/include
> +CXXFLAGS +=  -I. -I${LOCALBASE}/include
>  
>  LIB_DEPENDS =archivers/bzip2 \
>   audio/openal \
>   audio/zmusic \
>   devel/sdl2 \
> - graphics/jpeg \
> + graphics/libwebp \
>   multimedia/libvpx
>  
>  NO_TEST =Yes
> Index: distinfo
> ===
> RCS file: /cvs/ports/games/gzdoom/distinfo,v
> retrieving revision 1.7
> diff -u -p -r1.7 distinfo
> --- distinfo  18 Jul 2022 08:27:45 -  1.7
> +++ distinfo  9 Nov 2023 20:12:53 -
> @@ -1,2 +1,2 @@
> -SHA256 (gzdoom-4.8.2.tar.gz) = Tt1g+AlMncPft0AL28DrsKXldLCmdH7uTI2fH2r3cSc=
> -SIZE (gzdoom-4.8.2.tar.gz) = 24247668
> +SHA256 (ZDoom-gzdoom-g4.11.3.tar.gz) = 
> WUPbpQ2iD/lPH8xBUTJnLUKhWRfFcbHCt87v4Uk19dU=
> +SIZE (ZDoom-gzdoom-g4.11.3.tar.gz) = 24354699
> Index: patches/patch-CMakeLists_txt
> ===
> RCS file: /cvs/ports/games/gzdoom/patches/patch-CMakeLists_txt,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt  18 Jul 2022 08:27:46 -  1.3
> +++ patches/patch-CMakeLists_txt  9 Nov 2023 20:12:53 -
> @@ -1,7 +1,7 @@
>  Index: CMakeLists.txt
>  --- CMakeLists.txt.orig
>  +++ CMakeLists.txt
> -@@ -272,7 +272,7 @@ else()
> +@@ -301,7 +301,7 @@ else()
>   
>   if ( UNIX )
>   include(CheckSymbolExists)
> Index: patches/patch-libraries_ZVulkan_CMakeLists_txt
> ===
> RCS file: patches/patch-libraries_ZVulkan_CMakeLists_txt
> diff -N patches/patch-libraries_ZVulkan_CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-libraries_ZVulkan_CMakeLists_txt9 Nov 2023 20:12:53 
> -
> @@ -0,0 +1,12 @@
> +Index: libraries/ZVulkan/CMakeLists.txt
> +--- libraries/ZVulkan/CMakeLists.txt.orig
>  libraries/ZVulkan/CMakeLists.txt
> +@@ -188,7 +188,7 @@ if(WIN32)
> + add_definitions(-DUNICODE -D_UNICODE)
> + else()
> + set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
> +-set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> ++#set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
> + add_definitions(-DUNIX -D_UNIX)
> + 

GZDoom update, next attempt

2023-11-09 Thread Thomas Frohwein
Here is an update to GZDoom 4.11.3. It works to run mods like the
recently released Beyond Sunset.

Of note, you may need to switch the video backend to opengl as I
outlined after previous concerns:

https://marc.info/?l=openbsd-ports=169132550927983=2

Of note, we are several versions behind upstream - the current version
in ports is 4.8.2.

Index: Makefile
===
RCS file: /cvs/ports/games/gzdoom/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile18 Jul 2022 08:27:45 -  1.17
+++ Makefile9 Nov 2023 20:12:53 -
@@ -6,11 +6,10 @@ ONLY_FOR_ARCHS =  i386 amd64
 
 COMMENT =  OpenGL engine for idTech 1 games like 
doom,hexen,heretic...
 
-V =4.8.2
-GH_ACCOUNT =   coelckers
-GH_PROJECT =   gzdoom
-GH_TAGNAME =   g${V}
-DISTNAME = gzdoom-${V}
+V =4.11.3
+
+DIST_TUPLE =   github ZDoom gzdoom g${V} .
+PKGNAME =  gzdoom-${V}
 
 CATEGORIES=games
 
@@ -21,8 +20,8 @@ MAINTAINER =  Timo Myyra https://github.com/coelckers/gzdoom/pull/1665
-
-Index: src/d_main.cpp
 src/d_main.cpp.orig
-+++ src/d_main.cpp
-@@ -3534,6 +3534,8 @@ static int D_DoomMain_Internal (void)
-   
-   std::set_new_handler(NewFailure);
-   const char *batchout = Args->CheckValue("-errorlog");
-+
-+  D_DoomInit();
-   
-   // [RH] Make sure zdoom.pk3 is always loaded,
-   // as it contains magic stuff we need.
-@@ -3567,8 +3569,6 @@ static int D_DoomMain_Internal (void)
-   }
- 
-   if (!batchrun) Printf(PRINT_LOG, "%s version %s\n", GAMENAME, 
GetVersionString());
--
--  D_DoomInit();
- 
-   extern void D_ConfirmSendStats();
-   D_ConfirmSendStats();