From 15bef7a4678dcd39a6b98dbaec91f93186217c9c935cda34abb25a9b9ace609b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 29 Mar 2022 16:09:19 +0000 Subject: [PATCH 1/5] Update description OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=117 --- sdl2-symvers.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdl2-symvers.patch b/sdl2-symvers.patch index b02cd89..73514d3 100644 --- a/sdl2-symvers.patch +++ b/sdl2-symvers.patch @@ -1,8 +1,16 @@ From: Jan Engelhardt Date: 2018-01-10 23:56:12.245827883 +0100 +Should-this-be-upstream: yes +Is-it-upstream: not submitted yet + +The SDL project adds new functions over time, but they completely +fail to do the required ABI upkeep - which involves either bumping +the SO number or adding symvers. As a result of their lack of ABI +upkeep, the ELF system has no way to prohibit a too-modern program +being ran against a too-old SDL library, and that leads to bad user +experience, because symbols are resolved lazily and can crash the +program in the middle. -Scrape the SDL announcements since 2.0.3 (version in Leap 42.3) and add -some symvers so that zypper knows when to upgrade SDL. --- Makefile.in | 2 sdl2.sym | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ From e3da433e8d19b396c3099bd5732bb31fdbe02d2f89f8ae652623352aff76df45 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 2 Apr 2022 08:36:00 +0000 Subject: [PATCH 2/5] - Rename devel package to just %name-devel, which is what most openSUSE packages use. OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=118 --- SDL2.changes | 6 ++++++ SDL2.spec | 9 +++++---- baselibs.conf | 5 +++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/SDL2.changes b/SDL2.changes index f061074..760a4cb 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 30 18:46:17 UTC 2022 - Jan Engelhardt + +- Rename devel package to just %name-devel, which is what most + openSUSE packages use. + ------------------------------------------------------------------- Sun Jan 16 12:27:09 UTC 2022 - Carsten Ziepke diff --git a/SDL2.spec b/SDL2.spec index 55b00aa..03715c2 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -87,7 +87,7 @@ This is the "Simple DirectMedia Layer" library. It provides a generic API for access to audio, keyboard, mouse, and display framebuffer across multiple platforms. -%package -n libSDL2-devel +%package devel Summary: SDL2 Library Developer Files Group: Development/Libraries/X11 Requires: %lname = %version @@ -99,9 +99,10 @@ Requires: pkgconfig(glesv2) Requires: pkgconfig(glu) Requires: pkgconfig(x11) Requires: pkgconfig(xproto) -Provides: SDL2-devel = %version-%release +Provides: libSDL2-devel = %version-%release +Obsoletes: libSDL2-devel < %version-%release -%description -n libSDL2-devel +%description devel This package contains files needed for development with the SDL2 library. @@ -141,7 +142,7 @@ rm -fv "%buildroot/%_libdir/libSDL2.a" "%buildroot/%_libdir/libSDL2_test.a" %doc README.md README-SDL.txt %_libdir/libSDL2-2*.so.* -%files -n libSDL2-devel +%files devel %doc WhatsNew.txt %_bindir/sdl2-config %_libdir/libSDL2.so diff --git a/baselibs.conf b/baselibs.conf index d1dd351..bfd5be2 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,6 +1,7 @@ libSDL2-2_0-0 provides "SDL2- = " -libSDL2-devel - provides "SDL2-devel- = " +SDL2-devel + provides "libSDL2-devel- = " + obsoletes "libSDL2-devel- < " requires -libSDL2- requires "libSDL2-2_0-0- = " From aa1945cf472f37404150b9d5b9bf05aa0d7d78522b2f2994e896936086a0844f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 2 Apr 2022 08:42:42 +0000 Subject: [PATCH 3/5] Defer r118 change until another time OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=119 --- SDL2.changes | 6 ------ SDL2.spec | 9 ++++----- baselibs.conf | 5 ++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/SDL2.changes b/SDL2.changes index 760a4cb..f061074 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Wed Mar 30 18:46:17 UTC 2022 - Jan Engelhardt - -- Rename devel package to just %name-devel, which is what most - openSUSE packages use. - ------------------------------------------------------------------- Sun Jan 16 12:27:09 UTC 2022 - Carsten Ziepke diff --git a/SDL2.spec b/SDL2.spec index 03715c2..55b00aa 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -87,7 +87,7 @@ This is the "Simple DirectMedia Layer" library. It provides a generic API for access to audio, keyboard, mouse, and display framebuffer across multiple platforms. -%package devel +%package -n libSDL2-devel Summary: SDL2 Library Developer Files Group: Development/Libraries/X11 Requires: %lname = %version @@ -99,10 +99,9 @@ Requires: pkgconfig(glesv2) Requires: pkgconfig(glu) Requires: pkgconfig(x11) Requires: pkgconfig(xproto) -Provides: libSDL2-devel = %version-%release -Obsoletes: libSDL2-devel < %version-%release +Provides: SDL2-devel = %version-%release -%description devel +%description -n libSDL2-devel This package contains files needed for development with the SDL2 library. @@ -142,7 +141,7 @@ rm -fv "%buildroot/%_libdir/libSDL2.a" "%buildroot/%_libdir/libSDL2_test.a" %doc README.md README-SDL.txt %_libdir/libSDL2-2*.so.* -%files devel +%files -n libSDL2-devel %doc WhatsNew.txt %_bindir/sdl2-config %_libdir/libSDL2.so diff --git a/baselibs.conf b/baselibs.conf index bfd5be2..d1dd351 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,7 +1,6 @@ libSDL2-2_0-0 provides "SDL2- = " -SDL2-devel - provides "libSDL2-devel- = " - obsoletes "libSDL2-devel- < " +libSDL2-devel + provides "SDL2-devel- = " requires -libSDL2- requires "libSDL2-2_0-0- = " From 9b2aa434fee9032017e3e48e39fb16d294ae05a601f787da6e3b0f5c811e166f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 25 Apr 2022 21:59:40 +0000 Subject: [PATCH 4/5] - Update to release 2.0.22 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=120 --- SDL2-2.0.20.tar.gz | 3 - SDL2-2.0.20.tar.gz.sig | Bin 95 -> 0 bytes SDL2-2.0.22.tar.gz | 3 + SDL2-2.0.22.tar.gz.sig | Bin 0 -> 95 bytes SDL2.changes | 37 +++++++++ SDL2.spec | 4 +- sdl2-symvers.patch | 170 +++++++---------------------------------- 7 files changed, 69 insertions(+), 148 deletions(-) delete mode 100644 SDL2-2.0.20.tar.gz delete mode 100644 SDL2-2.0.20.tar.gz.sig create mode 100644 SDL2-2.0.22.tar.gz create mode 100644 SDL2-2.0.22.tar.gz.sig diff --git a/SDL2-2.0.20.tar.gz b/SDL2-2.0.20.tar.gz deleted file mode 100644 index c3b0817..0000000 --- a/SDL2-2.0.20.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06 -size 7207221 diff --git a/SDL2-2.0.20.tar.gz.sig b/SDL2-2.0.20.tar.gz.sig deleted file mode 100644 index 76aeb20a6bf55c3c9c3eab8cc2524b0816f83e8c933b56581d566fbd425907b3..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeB(WnmCxVvrS6WD(U!j%^5DT3>$gL7TzS$>qz-te>$mCEi&)mw}5@048#0Im0|d v<2R8tN9Gr9S1er-a^50A%>5k;!-9kVH{D%e!P@fff!*F~7ExdQ-2zkr%1J13 diff --git a/SDL2-2.0.22.tar.gz b/SDL2-2.0.22.tar.gz new file mode 100644 index 0000000..8f0b974 --- /dev/null +++ b/SDL2-2.0.22.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe7cbf3127882e3fc7259a75a0cb585620272c51745d3852ab9dd87960697f2e +size 7250633 diff --git a/SDL2-2.0.22.tar.gz.sig b/SDL2-2.0.22.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..322ab64224d5c646d9a37fe3ef0b4f8c54747e83121b8ca18349f46949edf00f GIT binary patch literal 95 zcmeB(WnmCxVvrS6WD(U!j%^5DT3>$gL7TzS$>qz-te>$mC8a&hVBq2ufQjs$#IWG_ vX1CjytIP6kv2KxTj+M=tTN3`5VL^|Ym$jFD-nuBwb)N2J9gVv>iWdL?pTQ=c literal 0 HcmV?d00001 diff --git a/SDL2.changes b/SDL2.changes index f061074..cb0be1f 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Mon Apr 25 21:54:48 UTC 2022 - Jan Engelhardt + +- Update to release 2.0.22 + * Added SDL_RenderGetWindow() to get the window associated with a renderer + * Added floating point rectangle functions: SDL_PointInFRect(), + SDL_FRectEmpty(), SDL_FRectEquals(), SDL_FRectEqualsEpsilon(), + SDL_HasIntersectionF(), SDL_IntersectFRect(), SDL_UnionFRect(), + SDL_EncloseFPoints(), SDL_IntersectFRectAndLine(). + * Added SDL_IsTextInputShown() which returns whether the IME + window is currently shown. + * Added SDL_ClearComposition() to dismiss the composition + window without disabling IME input. + * Added SDL_TEXTEDITING_EXT event for handling long composition + text, and a hint SDL_HINT_IME_SUPPORT_EXTENDED_TEXT to enable + it. + * Added the hint SDL_HINT_MOUSE_RELATIVE_MODE_CENTER to control + whether the mouse should be constrained to the whole window + or the center of the window when relative mode is enabled. + * The mouse is now automatically captured when mouse buttons + are pressed, and the hint SDL_HINT_MOUSE_AUTO_CAPTURE allows + you to control this behavior. + * Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL to let + SDL know that a foreign window will be used with OpenGL. + * Added the hint SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN to let + SDL know that a foreign window will be used with Vulkan. + * Added the hint SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE to specify + whether an SDL_QUIT event will be delivered when the last + application window is closed. + * Added the hint SDL_HINT_JOYSTICK_ROG_CHAKRAM to control + whether ROG Chakram mice show up as joysticks. + * Added the hint SDL_HINT_X11_WINDOW_TYPE to specify the + _NET_WM_WINDOW_TYPE of SDL windows. + * Added the hint SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR to + allow using libdecor with compositors that support + xdg-decoration. + ------------------------------------------------------------------- Sun Jan 16 12:27:09 UTC 2022 - Carsten Ziepke diff --git a/SDL2.spec b/SDL2.spec index 55b00aa..def37ec 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -19,7 +19,7 @@ %define sle_version 0 Name: SDL2 %define lname libSDL2-2_0-0 -Version: 2.0.20 +Version: 2.0.22 Release: 0 Summary: Simple DirectMedia Layer Library License: Zlib @@ -57,7 +57,7 @@ BuildRequires: pkgconfig(libpulse-simple) >= 0.9 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(tslib) BuildRequires: pkgconfig(udev) -BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-client) >= 1.18 BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) diff --git a/sdl2-symvers.patch b/sdl2-symvers.patch index 73514d3..49e2a83 100644 --- a/sdl2-symvers.patch +++ b/sdl2-symvers.patch @@ -3,24 +3,21 @@ Date: 2018-01-10 23:56:12.245827883 +0100 Should-this-be-upstream: yes Is-it-upstream: not submitted yet -The SDL project adds new functions over time, but they completely -fail to do the required ABI upkeep - which involves either bumping -the SO number or adding symvers. As a result of their lack of ABI -upkeep, the ELF system has no way to prohibit a too-modern program -being ran against a too-old SDL library, and that leads to bad user -experience, because symbols are resolved lazily and can crash the -program in the middle. +Functions were added over time, but neither was the SONAME changed +nor was a symvers file made. As a result, rpm is unable to +prevent a too-modern program being ran against a too-old SDL library. +It's bad user experience when symbols are resolved lazily, as the +program may crash. --- - Makefile.in | 2 - sdl2.sym | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 125 insertions(+), 1 deletion(-) + Makefile.in | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) -Index: SDL2-2.0.16/Makefile.in +Index: SDL2-2.0.22/Makefile.in =================================================================== ---- SDL2-2.0.16.orig/Makefile.in -+++ SDL2-2.0.16/Makefile.in -@@ -132,7 +132,7 @@ LT_AGE = @LT_AGE@ +--- SDL2-2.0.22.orig/Makefile.in ++++ SDL2-2.0.22/Makefile.in +@@ -134,7 +134,7 @@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ @@ -29,132 +26,19 @@ Index: SDL2-2.0.16/Makefile.in all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) -Index: SDL2-2.0.16/sdl2.sym -=================================================================== ---- /dev/null -+++ SDL2-2.0.16/sdl2.sym -@@ -0,0 +1,124 @@ -+SUSE_2.0.5 { -+global: -+ SDL_DequeueAudio; -+ SDL_GetHintBoolean; -+ SDL_RenderSetIntegerScale; -+ SDL_CreateRGBSurfaceWithFormat; -+ SDL_CreateRGBSurfaceWithFormatFrom; -+ SDL_GetDisplayUsableBounds; -+ SDL_GetWindowBordersSize; -+ SDL_SetWindowResizable; -+ SDL_SetWindowOpacity; -+ SDL_SetWindowModalFor; -+}; -+SUSE_2.0.6 { -+global: -+ SDL_Vulkan_LoadLibrary; -+ SDL_Vulkan_GetVkGetInstanceProcAddr; -+ SDL_Vulkan_GetInstanceExtensions; -+ SDL_Vulkan_CreateSurface; -+ SDL_Vulkan_GetDrawableSize; -+ SDL_Vulkan_UnloadLibrary; -+ SDL_ComposeCustomBlendMode; -+ SDL_HasNEON; -+ SDL_JoystickGetDeviceVendor; -+ SDL_JoystickGetDeviceProduct; -+ SDL_JoystickGetDeviceProductVersion; -+ SDL_JoystickGetDeviceType; -+ SDL_JoystickGetDeviceInstanceID; -+ SDL_JoystickGetVendor; -+ SDL_JoystickGetProduct; -+ SDL_JoystickGetProductVersion; -+ SDL_JoystickGetType; -+ SDL_JoystickGetAxisInitialState; -+ SDL_GameControllerGetVendor; -+ SDL_GameControllerGetProduct; -+ SDL_GameControllerGetProductVersion; -+ SDL_GameControllerNumMappings; -+ SDL_GameControllerMappingForIndex; -+ SDL_LoadFile; -+ SDL_LoadFile_RW; -+ SDL_DuplicateSurface; -+} SUSE_2.0.5; -+SUSE_2.0.7 { -+global: -+ SDL_NewAudioStream; -+ SDL_AudioStreamPut; -+ SDL_AudioStreamGet; -+ SDL_AudioStreamAvailable; -+ SDL_AudioStreamFlush; -+ SDL_AudioStreamClear; -+ SDL_FreeAudioStream; -+ SDL_GetMemoryFunctions; -+ SDL_SetMemoryFunctions; -+ SDL_GetNumAllocations; -+ SDL_LockJoystick; -+ SDL_UnlockJoystick; -+ SDL_SetEventFilter; -+ SDL_GetEventFilter; -+ SDL_AddEventWatch; -+ SDL_DelEventWatch; -+} SUSE_2.0.6; -+SUSE_2.0.8 { -+global: -+ SDL_fmod; -+ SDL_log10; -+ SDL_SetYUVConversionMode; -+ SDL_GetYUVConversionMode; -+} SUSE_2.0.7; -+SUSE_2.0.9 { -+global: -+ SDL_CreateThreadWithStackSize; -+ SDL_GameControllerGetPlayerIndex; -+ SDL_GameControllerMappingForDeviceIndex; -+ SDL_GameControllerRumble; -+ SDL_GetDisplayOrientation; -+ SDL_HasAVX512F; -+ SDL_HasColorKey; -+ SDL_IsTablet; -+ SDL_JoystickGetDevicePlayerIndex; -+ SDL_JoystickGetPlayerIndex; -+ SDL_JoystickRumble; -+ SDL_LinuxSetThreadPriority; -+ SDL_NumSensors; -+ SDL_SensorClose; -+ SDL_SensorFromInstanceID; -+ SDL_SensorGetData; -+ SDL_SensorGetDeviceInstanceID; -+ SDL_SensorGetDeviceName; -+ SDL_SensorGetDeviceNonPortableType; -+ SDL_SensorGetDeviceType; -+ SDL_SensorGetInstanceID; -+ SDL_SensorGetName; -+ SDL_SensorGetNonPortableType; -+ SDL_SensorGetType; -+ SDL_SensorOpen; -+ SDL_SensorUpdate; -+ SDL_exp; -+ SDL_expf; -+ SDL_wcsdup; -+} SUSE_2.0.8; -+SUSE_2.0.10 { -+global: -+ SDL_GetTouchDeviceType; -+ SDL_RWclose; -+ SDL_RWread; -+ SDL_RWseek; -+ SDL_RWsize; -+ SDL_RWtell; -+ SDL_RWwrite; -+ SDL_RenderCopyExF; -+ SDL_RenderCopyF; -+ SDL_RenderDrawLineF; -+ SDL_RenderDrawLinesF; -+ SDL_RenderDrawPointF; -+ SDL_RenderDrawPointsF; -+ SDL_RenderDrawRectF; -+ SDL_RenderDrawRectsF; -+ SDL_RenderFillRectF; -+ SDL_RenderFillRectsF; -+ SDL_RenderFlush; -+ SDL_SIMDAlloc; -+ SDL_SIMDFree; -+ SDL_SIMDGetAlignment; -+} SUSE_2.0.9; +@@ -155,7 +155,7 @@ update-revision: + + .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) + +-$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) ++$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) sdl2.sym + $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) +@@ -257,3 +257,6 @@ dist $(distfile): + + rpm: $(distfile) + rpmbuild -ta $? ++ ++sdl2.sym: ++ echo 'V_${PACKAGE_VERSION} { global: *; };' >$@ From 665f022c687e0e6dac607696bf913e085001ad6cf867fe4147ae5ebb94e5f501 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 25 Apr 2022 22:06:19 +0000 Subject: [PATCH 5/5] adjust sdl2-symvers.patch:: PACKAGE_VERSION won't work without automake OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=121 --- SDL2.spec | 1 + sdl2-symvers.patch | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/SDL2.spec b/SDL2.spec index def37ec..47e29a2 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -108,6 +108,7 @@ library. %prep %autosetup -p1 perl -i -pe 's{\r\n}{\n}g' *.txt README.md +echo 'V_%version { global: *; };' >sdl2.sym %build %global _lto_cflags %_lto_cflags -ffat-lto-objects diff --git a/sdl2-symvers.patch b/sdl2-symvers.patch index 49e2a83..7d76860 100644 --- a/sdl2-symvers.patch +++ b/sdl2-symvers.patch @@ -26,19 +26,3 @@ Index: SDL2-2.0.22/Makefile.in all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) -@@ -155,7 +155,7 @@ update-revision: - - .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) - --$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) -+$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) sdl2.sym - $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=$(LIBTOOLLINKERTAG) --mode=link $(LINKER) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) - - $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) -@@ -257,3 +257,6 @@ dist $(distfile): - - rpm: $(distfile) - rpmbuild -ta $? -+ -+sdl2.sym: -+ echo 'V_${PACKAGE_VERSION} { global: *; };' >$@