fix builds with ancient gcc

This commit is contained in:
Tom Callaway 2015-06-02 14:50:20 -04:00
parent 60767e0ac0
commit 9ec659971c
2 changed files with 19 additions and 1 deletions

12
SDL2-2.0.3-oldgcc.patch Normal file
View File

@ -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

View File

@ -1,6 +1,6 @@
Name: SDL2 Name: SDL2
Version: 2.0.3 Version: 2.0.3
Release: 4%{?dist} Release: 5%{?dist}
Summary: A cross-platform multimedia library Summary: A cross-platform multimedia library
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.libsdl.org/ URL: http://www.libsdl.org/
@ -8,6 +8,8 @@ License: zlib and MIT
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
Source1: SDL_config.h Source1: SDL_config.h
Patch0: multilib.patch Patch0: multilib.patch
# https://hg.libsdl.org/SDL/rev/7e843b8b8301
Patch1: SDL2-2.0.3-oldgcc.patch
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
BuildRequires: audiofile-devel BuildRequires: audiofile-devel
@ -70,6 +72,7 @@ developing SDL applications.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .multilib %patch0 -p1 -b .multilib
%patch1 -p1 -b .oldgcc
# Compilation without ESD # Compilation without ESD
sed -i -e 's/.*AM_PATH_ESD.*//' configure.in 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 sed -i -e 's/\r//g' TODO.txt README.txt WhatsNew.txt BUGS.txt COPYING.txt CREDITS.txt README-SDL.txt
@ -116,6 +119,9 @@ rm -f %{buildroot}%{_libdir}/*.a
%{_datadir}/aclocal/* %{_datadir}/aclocal/*
%changelog %changelog
* 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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild