git: bbea078ec9c0 - main - devel/sdl20: remove useless options

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Thu, 28 Apr 2022 17:54:36 UTC
The branch main has been updated by amdmi3:

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

commit bbea078ec9c0d8eaa3850d4e2be8f88f32ecac84
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-04-27 12:11:38 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-04-28 17:52:30 +0000

    devel/sdl20: remove useless options
    
    Drop SDL_* options which allow disabling specific SDL subsystems,
    with the exception of SDL_JOYSTICK which was renamed to JOYSTICK.
    These options unnecessary complicate the port while providing no
    gain and will lead to dependent port build failures if disabled
    unthoughtfully by a user.
---
 devel/sdl20/Makefile | 70 ++++++++++------------------------------------------
 1 file changed, 13 insertions(+), 57 deletions(-)

diff --git a/devel/sdl20/Makefile b/devel/sdl20/Makefile
index 26a22956120f..f6db7382f577 100644
--- a/devel/sdl20/Makefile
+++ b/devel/sdl20/Makefile
@@ -46,20 +46,13 @@ CONFIGURE_ARGS+=	--disable-sse3
 
 MAKE_ENV=	V=1
 
-OPTIONS_DEFINE=		ASM DBUS FCITX IBUS HIDAPI PTHREADS SAMPLERATE	\
-			UDEV
-OPTIONS_GROUP=		AUDIO VIDEO SUBSYSTEM
+OPTIONS_DEFINE=		ASM DBUS FCITX IBUS JOYSTICK HIDAPI PTHREADS \
+			SAMPLERATE UDEV
+OPTIONS_GROUP=		AUDIO VIDEO
 OPTIONS_GROUP_AUDIO=	ALSA JACK NAS OSS PIPEWIRE PULSEAUDIO SNDIO
-OPTIONS_GROUP_VIDEO=	KMSDRM OPENGL OPENGLES1 OPENGLES2 VULKAN 	\
+OPTIONS_GROUP_VIDEO=	KMSDRM OPENGL OPENGLES1 OPENGLES2 VULKAN \
 			WAYLAND X11
-OPTIONS_GROUP_SUBSYSTEM=SDL_ATOMIC SDL_AUDIO SDL_CPUINFO SDL_EVENTS 	\
-			SDL_FILE SDL_HAPTIC SDL_JOYSTICK SDL_LOADSO	\
-			SDL_POWER SDL_RENDER SDL_THREADS SDL_TIMERS	\
-			SDL_VIDEO
-OPTIONS_DEFAULT=	ASM OSS PTHREADS SDL_ATOMIC SDL_AUDIO		\
-			SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC	\
-			SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER	\
-			SDL_THREADS SDL_TIMERS SDL_VIDEO KMSDRM	OPENGL 	\
+OPTIONS_DEFAULT=	ASM JOYSTICK OSS PTHREADS KMSDRM OPENGL \
 			OPENGLES1 OPENGLES2 VULKAN WAYLAND X11
 OPTIONS_DEFINE_powerpc=	ALTIVEC
 OPTIONS_DEFINE_powerpc64=	ALTIVEC
@@ -68,24 +61,11 @@ OPTIONS_DEFAULT_powerpc64=	ALTIVEC
 
 AUDIO_DESC=		Audio drivers
 VIDEO_DESC=		Video drivers
-SUBSYSTEM_DESC=		SDL subsystems support
 
+JOYSTICK_DESC=		Joystick and haptic support
 HIDAPI_DESC=		Use HIDAPI for low level joystick drivers
 PIPEWIRE_DESC=		Pipewire sound server support
 PTHREADS_DESC=		Use POSIX threads for multi-threading
-SDL_ATOMIC_DESC=	Enable the SDL Atomic subsystem
-SDL_AUDIO_DESC=		Enable the SDL Audio subsystem
-SDL_CPUINFO_DESC=	Enable the SDL CPUinfo subsystem
-SDL_EVENTS_DESC=	Enable the SDL Events subsystem
-SDL_FILE_DESC=		Enable the SDL File subsystem
-SDL_HAPTIC_DESC=	Enable the SDL Haptic subsystem
-SDL_JOYSTICK_DESC=	Enable the SDL Joystick subsystem
-SDL_LOADSO_DESC=	Enable the SDL Loadso subsystem
-SDL_POWER_DESC=		Enable the SDL Power subsystem
-SDL_RENDER_DESC=	Enable the SDL Render subsystem
-SDL_THREADS_DESC=	Enable the SDL Threads subsystem
-SDL_TIMERS_DESC=	Enable the SDL Timers subsystem
-SDL_VIDEO_DESC=		Enable the SDL Video subsystem
 UDEV_DESC=		Use udev for input device detection
 KMSDRM_DESC=		KMSDRM display support
 OPENGL_DESC=		OpenGL rendering support
@@ -100,73 +80,50 @@ FCITX_DESC=		fcitx support
 ALTIVEC_CONFIGURE_ENABLE=	altivec
 ALSA_CONFIGURE_ENABLE=		alsa alsa-shared
 ALSA_LIB_DEPENDS=		libasound.so:audio/alsa-lib
-ALSA_IMPLIES=			SDL_AUDIO
 ASM_CONFIGURE_ENABLE=		assembly
 HIDAPI_CONFIGURE_ENABLE=	hidapi
-HIDAPI_IMPLIES=			SDL_JOYSTICK
+HIDAPI_IMPLIES=			JOYSTICK
 JACK_CONFIGURE_ENABLE=		jack jack-shared
 JACK_LIB_DEPENDS=		libjack.so:audio/jack
-JACK_IMPLIES=			SDL_AUDIO
+JOYSTICK_CONFIGURE_ENABLE=	joystick haptic
+JOYSTICK_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
+JOYSTICK_LIB_DEPENDS=		libinotify.so:devel/libinotify
 NAS_CONFIGURE_ENABLE=		nas nas-shared
 NAS_LIB_DEPENDS=		libaudio.so:audio/nas
-NAS_IMPLIES=			SDL_AUDIO
 OSS_CONFIGURE_ENABLE=		oss
-OSS_IMPLIES=			SDL_AUDIO
 PIPEWIRE_CONFIGURE_ENABLE=	pipewire pipewire-shared
 PIPEWIRE_LIB_DEPENDS=		libpipewire-0.3.so:multimedia/pipewire
-PIPEWIRE_IMPLIES=		SDL_AUDIO
 PTHREADS_CONFIGURE_ENABLE=	pthreads pthread-sem
 PULSEAUDIO_CONFIGURE_ENABLE=	pulseaudio pulseaudio-shared
 PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
-PULSEAUDIO_IMPLIES=		SDL_AUDIO
 SAMPLERATE_CONFIGURE_ENABLE=	libsamplerate libsamplerate-shared
 SAMPLERATE_LIB_DEPENDS=		libsamplerate.so:audio/libsamplerate
-SDL_ATOMIC_CONFIGURE_ENABLE=	atomic gcc-atomics
-SDL_AUDIO_CONFIGURE_ENABLE=	audio
-SDL_CPUINFO_CONFIGURE_ENABLE=	cpuinfo
-SDL_EVENTS_CONFIGURE_ENABLE=	events
-SDL_FILE_CONFIGURE_ENABLE=	filesystem
-SDL_HAPTIC_CONFIGURE_ENABLE=	haptic
-SDL_HAPTIC_IMPLIES=		SDL_JOYSTICK  # otherwise: ld: error: undefined symbol: test_bit
-SDL_JOYSTICK_CONFIGURE_ENABLE=	joystick
-SDL_JOYSTICK_BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto
-SDL_JOYSTICK_LIB_DEPENDS=	libinotify.so:devel/libinotify
-SDL_LOADSO_CONFIGURE_ENABLE=	loadso
-SDL_POWER_CONFIGURE_ENABLE=	power
-SDL_RENDER_CONFIGURE_ENABLE=	render
-SDL_THREADS_CONFIGURE_ENABLE=	threads
-SDL_TIMERS_CONFIGURE_ENABLE=	timers
-SDL_VIDEO_CONFIGURE_ENABLE=	video
 SNDIO_CONFIGURE_ENABLE=		sndio sndio-shared
 SNDIO_LIB_DEPENDS=		libsndio.so:audio/sndio
-SNDIO_IMPLIES=			SDL_AUDIO
 UDEV_CONFIGURE_ENABLE=		libudev
 UDEV_LIB_DEPENDS=		libudev.so:devel/libudev-devd
 UDEV_BUILD_DEPENDS=		${LOCALBASE}/include/linux/input.h:devel/evdev-proto
 KMSDRM_CONFIGURE_ENABLE=	video-kmsdrm kmsdrm-shared
 KMSDRM_USES=			gl
 KMSDRM_USE=	 		GL=gbm
-KMSDRM_IMPLIES=			SDL_VIDEO
 OPENGL_CONFIGURE_ENABLE=	video-opengl
 OPENGL_USES=			gl
 OPENGL_USE=			GL=opengl
-OPENGL_IMPLIES=			SDL_VIDEO
 OPENGLES1_CONFIGURE_ENABLE=	video-opengles1
 OPENGLES1_USES=			gl
 OPENGLES1_USE=			GL=egl,glesv1
-OPENGLES1_IMPLIES=		SDL_VIDEO OPENGLES
+OPENGLES1_IMPLIES=		OPENGLES
 OPENGLES2_CONFIGURE_ENABLE=	video-opengles2
 OPENGLES2_USES=			gl
 OPENGLES2_USE=			GL=egl,glesv2
-OPENGLES2_IMPLIES=		SDL_VIDEO OPENGLES
+OPENGLES2_IMPLIES=		OPENGLES
 VULKAN_CONFIGURE_ENABLE=	video-vulkan
-VULKAN_IMPLIES=			SDL_LOADSO SDL_VIDEO
 WAYLAND_CONFIGURE_ENABLE=	video-wayland wayland-shared video-wayland-qt-touch
 WAYLAND_BUILD_DEPENDS=		wayland-protocols>0:graphics/wayland-protocols \
 				${LOCALBASE}/include/linux/input.h:devel/evdev-proto
 WAYLAND_LIB_DEPENDS=		libwayland-egl.so:graphics/wayland \
 				libxkbcommon.so:x11/libxkbcommon
-WAYLAND_IMPLIES=		SDL_VIDEO OPENGLES2
+WAYLAND_IMPLIES=		OPENGLES2
 X11_CONFIGURE_ENABLE=		video-x11 x11-shared \
 				video-x11-xcursor \
 				video-x11-xdbe \
@@ -179,7 +136,6 @@ X11_CONFIGURE_ENABLE=		video-x11 x11-shared \
 				video-x11-vm
 X11_USES=			xorg
 X11_USE=			XORG=xcursor,xext,xinerama,xi,xfixes,xrandr,xscrnsaver,xxf86vm
-X11_IMPLIES=			SDL_VIDEO
 DBUS_LIB_DEPENDS=		libdbus-1.so:devel/dbus
 DBUS_CONFIGURE_ENABLE=		dbus
 FCITX_LIB_DEPENDS=		libfcitx-config.so:chinese/fcitx