SHA256
1
0
forked from pool/SDL2
SDL2/SDL2.spec

161 lines
4.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package SDL2
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: SDL2
%define lname libSDL2-2_0-0
Accepting request 530173 from home:SpartanJ:branches:games - Update to 2.0.6: General: * Added cross-platform Vulkan graphics support in SDL_vulkan.h SDL_Vulkan_LoadLibrary() SDL_Vulkan_GetVkGetInstanceProcAddr() SDL_Vulkan_GetInstanceExtensions() SDL_Vulkan_CreateSurface() SDL_Vulkan_GetDrawableSize() SDL_Vulkan_UnloadLibrary() This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c * Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering * Added SDL_HasNEON() which returns whether the CPU has NEON instruction support * Added support for many game controllers, including the Nintendo Switch Pro Controller * Added support for inverted axes and separate axis directions in game controller mappings * Added functions to return information about a joystick before it's opened: SDL_JoystickGetDeviceVendor() SDL_JoystickGetDeviceProduct() SDL_JoystickGetDeviceProductVersion() SDL_JoystickGetDeviceType() SDL_JoystickGetDeviceInstanceID() * Added functions to return information about an open joystick: SDL_JoystickGetVendor() SDL_JoystickGetProduct() SDL_JoystickGetProductVersion() SDL_JoystickGetType() SDL_JoystickGetAxisInitialState() * Added functions to return information about an open game controller: SDL_GameControllerGetVendor() SDL_GameControllerGetProduct() SDL_GameControllerGetProductVersion() * Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings * Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory * Added SDL_DuplicateSurface() to make a copy of a surface * Added an experimental JACK audio driver * Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling * Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling * Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize(): "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen (the default) "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen * Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input * Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events Windows: * The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device * The old XAudio2 audio driver is deprecated and will be removed in the next release * Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows * The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers * Updated the GUID format for game controller mappings, older mappings will be automatically converted on load * Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows Linux: * Added an experimental KMS/DRM video driver for embedded development iOS: * Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, determining whether the phone mute switch affects the audio OBS-URL: https://build.opensuse.org/request/show/530173 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=55
2017-10-01 01:36:00 +02:00
Version: 2.0.6
Release: 0
Summary: Simple DirectMedia Layer Library
License: Zlib
Group: Development/Libraries/X11
Url: http://libsdl.org/
#DL-URL: http://libsdl.org/download-2.0.php
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
Patch1: %{name}-ppc64-declaration-after-statement.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: nasm
BuildRequires: pkg-config
BuildRequires: pkgconfig(alsa) >= 0.9.0
BuildRequires: pkgconfig(dbus-1)
%if !0%{?sle_version}
BuildRequires: pkgconfig(fcitx)
%endif
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(ibus-1.0)
%if 0%{?suse_version} > 1120
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(glesv1_cm)
BuildRequires: pkgconfig(glesv2)
%endif
BuildRequires: pkgconfig(ice)
# KMS/DRM driver needs libdrm and libgbm
BuildRequires: libdrm-devel >= 2.4.46
BuildRequires: libgbm-devel >= 9.0.0
%if 0%{?suse_version} > 1220
BuildRequires: pkgconfig(tslib)
%endif
BuildRequires: pkgconfig(x11)
%if 0%{?suse_version} > 1120
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xxf86vm)
%endif
BuildRequires: pkgconfig(libpulse-simple) >= 0.9
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xi)
%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.
%package -n %lname
Summary: Simple DirectMedia Layer Library
Group: System/Libraries
Provides: SDL2 = %version-%release
%description -n %lname
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
Requires: %lname = %version
Requires: c_compiler
Requires: pkgconfig
Requires: pkgconfig(gl)
Requires: pkgconfig(glesv1_cm)
Requires: pkgconfig(glesv2)
Requires: pkgconfig(glu)
Requires: pkgconfig(x11)
Requires: pkgconfig(xproto)
Provides: SDL2-devel = %version-%release
%description -n libSDL2-devel
This package contains files needed for development with the SDL2
library.
%prep
%setup -q
%ifarch ppc64 ppc64le
%patch -P 1 -p1
%endif
dos2unix WhatsNew.txt
dos2unix TODO.txt
dos2unix BUGS.txt
dos2unix README-SDL.txt
dos2unix README.txt
dos2unix CREDITS.txt
dos2unix COPYING.txt
%build
# In this instance, we do want --with-pic because of libSDL2main.a.
%configure --with-pic \
%if 0%{?sle_version}
--disable-fcitx \
%endif
--disable-rpath \
--disable-alsa-shared \
--disable-video-directfb \
--enable-video-kmsdrm
make %{?_smp_mflags} V=1
%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la
# We do not want static libs, but using --disable-static leads to make aborting
# halfway through. SDL2main.a we need to keep(?) for the stub symbol.
find "%buildroot/%_libdir" -type f -name "*.a" ! -name "libSDL2main.a" -delete
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc BUGS.txt COPYING.txt CREDITS.txt README.txt README-SDL.txt
%_libdir/libSDL2-2*.so.*
%files -n libSDL2-devel
%defattr(-,root,root)
%doc TODO.txt WhatsNew.txt
%_bindir/sdl2-config
%_libdir/libSDL2.so
%_libdir/libSDL2main.a
%_includedir/SDL2/
%_datadir/aclocal/sdl2.m4
%_libdir/pkgconfig/sdl2.pc
%_libdir/cmake/SDL2/
%changelog