summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2022-10-04 11:57:28 +0200
committerSam James <sam@gentoo.org>2022-10-04 12:35:09 +0100
commit3c24f1026227c0be0e9a5b32532f8c6e73671bca (patch)
treef6e83927d3940f6a6ec161872a5c2d51ee624b71 /media-libs/libsdl2
parentmedia-libs/tiff: drop 4.4.0-r1 to ~arch (diff)
downloadgentoo-3c24f1026227c0be0e9a5b32532f8c6e73671bca.tar.gz
gentoo-3c24f1026227c0be0e9a5b32532f8c6e73671bca.tar.bz2
gentoo-3c24f1026227c0be0e9a5b32532f8c6e73671bca.zip
media-libs/libsdl2: Fix build with libudev and joystick subsystem disabled
Upstream commit: 71fb91f7e43c5f046a037bf5ca59214d93fe2d51 Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Closes: https://github.com/gentoo/gentoo/pull/27607 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libsdl2')
-rw-r--r--media-libs/libsdl2/files/libsdl2-2.24.0-fix-build-without-joystick.patch32
-rw-r--r--media-libs/libsdl2/libsdl2-2.24.0-r2.ebuild1
2 files changed, 33 insertions, 0 deletions
diff --git a/media-libs/libsdl2/files/libsdl2-2.24.0-fix-build-without-joystick.patch b/media-libs/libsdl2/files/libsdl2-2.24.0-fix-build-without-joystick.patch
new file mode 100644
index 000000000000..0370f66ef8c9
--- /dev/null
+++ b/media-libs/libsdl2/files/libsdl2-2.24.0-fix-build-without-joystick.patch
@@ -0,0 +1,32 @@
+# https://github.com/libsdl-org/SDL/commit/71fb91f7e43c5f046a037bf5ca59214d93fe2d51
+From 71fb91f7e43c5f046a037bf5ca59214d93fe2d51 Mon Sep 17 00:00:00 2001
+From: Cameron Gutman <aicommander@gmail.com>
+Date: Mon, 26 Sep 2022 21:38:09 -0500
+Subject: [PATCH] evdev: Fix build with libudev and joystick subsystem disabled
+
+---
+ src/core/linux/SDL_evdev_capabilities.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/core/linux/SDL_evdev_capabilities.h b/src/core/linux/SDL_evdev_capabilities.h
+index 26fa7400485b..990ebe01b872 100644
+--- a/src/core/linux/SDL_evdev_capabilities.h
++++ b/src/core/linux/SDL_evdev_capabilities.h
+@@ -25,8 +25,6 @@
+ #ifndef SDL_evdev_capabilities_h_
+ #define SDL_evdev_capabilities_h_
+
+-#if HAVE_LIBUDEV_H || defined(SDL_JOYSTICK_LINUX)
+-
+ #include <linux/input.h>
+
+ /* A device can be any combination of these classes */
+@@ -53,8 +51,6 @@ extern int SDL_EVDEV_GuessDeviceClass(unsigned long bitmask_ev[NBITS(EV_MAX)],
+ unsigned long bitmask_key[NBITS(KEY_MAX)],
+ unsigned long bitmask_rel[NBITS(REL_MAX)]);
+
+-#endif /* HAVE_LIBUDEV_H || defined(SDL_JOYSTICK_LINUX) */
+-
+ #endif /* SDL_evdev_capabilities_h_ */
+
+ /* vi: set ts=4 sw=4 expandtab: */
diff --git a/media-libs/libsdl2/libsdl2-2.24.0-r2.ebuild b/media-libs/libsdl2/libsdl2-2.24.0-r2.ebuild
index df06e35c7b52..481ce62c0cdf 100644
--- a/media-libs/libsdl2/libsdl2-2.24.0-r2.ebuild
+++ b/media-libs/libsdl2/libsdl2-2.24.0-r2.ebuild
@@ -97,6 +97,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.0.16-static-libs.patch
"${FILESDIR}"/${PN}-2.24.0-clang-15-configure.patch
"${FILESDIR}"/${P}-cmake-target-fixes.patch
+ "${FILESDIR}"/${P}-fix-build-without-joystick.patch
)
S="${WORKDIR}/${MY_P}"