From: Thomas Frohwein Subject: SDL3: add separate interactive test suite To: ports@openbsd.org Date: Wed, 23 Sep 2026 15:02:23 -0700 Hi, SDL3 is the future for lots of software and for purposes of development and debugging, the included interactive tests would be very useful to make available. They take up some space and will not be needed by most, so I think using MULTI_PACKAGES would be appropriate for this use case. Diff below adds sdl3,-tests package. The tests are installed here: /usr/local/libexec/installed-tests/SDL3/ My immediate use case is testcontroller, which helps with debugging the game controller support, especially as games/sdl-jstest only supports SDL1 and SDL2. This tool would also be useful for random bug reports/questions about controller support. Probably main downside is that SDL_TESTS requires ffmpeg to build. This seems to currently support all ARCHS, but may break on at least some archs temporarily in the future... Thoughts? ok? Index: Makefile =================================================================== RCS file: /cvs/ports/devel/sdl3/Makefile,v diff -u -p -r1.11 Makefile --- Makefile 21 Sep 2026 23:19:56 -0000 1.11 +++ Makefile 23 Sep 2026 21:52:08 -0000 @@ -1,9 +1,10 @@ -COMMENT = cross-platform multimedia library +COMMENT-main = cross-platform multimedia library +COMMENT-tests = interactive test suite for SDL3 V = 3.4.16 DISTNAME = SDL3-${V} PKGNAME = ${DISTNAME:L} -REVISION = 1 +REVISION = 2 SHARED_LIBS += SDL3 0.1 # 3.4.0 @@ -11,12 +12,22 @@ CATEGORIES = devel HOMEPAGE = https://libsdl.org/ MAINTAINER = Thomas Frohwein +MULTI_PACKAGES = -main -tests + # zlib PERMIT_PACKAGE = Yes -WANTLIB += EGL X11 Xcursor Xext Xfixes Xi Xrandr Xrender Xss Xtst drm -WANTLIB += fribidi gbm iconv m pthread sndio usbhid wayland-client -WANTLIB += wayland-cursor wayland-egl xkbcommon +cWANTLIB += X11 iconv m pthread wayland-client + +WANTLIB-main += ${cWANTLIB} EGL Xcursor Xext Xfixes Xi Xrandr Xrender +WANTLIB-main += Xss Xtst drm fribidi gbm sndio usbhid wayland-cursor +WANTLIB-main += wayland-egl xkbcommon + +WANTLIB-tests = ${cWANTLIB} GL SDL3 c crypto ssl va va-drm va-x11 xml2 z +WANTLIB-tests += SvtAv1Enc aom avcodec avformat avutil bz2 dav1d gsm +WANTLIB-tests += lzma mp3lame opus speex swresample swscale theoradec +WANTLIB-tests += theoraenc vorbis vorbisenc vpx webp webpmux x264 x265 +WANTLIB-tests += xvidcore SITES = https://libsdl.org/release/ \ https://github.com/libsdl-org/SDL/releases/download/release-${V}/ @@ -24,33 +35,40 @@ SITES = https://libsdl.org/release/ \ MODULES = devel/cmake MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib -L${X11BASE}/lib -liconv +# grpahics/ffmpeg is needed for -DSDL_TESTS=ON BUILD_DEPENDS = devel/sdl2:patch \ + graphics/ffmpeg \ wayland/libinput-openbsd -LIB_DEPENDS = converters/libiconv \ +LIB_DEPENDS-main = converters/libiconv \ devel/fribidi \ wayland/wayland \ x11/xkbcommon +LIB_DEPENDS-tests = ${BASE_PKGPATH},-main \ + converters/libiconv \ + graphics/ffmpeg \ + wayland/wayland + CONFIGURE_ARGS = -DSDL_ALSA=OFF \ -DSDL_DBUS=OFF \ -DSDL_DEPS_SHARED=OFF \ -DSDL_HAPTIC=OFF \ -DSDL_HIDAPI=OFF \ -DSDL_INSTALL=ON \ + -DSDL_INSTALL_TESTS=ON \ -DSDL_JACK=OFF \ -DSDL_LIBUDEV=OFF \ -DSDL_PIPEWIRE=OFF \ -DSDL_PULSEAUDIO=OFF \ -DSDL_SNDIO_SHARED=OFF \ + -DSDL_TESTS=ON \ + -DSDL_TESTS_LINK_SHARED=ON \ -DSDL_VULKAN=ON \ -DSDL_WAYLAND=ON \ -DSDL_WAYLAND_SHARED=OFF \ -DSDL_X11_SHARED=OFF \ -DHAVE_GCC_WDOCUMENTATION=OFF \ -DHAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND=OFF - -# building tests adds build dependency on graphics/ffmpeg -CONFIGURE_ARGS += -DSDL_TESTS=OFF CFLAGS += -I${LOCALBASE}/include -I${X11BASE}/include Index: pkg/DESCR =================================================================== RCS file: pkg/DESCR diff -N pkg/DESCR --- pkg/DESCR 7 Aug 2025 16:32:50 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ -Simple DirectMedia Layer is a cross-platform multimedia -library designed to provide fast access to the graphics -framebuffer and audio device. It is used by MPEG playback -software, emulators, and many popular games. Index: pkg/DESCR-main =================================================================== RCS file: pkg/DESCR-main diff -N pkg/DESCR-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-main 23 Sep 2026 21:52:08 -0000 @@ -0,0 +1,4 @@ +Simple DirectMedia Layer is a cross-platform multimedia +library designed to provide fast access to the graphics +framebuffer and audio device. It is used by MPEG playback +software, emulators, and many popular games. Index: pkg/DESCR-tests =================================================================== RCS file: pkg/DESCR-tests diff -N pkg/DESCR-tests --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-tests 23 Sep 2026 21:52:08 -0000 @@ -0,0 +1,6 @@ +Simple DirectMedia Layer is a cross-platform multimedia +library designed to provide fast access to the graphics +framebuffer and audio device. It is used by MPEG playback +software, emulators, and many popular games. + +This is the interactive test suite for SDL3. Index: pkg/PLIST =================================================================== RCS file: pkg/PLIST diff -N pkg/PLIST --- pkg/PLIST 18 Feb 2026 18:11:23 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,101 +0,0 @@ -include/SDL3/ -include/SDL3/SDL.h -include/SDL3/SDL_assert.h -include/SDL3/SDL_asyncio.h -include/SDL3/SDL_atomic.h -include/SDL3/SDL_audio.h -include/SDL3/SDL_begin_code.h -include/SDL3/SDL_bits.h -include/SDL3/SDL_blendmode.h -include/SDL3/SDL_camera.h -include/SDL3/SDL_clipboard.h -include/SDL3/SDL_close_code.h -include/SDL3/SDL_copying.h -include/SDL3/SDL_cpuinfo.h -include/SDL3/SDL_dialog.h -include/SDL3/SDL_dlopennote.h -include/SDL3/SDL_egl.h -include/SDL3/SDL_endian.h -include/SDL3/SDL_error.h -include/SDL3/SDL_events.h -include/SDL3/SDL_filesystem.h -include/SDL3/SDL_gamepad.h -include/SDL3/SDL_gpu.h -include/SDL3/SDL_guid.h -include/SDL3/SDL_haptic.h -include/SDL3/SDL_hidapi.h -include/SDL3/SDL_hints.h -include/SDL3/SDL_init.h -include/SDL3/SDL_intrin.h -include/SDL3/SDL_iostream.h -include/SDL3/SDL_joystick.h -include/SDL3/SDL_keyboard.h -include/SDL3/SDL_keycode.h -include/SDL3/SDL_loadso.h -include/SDL3/SDL_locale.h -include/SDL3/SDL_log.h -include/SDL3/SDL_main.h -include/SDL3/SDL_main_impl.h -include/SDL3/SDL_messagebox.h -include/SDL3/SDL_metal.h -include/SDL3/SDL_misc.h -include/SDL3/SDL_mouse.h -include/SDL3/SDL_mutex.h -include/SDL3/SDL_oldnames.h -include/SDL3/SDL_opengl.h -include/SDL3/SDL_opengl_glext.h -include/SDL3/SDL_opengles.h -include/SDL3/SDL_opengles2.h -include/SDL3/SDL_opengles2_gl2.h -include/SDL3/SDL_opengles2_gl2ext.h -include/SDL3/SDL_opengles2_gl2platform.h -include/SDL3/SDL_opengles2_khrplatform.h -include/SDL3/SDL_pen.h -include/SDL3/SDL_pixels.h -include/SDL3/SDL_platform.h -include/SDL3/SDL_platform_defines.h -include/SDL3/SDL_power.h -include/SDL3/SDL_process.h -include/SDL3/SDL_properties.h -include/SDL3/SDL_rect.h -include/SDL3/SDL_render.h -include/SDL3/SDL_revision.h -include/SDL3/SDL_scancode.h -include/SDL3/SDL_sensor.h -include/SDL3/SDL_stdinc.h -include/SDL3/SDL_storage.h -include/SDL3/SDL_surface.h -include/SDL3/SDL_system.h -include/SDL3/SDL_test.h -include/SDL3/SDL_test_assert.h -include/SDL3/SDL_test_common.h -include/SDL3/SDL_test_compare.h -include/SDL3/SDL_test_crc32.h -include/SDL3/SDL_test_font.h -include/SDL3/SDL_test_fuzzer.h -include/SDL3/SDL_test_harness.h -include/SDL3/SDL_test_log.h -include/SDL3/SDL_test_md5.h -include/SDL3/SDL_test_memory.h -include/SDL3/SDL_thread.h -include/SDL3/SDL_time.h -include/SDL3/SDL_timer.h -include/SDL3/SDL_touch.h -include/SDL3/SDL_tray.h -include/SDL3/SDL_version.h -include/SDL3/SDL_video.h -include/SDL3/SDL_vulkan.h -lib/cmake/SDL3/ -lib/cmake/SDL3/SDL3Config.cmake -lib/cmake/SDL3/SDL3ConfigVersion.cmake -lib/cmake/SDL3/SDL3headersTargets.cmake -lib/cmake/SDL3/SDL3sharedTargets${MODCMAKE_BUILD_SUFFIX} -lib/cmake/SDL3/SDL3sharedTargets.cmake -lib/cmake/SDL3/SDL3testTargets${MODCMAKE_BUILD_SUFFIX} -lib/cmake/SDL3/SDL3testTargets.cmake -@lib lib/libSDL3.so.${LIBSDL3_VERSION} -@static-lib lib/libSDL3_test.a -lib/pkgconfig/sdl3.pc -share/licenses/ -share/licenses/SDL3/ -share/licenses/SDL3/LICENSE.txt Index: pkg/PLIST-main =================================================================== RCS file: pkg/PLIST-main diff -N pkg/PLIST-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-main 23 Sep 2026 21:52:08 -0000 @@ -0,0 +1,101 @@ +include/SDL3/ +include/SDL3/SDL.h +include/SDL3/SDL_assert.h +include/SDL3/SDL_asyncio.h +include/SDL3/SDL_atomic.h +include/SDL3/SDL_audio.h +include/SDL3/SDL_begin_code.h +include/SDL3/SDL_bits.h +include/SDL3/SDL_blendmode.h +include/SDL3/SDL_camera.h +include/SDL3/SDL_clipboard.h +include/SDL3/SDL_close_code.h +include/SDL3/SDL_copying.h +include/SDL3/SDL_cpuinfo.h +include/SDL3/SDL_dialog.h +include/SDL3/SDL_dlopennote.h +include/SDL3/SDL_egl.h +include/SDL3/SDL_endian.h +include/SDL3/SDL_error.h +include/SDL3/SDL_events.h +include/SDL3/SDL_filesystem.h +include/SDL3/SDL_gamepad.h +include/SDL3/SDL_gpu.h +include/SDL3/SDL_guid.h +include/SDL3/SDL_haptic.h +include/SDL3/SDL_hidapi.h +include/SDL3/SDL_hints.h +include/SDL3/SDL_init.h +include/SDL3/SDL_intrin.h +include/SDL3/SDL_iostream.h +include/SDL3/SDL_joystick.h +include/SDL3/SDL_keyboard.h +include/SDL3/SDL_keycode.h +include/SDL3/SDL_loadso.h +include/SDL3/SDL_locale.h +include/SDL3/SDL_log.h +include/SDL3/SDL_main.h +include/SDL3/SDL_main_impl.h +include/SDL3/SDL_messagebox.h +include/SDL3/SDL_metal.h +include/SDL3/SDL_misc.h +include/SDL3/SDL_mouse.h +include/SDL3/SDL_mutex.h +include/SDL3/SDL_oldnames.h +include/SDL3/SDL_opengl.h +include/SDL3/SDL_opengl_glext.h +include/SDL3/SDL_opengles.h +include/SDL3/SDL_opengles2.h +include/SDL3/SDL_opengles2_gl2.h +include/SDL3/SDL_opengles2_gl2ext.h +include/SDL3/SDL_opengles2_gl2platform.h +include/SDL3/SDL_opengles2_khrplatform.h +include/SDL3/SDL_pen.h +include/SDL3/SDL_pixels.h +include/SDL3/SDL_platform.h +include/SDL3/SDL_platform_defines.h +include/SDL3/SDL_power.h +include/SDL3/SDL_process.h +include/SDL3/SDL_properties.h +include/SDL3/SDL_rect.h +include/SDL3/SDL_render.h +include/SDL3/SDL_revision.h +include/SDL3/SDL_scancode.h +include/SDL3/SDL_sensor.h +include/SDL3/SDL_stdinc.h +include/SDL3/SDL_storage.h +include/SDL3/SDL_surface.h +include/SDL3/SDL_system.h +include/SDL3/SDL_test.h +include/SDL3/SDL_test_assert.h +include/SDL3/SDL_test_common.h +include/SDL3/SDL_test_compare.h +include/SDL3/SDL_test_crc32.h +include/SDL3/SDL_test_font.h +include/SDL3/SDL_test_fuzzer.h +include/SDL3/SDL_test_harness.h +include/SDL3/SDL_test_log.h +include/SDL3/SDL_test_md5.h +include/SDL3/SDL_test_memory.h +include/SDL3/SDL_thread.h +include/SDL3/SDL_time.h +include/SDL3/SDL_timer.h +include/SDL3/SDL_touch.h +include/SDL3/SDL_tray.h +include/SDL3/SDL_version.h +include/SDL3/SDL_video.h +include/SDL3/SDL_vulkan.h +lib/cmake/SDL3/ +lib/cmake/SDL3/SDL3Config.cmake +lib/cmake/SDL3/SDL3ConfigVersion.cmake +lib/cmake/SDL3/SDL3headersTargets.cmake +lib/cmake/SDL3/SDL3sharedTargets${MODCMAKE_BUILD_SUFFIX} +lib/cmake/SDL3/SDL3sharedTargets.cmake +lib/cmake/SDL3/SDL3testTargets${MODCMAKE_BUILD_SUFFIX} +lib/cmake/SDL3/SDL3testTargets.cmake +@lib lib/libSDL3.so.${LIBSDL3_VERSION} +@static-lib lib/libSDL3_test.a +lib/pkgconfig/sdl3.pc +share/licenses/ +share/licenses/SDL3/ +share/licenses/SDL3/LICENSE.txt Index: pkg/PLIST-tests =================================================================== RCS file: pkg/PLIST-tests diff -N pkg/PLIST-tests --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-tests 23 Sep 2026 21:52:08 -0000 @@ -0,0 +1,154 @@ +libexec/installed-tests/ +libexec/installed-tests/SDL3/ +libexec/installed-tests/SDL3/audiofile.png +@bin libexec/installed-tests/SDL3/checkkeys +@bin libexec/installed-tests/SDL3/childprocess +libexec/installed-tests/SDL3/gamepad_axis.png +libexec/installed-tests/SDL3/gamepad_axis_arrow.png +libexec/installed-tests/SDL3/gamepad_back.png +libexec/installed-tests/SDL3/gamepad_battery.png +libexec/installed-tests/SDL3/gamepad_battery_unknown.png +libexec/installed-tests/SDL3/gamepad_battery_wired.png +libexec/installed-tests/SDL3/gamepad_button.png +libexec/installed-tests/SDL3/gamepad_button_background.png +libexec/installed-tests/SDL3/gamepad_button_small.png +libexec/installed-tests/SDL3/gamepad_face_abxy.png +libexec/installed-tests/SDL3/gamepad_face_axby.png +libexec/installed-tests/SDL3/gamepad_face_bayx.png +libexec/installed-tests/SDL3/gamepad_face_sony.png +libexec/installed-tests/SDL3/gamepad_front.png +libexec/installed-tests/SDL3/gamepad_touchpad.png +libexec/installed-tests/SDL3/gamepad_wired.png +libexec/installed-tests/SDL3/gamepad_wireless.png +libexec/installed-tests/SDL3/glass.png +libexec/installed-tests/SDL3/icon.png +libexec/installed-tests/SDL3/icon2x.png +libexec/installed-tests/SDL3/logaudiodev.png +@bin libexec/installed-tests/SDL3/loopwave +libexec/installed-tests/SDL3/moose.dat +libexec/installed-tests/SDL3/msdf_font.csv +libexec/installed-tests/SDL3/msdf_font.png +libexec/installed-tests/SDL3/physaudiodev.png +libexec/installed-tests/SDL3/sample.png +libexec/installed-tests/SDL3/sample.wav +libexec/installed-tests/SDL3/sdl-test_round.png +libexec/installed-tests/SDL3/soundboard.png +libexec/installed-tests/SDL3/soundboard_levels.png +libexec/installed-tests/SDL3/speaker.png +libexec/installed-tests/SDL3/sword.wav +@bin libexec/installed-tests/SDL3/testasyncio +@bin libexec/installed-tests/SDL3/testatomic +@bin libexec/installed-tests/SDL3/testaudio +@bin libexec/installed-tests/SDL3/testaudiohotplug +@bin libexec/installed-tests/SDL3/testaudioinfo +@bin libexec/installed-tests/SDL3/testaudiorecording +@bin libexec/installed-tests/SDL3/testaudiostreamdynamicresample +@bin libexec/installed-tests/SDL3/testautomation +@bin libexec/installed-tests/SDL3/testbounds +@bin libexec/installed-tests/SDL3/testcamera +@bin libexec/installed-tests/SDL3/testclipboard +@bin libexec/installed-tests/SDL3/testcolorspace +@bin libexec/installed-tests/SDL3/testcontroller +@bin libexec/installed-tests/SDL3/testcustomcursor +@bin libexec/installed-tests/SDL3/testdialog +@bin libexec/installed-tests/SDL3/testdisplayinfo +@bin libexec/installed-tests/SDL3/testdlopennote +@bin libexec/installed-tests/SDL3/testdraw +@bin libexec/installed-tests/SDL3/testdrawchessboard +@bin libexec/installed-tests/SDL3/testdropfile +@bin libexec/installed-tests/SDL3/testerror +@bin libexec/installed-tests/SDL3/testevdev +@bin libexec/installed-tests/SDL3/testffmpeg +@bin libexec/installed-tests/SDL3/testfile +@bin libexec/installed-tests/SDL3/testfilesystem +@bin libexec/installed-tests/SDL3/testgeometry +@bin libexec/installed-tests/SDL3/testgl +@bin libexec/installed-tests/SDL3/testgles +@bin libexec/installed-tests/SDL3/testgles2 +@bin libexec/installed-tests/SDL3/testgpu_simple_clear +@bin libexec/installed-tests/SDL3/testgpu_spinning_cube +@bin libexec/installed-tests/SDL3/testgpurender_effects +@bin libexec/installed-tests/SDL3/testgpurender_msdf +@bin libexec/installed-tests/SDL3/testhaptic +@bin libexec/installed-tests/SDL3/testhittesting +@bin libexec/installed-tests/SDL3/testhotplug +@bin libexec/installed-tests/SDL3/testiconv +@bin libexec/installed-tests/SDL3/testime +@bin libexec/installed-tests/SDL3/testintersections +@bin libexec/installed-tests/SDL3/testkeys +@bin libexec/installed-tests/SDL3/testloadso +@bin libexec/installed-tests/SDL3/testlocale +@bin libexec/installed-tests/SDL3/testlock +@bin libexec/installed-tests/SDL3/testmanymouse +@bin libexec/installed-tests/SDL3/testmessage +@bin libexec/installed-tests/SDL3/testmodal +@bin libexec/installed-tests/SDL3/testmouse +@bin libexec/installed-tests/SDL3/testmultiaudio +@bin libexec/installed-tests/SDL3/testnative +@bin libexec/installed-tests/SDL3/testoffscreen +@bin libexec/installed-tests/SDL3/testoverlay +@bin libexec/installed-tests/SDL3/testpalette +@bin libexec/installed-tests/SDL3/testpen +@bin libexec/installed-tests/SDL3/testplatform +@bin libexec/installed-tests/SDL3/testpopup +@bin libexec/installed-tests/SDL3/testpower +@bin libexec/installed-tests/SDL3/testprocess +@bin libexec/installed-tests/SDL3/testqsort +@bin libexec/installed-tests/SDL3/testrelative +@bin libexec/installed-tests/SDL3/testrendercopyex +@bin libexec/installed-tests/SDL3/testrendertarget +@bin libexec/installed-tests/SDL3/testresample +@bin libexec/installed-tests/SDL3/testrotate +@bin libexec/installed-tests/SDL3/testrumble +@bin libexec/installed-tests/SDL3/testrwlock +@bin libexec/installed-tests/SDL3/testscale +@bin libexec/installed-tests/SDL3/testsem +@bin libexec/installed-tests/SDL3/testsensor +@bin libexec/installed-tests/SDL3/testshader +@bin libexec/installed-tests/SDL3/testshape +@bin libexec/installed-tests/SDL3/testsoftwaretransparent +@bin libexec/installed-tests/SDL3/testsprite +@bin libexec/installed-tests/SDL3/testspriteminimal +@bin libexec/installed-tests/SDL3/testspritesurface +@bin libexec/installed-tests/SDL3/testsurround +@bin libexec/installed-tests/SDL3/testsymbols +@bin libexec/installed-tests/SDL3/testthread +@bin libexec/installed-tests/SDL3/testtime +@bin libexec/installed-tests/SDL3/testtimer +@bin libexec/installed-tests/SDL3/testtray +@bin libexec/installed-tests/SDL3/testurl +@bin libexec/installed-tests/SDL3/testver +@bin libexec/installed-tests/SDL3/testviewport +@bin libexec/installed-tests/SDL3/testvulkan +@bin libexec/installed-tests/SDL3/testwm +@bin libexec/installed-tests/SDL3/testyuv +libexec/installed-tests/SDL3/testyuv.png +@bin libexec/installed-tests/SDL3/torturethread +libexec/installed-tests/SDL3/trashcan.png +libexec/installed-tests/SDL3/unifont-15.1.05.hex +libexec/installed-tests/SDL3/utf8.txt +share/installed-tests/ +share/installed-tests/SDL3/ +share/installed-tests/SDL3/testatomic.test +share/installed-tests/SDL3/testaudioinfo.test +share/installed-tests/SDL3/testautomation.test +share/installed-tests/SDL3/testbounds.test +share/installed-tests/SDL3/testdisplayinfo.test +share/installed-tests/SDL3/testerror.test +share/installed-tests/SDL3/testevdev.test +share/installed-tests/SDL3/testfile.test +share/installed-tests/SDL3/testfilesystem.test +share/installed-tests/SDL3/testkeys.test +share/installed-tests/SDL3/testlocale.test +share/installed-tests/SDL3/testplatform.test +share/installed-tests/SDL3/testpower.test +share/installed-tests/SDL3/testprocess.test +share/installed-tests/SDL3/testqsort.test +share/installed-tests/SDL3/testrwlock.test +share/installed-tests/SDL3/testsem.test +share/installed-tests/SDL3/testsymbols.test +share/installed-tests/SDL3/testthread.test +share/installed-tests/SDL3/testtimer.test +share/installed-tests/SDL3/testver.test +share/installed-tests/SDL3/testyuv.test +share/installed-tests/SDL3/torturethread.test