Browse Source

SDL2 package update

Signed-off-by: guibuilder_pel7ppc64lebuilder0 <guibuilder@powerel.org>
master
guibuilder_pel7ppc64lebuilder0 5 years ago
parent
commit
a5dc754d29
  1. 12
      SOURCES/SDL2-2.0.3-oldgcc.patch
  2. 47
      SOURCES/SDL_config.h
  3. 24
      SOURCES/multilib.patch
  4. 196
      SPECS/SDL2.spec

12
SOURCES/SDL2-2.0.3-oldgcc.patch

@ -0,0 +1,12 @@
diff -up SDL2-2.0.3/include/begin_code.h.oldgcc SDL2-2.0.3/include/begin_code.h
--- SDL2-2.0.3/include/begin_code.h.oldgcc 2015-06-02 14:44:27.811507809 -0400
+++ SDL2-2.0.3/include/begin_code.h 2015-06-02 14:44:40.370428419 -0400
@@ -56,8 +56,6 @@
# else
# if defined(__GNUC__) && __GNUC__ >= 4
# define DECLSPEC __attribute__ ((visibility("default")))
-# elif defined(__GNUC__) && __GNUC__ >= 2
-# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC
# endif

47
SOURCES/SDL_config.h

@ -1,23 +1,22 @@
/* /*
SDL - Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2006 Sam Lantinga Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>


This library is free software; you can redistribute it and/or This software is provided 'as-is', without any express or implied
modify it under the terms of the GNU Lesser General Public warranty. In no event will the authors be held liable for any damages
License as published by the Free Software Foundation; either arising from the use of this software.
version 2.1 of the License, or (at your option) any later version.


This library is distributed in the hope that it will be useful, Permission is granted to anyone to use this software for any purpose,
but WITHOUT ANY WARRANTY; without even the implied warranty of including commercial applications, and to alter it and redistribute it
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU freely, subject to the following restrictions:
Lesser General Public License for more details.


You should have received a copy of the GNU Lesser General Public 1. The origin of this software must not be misrepresented; you must not
License along with this library; if not, write to the Free Software claim that you wrote the original software. If you use this software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA in a product, an acknowledgment in the product documentation would be

appreciated but is not required.
Sam Lantinga 2. Altered source versions must be plainly marked as such, and must not be
slouken@libsdl.org misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/ */


/* /*
@ -26,8 +25,12 @@
* original SDL_config.h on multilib systems, which result from arch-specific * original SDL_config.h on multilib systems, which result from arch-specific
* configuration options. Please do not use the arch-specific file directly. * configuration options. Please do not use the arch-specific file directly.
* *
* Copyright (C) 2006 Red Hat, Inc. * Copyright (C) 2013 Igor Gnatenko
* Thomas Woerner <twoerner@redhat.com> * Igor Gnatenko <i.gnatenko.brain@gmail.com>
*/

/**
* \file SDL_config.h
*/ */


#ifdef SDL_config_wrapper_h #ifdef SDL_config_wrapper_h
@ -40,11 +43,11 @@
#elif defined(__ia64__) #elif defined(__ia64__)
#include "SDL_config-ia64.h" #include "SDL_config-ia64.h"
#elif defined(__powerpc64__) #elif defined(__powerpc64__)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#include "SDL_config-ppc64.h" #include "SDL_config-ppc64.h"
#else # else
#include "SDL_config-ppc64le.h" #include "SDL_config-ppc64le.h"
#endif # endif
#elif defined(__powerpc__) #elif defined(__powerpc__)
#include "SDL_config-ppc.h" #include "SDL_config-ppc.h"
#elif defined(__s390x__) #elif defined(__s390x__)
@ -64,7 +67,7 @@
#elif defined(__aarch64__) #elif defined(__aarch64__)
#include "SDL_config-aarch64.h" #include "SDL_config-aarch64.h"
#else #else
#error "The SDL-devel package is not usable with the architecture." #error "The SDL2-devel package is not usable with the architecture."
#endif #endif


#undef SDL_config_wrapper_h #undef SDL_config_wrapper_h

24
SOURCES/multilib.patch

@ -0,0 +1,24 @@
*** XSLT/xslt-config.in.orig 2006-06-06 17:32:23.000000000 +0200
--- XSLT/xslt-config.in 2006-06-06 17:32:48.000000000 +0200
***************
*** 4,10 ****
exec_prefix=@exec_prefix@
exec_prefix_set=no
includedir=@includedir@
! libdir=@libdir@
usage()
{
--- 4,15 ----
exec_prefix=@exec_prefix@
exec_prefix_set=no
includedir=@includedir@
! if [ "`ldd /bin/sh | grep lib64`" = "" ]
! then
! libdir=${exec_prefix}/lib
! else
! libdir=${exec_prefix}/lib64
! fi
usage()
{

196
SPECS/SDL2.spec

@ -0,0 +1,196 @@
%if 0%{?epel}
%bcond_with wayland
%else
%bcond_without wayland
%endif

Name: SDL2
Version: 2.0.3
Release: 9%{?dist}
Summary: A cross-platform multimedia library
Group: System Environment/Libraries
URL: http://www.libsdl.org/
License: zlib and MIT
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
Source1: SDL_config.h
Patch0: multilib.patch
# https://hg.libsdl.org/SDL/rev/7e843b8b8301
Patch1: SDL2-2.0.3-oldgcc.patch

BuildRequires: alsa-lib-devel
BuildRequires: audiofile-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
BuildRequires: dbus-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libusb-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: libXinerama-devel
BuildRequires: libXcursor-devel
BuildRequires: systemd-devel
# Wayland
%if %{with wayland}
BuildRequires: libwayland-client-devel
#BuildRequires: libwayland-egl-devel
BuildRequires: libwayland-cursor-devel
%endif
BuildRequires: libxkbcommon-devel

%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
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: alsa-lib-devel
Requires: mesa-libGL-devel
Requires: mesa-libGLU-devel
Requires: mesa-libEGL-devel
Requires: mesa-libGLES-devel
Requires: libX11-devel
Requires: libXi-devel
Requires: libXext-devel
Requires: libXrandr-devel
Requires: libXrender-devel
Requires: libXScrnSaver-devel
Requires: libXinerama-devel
Requires: libXcursor-devel
Requires: systemd-devel
%if %{with wayland}
# Wayland
Requires: libwayland-client-devel
#Requires: libwayland-egl-devel
Requires: libwayland-cursor-devel
%endif
Requires: libxkbcommon-devel

%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.

%prep
%setup -q
#%patch0 -p1 -b .multilib
%patch1 -p1 -b .oldgcc
# Compilation without ESD
sed -i -e 's/.*AM_PATH_ESD.*//' configure.in
sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt

%build
%configure \
--enable-sdl-dlopen \
--disable-arts \
--disable-esd \
--disable-nas \
--enable-pulseaudio-shared \
--enable-alsa \
%if %{with wayland}
--enable-video-wayland \
%endif
--disable-rpath
make %{?_smp_mflags}

%install
%make_install

# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
# multilib systems and install SDL_config.h wrapper
mv %{buildroot}%{_includedir}/SDL2/SDL_config.h %{buildroot}%{_includedir}/SDL2/SDL_config-%{_arch}.h
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/SDL2/SDL_config.h

# remove libtool .la file
rm -f %{buildroot}%{_libdir}/*.la
# remove static .a file
rm -f %{buildroot}%{_libdir}/*.a

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc BUGS.txt CREDITS.txt COPYING.txt README-SDL.txt
%{_libdir}/lib*.so.*

%files devel
%doc README.txt TODO.txt WhatsNew.txt
%{_bindir}/*-config
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/sdl2.pc
%{_includedir}/SDL2
%{_datadir}/aclocal/*

%changelog
* Wed Nov 18 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-9
- Use bcond instead

* Tue Aug 11 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-8
- Remove wayland support for Requires.

* Thu Aug 06 2015 Ding-Yi Chen <dchen@redhat.com> - 2.0.3-7
- Remove wayland support.

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Jun 2 2015 Tom Callaway <spot@fedoraproject.org> - 2.0.3-5
- remove code preventing builds with ancient gcc

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Wed Jun 11 2014 Karsten Hopp <karsten@redhat.com> 2.0.3-3
- fix filename of SDL_config.h for ppc64le

* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Mar 19 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.3-1
- 2.0.3 upstream release

* Sat Mar 08 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.2-1
- 2.0.2 upstream release
- Enable wayland backend

* Tue Dec 10 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.1-2
- Add libXinerama, libudev, libXcursor support (RHBZ #1039702)

* Thu Oct 24 2013 Tom Callaway <spot@fedoraproject.org> - 2.0.1-1
- update to 2.0.1

* Sat Aug 24 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-3
- Fix multilib issues

* Tue Aug 13 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-2
- SDL2 is released. Announce:
- http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-August/089854.html

* Sat Aug 10 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc4
- Update to latest SDL2 (08.08.2013)

* Tue Jul 30 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc3
- Fix Licenses
- some cleanups in spec

* Tue Jul 30 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc2
- Delete -static package
- Fix License tag
- Fix end-of-line in documents
- Remove all spike-nails EL-specify (if someone will want to do - 'patches are welcome')
- Change Release tag to .rcX%%{?dist} (maintainer has changed released tarballs)

* Mon Jul 29 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.0.0-1.rc1
- Some fixes in spec and cleanup

* Mon Jul 29 2013 Jon Ciesla <limburgher@gmail.com> - 2.0.0-1
- Ported from SDL 1.2.15-10
Loading…
Cancel
Save