btw I can do a test build after my currently running bulk finishes,
but it's on i386 which misses some of the ports which use sdl2


On 2022/10/10 21:23, Thomas Frohwein wrote:
> On Sat, Sep 10, 2022 at 02:32:33AM -0400, Thomas Frohwein wrote:
> > Hi,
> > 
> > Based on a diff from Brad and with a fix for the gamecontroller support
> > found by namn@. I've tested several consumers runtime. sthen@ said
> > Brad's diff that was the same except for the gamecontroller patch ran
> > into problems building games/devilutionx and games/warzone2100.
> 
> In the meantime, SDL 2.24.1 has released. I had to update the devilutionx
> diff because apparently some of the cmake module internals changed.
> 
> Could someone put this in a bulk build to make sure no new fallout emerges?
> 
> Attaching updated diff for sdl2 2.24.1, devilutionx, and warzone2100. (The
> latter 2 were the fallouts that sthen@ noticed on a bulk build with sdl2
> 2.24.0).
> 
> Release Notes:
> https://github.com/libsdl-org/SDL/releases/tag/release-2.24.1

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/Makefile,v
> retrieving revision 1.40
> diff -u -p -r1.40 Makefile
> --- Makefile  2 May 2022 14:04:34 -0000       1.40
> +++ Makefile  11 Oct 2022 00:59:26 -0000
> @@ -1,13 +1,12 @@
>  COMMENT=     cross-platform multimedia library
>  
> -V=           2.0.20
> +V=           2.24.1
>  DISTNAME=    SDL2-${V}
>  PKGNAME=     sdl2-${V}
> -REVISION=    0
>  CATEGORIES=  devel
>  MASTER_SITES=        https://www.libsdl.org/release/
>  
> -SHARED_LIBS= SDL2            0.11    # 0.18
> +SHARED_LIBS= SDL2            0.12    # 0.18
>  
>  HOMEPAGE=    https://www.libsdl.org/
>  
> @@ -18,8 +17,8 @@ DEBUG_PACKAGES=     ${BUILD_PACKAGES}
>  # zlib
>  PERMIT_PACKAGE=      Yes
>  
> -WANTLIB+=    X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender Xss
> -WANTLIB+=    Xxf86vm m pthread samplerate sndio usbhid xcb
> +WANTLIB+=    X11 Xcursor Xext Xfixes Xi Xrandr Xrender Xss m pthread 
> samplerate
> +WANTLIB+=    sndio usbhid xcb
>  # GL library is dlopen'd
>  WANTLIB+=    GL
>  
> @@ -62,5 +61,8 @@ CONFIGURE_ARGS+= --enable-altivec=no
>  
>  # tests in test subdir, but interactive and not hooked up to build
>  NO_TEST=     Yes
> +
> +pre-configure:
> +     ${SUBST_CMD} ${WRKSRC}/sdl2-config.cmake.in
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/distinfo,v
> retrieving revision 1.14
> diff -u -p -r1.14 distinfo
> --- distinfo  8 Mar 2022 11:38:36 -0000       1.14
> +++ distinfo  11 Oct 2022 00:59:26 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (SDL2-2.0.20.tar.gz) = xWq6HXtbDn6Znkp2mMcLY6M5T/lwS19uHFfgwW8E3QY=
> -SIZE (SDL2-2.0.20.tar.gz) = 7207221
> +SHA256 (SDL2-2.24.1.tar.gz) = vBIViLEQUGVZjOOAeAJqQUwo6pXmbtKtq0xE2Aswnhs=
> +SIZE (SDL2-2.24.1.tar.gz) = 7523849
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/patches/patch-Makefile_in,v
> retrieving revision 1.12
> diff -u -p -r1.12 patch-Makefile_in
> --- patches/patch-Makefile_in 8 Mar 2022 11:38:36 -0000       1.12
> +++ patches/patch-Makefile_in 11 Oct 2022 00:59:26 -0000
> @@ -1,7 +1,7 @@
>  Index: Makefile.in
>  --- Makefile.in.orig
>  +++ Makefile.in
> -@@ -133,7 +133,7 @@ LT_AGE      = @LT_AGE@
> +@@ -135,7 +135,7 @@ LT_AGE      = @LT_AGE@
>   LT_CURRENT  = @LT_CURRENT@
>   LT_RELEASE  = @LT_RELEASE@
>   LT_REVISION = @LT_REVISION@
> Index: patches/patch-sdl2-config_cmake_in
> ===================================================================
> RCS file: patches/patch-sdl2-config_cmake_in
> diff -N patches/patch-sdl2-config_cmake_in
> --- patches/patch-sdl2-config_cmake_in        8 Mar 2022 11:38:36 -0000       
> 1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,76 +0,0 @@
> -Index: sdl2-config.cmake.in
> ---- sdl2-config.cmake.in.orig
> -+++ sdl2-config.cmake.in
> -@@ -10,72 +10,3 @@ set(SDL2_LIBDIR "${libdir}")
> - set(SDL2_INCLUDE_DIRS "${includedir}/SDL2")
> - set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
> - string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
> --
> --if(NOT TARGET SDL2::SDL2)
> --  # provide SDL2::SDL2, SDL2::SDL2main and SDL2::SDL2-static targets, like 
> SDL2Config.cmake does, for compatibility
> --
> --  # Remove -lSDL2 as that is handled by CMake, note the space at the end so 
> it does not replace e.g. -lSDL2main
> --  # This may require "libdir" beeing set (from above)
> --  string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS "@SDL_RLD_FLAGS@ 
> @SDL_LIBS@ ")
> --  # also get rid of -lSDL2main, if you want to link against that use both 
> SDL2::SDL2main and SDL2::SDL2 (in that order)
> --  # (SDL2Config.cmake has the same behavior)
> --  string(REPLACE "-lSDL2main" "" SDL2_EXTRA_LINK_FLAGS 
> ${SDL2_EXTRA_LINK_FLAGS})
> --  string(STRIP "${SDL2_EXTRA_LINK_FLAGS}" SDL2_EXTRA_LINK_FLAGS)
> --  string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS_STATIC 
> "@SDL_STATIC_LIBS@ ")
> --  string(STRIP "${SDL2_EXTRA_LINK_FLAGS_STATIC}" 
> SDL2_EXTRA_LINK_FLAGS_STATIC)
> --
> --if(WIN32 AND NOT MSVC)
> --  # MINGW needs very special handling, because the link order must be 
> exactly -lmingw32 -lSDL2main -lSDL2
> --  # for it to work at all (and -mwindows somewhere); a normal SHARED 
> IMPORTED or STATIC IMPORTED library always puts itself first
> --  # so handle this like a header-only lib and put everything in 
> INTERFACE_LINK_LIBRARIES
> --
> --  add_library(SDL2::SDL2 INTERFACE IMPORTED)
> --  set_target_properties(SDL2::SDL2 PROPERTIES
> --    INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
> --    INTERFACE_LINK_LIBRARIES "-L${SDL2_LIBDIR} -lSDL2")
> --
> --  add_library(SDL2::SDL2main INTERFACE IMPORTED)
> --  set_target_properties(SDL2::SDL2main PROPERTIES
> --    INTERFACE_LINK_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main 
> -mwindows")
> --
> --else() # (not WIN32) or MSVC
> --
> --  add_library(SDL2::SDL2 SHARED IMPORTED)
> --  set_target_properties(SDL2::SDL2 PROPERTIES
> --    INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
> --    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
> --    IMPORTED_LOCATION 
> "${SDL2_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}")
> --
> --  if(MSVC)
> --    # This file is generated when building SDL2 with autotools and MinGW, 
> and MinGW/dlltool
> --    # isn't able to generate .lib files that are usable by recent MSVC 
> versions 
> --    # (something about "module unsafe for SAFESEH"; SAFESEH is enabled by 
> default in MSVC).
> --    # The .lib file for SDL2.dll *could* be generated with `gendef 
> SDL2.dll` and then
> --    # `lib.exe /machine:x86 /def:SDL2.def /out:SDL2.lib` (or /machine:amd64)
> --    # but that requires lib.exe from a Visual Studio installation - and 
> that still doesn't
> --    # give you a static SDL2main.lib with SAFESEH support that you'll need 
> (unless you don't use SDL2main)
> --    # Note that when building SDL2 with CMake and MSVC, the result works 
> with both MinGW and MSVC.
> --
> --    message(FATAL_ERROR, "This build of libSDL2 only supports MinGW, not 
> MSVC (Visual C++), because it lacks .lib files!")
> --    # MSVC needs SDL2.lib set as IMPORTED_IMPLIB to link against (comment 
> out message() call above if you added SDL2.lib yourself)
> --    set_target_properties(SDL2::SDL2 PROPERTIES IMPORTED_IMPLIB 
> "${SDL2_LIBDIR}/SDL2.lib")
> --  else()
> --    # this mustn't be set for MSVC, so do it here in an extra call here
> --    set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES  
> "${SDL2_EXTRA_LINK_FLAGS}")
> --  endif()
> --
> --  add_library(SDL2::SDL2main STATIC IMPORTED)
> --  set_target_properties(SDL2::SDL2main PROPERTIES
> --    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
> --    IMPORTED_LOCATION 
> "${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX}")
> --
> --endif() # (not WIN32) or MSVC
> --
> --  add_library(SDL2::SDL2-static STATIC IMPORTED)
> --  set_target_properties(SDL2::SDL2-static PROPERTIES
> --    INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
> --    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
> --    IMPORTED_LOCATION 
> "${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_STATIC_LIBRARY_SUFFIX}"
> --    INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS_STATIC}")
> --
> --endif() # NOT TARGET SDL2::SDL2
> Index: patches/patch-sdl2-config_in
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/patches/patch-sdl2-config_in,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-sdl2-config_in
> --- patches/patch-sdl2-config_in      8 Mar 2022 11:38:36 -0000       1.3
> +++ patches/patch-sdl2-config_in      11 Oct 2022 00:59:26 -0000
> @@ -1,7 +1,7 @@
>  Index: sdl2-config.in
>  --- sdl2-config.in.orig
>  +++ sdl2-config.in
> -@@ -42,10 +42,10 @@ while test $# -gt 0; do
> +@@ -46,10 +46,10 @@ while test $# -gt 0; do
>         echo @SDL_VERSION@
>         ;;
>       --cflags)
> Index: patches/patch-sdl2_pc_in
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/patches/patch-sdl2_pc_in,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-sdl2_pc_in
> --- patches/patch-sdl2_pc_in  8 Mar 2022 11:38:36 -0000       1.5
> +++ patches/patch-sdl2_pc_in  11 Oct 2022 00:59:26 -0000
> @@ -6,6 +6,6 @@ Index: sdl2.pc.in
>   Requires:
>   Conflicts:
>  -Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKGCONFIG_LIBS_PRIV@ 
> @SDL_STATIC_LIBS@
> --Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@
> +-Cflags: -I${includedir} -I${includedir}/SDL2 @SDL_CFLAGS@
>  +Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @X_LIBS@
>  +Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@ @X_CFLAGS@
> Index: patches/patch-src_SDL_c
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/patches/patch-src_SDL_c,v
> retrieving revision 1.9
> diff -u -p -r1.9 patch-src_SDL_c
> --- patches/patch-src_SDL_c   2 May 2022 14:04:34 -0000       1.9
> +++ patches/patch-src_SDL_c   11 Oct 2022 00:59:26 -0000
> @@ -1,10 +1,10 @@
> -Disable breaking if no haptic feedback support which disallows 
> gamecontroller API
> -allow custom SDL GetPlatform name with env var SDL_PLATFORM
> +- Disable breaking if no haptic feedback support which disallows 
> gamecontroller API
> +- Allow custom SDL GetPlatform name with env var SDL_PLATFORM
>  
>  Index: src/SDL.c
>  --- src/SDL.c.orig
>  +++ src/SDL.c
> -@@ -279,9 +279,6 @@ SDL_InitSubSystem(Uint32 flags)
> +@@ -301,9 +301,6 @@ SDL_InitSubSystem(Uint32 flags)
>           }
>           SDL_PrivateSubsystemRefCountIncr(SDL_INIT_GAMECONTROLLER);
>           flags_initialized |= SDL_INIT_GAMECONTROLLER;
> @@ -14,13 +14,12 @@ Index: src/SDL.c
>   #endif
>       }
>   
> -@@ -508,6 +505,11 @@ SDL_GetRevisionNumber(void)
> +@@ -533,6 +530,10 @@ SDL_GetRevisionNumber(void)
>   const char *
>   SDL_GetPlatform(void)
>   {
>  +    const char *platform;
>  +    if (platform = SDL_getenv("SDL_PLATFORM")) {
> -+        printf("Custom SDL_PLATFORM: %s\n", platform);
>  +        return platform;
>  +    }
>   #if __AIX__
> Index: patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
> ===================================================================
> RCS file: patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
> diff -N patches/patch-src_filesystem_unix_SDL_sysfilesystem_c
> --- patches/patch-src_filesystem_unix_SDL_sysfilesystem_c     8 Mar 2022 
> 11:38:36 -0000       1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,56 +0,0 @@
> -Disable SDL_GetBasePath implementation, not functional.
> -
> -Index: src/filesystem/unix/SDL_sysfilesystem.c
> ---- src/filesystem/unix/SDL_sysfilesystem.c.orig
> -+++ src/filesystem/unix/SDL_sysfilesystem.c
> -@@ -149,50 +149,6 @@ SDL_GetBasePath(void)
> -         }
> -     }
> - #endif
> --#if defined(__OPENBSD__)
> --    /* Please note that this will fail if the process was launched with a 
> relative path and the cwd has changed, or argv is altered. So don't do that. 
> Or add a new sysctl to OpenBSD. */
> --    char **cmdline;
> --    size_t len;
> --    const int mib[] = { CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV 
> };
> --    if (sysctl(mib, 4, NULL, &len, NULL, 0) != -1) {
> --        char *exe;
> --        char *realpathbuf = (char *) SDL_malloc(PATH_MAX + 1);
> --        if (!realpathbuf) {
> --            SDL_OutOfMemory();
> --            return NULL;
> --        }
> --
> --        cmdline = SDL_malloc(len);
> --        if (!cmdline) {
> --            SDL_free(realpathbuf);
> --            SDL_OutOfMemory();
> --            return NULL;
> --        }
> --
> --        sysctl(mib, 4, cmdline, &len, NULL, 0);
> --
> --        exe = cmdline[0];
> --        if (SDL_strchr(exe, '/') == NULL) {  /* not a relative or absolute 
> path, check $PATH for it */
> --            exe = search_path_for_binary(cmdline[0]);
> --        }
> --
> --        if (exe) {
> --            if (realpath(exe, realpathbuf) != NULL) {
> --                retval = realpathbuf;
> --            }
> --
> --            if (exe != cmdline[0]) {
> --                SDL_free(exe);
> --            }
> --        }
> --
> --        if (!retval) {
> --            SDL_free(realpathbuf);
> --        }
> --
> --        SDL_free(cmdline);
> --    }
> --#endif
> - #if defined(__SOLARIS__)
> -     const char *path = getexecname();
> -     if ((path != NULL) && (path[0] == '/')) { /* must be absolute path... */
> Index: patches/patch-src_joystick_SDL_gamecontrollerdb_h
> ===================================================================
> RCS file: 
> /cvs/ports/devel/sdl2/patches/patch-src_joystick_SDL_gamecontrollerdb_h,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-src_joystick_SDL_gamecontrollerdb_h
> --- patches/patch-src_joystick_SDL_gamecontrollerdb_h 8 Mar 2022 11:38:36 
> -0000       1.4
> +++ patches/patch-src_joystick_SDL_gamecontrollerdb_h 11 Oct 2022 00:59:26 
> -0000
> @@ -1,10 +1,10 @@
> -enable controller detection by GUID on OpenBSD
> -use both LINUX and MACOSX guids to match both XInput and DInput devices
> +- Enable controller detection by GUID on OpenBSD
> +- Use both Linux and macOS GUIDs to match both XInput and DInput devices
>  
>  Index: src/joystick/SDL_gamecontrollerdb.h
>  --- src/joystick/SDL_gamecontrollerdb.h.orig
>  +++ src/joystick/SDL_gamecontrollerdb.h
> -@@ -347,7 +347,7 @@ static const char *s_ControllerMappings [] =
> +@@ -357,7 +357,7 @@ static const char *s_ControllerMappings [] =
>       
> "030000004f04000003d0000000000000,run'n'drive,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:a3,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:a4,rightstick:b11,righttrigger:b5,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
>       "03000000101c0000171c000000000000,uRage 
> Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,",
>   #endif
> @@ -13,12 +13,12 @@ Index: src/joystick/SDL_gamecontrollerdb
>       "03000000c82d00000090000001000000,8BitDo FC30 
> Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
>       "03000000c82d00000090000001000000,8BitDo FC30 
> Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
>       "03000000c82d00001038000000010000,8BitDo FC30 
> Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
> -@@ -494,7 +494,7 @@ static const char *s_ControllerMappings [] =
> +@@ -509,7 +509,7 @@ static const char *s_ControllerMappings [] =
>       "03000000830500006020000000010000,iBuffalo SNES 
> Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
>       "03000000830500006020000000000000,iBuffalo USB 2-axis 8-button 
> Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,",
>   #endif
> --#if defined(__LINUX__)
> -+#if defined(__LINUX__) || defined(__OpenBSD__)
> +-#ifdef SDL_JOYSTICK_LINUX
> ++#if defined(SDL_JOYSTICK_LINUX) || defined(__OpenBSD__)
>       
> "xinput,*,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
>       "03000000c82d00000090000011010000,8BitDo FC30 
> Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
>       "03000000c82d00000090000011010000,8BitDo FC30 
> Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
> Index: patches/patch-src_joystick_bsd_SDL_bsdjoystick_c
> ===================================================================
> RCS file: 
> /cvs/ports/devel/sdl2/patches/patch-src_joystick_bsd_SDL_bsdjoystick_c,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-src_joystick_bsd_SDL_bsdjoystick_c
> --- patches/patch-src_joystick_bsd_SDL_bsdjoystick_c  8 Mar 2022 11:38:36 
> -0000       1.5
> +++ patches/patch-src_joystick_bsd_SDL_bsdjoystick_c  11 Oct 2022 00:59:26 
> -0000
> @@ -1,8 +1,8 @@
> -assign buttons correctly
> -get GUID using USB_GET_DEVICEINFO
> -detect newer (XInput-style) gamecontroller if hitem.logical_maximum is
> -> 255; if so invert y axes
> -use ujoy(4) devices
> +- Assign buttons correctly
> +- Get GUID using USB_GET_DEVICEINFO
> +- detect newer (XInput-style) gamecontroller if hitem.logical_maximum is > 
> 255;
> +  if so invert y axes
> +- Use ujoy(4) devices
>  
>  Index: src/joystick/bsd/SDL_bsdjoystick.c
>  --- src/joystick/bsd/SDL_bsdjoystick.c.orig
> @@ -43,7 +43,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>   
>           joynames[numjoysticks] = SDL_strdup(s);
>   
> -@@ -356,6 +365,9 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
> +@@ -362,6 +371,9 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
>   #endif
>       int fd;
>       int i;
> @@ -53,7 +53,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>   
>       fd = open(path, O_RDONLY | O_CLOEXEC);
>       if (fd == -1) {
> -@@ -434,6 +446,17 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
> +@@ -440,6 +452,17 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
>       }
>   desc_failed:
>   #endif
> @@ -71,7 +71,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>       if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
>           goto usberr;
>       }
> -@@ -544,6 +567,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
> +@@ -550,6 +573,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
>       Sint32 v;
>   #ifdef __OpenBSD__
>       Sint32 dpad[4] = {0, 0, 0, 0};
> @@ -79,7 +79,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>   #endif
>   
>   #if defined(__FREEBSD__) || SDL_HAVE_MACHINE_JOYSTICK_H || 
> defined(__FreeBSD_kernel__) || defined(__DragonFly_)
> -@@ -618,6 +642,18 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
> +@@ -624,6 +648,18 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
>                               naxe = joy->hwdata->axis_map[joyaxe];
>                               /* scaleaxe */
>                               v = (Sint32) hid_get_data(REP_BUF_DATA(rep), 
> &hitem);
> @@ -98,7 +98,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>                               v -= (hitem.logical_maximum +
>                                     hitem.logical_minimum + 1) / 2;
>                               v *= 32768 /
> -@@ -652,7 +688,12 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
> +@@ -658,7 +694,12 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
>                       }
>                   case HUP_BUTTON:
>                       v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
> @@ -111,7 +111,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.
>                       nbutton++;
>                       break;
>                   default:
> -@@ -697,11 +738,16 @@ static SDL_JoystickGUID
> +@@ -703,11 +744,16 @@ static SDL_JoystickGUID
>   BSD_JoystickGetDeviceGUID( int device_index )
>   {
>       SDL_JoystickGUID guid;
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/devel/sdl2/pkg/PLIST,v
> retrieving revision 1.12
> diff -u -p -r1.12 PLIST
> --- pkg/PLIST 8 Mar 2022 11:38:36 -0000       1.12
> +++ pkg/PLIST 11 Oct 2022 00:59:26 -0000
> @@ -16,6 +16,7 @@ include/SDL2/SDL_events.h
>  include/SDL2/SDL_filesystem.h
>  include/SDL2/SDL_gamecontroller.h
>  include/SDL2/SDL_gesture.h
> +include/SDL2/SDL_guid.h
>  include/SDL2/SDL_haptic.h
>  include/SDL2/SDL_hidapi.h
>  include/SDL2/SDL_hints.h

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/devilutionx/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- Makefile  11 Mar 2022 19:04:15 -0000      1.10
> +++ Makefile  11 Oct 2022 01:00:41 -0000
> @@ -5,6 +5,7 @@ CATEGORIES =  games x11
>  GH_ACCOUNT = diasurgical
>  GH_PROJECT = devilutionX
>  GH_TAGNAME = 1.1.0
> +REVISION =   0
>  
>  MAINTAINER = Brian Callahan <[email protected]>
>  
> @@ -26,7 +27,8 @@ LIB_DEPENDS =       devel/sdl2-mixer \
>  CONFIGURE_ARGS =     -DBINARY_RELEASE=ON \
>                       -DDEBUG=OFF \
>                       -DDISABLE_LTO=ON \
> -                     -DVERSION_NUM="${GH_TAGNAME}"
> +                     -DVERSION_NUM="${GH_TAGNAME}" \
> +                     -DSDL2_INCLUDE_DIR=${LOCALBASE}/include/SDL2
>  
>  NO_TEST =    Yes
>  
> 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      11 Oct 2022 01:00:41 -0000
> @@ -0,0 +1,12 @@
> +EXPERIMENTAL: don't link SDL2::SDL2main (removed in SDL 2.24.0)
> +Index: CMakeLists.txt
> +--- CMakeLists.txt.orig
> ++++ CMakeLists.txt
> +@@ -479,7 +479,6 @@ foreach(target devilution ${BIN_TARGET})
> +     target_compile_definitions(${target} PRIVATE USE_SDL1)
> +   else()
> +     target_link_libraries(${target} PRIVATE
> +-      SDL2::SDL2main
> +       SDL2::SDL2_ttf
> +       SDL2::SDL2_mixer)
> +   endif()
> Index: patches/patch-CMake_FindSDL2_cmake
> ===================================================================
> RCS file: patches/patch-CMake_FindSDL2_cmake
> diff -N patches/patch-CMake_FindSDL2_cmake
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-CMake_FindSDL2_cmake        11 Oct 2022 01:00:41 -0000
> @@ -0,0 +1,14 @@
> +comment out set_property to avoid error "set_property can not be used on an
> +ALIAS target" 
> +
> +Index: CMake/FindSDL2.cmake
> +--- CMake/FindSDL2.cmake.orig
> ++++ CMake/FindSDL2.cmake
> +@@ -251,5 +251,5 @@ mark_as_advanced(SDL2_LIBRARY
> +     SDL2_MWINDOWS_LIBRARY)
> + 
> + find_package(Threads REQUIRED)
> +-set_property(TARGET SDL2::SDL2 APPEND PROPERTY
> +-    INTERFACE_LINK_LIBRARIES Threads::Threads)
> ++#set_property(TARGET SDL2::SDL2 APPEND PROPERTY
> ++#   INTERFACE_LINK_LIBRARIES Threads::Threads)

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/warzone2100/Makefile,v
> retrieving revision 1.47
> diff -u -p -r1.47 Makefile
> --- Makefile  3 Oct 2022 21:33:17 -0000       1.47
> +++ Makefile  11 Oct 2022 01:15:26 -0000
> @@ -8,7 +8,7 @@ CATEGORIES=   games
>  MASTER_SITES=        
> https://github.com/Warzone2100/warzone2100/releases/download/$V/
>  DISTFILES=   warzone2100-${V}{warzone2100_src}${EXTRACT_SUFX}
>  EXTRACT_SUFX=        .tar.xz
> -REVISION=    1
> +REVISION=    2
>  
>  HOMEPAGE=    https://wz2100.net/
>  
> @@ -44,6 +44,8 @@ BUILD_DEPENDS=      archivers/unzip \
>               textproc/asciidoctor
>  RUN_DEPENDS= devel/desktop-file-utils \
>               x11/gtk+3,-guic
> +
> +MODCMAKE_LDFLAGS+=   -L${LOCALBASE}/lib -L${X11BASE}/lib
>  
>  WRKDIST =    ${WRKDIR}/warzone2100
>  

Reply via email to