2013-05-26 11:01:54 +02:00
|
|
|
#
|
|
|
|
# spec file for package SDL2
|
|
|
|
#
|
2020-01-12 23:54:27 +01:00
|
|
|
# Copyright (c) 2020 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
|
2020-03-11 11:32:16 +01:00
|
|
|
Version: 2.0.12
|
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/
|
2014-07-21 22:15:42 +02:00
|
|
|
|
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
|
2018-05-15 02:04:42 +02:00
|
|
|
Patch2: SDL2-endian.patch
|
2020-03-11 11:32:16 +01:00
|
|
|
Patch3: sdl2-khronos.patch
|
2016-01-13 13:59:01 +01:00
|
|
|
BuildRequires: cmake
|
2013-11-07 22:55:00 +01:00
|
|
|
BuildRequires: dos2unix
|
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
|
2014-05-26 15:28:38 +02:00
|
|
|
%if 0%{?suse_version} > 1220
|
2014-05-26 15:26:59 +02:00
|
|
|
BuildRequires: pkgconfig(tslib)
|
|
|
|
%endif
|
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)
|
2016-03-10 14:40:11 +01:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2018-03-17 11:14:44 +01:00
|
|
|
BuildRequires: pkgconfig(wayland-client)
|
|
|
|
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.
|
|
|
|
|
|
|
|
%package -n libSDL2-devel
|
|
|
|
Summary: SDL2 Library Developer Files
|
|
|
|
Group: Development/Libraries/X11
|
2014-12-18 11:07:37 +01:00
|
|
|
Requires: %lname = %version
|
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)
|
2014-12-18 11:07:37 +01:00
|
|
|
Provides: SDL2-devel = %version-%release
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%description -n libSDL2-devel
|
|
|
|
This package contains files needed for development with the SDL2
|
|
|
|
library.
|
|
|
|
|
|
|
|
%prep
|
2019-08-11 13:37:08 +02:00
|
|
|
%autosetup -p1
|
2013-11-07 22:55:00 +01:00
|
|
|
dos2unix WhatsNew.txt
|
|
|
|
dos2unix TODO.txt
|
|
|
|
dos2unix BUGS.txt
|
|
|
|
dos2unix README-SDL.txt
|
|
|
|
dos2unix README.txt
|
|
|
|
dos2unix CREDITS.txt
|
|
|
|
dos2unix COPYING.txt
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%build
|
2019-08-11 06:27:46 +02: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
|
2020-01-12 23:54:27 +01:00
|
|
|
--enable-sse3=no --disable-rpath --disable-3dnow \
|
|
|
|
CFLAGS="%optflags -fcommon"
|
2016-03-17 18:01:40 +01:00
|
|
|
make %{?_smp_mflags} V=1
|
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
|
2014-12-19 11:58:51 +01:00
|
|
|
# We do not want static libs, but using --disable-static leads to make aborting
|
2019-08-11 13:37:08 +02:00
|
|
|
# halfway through %%build. Now it can be removed though.
|
|
|
|
rm -f "%buildroot/%_libdir/"*.a
|
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
|
2018-11-05 00:49:11 +01:00
|
|
|
%license COPYING.txt
|
|
|
|
%doc BUGS.txt CREDITS.txt README.txt README-SDL.txt
|
2014-12-18 11:07:37 +01:00
|
|
|
%_libdir/libSDL2-2*.so.*
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%files -n libSDL2-devel
|
2013-06-24 20:12:02 +02:00
|
|
|
%doc TODO.txt 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/
|
2013-05-26 11:01:54 +02:00
|
|
|
|
|
|
|
%changelog
|