Compare commits

..

No commits in common. "68b81c3a28b12f4f0823c52cfe734eddc855e570" and "7e4a331affc6e7ddb543e11366819e0b051c9992" have entirely different histories.

8 changed files with 49 additions and 284 deletions

View File

@ -1 +0,0 @@
788380a96075119a2ab1e5b53f2fee74fa957fa2 SDL2-2.26.0.tar.gz

4
.gitignore vendored
View File

@ -11,7 +11,3 @@
/SDL2-2.0.10.tar.gz /SDL2-2.0.10.tar.gz
/SDL2-2.0.12.tar.gz /SDL2-2.0.12.tar.gz
/SDL2-2.0.14.tar.gz /SDL2-2.0.14.tar.gz
/SDL2-2.0.16.tar.gz
/SDL2-2.0.18.tar.gz
/SDL2-2.0.20.tar.gz
/SDL2-2.26.0.tar.gz

View File

@ -1,81 +0,0 @@
From 68d8a2c6b4f732920df40bd79dc3c18b71a4a349 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa@fedoraproject.org>
Date: Fri, 29 Apr 2022 23:39:39 -0400
Subject: [PATCH] Revert "Revert "video: Prefer Wayland over X11""
For Fedora/RHEL, we want to continue using Wayland by default.
The majority of issues around Wayland by default seem to center
around cases that are issues for the Steam Runtime's bundled
copy of SDL and proprietary games that depend on that runtime.
These issues do not apply to us.
This reverts commit 254fcc90eb22bb159ab365ad956222a9c5632841.
---
src/video/SDL_video.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 2b896c44b..6f31f4c9e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -61,12 +61,12 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_COCOA
&COCOA_bootstrap,
#endif
-#if SDL_VIDEO_DRIVER_X11
- &X11_bootstrap,
-#endif
#if SDL_VIDEO_DRIVER_WAYLAND
&Wayland_bootstrap,
#endif
+#if SDL_VIDEO_DRIVER_X11
+ &X11_bootstrap,
+#endif
#if SDL_VIDEO_DRIVER_VIVANTE
&VIVANTE_bootstrap,
#endif
@@ -4275,12 +4275,12 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
#if SDL_VIDEO_DRIVER_UIKIT
#include "uikit/SDL_uikitmessagebox.h"
#endif
-#if SDL_VIDEO_DRIVER_X11
-#include "x11/SDL_x11messagebox.h"
-#endif
#if SDL_VIDEO_DRIVER_WAYLAND
#include "wayland/SDL_waylandmessagebox.h"
#endif
+#if SDL_VIDEO_DRIVER_X11
+#include "x11/SDL_x11messagebox.h"
+#endif
#if SDL_VIDEO_DRIVER_HAIKU
#include "haiku/SDL_bmessagebox.h"
#endif
@@ -4388,17 +4388,17 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
retval = 0;
}
#endif
-#if SDL_VIDEO_DRIVER_X11
+#if SDL_VIDEO_DRIVER_WAYLAND
if (retval == -1 &&
- SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
- X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
+ SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
+ Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
-#if SDL_VIDEO_DRIVER_WAYLAND
+#if SDL_VIDEO_DRIVER_X11
if (retval == -1 &&
- SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WAYLAND) &&
- Wayland_ShowMessageBox(messageboxdata, buttonid) == 0) {
+ SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
+ X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
--
2.35.1

View File

@ -0,0 +1,15 @@
diff -up SDL2-2.0.9/include/SDL_opengl_glext.h.khrplatform SDL2-2.0.9/include/SDL_opengl_glext.h
--- SDL2-2.0.9/include/SDL_opengl_glext.h.khrplatform 2019-02-15 20:22:39.173773779 -0500
+++ SDL2-2.0.9/include/SDL_opengl_glext.h 2019-02-15 20:22:58.176399330 -0500
@@ -469,8 +469,9 @@ GLAPI void APIENTRY glBlendEquation (GLe
typedef long GLsizeiptr;
typedef long GLintptr;
#else
-typedef ptrdiff_t GLsizeiptr;
-typedef ptrdiff_t GLintptr;
+#include <KHR/khrplatform.h>
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
#endif
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765

131
SDL2.spec
View File

@ -1,28 +1,16 @@
# For the generated library symbol suffix
%if 0%{?__isa_bits} == 32
%global libsymbolsuffix %{nil}
%else
%global libsymbolsuffix ()(%{__isa_bits}bit)
%endif
# For declaring rich dependency on libdecor
%global libdecor_majver 0
Name: SDL2 Name: SDL2
Version: 2.26.0 Version: 2.0.14
Release: 1%{?dist} Release: 7%{?dist}
Summary: Cross-platform multimedia library Summary: Cross-platform multimedia library
License: zlib and MIT License: zlib and MIT
URL: http://www.libsdl.org/ URL: http://www.libsdl.org/
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
Source1: SDL_config.h Source1: SDL_config.h
Source2: SDL_revision.h
Patch0: multilib.patch Patch0: multilib.patch
# Prefer Wayland by default # ptrdiff_t is not the same as khronos defines on 32bit arches
Patch1: SDL2-2.0.22-prefer-wayland.patch Patch1: SDL2-2.0.9-khrplatform.patch
BuildRequires: git-core
BuildRequires: cmake BuildRequires: cmake
BuildRequires: make BuildRequires: make
BuildRequires: gcc BuildRequires: gcc
@ -38,22 +26,19 @@ BuildRequires: libXi-devel
BuildRequires: libXrandr-devel BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel BuildRequires: libXrender-devel
BuildRequires: libXScrnSaver-devel BuildRequires: libXScrnSaver-devel
BuildRequires: libusb-devel
BuildRequires: libXinerama-devel BuildRequires: libXinerama-devel
BuildRequires: libXcursor-devel BuildRequires: libXcursor-devel
BuildRequires: systemd-devel BuildRequires: systemd-devel
BuildRequires: pkgconfig(libusb-1.0)
# PulseAudio # PulseAudio
BuildRequires: pkgconfig(libpulse-simple) BuildRequires: pkgconfig(libpulse-simple)
# Jack # Jack
BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(jack)
# PipeWire
BuildRequires: pkgconfig(libpipewire-0.3)
# D-Bus # D-Bus
BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dbus-1)
# IBus # IBus
BuildRequires: pkgconfig(ibus-1.0) BuildRequires: pkgconfig(ibus-1.0)
# Wayland # Wayland
BuildRequires: pkgconfig(libdecor-%{libdecor_majver})
BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-cursor)
@ -66,9 +51,6 @@ BuildRequires: vulkan-devel
BuildRequires: mesa-libgbm-devel BuildRequires: mesa-libgbm-devel
BuildRequires: libdrm-devel BuildRequires: libdrm-devel
# Ensure libdecor is pulled in when libwayland-client is (rhbz#1992804)
Requires: (libdecor-%{libdecor_majver}.so.%{libdecor_majver}%{libsymbolsuffix} if libwayland-client)
%description %description
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
to provide fast access to the graphics frame buffer and audio device. to provide fast access to the graphics frame buffer and audio device.
@ -79,8 +61,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: mesa-libEGL-devel%{?_isa} Requires: mesa-libEGL-devel%{?_isa}
Requires: mesa-libGLES-devel%{?_isa} Requires: mesa-libGLES-devel%{?_isa}
Requires: libX11-devel%{?_isa} Requires: libX11-devel%{?_isa}
# Conflict with versions before libSDLmain moved here # Needed to keep CMake happy
Conflicts: %{name}-static < 2.0.18-2 Requires: %{name}-static%{?_isa} = %{version}-%{release}
%description devel %description devel
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
@ -90,17 +72,13 @@ developing SDL applications.
%package static %package static
Summary: Static libraries for SDL2 Summary: Static libraries for SDL2
# Needed to keep CMake happy
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
# Conflict with versions before libSDLmain moved to -devel
Conflicts: %{name}-devel < 2.0.18-2
%description static %description static
Static libraries for SDL2. Static libraries for SDL2.
%prep %prep
%autosetup -S git %autosetup -p1
sed -i -e 's/\r//g' TODO.txt README.md WhatsNew.txt BUGS.txt LICENSE.txt CREDITS.txt README-SDL.txt sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt
%build %build
# Deal with new CMake policy around whitespace in LDFLAGS... # Deal with new CMake policy around whitespace in LDFLAGS...
@ -108,23 +86,20 @@ export LDFLAGS="%{shrink:%{build_ldflags}}"
%cmake \ %cmake \
-DSDL_DLOPEN=ON \ -DSDL_DLOPEN=ON \
-DSDL_VIDEO_KMSDRM=ON \ -DVIDEO_KMSDRM=ON \
-DSDL_ARTS=OFF \ -DARTS=OFF \
-DSDL_ESD=OFF \ -DESD=OFF \
-DSDL_NAS=OFF \ -DNAS=OFF \
-DSDL_PULSEAUDIO_SHARED=ON \ -DPULSEAUDIO_SHARED=ON \
-DSDL_JACK_SHARED=ON \ -DJACK_SHARED=ON \
-DSDL_PIPEWIRE_SHARED=ON \ -DALSA=ON \
-DSDL_ALSA=ON \ -DVIDEO_WAYLAND=ON \
-DSDL_VIDEO_WAYLAND=ON \ -DVIDEO_VULKAN=ON \
-DSDL_LIBDECOR_SHARED=ON \ -DSSE3=OFF \
-DSDL_VIDEO_VULKAN=ON \ -DRPATH=OFF \
-DSDL_SSE3=OFF \
-DSDL_RPATH=OFF \
-DSDL_STATIC=ON \ -DSDL_STATIC=ON \
-DSDL_STATIC_PIC=ON \
%ifarch ppc64le %ifarch ppc64le
-DSDL_ALTIVEC=OFF \ -DALTIVEC=OFF \
%endif %endif
%cmake_build %cmake_build
@ -137,80 +112,26 @@ export LDFLAGS="%{shrink:%{build_ldflags}}"
mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h
# Rename SDL_revision.h to SDL_revision-<arch>.h to avoid file conflicts on
# multilib systems and install SDL_revision.h wrapper
# TODO: Figure out how in the hell the SDL_REVISION changes between architectures on the same SRPM.
mv %{buildroot}%{_includedir}/SDL2/SDL_revision.h %{buildroot}%{_includedir}/SDL2/SDL_revision-%{_arch}.h
install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/SDL2/SDL_revision.h
%files %files
%license LICENSE.txt %license COPYING.txt
%doc BUGS.txt CREDITS.txt README-SDL.txt %doc BUGS.txt CREDITS.txt README-SDL.txt
%{_libdir}/libSDL2-2.0.so.0* %{_libdir}/libSDL2-2.0.so.0*
%files devel %files devel
%doc README.md TODO.txt WhatsNew.txt %doc README.txt TODO.txt WhatsNew.txt
%{_bindir}/*-config %{_bindir}/*-config
%{_libdir}/lib*.so %{_libdir}/lib*.so
%{_libdir}/libSDL2main.a
%{_libdir}/pkgconfig/sdl2.pc %{_libdir}/pkgconfig/sdl2.pc
%dir %{_libdir}/cmake/SDL2 %{_libdir}/cmake/SDL2/
%{_libdir}/cmake/SDL2/SDL2Config*.cmake
%{_libdir}/cmake/SDL2/SDL2Targets*.cmake
%{_libdir}/cmake/SDL2/SDL2mainTargets*.cmake
%{_includedir}/SDL2 %{_includedir}/SDL2
%{_datadir}/aclocal/* %{_datadir}/aclocal/*
%{_libdir}/libSDL2_test.a
%{_libdir}/cmake/SDL2/SDL2testTargets*.cmake
%files static %files static
%license LICENSE.txt %license COPYING.txt
%{_libdir}/libSDL2.a %{_libdir}/lib*.a
%{_libdir}/cmake/SDL2/SDL2staticTargets*.cmake
%changelog %changelog
* Mon Aug 21 2022 Neal Gompa <ngompa@centosproject.org> - 2.26.0-1
- Update to 2.26.0
Resolves: rhbz#2051959
- Drop backported patches included in this release
* Tue Feb 08 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.20-2
- Backport Wayland fixes with Wayland-by-default from upstream
Resolves: rhbz#2051963
* Tue Jan 11 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.20-1
- Update to 2.0.20
Resolves: rhbz#2039137
- Drop backported patches included in this release
* Fri Jan 07 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.18-2
- Move libSDL2main to -devel and refresh split CMake target patch
Resolves: rhbz#2038390
* Tue Jan 04 2022 Neal Gompa <ngompa@centosproject.org> - 2.0.18-1
- Update to 2.0.18
Resolves: rhbz#2028076
- Fix multilib conflict with SDL_revision.h (rhbz#2008838)
- Backport fix for building against wayland-1.20+
- Add patch to split SDL2 CMake targets for static libraries (rhbz#1965359)
* Wed Dec 01 2021 Neal Gompa <ngompa@centosproject.org> - 2.0.16-5
- Re-enable libdecor support now that it's available in RHEL 9
Resolves: rhbz#2003471
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-4
- Build with SDL_STATIC_PIC and SDL_STATIC to actually make the
static version of SDL2
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-3
- Build with SDL_STATIC_PIC instead of SDL_STATIC
* Thu Aug 26 2021 Wim Taymans <wtaymans@redhat.com> - 2.0.16-2
- Disable libdecor until it is added to centos/RHEL9
* Thu Aug 26 2021 Neal Gompa <ngompa@fedoraproject.org> - 2.0.16-1
- Update to 2.0.16
* Thu Aug 26 2021 Tom Callaway <spot@fedoraproject.org> - 2.0.14-7 * Thu Aug 26 2021 Tom Callaway <spot@fedoraproject.org> - 2.0.14-7
- add -static Requires to -devel to make CMake stop failing on missing files (bz1965359) - add -static Requires to -devel to make CMake stop failing on missing files (bz1965359)

View File

@ -1,83 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/*
* This SDL_revision.h is a wrapper include file for the original SDL_revision.h,
* which has been renamed to SDL_revision-<arch>.h. There are conflicts for the
* original SDL_revision.h on multilib systems, which result from REVISION
* inconsistency between architecture builds, though, I'm not sure why.
* Computers are weird.
*
* Copyright (C) 2021 Tom Callaway <spotrh@gmail.com>
*/
/**
* \file SDL_revision.h
*/
#ifdef SDL_revision_wrapper_h
#error "SDL_revision_wrapper_h should not be defined!"
#endif
#define SDL_revision_wrapper_h
#if defined(__i386__)
#include "SDL_revision-i386.h"
#elif defined(__ia64__)
#include "SDL_revision-ia64.h"
#elif defined(__powerpc64__)
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#include "SDL_revision-ppc64.h"
# else
#include "SDL_revision-ppc64le.h"
# endif
#elif defined(__powerpc__)
#include "SDL_revision-ppc.h"
#elif defined(__s390x__)
#include "SDL_revision-s390x.h"
#elif defined(__s390__)
#include "SDL_revision-s390.h"
#elif defined(__x86_64__)
#include "SDL_revision-x86_64.h"
#elif defined(__arm__)
#include "SDL_revision-arm.h"
#elif defined(__alpha__)
#include "SDL_revision-alpha.h"
#elif defined(__sparc__) && defined (__arch64__)
#include "SDL_revision-sparc64.h"
#elif defined(__sparc__)
#include "SDL_revision-sparc.h"
#elif defined(__aarch64__)
#include "SDL_revision-aarch64.h"
#elif defined(__mips64) && defined(__MIPSEL__)
#include "SDL_revision-mips64el.h"
#elif defined(__mips64)
#include "SDL_revision-mips64.h"
#elif defined(__mips) && defined(__MIPSEL__)
#include "SDL_revision-mipsel.h"
#elif defined(__mips)
#include "SDL_revision-mips.h"
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#include "SDL_revision-riscv64.h"
#else
#error "The SDL2-devel package is not usable with the architecture."
#endif
#undef SDL_revision_wrapper_h

View File

@ -1,16 +1,15 @@
diff --git a/sdl2-config.in b/sdl2-config.in diff -up SDL2-2.0.14/sdl2-config.in.orig SDL2-2.0.14/sdl2-config.in
index f6eca7668..93460f7ae 100644 --- SDL2-2.0.14/sdl2-config.in.orig 2020-12-21 17:44:36.000000000 +0000
--- a/sdl2-config.in +++ SDL2-2.0.14/sdl2-config.in 2021-01-21 16:26:35.663960042 +0000
+++ b/sdl2-config.in @@ -3,7 +3,6 @@
@@ -7,7 +7,6 @@ bindir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)") prefix=@prefix@
prefix=$(cd -P -- "$bindir/@bin_prefix_relpath@" && printf '%s\n' "$(pwd -P)")
exec_prefix=@exec_prefix@ exec_prefix=@exec_prefix@
exec_prefix_set=no exec_prefix_set=no
-libdir=@libdir@ -libdir=@libdir@
@ENABLE_STATIC_FALSE@usage="\ @ENABLE_STATIC_FALSE@usage="\
@ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" @ENABLE_STATIC_FALSE@Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
@@ -49,12 +48,11 @@ while test $# -gt 0; do @@ -45,11 +44,11 @@ while test $# -gt 0; do
echo -I@includedir@/SDL2 @SDL_CFLAGS@ echo -I@includedir@/SDL2 @SDL_CFLAGS@
;; ;;
@ENABLE_SHARED_TRUE@ --libs) @ENABLE_SHARED_TRUE@ --libs)
@ -19,8 +18,7 @@ index f6eca7668..93460f7ae 100644
@ENABLE_SHARED_TRUE@ ;; @ENABLE_SHARED_TRUE@ ;;
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
-@ENABLE_STATIC_TRUE@ sdl_static_libs=$(echo "@SDL_LIBS@ @SDL_STATIC_LIBS@" | sed -E "s#-lSDL2[ $]#$libdir/libSDL2.a #g") -@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_LIBS@ @SDL_STATIC_LIBS@
-@ENABLE_STATIC_TRUE@ echo -L@libdir@ $sdl_static_libs
+@ENABLE_STATIC_TRUE@ echo @SDL_LIBS@ @SDL_STATIC_LIBS@ +@ENABLE_STATIC_TRUE@ echo @SDL_LIBS@ @SDL_STATIC_LIBS@
@ENABLE_STATIC_TRUE@ ;; @ENABLE_STATIC_TRUE@ ;;
*) *)

View File

@ -1 +1 @@
SHA512 (SDL2-2.26.0.tar.gz) = b4379140399e2248b28c4fe36ba6bb142cd047014c3cfc6fd2c0fee7110ad28af6553f24ca4ccf4996165940de127aafe8d744b09bea9d5684ce8244697996bf SHA512 (SDL2-2.0.14.tar.gz) = ebc482585bd565bf3003fbcedd91058b2183e333b9ea566d2f386da0298ff970645d9d25c1aa4459c7c96e9ea839fd1c5f2da0242a56892865b2e456cdd027ee