Bug 252371 - devel/sdl20: update to 2.0.18 and refactoring options
Summary: devel/sdl20: update to 2.0.18 and refactoring options
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL: https://discourse.libsdl.org/t/sdl-2-...
Keywords:
: 218289 (view as bug list)
Depends on: 253850 260885
Blocks: 260749
  Show dependency treegraph
 
Reported: 2021-01-03 07:03 UTC by Vladimir Druzenko
Modified: 2022-01-03 21:48 UTC (History)
10 users (show)

See Also:
bugzilla: maintainer-feedback? (amdmi3)
antoine: exp-run+


Attachments
update to 2.0.14, add EVDEV option (5.59 KB, patch)
2021-01-03 07:03 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.14, refactoring of the options (11.35 KB, patch)
2021-01-03 16:03 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.14 and refactoring of the options (13.15 KB, patch)
2021-01-03 18:09 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.14 and refactoring of the options (v4) (13.33 KB, patch)
2021-01-19 17:01 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.14 and refactoring of the options (v4) (13.20 KB, patch)
2021-01-19 17:05 UTC, Vladimir Druzenko
no flags Details | Diff
Enable embedded gamecontrollerdb.txt for evdev (1.60 KB, patch)
2021-01-23 14:28 UTC, Jan Beich
no flags Details | Diff
update to 2.0.16 and refactoring of the options (v5) (16.72 KB, patch)
2021-08-10 23:12 UTC, Vladimir Druzenko
no flags Details | Diff
v5.1 (18.11 KB, patch)
2021-09-03 12:02 UTC, Ghost
no flags Details | Diff
v5.2 (18.63 KB, patch)
2021-09-23 15:22 UTC, Ghost
no flags Details | Diff
update to 2.0.18 and refactoring of the options (v6) (17.95 KB, patch)
2021-12-04 02:27 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.18 and refactoring of the options (v7) (17.95 KB, patch)
2021-12-22 14:11 UTC, Vladimir Druzenko
no flags Details | Diff
update to 2.0.18 and refactoring of the options (v8) (18.00 KB, patch)
2021-12-26 21:39 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-03 07:03:21 UTC
Created attachment 221227 [details]
update to 2.0.14, add EVDEV option

Tested on 12.2 amd64: build, install, check-plist.

https://www.libsdl.org/download-2.0.php
---------------------------------------------------------------------------
2.0.14:
---------------------------------------------------------------------------
General:
* Added support for PS5 DualSense and Xbox Series X controllers to the HIDAPI controller driver
* Added game controller button constants for paddles and new buttons
* Added game controller functions to get additional information:
	* SDL_GameControllerGetSerial()
	* SDL_GameControllerHasAxis()
	* SDL_GameControllerHasButton()
	* SDL_GameControllerGetNumTouchpads()
	* SDL_GameControllerGetNumTouchpadFingers()
	* SDL_GameControllerGetTouchpadFinger()
	* SDL_GameControllerHasSensor()
	* SDL_GameControllerSetSensorEnabled()
	* SDL_GameControllerIsSensorEnabled()
	* SDL_GameControllerGetSensorData()
	* SDL_GameControllerRumbleTriggers()
	* SDL_GameControllerHasLED()
	* SDL_GameControllerSetLED()
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_PS5 to control whether the HIDAPI driver for PS5 controllers should be used.
* Added joystick functions to get additional information:
	* SDL_JoystickGetSerial()
	* SDL_JoystickRumbleTriggers()
	* SDL_JoystickHasLED()
	* SDL_JoystickSetLED()
* Added an API to allow the application to create virtual joysticks:
	* SDL_JoystickAttachVirtual()
	* SDL_JoystickDetachVirtual()
	* SDL_JoystickIsVirtual()
	* SDL_JoystickSetVirtualAxis()
	* SDL_JoystickSetVirtualButton()
	* SDL_JoystickSetVirtualHat()
* Added SDL_LockSensors() and SDL_UnlockSensors() to guarantee exclusive access to the sensor list
* Added SDL_HAPTIC_STEERING_AXIS to play an effect on the steering wheel
* Added the hint SDL_HINT_MOUSE_RELATIVE_SCALING to control whether relative motion is scaled by the screen DPI or renderer logical size
* The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is now false for better compatibility with modern window managers
* Added SDL_GetPreferredLocales() to get the application's current locale setting
* Added the hint SDL_HINT_PREFERRED_LOCALES to override your application's default locale setting
* Added SDL_OpenURL() to open a URL in the system's default browser
* Added SDL_HasSurfaceRLE() to tell whether a surface is currently using RLE encoding
* Added SDL_SIMDRealloc() to reallocate memory obtained from SDL_SIMDAlloc()
* Added SDL_GetErrorMsg() to get the last error in a thread-safe way
* Added SDL_crc32(), SDL_wcscasecmp(), SDL_wcsncasecmp(), SDL_trunc(), SDL_truncf()
* Added clearer names for RGB pixel formats, e.g. SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_XBGR8888, etc.

Windows:
* Added the RAWINPUT controller driver to support more than 4 Xbox controllers simultaneously
* Added the hint SDL_HINT_JOYSTICK_RAWINPUT to control whether the RAWINPUT driver should be used
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT to control whether XInput and WGI should be used to for complete controller functionality with the RAWINPUT driver.

macOS:
* Added the SDL_WINDOW_METAL flag to specify that a window should be created with a Metal view
* Added SDL_Metal_GetLayer() to get the CAMetalLayer backing a Metal view
* Added SDL_Metal_GetDrawableSize() to get the size of a window's drawable, in pixels

Linux:
* Added the hint SDL_HINT_AUDIO_DEVICE_APP_NAME to specify the name that shows up in PulseAudio for your application
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_NAME to specify the name that shows up in PulseAudio associated with your audio stream
* Added the hint SDL_HINT_LINUX_JOYSTICK_DEADZONES to control whether HID defined dead zones should be respected on Linux
* Added the hint SDL_HINT_THREAD_PRIORITY_POLICY to specify the thread scheduler policy
* Added the hint SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow time critical threads to use a realtime scheduling policy

Android:
* Added SDL_AndroidRequestPermission() to request a specific system permission
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO to control whether audio will pause when the application goes intot he background

OS/2:
* Added support for OS/2, see docs/README-os2.md for details

Emscripten (running in a web browser):
* Added the hint SDL_HINT_EMSCRIPTEN_ASYNCIFY to control whether SDL should call emscripten_sleep internally
Comment 1 Alex S 2021-01-03 13:45:36 UTC
> EVDEV_CONFIGURE_ENABLE=		events

I don't think evdev has a direct relation to the SDL's events subsystem.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-03 14:41:50 UTC
(In reply to Alex S from comment #1)
I found in configure file this:
            freebsd)
                if test x$use_input_events = xyes; then
            
$as_echo "#define SDL_JOYSTICK_LINUX 1" >>confdefs.h
            
                    SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
                    SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
                    have_joystick=yes
                fi
            ;;
and this:
        # Set up files for evdev input
        if test x$use_input_events = xyes; then
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev.c"
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_kbd.c"
            SOURCES="$SOURCES $srcdir/src/core/freebsd/SDL_evdev_kbd_freebsd.c"
        fi

But you are right - events is other feature.
I can't find how to avoid picking up evdev if devel/evdev-proto is installed.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-03 16:03:06 UTC
Created attachment 221245 [details]
update to 2.0.14, refactoring of the options

I did big refactoring of the options and didn't add EVDEV.
Comment 4 Alex S 2021-01-03 16:26:58 UTC
(In reply to VVD from comment #2)

> I can't find how to avoid picking up evdev if devel/evdev-proto is installed.

This is not configurable. It's generally in our best interest to fix possible evdev issues, rather than work around them, so I don't think it should configurable either.

My aim with making this an option in bug 249874 was giving users some way of avoiding the situation where a gamepad gets picked by both backends, which might be quite confusing (in case they produce different button mappings or whatever). It's not clear whether this will be a problem in practice. It's possible to implement this as a runtime switch if necessary. Or maybe we should eventually just disable the uhid backend, it going to be redundant once iichid is merged (https://reviews.freebsd.org/D27777).

I'd like to see the port's maintainer opinion on the matter.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-03 18:09:17 UTC
Created attachment 221249 [details]
update to 2.0.14 and refactoring of the options

More refactoring.

Check, please.
Comment 6 Val Packett 2021-01-07 13:33:35 UTC
Works for me, evdev gamepad is picked up fine :) (Unlike some previous evdev patches)
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-19 13:45:07 UTC
Maintainer timeout?
Comment 8 Li-Wen Hsu freebsd_committer freebsd_triage 2021-01-19 14:13:59 UTC
maintainer timeout.
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2021-01-19 15:18:08 UTC
This is in the works
Comment 10 Dmitry Marakasov freebsd_committer freebsd_triage 2021-01-19 15:59:31 UTC
Please split into topic patches. At least separate options refactoring, new options (vulkan) and 2.0.14 update.

> VIDEO_KMSDRM_ENABLE=		video-kmsdrm kmsdrm-shared
> VIDEO_OPENGL_ENABLE=		video-opengl

These and some others do not seem to be correct.
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-19 17:01:36 UTC
Created attachment 221746 [details]
update to 2.0.14 and refactoring of the options (v4)

(In reply to Dmitry Marakasov from comment #10)
> Please split into topic patches. At least separate options refactoring, new options (vulkan) and 2.0.14 update.
It's a lot of manual work…
We can discuss changes in the IRC #bsdports @ EFNet or #freebsd @ Freenode.

> These and some others do not seem to be correct.
Typo, then copy&paste his typo.
Fixed.
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2021-01-19 17:05:17 UTC
Created attachment 221747 [details]
update to 2.0.14 and refactoring of the options (v4)
Comment 13 Dmitry Marakasov freebsd_committer freebsd_triage 2021-01-19 18:29:45 UTC
(In reply to VVD from comment #11)
> It's a lot of manual work…

But it should be done.

> We can discuss changes in the IRC #bsdports @ EFNet or #freebsd @ Freenode.

I don't see any major problems, it should just not be committed as a single blob. I've had a WIP patch with a similar options refactoring, as least it should be compared to yours to make sure nothing's missing from the final variant.
Comment 14 Jan Beich freebsd_committer freebsd_triage 2021-01-23 14:10:46 UTC
*** Bug 218289 has been marked as a duplicate of this bug. ***
Comment 15 Jan Beich freebsd_committer freebsd_triage 2021-01-23 14:28:02 UTC
Created attachment 221841 [details]
Enable embedded gamecontrollerdb.txt for evdev

GameController API maps various joysticks onto standard gamepad layout, avoiding having to rebind buttons in each game. With evdev-based joystick support FreeBSD can re-use Linux mappings, so users no longer need to define SDL_GAMECONTROLLERCONFIG via environ(7) for popular gamepads.

   $ pkg install controllermap
   $ testgamecontroller
   INFO: Supported mappings:
   ...
  -INFO: Joystick 0: Mega World Thrustmaster dual analog 3.2 Gamepad (guid 030000004f04000015b3000001010000, VID 0x044f, PID 0xb315, player index = -1)
  -INFO: There are 0 game controller(s) attached (1 joystick(s))
  +INFO: PS3 Controller 0: Thrustmaster Dual Analog 3.2 (guid 030000004f04000015b3000001010000, VID 0x044f, PID 0xb315, player index = 0)
  +INFO: There are 1 game controller(s) attached (1 joystick(s))
Comment 16 Dmitry Marakasov freebsd_committer freebsd_triage 2021-02-27 13:19:43 UTC
Submitter timeout;
Currently testing dependent ports
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2021-02-27 13:24:58 UTC
The patch is ready. I have no time to split it in two.
Comment 18 Patrick McMunn 2021-04-13 19:26:06 UTC
I tested the refactoring patch plus the gamecontrollerdb.txt patch, and it compiled and installed successfully. I also had the HIDAPI option enabled, so once this is committed it can close bug 247863 also.
Comment 19 Patrick McMunn 2021-05-13 03:04:51 UTC
(In reply to VVD from comment #17)
What parts need to be split apart? Maybe I can do that work in my spare time. Splitting a patch should be within reach of my skill level.
Comment 20 Patrick McMunn 2021-05-23 20:24:28 UTC
(In reply to VVD from comment #17)
I had some time to take a look at splitting the patch. As it turns out, there's a utility already available in ports called splitpatch. There's no need for any manual work whatsoever. Just run "splitpatch sdl20_v4.diff" and it spits out 5 separate patch files ready to go.
Comment 21 Dmitry Marakasov freebsd_committer freebsd_triage 2021-05-24 11:07:02 UTC
(In reply to Patrick McMunn from comment #20)
There's no need to split it into parts for each file. It needs to be split into topic commits, one which does options refactoring and one with the update. These are indepenent changes and should not be mixed together.
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2021-08-10 23:12:15 UTC
Created attachment 227097 [details]
update to 2.0.16 and refactoring of the options (v5)

Tested on 12.2 amd64: make check-plist/build/install/run.

---------------------------------------------------------------------------
2.0.16:
---------------------------------------------------------------------------
General:
* Added SDL_FlashWindow() to get a user's attention
* Added SDL_GetAudioDeviceSpec() to get the preferred audio format of a device
* Added SDL_SetWindowAlwaysOnTop() to dynamically change the SDL_WINDOW_ALWAYS_ON_TOP flag for a window
* Added SDL_SetWindowKeyboardGrab() to support grabbing the keyboard independently of the mouse
* Added SDL_SoftStretchLinear() to do bilinear scaling between 32-bit software surfaces
* Added SDL_UpdateNVTexture() to update streaming NV12/21 textures
* Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow sending custom trigger effects to the DualSense controller
* Added SDL_GameControllerGetSensorDataRate() to get the sensor data rate for PlayStation and Nintendo Switch controllers
* Added support for the Amazon Luna game controller
* Added rumble support for the Google Stadia controller using the HIDAPI driver
* Added SDL_GameControllerType constants for the Amazon Luna and Google Stadia controllers
* Added analog rumble for Nintendo Switch Pro controllers using the HIDAPI driver
* Reduced CPU usage when using SDL_WaitEvent() and SDL_WaitEventTimeout()

Windows:
* Added SDL_SetWindowsMessageHook() to set a function that is called for all Windows messages
* Added SDL_RenderGetD3D11Device() to get the D3D11 device used by the SDL renderer

Linux:
* Greatly improved Wayland support
* Added support for audio output and capture using Pipewire
* Added the hint SDL_HINT_AUDIO_INCLUDE_MONITORS to control whether PulseAudio recording should include monitor devices
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panels

Android:
* Added SDL_AndroidShowToast() to show a lightweight notification

iOS:
* Added support for mouse relative mode on iOS 14.1 and newer
* Added support for the Xbox Series X controller

tvOS:
* Added support for the Xbox Series X controller
Comment 23 Jan Beich freebsd_committer freebsd_triage 2021-08-10 23:39:52 UTC
Thanks for rebase/update. https://github.com/libsdl-org/sdl/commit/9e6fcbe72c35 added dependency on x11-toolkits/libdecor which may need to be tracked as part of VIDEO_WAYLAND or a separate option:

$ pkg install libdecor
$ make clean configure
[...]
checking for libdecor support... yes
-- dynamic libdecor -> libdecor-0.so.0
[...]
/bin/sh ./libtool --tag=CC --mode=compile cc ... -I/usr/local/include/libdecor-0 ... -c .../work/SDL2-2.0.16/src/video/wayland/SDL_waylanddyn.c -o build/SDL_waylanddyn.lo
[...]
$ strings $(make -V STAGEDIR)$(make -V PREFIX)/lib/libSDL*.so | fgrep decor-0
libdecor-0.so.0

Note, the dependency is build-only (can be enabled by default without burdening binary package users) unless --disable-libdecor-shared is passed to convert dlopen("libdecor-0.so.0") into -ldecor-0 (direct linkage, still dynamic).
Comment 24 Ghost 2021-09-03 12:02:58 UTC
Created attachment 227643 [details]
v5.1

Maybe switch VIDEO_OPENGL_USE= GL=gl to GL=opengl? With global X11=off, libGL does not exist due to X11-related symbols in libGL. New graphics/libglvnd provides libOpenGL without X11 symbols, and is opened by SDL when libGL is not available starting with https://github.com/libsdl-org/SDL/commit/5f7eb88ae
+ https://github.com/libsdl-org/SDL/commit/9996cecc72

graphics/libglvnd is not optional since https://cgit.freebsd.org/ports/commit/?id=5343f55d87 and related QA was added since https://cgit.freebsd.org/ports/commit/?id=b5a56c9450ee; libOpenGL is not optional, while libGL is.

poudriere testport output using vanilla base and ports + v5.1:
=>> Checking shared library dependencies
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [librt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libthr.so.3]
 0x0000000000000001 NEEDED               Shared library: [libusbhid.so.4]

v5 patch did not apply cleanly for me; v5.1 applies via "git am" and includes the switch to libOpenGL. Tested on libX11-less desktop via audio/fasttracker2.
Comment 25 Jan Beich freebsd_committer freebsd_triage 2021-09-19 12:34:48 UTC
I'm getting tired of patching to support SDL2-2.0.12 in emulators/yuzu. Let's help devel/sdl20 maintainer by fixing consumers.

After exp-run restore Assignee back to amdmi3@ per comment 21. I haven't reviewed the patch myself.
Comment 26 Antoine Brodin freebsd_committer freebsd_triage 2021-09-23 09:19:55 UTC
attachment.cgi?id=227643:373: trailing whitespace.

attachment.cgi?id=227643:381: trailing whitespace.

error: patch failed: devel/sdl20/Makefile:1
error: devel/sdl20/Makefile: patch does not apply
attachment.cgi?id=227643:381: new blank line at EOF.
+
error: patch failed: devel/sdl20/files/patch-src_cpuinfo_SDL__cpuinfo.c:1
error: devel/sdl20/files/patch-src_cpuinfo_SDL__cpuinfo.c: patch does not apply
Comment 27 Ghost 2021-09-23 15:22:16 UTC
Created attachment 228136 [details]
v5.2

Fix merge conflict after ports ece0c9bb0.
Comment 28 Antoine Brodin freebsd_committer freebsd_triage 2021-10-01 12:12:24 UTC
Exp-run looks fine
Comment 29 Robert Clausecker freebsd_committer freebsd_triage 2021-10-01 12:18:26 UTC
Would be cool to get this in before 2021Q4 is branched off.  If not, will this change be MFH'ed?
Comment 30 Vladimir Druzenko freebsd_committer freebsd_triage 2021-12-04 02:27:58 UTC
Created attachment 229869 [details]
update to 2.0.18 and refactoring of the options (v6)

Updated to 2.0.18, added options VIDEO_OPENGLES1 and PIPEWARE, removed DLOPEN.
Comment 31 Stéphane D'Alu 2021-12-22 11:20:45 UTC
* In the patch a backslash '\' is missing in OPTIONS_DEFINE after the VIDEO_WAYLAND

* when building I have the following warning from stage-qa:
====> Running Q/A tests (stage-qa)
Error: /usr/local/lib/libSDL2-2.0.so.0.18.0 is linked to /usr/local/lib/libinotify.so.0 from devel/libinotify but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libinotify.so:devel/libinotify

Otherwise, the patch fix my problem with the gamepad not being detected. Thanks!
Comment 32 Vladimir Druzenko freebsd_committer freebsd_triage 2021-12-22 14:11:06 UTC
Created attachment 230314 [details]
update to 2.0.18 and refactoring of the options (v7)

Fixed \ issue.
Comment 33 Stéphane D'Alu 2021-12-22 23:46:41 UTC
When using my poudriere build (on another computer), I've got the following error:

ld: error: undefined symbol: IsJoystickJSNode
>>> referenced by SDL_sysjoystick.c
>>>               build/.libs/SDL_sysjoystick.o:(joystick_udev_callback)

ld: error: undefined symbol: IsJoystickDeviceNode
>>> referenced by SDL_sysjoystick.c
>>>               build/.libs/SDL_sysjoystick.o:(filter_entries)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:158: build/libSDL2.la] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/sdl20/work/SDL2-2.0.18'
*** Error code 1


Selected options:
     ALSA=off: Audio output via the ALSA audio architecture
     ASM=on: Use optimized assembly code
     HIDAPI=on: Use HIDAPI for low level joystick drivers
     JACK=off: Audio output via the JackD sound server
     NAS=off: Audio output via the Network Audio System
     OSS=on: Audio output via the Open Sound System
     PIPEWARE=off: Audio output via the Pipewire sound server
     PTHREADS=on: Use POSIX threads for multi-threading
     PULSEAUDIO=off: Audio output via the PulseAudio sound server
     SAMPLERATE=on: Audio rate conversion via libsamplerate
     SDL_ATOMIC=on: Enable the SDL Atomic subsystem
     SDL_AUDIO=on: Enable the SDL Audio subsystem
     SDL_CPUINFO=on: Enable the SDL CPUinfo subsystem
     SDL_EVENTS=on: Enable the SDL Events subsystem
     SDL_FILE=on: Enable the SDL File subsystem
     SDL_HAPTIC=on: Enable the SDL Haptic subsystem
     SDL_JOYSTICK=on: Enable the SDL Joystick subsystem
     SDL_LOADSO=on: Enable the SDL Loadso subsystem
     SDL_POWER=on: Enable the SDL Power subsystem
     SDL_RENDER=on: Enable the SDL Render subsystem
     SDL_THREADS=on: Enable the SDL Threads subsystem
     SDL_TIMERS=on: Enable the SDL Timers subsystem
     SDL_VIDEO=on: Enable the SDL Video subsystem
     SNDIO=on: Sndio audio support
     UDEV=on: Use udev for input device detection
     VIDEO_KMSDRM=on: KMSDRM display support
     VIDEO_OPENGL=on: OpenGL rendering support
     VIDEO_OPENGLES1=on: OpenGL ES 1.x rendering support
     VIDEO_OPENGLES2=on: OpenGL ES 2.x rendering support
     VIDEO_VULKAN=on: Vulkan rendering support
     VIDEO_WAYLAND=on: Wayland display support
     VIDEO_X11=on: X11 display support
Comment 34 Stéphane D'Alu 2021-12-23 00:07:04 UTC
Poudriere error is due to the missing (previously identified in stage-qa):
 
LIB_DEPENDS+=libinotify.so:devel/libinotify

But I don't know if it need to be added whatever option is selected or if it is only specific to some options (SDL_JOYSTICK, ...)
Comment 35 Vladimir Druzenko freebsd_committer freebsd_triage 2021-12-26 21:39:29 UTC
Created attachment 230432 [details]
update to 2.0.18 and refactoring of the options (v8)

Fixed:
ld: error: undefined symbol: IsJoystickJSNode
>>> referenced by SDL_sysjoystick.c
>>>               build/.libs/SDL_sysjoystick.o:(joystick_udev_callback)

ld: error: undefined symbol: IsJoystickDeviceNode
>>> referenced by SDL_sysjoystick.c
>>>               build/.libs/SDL_sysjoystick.o:(filter_entries)

libinotify for SDL_JOYSTICK only - tested.
Comment 36 Dmitry Marakasov freebsd_committer freebsd_triage 2021-12-27 15:26:49 UTC
Sorry everybody for the wait. The patch looks good, I'm currently waiting for the poudriere run for all consumers and will definitely commit it this year.

Some more testing is required for different options combinations, but I'm not going to postpone the update any longer and will do the thorough testing afterwards. I also plan to trim useless options which do not affect the dependency list.

VVD, thanks for the patch, Stéphane thanks for testing!
Comment 37 Dmitry Marakasov freebsd_committer freebsd_triage 2021-12-27 18:04:30 UTC
For the time being, no runtime problems with a lot of games on my desktop, neither after only updating sdl2, nor after rebuilding consumers as well.
Comment 38 commit-hook freebsd_committer freebsd_triage 2021-12-29 17:04:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9cb3316ecd2076e9267cac1b7f28eb99f4c0c2be

commit 9cb3316ecd2076e9267cac1b7f28eb99f4c0c2be
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-12-27 15:18:53 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-12-29 16:55:37 +0000

    devel/sdl20: update to 2.0.18

    PR:             252371
    Submitted by:   vvd@unislabs.com

 devel/sdl20/Makefile                               | 237 +++++++--------------
 devel/sdl20/distinfo                               |   6 +-
 .../sdl20/files/patch-include_SDL__endian.h (gone) |  11 -
 devel/sdl20/files/patch-noegl                      |  14 +-
 .../files/patch-src_cpuinfo_SDL__cpuinfo.c (gone)  |  33 ---
 devel/sdl20/files/patch-wayland (gone)             |  70 ------
 devel/sdl20/pkg-plist                              |   5 +-
 7 files changed, 93 insertions(+), 283 deletions(-)
Comment 39 Jack 2021-12-29 22:13:35 UTC
+OPTIONS_DEFINE=		ALSA ASM HIDAPI JACK NAS OSS PIPEWARE PTHREADS	\

Looks like PIPEWARE should be PIPEWIRE?
Comment 40 Vladimir Druzenko freebsd_committer freebsd_triage 2021-12-29 23:50:08 UTC
(In reply to Jack from comment #39)
Yes. :-o

Correct name of software is "pipewire", so option must have name PIPEWIRE.

Who can commit Makefile with: s/PIPEWARE/PIPEWIRE/g ?