Add configuration files and patches for R, SDL2, SDL3, Tk, and Vala
- Introduced `r.toml` for R package configuration, including build flags and dependencies. - Added `sdl2-compat.toml` for SDL2 compatibility layer with SDL3, specifying build and runtime dependencies. - Created a patch for SDL3 to handle cases when XInput2 is not available, ensuring compatibility. - Added `sdl3.toml` for SDL3 configuration, including build flags and dependencies. - Introduced `tk.toml` for Tk configuration, detailing build flags and runtime dependencies. - Added a patch for Vala to ensure POSIX compliance in the test runner script, improving portability.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From 8b6b251966b5ea14f9df87c834ffa9ea456b5600 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Praznik <frank.praznik@gmail.com>
|
||||
Date: Tue, 17 Mar 2026 15:01:56 -0400
|
||||
Subject: [PATCH] x11: Fix building when XInput2 is not available
|
||||
|
||||
---
|
||||
src/video/x11/SDL_x11xinput2.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c
|
||||
index c8b37cec98217..5cf75901f2c14 100644
|
||||
--- a/src/video/x11/SDL_x11xinput2.c
|
||||
+++ b/src/video/x11/SDL_x11xinput2.c
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
static bool xinput2_initialized;
|
||||
-#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO) || defined(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
|
||||
static bool xinput2_scrolling_supported;
|
||||
static bool xinput2_multitouch_supported;
|
||||
@@ -137,6 +136,7 @@ static SDL_Window *xinput2_get_sdlwindow(SDL_VideoData *videodata, Window window
|
||||
const SDL_WindowData *windowdata = X11_FindWindow(videodata, window);
|
||||
return windowdata ? windowdata->window : NULL;
|
||||
}
|
||||
+#endif // SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO
|
||||
static void xinput2_reset_scrollable_valuators(void)
|
||||
@@ -751,12 +751,15 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
|
||||
|
||||
void X11_InitXinput2Multitouch(SDL_VideoDevice *_this)
|
||||
{
|
||||
+#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
xinput2_grabbed_touch_raised = false;
|
||||
xinput2_active_touch_count = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool X11_Xinput2HandlesMotionForWindow(SDL_WindowData *window_data)
|
||||
{
|
||||
+#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
/* Send the active flag once more after the touch count is zero, to suppress the
|
||||
* emulated motion event when the last touch is raised.
|
||||
*/
|
||||
@@ -765,6 +768,9 @@ bool X11_Xinput2HandlesMotionForWindow(SDL_WindowData *window_data)
|
||||
xinput2_grabbed_touch_raised = false;
|
||||
|
||||
return ret;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif // SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
}
|
||||
|
||||
void X11_Xinput2Select(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
@@ -0,0 +1,59 @@
|
||||
[build]
|
||||
type = "cmake"
|
||||
|
||||
[build.flags]
|
||||
build_dir = "build"
|
||||
configure = [
|
||||
"-DSDL_STATIC=OFF",
|
||||
"-G Ninja",
|
||||
"-DSDL_RPATH=OFF",
|
||||
"-DSDL_X11_XINPUT=OFF",
|
||||
"-DSDL_X11_XFIXES=OFF",
|
||||
"-DSDL_X11_XTEST=OFF",
|
||||
"-DSDL_X11_XINPUT=OFF",
|
||||
]
|
||||
no-delete-static = true
|
||||
|
||||
[dependencies]
|
||||
build = [
|
||||
"cmake",
|
||||
"ninja",
|
||||
"wayland-protocols",
|
||||
"mesa",
|
||||
"alsa-lib",
|
||||
"libxrandr",
|
||||
"libxinerama",
|
||||
"wayland",
|
||||
"libxss",
|
||||
"vulkan-headers",
|
||||
]
|
||||
optional = [
|
||||
"alsa-lib",
|
||||
"vulkan-driver",
|
||||
]
|
||||
runtime = [
|
||||
"glibc",
|
||||
"libxext",
|
||||
"libx11",
|
||||
"libgl",
|
||||
"libxrender",
|
||||
"libxcursor",
|
||||
"hidapi",
|
||||
"libusb",
|
||||
]
|
||||
|
||||
[package]
|
||||
description = "A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 3)"
|
||||
homepage = "https://www.libsdl.org/"
|
||||
license = "Zlib"
|
||||
name = "sdl3"
|
||||
version = "3.4.2"
|
||||
|
||||
[[manual_sources]]
|
||||
file = "sdl-libxinput.patch"
|
||||
|
||||
[[source]]
|
||||
extract_dir = "$name-$version"
|
||||
sha256 = "ef39a2e3f9a8a78296c40da701967dd1b0d0d6e267e483863ce70f8a03b4050c"
|
||||
url = "https://github.com/libsdl-org/SDL/releases/download/release-$version/SDL3-$version.tar.gz"
|
||||
patches = [ "sdl-libxinput.patch" ]
|
||||
Reference in New Issue
Block a user