There is a regression in media-libs/libsdl2-2.24.2, comparing to media-libs/libsdl2-2.24.0-r2, which prevents from building it when joystick support is disabled: # emerge -uv1a media-libs/libsdl2 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] media-libs/libsdl2-2.24.2::gentoo [2.24.0-r2::gentoo] USE="X alsa nas opengl sound threads video (-aqua) (-custom-cflags) -dbus -doc -fcitx4 -gles1 -gles2 -haptic -ibus -jack -joystick -kms -libsamplerate -oss -pipewire -pulseaudio -sndio -static-libs -udev -vulkan -wayland -xscreensaver" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="mmx sse sse2 -3dnow" VIDEO_CARDS="(-vc4)" 0 KiB [...] libtool: compile: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -g -DUSING_GENERATED_CONFIG_H -Iinclude -I/var/tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/include -idirafter /var/tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/video/khronos -DSDL_BUILD_MAJ OR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=24 -DSDL_BUILD_MICRO_VERSION=2 -mmmx -msse -msse2 -msse3 -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -DHAVE_LINUX_VERSION_H -MMD -MT build/SDL_evdev.lo -c /var/ tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/core/linux/SDL_evdev.c -fPIC -DPIC -o build/.libs/SDL_evdev.o [...] /var/tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/core/linux/SDL_evdev.c: In function 'SDL_EVDEV_init_touchscreen': /var/tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/core/linux/SDL_evdev.c:621:23: error: 'SDL_UDEV_DEVICE_TOUCHPAD' undeclared (first use in this function) 621 | (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT, | ^~~~~~~~~~~~~~~~~~~~~~~~ According to an upstream <https://github.com/libsdl-org/SDL/issues/6169> it's fixed in a their git tree.
https://github.com/libsdl-org/SDL/commit/9f8b68a2785563031473011379878bb63ed5d3a3
I have exactly the same issue with media-libs/libsdl2 so can confirm it happens here too (with rather different USE flags): [ebuild U ] media-libs/libsdl2-2.24.2::gentoo [2.24.0-r2::gentoo] USE="alsa opengl sound threads video -X (-aqua) (-custom-cflags) -dbus -doc -fcitx4 -gles1 -gles2 -haptic -ibus -jack -joystick -kms -libsamplerate -nas -oss -pipewire -pulseaudio -sndio -static-libs -udev -vulkan -wayland -xscreensaver" CPU_FLAGS_X86="mmx sse sse2 -3dnow" VIDEO_CARDS="(-vc4)" 0 KiB [...] /tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/core/linux/SDL_evdev.c:621:23: error: 'SDL_UDEV_DEVICE_TOUCHPAD' undeclared (first use in this function) 621 | (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT, [... skipping some more identical errors in different functions ...] /tmp/portage/media-libs/libsdl2-2.24.2/work/SDL2-2.24.2/src/core/linux/SDL_evdev.c:808:23: error: 'SDL_UDEV_DEVICE_TOUCHSCREEN' undeclared (first use in this function) 808 | if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) {
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0564a6e5a2fb6fada5d1bbd38a9181d1cd99014 commit c0564a6e5a2fb6fada5d1bbd38a9181d1cd99014 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-09 15:21:50 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-09 15:21:50 +0000 media-libs/libsdl2: add joystick patch to 2.24.2 too It's fixed in 2.26.0 upstream. Closes: https://bugs.gentoo.org/884237 Signed-off-by: Sam James <sam@gentoo.org> media-libs/libsdl2/libsdl2-2.24.2.ebuild | 1 + 1 file changed, 1 insertion(+)