2013-05-26 11:01:54 +02:00
|
|
|
#
|
|
|
|
# spec file for package SDL2
|
|
|
|
#
|
2022-01-11 20:48:57 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2013-05-26 11:01:54 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-05 00:49:11 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-05-26 11:01:54 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-08-23 13:20:16 +02:00
|
|
|
%define sle_version 0
|
2013-05-26 11:01:54 +02:00
|
|
|
Name: SDL2
|
2014-03-13 21:34:09 +01:00
|
|
|
%define lname libSDL2-2_0-0
|
2022-10-05 05:56:56 +02:00
|
|
|
Version: 2.24.1
|
2013-08-14 08:45:20 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Simple DirectMedia Layer Library
|
|
|
|
License: Zlib
|
|
|
|
Group: Development/Libraries/X11
|
2018-11-05 00:49:11 +01:00
|
|
|
URL: http://libsdl.org/
|
2021-12-17 11:46:44 +01:00
|
|
|
#Git-Clone: https://github.com/libsdl-org/SDL
|
2014-03-13 21:34:09 +01:00
|
|
|
#DL-URL: http://libsdl.org/download-2.0.php
|
2013-08-14 08:45:20 +02:00
|
|
|
Source: http://libsdl.org/release/%name-%version.tar.gz
|
|
|
|
Source2: http://libsdl.org/release/%name-%version.tar.gz.sig
|
|
|
|
Source3: %name.keyring
|
|
|
|
Source4: baselibs.conf
|
2018-01-11 00:21:40 +01:00
|
|
|
Patch1: sdl2-symvers.patch
|
2021-12-17 11:46:44 +01:00
|
|
|
Patch2: sdl2-khronos.patch
|
2016-01-13 13:59:01 +01:00
|
|
|
BuildRequires: cmake
|
2014-07-21 22:15:42 +02:00
|
|
|
BuildRequires: gcc-c++
|
2013-05-26 11:01:54 +02:00
|
|
|
BuildRequires: nasm
|
2015-01-08 10:05:38 +01:00
|
|
|
BuildRequires: pkg-config
|
2014-12-19 11:58:51 +01:00
|
|
|
BuildRequires: pkgconfig(alsa) >= 0.9.0
|
2014-05-26 15:26:59 +02:00
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
2017-08-01 16:01:48 +02:00
|
|
|
%if !0%{?sle_version}
|
2017-02-15 16:23:59 +01:00
|
|
|
BuildRequires: pkgconfig(fcitx)
|
2017-08-01 16:01:48 +02:00
|
|
|
%endif
|
2017-10-02 12:30:55 +02:00
|
|
|
BuildRequires: pkgconfig(egl)
|
2014-07-21 22:15:42 +02:00
|
|
|
BuildRequires: pkgconfig(gl)
|
2017-10-02 12:30:55 +02:00
|
|
|
BuildRequires: pkgconfig(glesv1_cm)
|
|
|
|
BuildRequires: pkgconfig(glesv2)
|
2013-05-26 11:01:54 +02:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(glu)
|
2016-01-13 13:59:01 +01:00
|
|
|
BuildRequires: pkgconfig(ibus-1.0)
|
2014-05-26 09:36:24 +02:00
|
|
|
BuildRequires: pkgconfig(ice)
|
2017-10-02 12:29:44 +02:00
|
|
|
# KMS/DRM driver needs libdrm and libgbm
|
2017-10-02 12:33:57 +02:00
|
|
|
BuildRequires: pkgconfig(gbm) >= 9.0.0
|
2017-10-02 12:30:24 +02:00
|
|
|
BuildRequires: pkgconfig(libdrm) >= 2.4.46
|
2013-08-14 08:45:20 +02:00
|
|
|
BuildRequires: pkgconfig(libpulse-simple) >= 0.9
|
2016-03-10 14:03:38 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
2021-11-30 18:49:35 +01:00
|
|
|
BuildRequires: pkgconfig(tslib)
|
2016-03-10 14:40:11 +01:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2022-04-25 23:59:40 +02:00
|
|
|
BuildRequires: pkgconfig(wayland-client) >= 1.18
|
2018-03-17 11:14:44 +01:00
|
|
|
BuildRequires: pkgconfig(wayland-cursor)
|
|
|
|
BuildRequires: pkgconfig(wayland-egl)
|
|
|
|
BuildRequires: pkgconfig(wayland-protocols)
|
|
|
|
BuildRequires: pkgconfig(wayland-scanner)
|
2017-10-02 12:30:55 +02:00
|
|
|
BuildRequires: pkgconfig(x11)
|
|
|
|
BuildRequires: pkgconfig(xcursor)
|
2014-07-21 22:15:42 +02:00
|
|
|
BuildRequires: pkgconfig(xext)
|
|
|
|
BuildRequires: pkgconfig(xi)
|
2017-10-02 12:30:55 +02:00
|
|
|
BuildRequires: pkgconfig(xinerama)
|
2018-03-17 11:14:44 +01:00
|
|
|
BuildRequires: pkgconfig(xkbcommon)
|
2017-10-02 12:30:55 +02:00
|
|
|
BuildRequires: pkgconfig(xrandr)
|
|
|
|
BuildRequires: pkgconfig(xscrnsaver)
|
|
|
|
BuildRequires: pkgconfig(xxf86vm)
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
This is the "Simple DirectMedia Layer" library. It provides a generic
|
|
|
|
API for access to audio, keyboard, mouse, and display framebuffer
|
|
|
|
across multiple platforms.
|
|
|
|
|
2013-08-14 08:45:20 +02:00
|
|
|
%package -n %lname
|
2013-05-26 11:01:54 +02:00
|
|
|
Summary: Simple DirectMedia Layer Library
|
|
|
|
Group: System/Libraries
|
2014-12-18 11:07:37 +01:00
|
|
|
Provides: SDL2 = %version-%release
|
2013-05-26 11:01:54 +02:00
|
|
|
|
2013-08-14 08:45:20 +02:00
|
|
|
%description -n %lname
|
2013-05-26 11:01:54 +02:00
|
|
|
This is the "Simple DirectMedia Layer" library. It provides a generic
|
|
|
|
API for access to audio, keyboard, mouse, and display framebuffer
|
|
|
|
across multiple platforms.
|
|
|
|
|
2022-07-05 11:16:55 +02:00
|
|
|
SDL2 uses dlopen, so if you experience problems under X11, check
|
|
|
|
again that libXrandr2 and libXi6 are in fact installed.
|
|
|
|
|
2022-08-19 20:02:27 +02:00
|
|
|
%package devel
|
2013-05-26 11:01:54 +02:00
|
|
|
Summary: SDL2 Library Developer Files
|
|
|
|
Group: Development/Libraries/X11
|
2022-08-19 19:59:37 +02:00
|
|
|
Requires: %lname = %version-%release
|
2013-08-14 08:45:20 +02:00
|
|
|
Requires: c_compiler
|
2013-05-26 11:01:54 +02:00
|
|
|
Requires: pkgconfig
|
2013-08-14 08:45:20 +02:00
|
|
|
Requires: pkgconfig(gl)
|
|
|
|
Requires: pkgconfig(glesv1_cm)
|
|
|
|
Requires: pkgconfig(glesv2)
|
2013-05-26 11:01:54 +02:00
|
|
|
Requires: pkgconfig(glu)
|
2013-08-14 08:45:20 +02:00
|
|
|
Requires: pkgconfig(x11)
|
|
|
|
Requires: pkgconfig(xproto)
|
2022-08-19 20:02:27 +02:00
|
|
|
Obsoletes: libSDL2-devel < %version-%release
|
|
|
|
Provides: libSDL2-devel = %version-%release
|
2013-05-26 11:01:54 +02:00
|
|
|
|
2022-08-19 20:02:27 +02:00
|
|
|
%description devel
|
2013-05-26 11:01:54 +02:00
|
|
|
This package contains files needed for development with the SDL2
|
|
|
|
library.
|
|
|
|
|
|
|
|
%prep
|
2019-08-11 13:37:08 +02:00
|
|
|
%autosetup -p1
|
2022-01-16 16:56:40 +01:00
|
|
|
perl -i -pe 's{\r\n}{\n}g' *.txt README.md
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%build
|
2022-01-11 20:48:57 +01:00
|
|
|
%global _lto_cflags %_lto_cflags -ffat-lto-objects
|
2015-01-08 14:38:01 +01:00
|
|
|
# In this instance, we do want --with-pic because of libSDL2main.a.
|
2017-10-02 21:15:42 +02:00
|
|
|
%configure --with-pic --disable-alsa-shared --disable-video-directfb \
|
2018-03-17 11:14:44 +01:00
|
|
|
--enable-video-kmsdrm --enable-video-wayland \
|
2017-08-01 16:01:48 +02:00
|
|
|
%if 0%{?sle_version}
|
2017-10-02 21:15:42 +02:00
|
|
|
--disable-fcitx \
|
2017-08-01 16:01:48 +02:00
|
|
|
%endif
|
2017-10-16 20:30:42 +02:00
|
|
|
%ifarch ix86
|
|
|
|
--enable-sse2=no \
|
|
|
|
%endif
|
2022-07-05 11:16:55 +02:00
|
|
|
--enable-sse3=no --disable-rpath --disable-3dnow
|
2021-08-11 13:01:11 +02:00
|
|
|
%make_build
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%install
|
2019-08-11 13:37:08 +02:00
|
|
|
%make_install
|
2014-12-18 11:07:37 +01:00
|
|
|
rm -f "%buildroot/%_libdir"/*.la
|
2022-08-20 10:03:58 +02:00
|
|
|
rm -fv "%buildroot/%_libdir/libSDL2.a"
|
2020-04-16 10:33:02 +02:00
|
|
|
# Need to keep libSDL2main.a (empty lib), because it is referenced by
|
|
|
|
# sdl2-config.cmake, and it seems like that .cmake file cannot be edited to
|
|
|
|
# make SDL2::SDL2main a phony target with no file (just leads to more Makefile
|
|
|
|
# errors down the road).
|
2013-05-26 11:01:54 +02:00
|
|
|
|
2014-12-18 11:07:37 +01:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
2013-08-14 08:45:20 +02:00
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
2013-05-26 11:01:54 +02:00
|
|
|
|
2013-08-14 08:45:20 +02:00
|
|
|
%files -n %lname
|
2021-08-11 13:01:11 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.md README-SDL.txt
|
2014-12-18 11:07:37 +01:00
|
|
|
%_libdir/libSDL2-2*.so.*
|
2013-05-26 11:01:54 +02:00
|
|
|
|
2022-08-19 20:02:27 +02:00
|
|
|
%files devel
|
2021-08-11 13:01:11 +02:00
|
|
|
%doc WhatsNew.txt
|
2014-12-18 11:07:37 +01:00
|
|
|
%_bindir/sdl2-config
|
|
|
|
%_libdir/libSDL2.so
|
|
|
|
%_includedir/SDL2/
|
|
|
|
%_datadir/aclocal/sdl2.m4
|
|
|
|
%_libdir/pkgconfig/sdl2.pc
|
2016-01-13 13:59:01 +01:00
|
|
|
%_libdir/cmake/SDL2/
|
2020-04-16 10:33:02 +02:00
|
|
|
%_libdir/libSDL2main.a
|
2022-08-20 10:03:58 +02:00
|
|
|
%_libdir/libSDL2_test.a
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%changelog
|