From 42563f7eac1634942b6715199fa2e40b731ab16e Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 4 Jun 2025 08:48:29 +0800 Subject: [PATCH] init package --- .gitattributes | 1 + .lfsconfig | 2 + SDL3-3.2.16.tar.gz | 3 ++ SDL3.spec | 127 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 .gitattributes create mode 100644 .lfsconfig create mode 100644 SDL3-3.2.16.tar.gz create mode 100644 SDL3.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0a80fdc --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000..79142ad --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/SDL3 diff --git a/SDL3-3.2.16.tar.gz b/SDL3-3.2.16.tar.gz new file mode 100644 index 0000000..412acce --- /dev/null +++ b/SDL3-3.2.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8 +size 15892772 diff --git a/SDL3.spec b/SDL3.spec new file mode 100644 index 0000000..816cb7f --- /dev/null +++ b/SDL3.spec @@ -0,0 +1,127 @@ +Name: SDL3 +Version: 3.2.16 +Release: 1 +Summary: Cross-platform multimedia library +License: Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT) +URL: https://www.libsdl.org/ +Source0: https://www.libsdl.org/release/%{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: alsa-lib-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGLU-devel +BuildRequires: mesa-libEGL-devel +BuildRequires: mesa-libGLES-devel +BuildRequires: libXext-devel +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +# While SDL3 supports this, Xwayland does not expose XScrnSaver. +# BuildRequires: libXScrnSaver-devel +BuildRequires: libXinerama-devel +BuildRequires: libXcursor-devel +BuildRequires: systemd-devel +# For building man pages +BuildRequires: perl-interpreter +BuildRequires: pkgconfig(libusb-1.0) +# PulseAudio +BuildRequires: pkgconfig(libpulse-simple) +# Jack +BuildRequires: pkgconfig(jack) +# PipeWire +BuildRequires: pkgconfig(libpipewire-0.3) +# D-Bus +BuildRequires: pkgconfig(dbus-1) +# IBus +BuildRequires: pkgconfig(ibus-1.0) +# Wayland +BuildRequires: pkgconfig(libdecor-0) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-cursor) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: pkgconfig(wayland-scanner) +BuildRequires: pkgconfig(xkbcommon) +# Vulkan +BuildRequires: vulkan-devel +# KMS +BuildRequires: mesa-libgbm-devel +BuildRequires: libdrm-devel + +# Long ago forked hidraw customized for SDL +Provides: bundled(hidraw) + +%description +Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed +to provide fast access to the graphics frame buffer and audio device. + +%package devel +Summary: Files needed to develop Simple DirectMedia Layer applications +Requires: %{name}%{?_isa} = %{version}-%{release} +# Add deps required to compile SDL apps +## For SDL_opengl.h +Requires: pkgconfig(gl) +Requires: pkgconfig(glu) +## For SDL_syswm.h +Requires: pkgconfig(x11) +Requires: pkgconfig(xproto) + +%description devel +Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed +to provide fast access to the graphics frame buffer and audio device. This +package provides the libraries, include files, and other resources needed for +developing SDL applications. + +%package test +Summary: Testing libraries for SDL3 +# Needed to keep CMake happy +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description test +Testing libraries for SDL3. + +%prep +%autosetup +sed -e 's/\r//g' -i README.md WhatsNew.txt BUGS.txt LICENSE.txt CREDITS.md + +%build +%cmake \ + -DSDL_INSTALL_DOCS=ON \ + -DSDL_RPATH=OFF \ + -DSDL_DEPS_SHARED:BOOL=OFF +%cmake_build + +%install +%cmake_install + +%files +%license LICENSE.txt +%doc BUGS.txt CREDITS.md README.md +%{_libdir}/libSDL3.so.0 +%{_libdir}/libSDL3.so.0.* + +%files devel +%doc README.md WhatsNew.txt +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/sdl3.pc +%dir %{_libdir}/cmake/SDL3 +%{_libdir}/cmake/SDL3/FindLibUSB.cmake +%{_libdir}/cmake/SDL3/PkgConfigHelper.cmake +%{_libdir}/cmake/SDL3/SDL3Config*.cmake +%{_libdir}/cmake/SDL3/SDL3headersTargets*.cmake +%{_libdir}/cmake/SDL3/SDL3sharedTargets*.cmake +%{_includedir}/SDL3 +%{_mandir}/man3/SDL*.3* + +%files test +%license LICENSE.txt +%{_libdir}/libSDL3_test.a +%{_libdir}/cmake/SDL3/SDL3testTargets*.cmake + +%changelog +* Wed Jun 04 2025 Funda Wang - 3.2.16-1 +- init package -- Gitee