Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 5c62c509afd7f09f0c1e63d81305f18e > files > 11

SDL12-1.2.15-4.mga3.src.rpm

%ifarch x86_64
%define	mark64	()(64bit)
%else
%define	mark64	%{nil}
%endif

%define	fname	SDL
%define	name	SDL12
%define	version	1.2.15
%define rel	4
%define	lib_name_orig	lib%{fname}
%define apiver 1.2
%define	major 0
%define	libname	%mklibname %{fname} %{apiver} %{major}
%define develname %mklibname %{fname} -d
%define build_plugins	0
%define build_directfb	1
%define build_ggi	1
%define	build_aalib	1

Summary:	Simple DirectMedia Layer
Name:		%{name}
Version:	%{version}
Release:	%mkrel %{rel}
License:	LGPLv2+
Group:		System/Libraries
URL:		http://www.libsdl.org/
Source0:	http://www.libsdl.org/release/%{fname}-%{version}.tar.gz
Patch0:		SDL-1.2.10-fixrpath.patch
Patch1:		SDL-1.2.10-libtool.patch
Patch4:		SDL-1.2.13-libdir.patch
Patch21:	SDL-1.2.14-anonymous-enums.patch
# (cg) 1.2.13-10mdv Use pulse output by default
Patch51:	SDL-1.2.13-preferpulse.patch
Patch52:	SDL-1.2.12-pagesize.patch
Patch54:	SDL-1.2.14-dont-propagate-lpthread.patch
# (fc) 1.2.13-7mdv fix crash in pulseaudio backend when /proc is not mounted (Mdv bug #38220)
Patch57:	SDL-1.2.14-noproc.patch
# (misc) patch from fedora to solve ri-li crash ( mdv bug #45721 )
Patch58:	SDL-1.2.13-rh484362.patch

# libGL is required to enable glx support
BuildRequires:	libmesaglu-devel
BuildRequires:	nas-devel
BuildRequires:	chrpath
BuildRequires:	libpulseaudio-devel
BuildRequires:	libalsa-devel
BuildRequires:	libxrandr-devel
BuildRequires:	zlib-devel
%ifarch %{ix86}
BuildRequires:	yasm
%endif
%if %{build_plugins}
BuildRequires:	libtool-devel
%endif
%if %{build_directfb}
BuildRequires:	DirectFB-devel >= 1.0.0
%endif
%if %{build_ggi}
BuildRequires:	libggi-devel
%endif
%if %{build_aalib}
BuildRequires:	aalib-devel
%endif

%description
This is the Simple DirectMedia Layer, a generic API that provides low level
access to audio, keyboard, mouse, and display framebuffer across multiple
platforms.

%if %{build_plugins}

%if %{build_ggi}
%package -n %{libname}-video-ggi
Summary:	GGI video support for SDL
Group:		System/Libraries
Requires:	%{libname} = %{version}-%{release}

%description -n %{libname}-video-ggi
This is the Simple DirectMedia Layer, a generic API that provides low level
access to audio, keyboard, mouse, and display framebuffer across multiple
platforms.

This package provides GGI video support as a plugin to SDL.
%endif

%if %{build_directfb}
%package -n %{libname}-video-directfb
Summary:	DirectFB video support for SDL
Group:		System/Libraries
Requires:	%{libname} = %{version}-%{release}

%description -n %{libname}-video-directfb
This is the Simple DirectMedia Layer, a generic API that provides low level
access to audio, keyboard, mouse, and display framebuffer across multiple
platforms.

This package provides DirectFB video support as a plugin to SDL.
%endif

%endif

%package -n %{libname}
Summary:	Main library for %{name}
Group:		System/Libraries
Provides:	%{name} = %{version}-%{release}
Provides:	%{lib_name_orig} = %{version}-%{release}
Requires:	libGL.so.1%{mark64}
Obsoletes:	%mklibname SDL 1.2
Provides:	%mklibname SDL 1.2

%description -n %{libname}
This package contains the library needed to run programs dynamically
linked with %{name}.

%package -n %{develname}
Summary:	Headers for developing programs that will use %{name}
Group:		Development/C
Requires:	%{libname} = %{version}
Requires:	libalsa-devel >= 0.9.0
# GL/GLU referenced in headers, but is dlopened so there are no autodeps:
Requires:	mesagl-devel
Requires:	mesaglu-devel
Provides:	%{lib_name_orig}-devel = %{version}-%{release}
Provides:	SDL-devel = %{version}-%{release}
Provides:	SDL%{apiver}-devel = %{version}-%{release}
Obsoletes:	%mklibname SDL 1.2 -d
Provides:	%mklibname SDL 1.2 -d

%description -n %{develname}
This package contains the headers that programmers will need to develop
applications which will use %{name}.

%prep
%setup -q -n %{fname}-%{version}
%patch0 -p1
#patch1 -p1 -b .libtool
#patch4 -p1 -b .libdir
%patch21 -p1 -b .enums
#patch41 -p1 -b .nasm_include
#patch50 -p1 -b .byteorder
#patch51 -p1 -b .preferpulsealsa
#patch52 -p1 -b .pagesize
%patch54 -p1 -b .no_lpthread
%patch57 -p1 -b .noproc
%patch58 -p1 -b .disable_SDL_revcpy

iconv -f ISO-8859-1 -t UTF-8 CREDITS > CREDITS.tmp
touch -r CREDITS CREDITS.tmp
mv CREDITS.tmp CREDITS

%build
./autogen.sh

export CFLAGS="%{optflags} -fPIC -funroll-loops -ffast-math -O3"
export CXXFLAGS="$CFLAGS"

%configure2_5x	--enable-video-opengl \
		--disable-video-svga \
%if %{build_ggi}
		--enable-video-ggi \
%if %{build_plugins}
		--enable-video-ggi-plugin \
%endif
%endif
%if %{build_directfb}
		--enable-video-directfb \
%if %{build_plugins}
		--enable-video-directfb-plugin \
%endif
%endif
%if %{build_aalib}
		--enable-video-aalib \
%if %{build_plugins}
		--enable-video-aalib-plugin \
%endif
%endif
%ifarch %{ix86} x86_64
		--enable-nasm \
%else
		--disable-nasm \
%endif
		--enable-assembly \
		--enable-sdl-dlopen \
		--enable-nas \
		--enable-nas-shared \
		--enable-pulseaudio \
		--enable-pulseaudio-shared \
		--enable-alsa \
		--enable-alsa-shared \
		--disable-arts \
		--program-prefix= \
		--disable-rpath --disable-static
%make

%install
rm -rf %{buildroot}
%makeinstall_std

# remove unpackaged files
%if %{build_plugins}
rm -f %{buildroot}%{_libdir}/SDL/*.a
%endif

find %{buildroot} -name *.la | xargs rm
# --disable-rpath does not seem to work correctly
chrpath -d %{buildroot}%{_libdir}/libSDL.so

%multiarch_binaries %{buildroot}%{_bindir}/sdl-config

%clean
rm -rf %{buildroot}

%files -n %{libname}
%doc README-SDL.txt CREDITS BUGS
%{_libdir}/libSDL-%{apiver}.so.%{major}*
%if %{build_plugins}
%dir %{_libdir}/SDL
%endif

%if %{build_plugins}

%if %{build_ggi}
%files -n %{libname}-video-ggi
%{_libdir}/SDL/video_ggi.*
%endif

%if %{build_directfb}
%files -n %{libname}-video-directfb
%{_libdir}/SDL/video_directfb.*
%endif

%endif

%files -n %{develname}
%doc README README-SDL.txt CREDITS BUGS WhatsNew docs.html
%doc docs/html/*.html
%{_bindir}/sdl-config
%multiarch %{multiarch_bindir}/sdl-config
%{_libdir}/pkgconfig/sdl.pc
%{_libdir}/*.so
%{_libdir}/*.a
%dir %{_includedir}/SDL
%{_includedir}/SDL/*.h
%{_datadir}/aclocal/*
%{_mandir}/*/*


%changelog

* Fri Jan 11 2013 umeabot <umeabot> 1.2.15-4.mga3
+ Revision: 345081
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jul 28 2012 fwang <fwang> 1.2.15-3.mga3
+ Revision: 275241
- rebuild for new directfb

* Tue May 29 2012 shlomif <shlomif> 1.2.15-2.mga3
+ Revision: 249157
- Remove some commented out patch applications
- Remove an unneeded patch.

* Mon May 28 2012 shlomif <shlomif> 1.2.15-1.mga3
+ Revision: 248792
- New version 1.2.15

* Sun Apr 15 2012 luigiwalser <luigiwalser> 1.2.14-10.mga2
+ Revision: 230942
- sync changes from Mandriva:
- enable assembly instructions on x86_64 as well
- use system nas library
- compile with -ffast-math and -funroll-loops
- remove obsolete configure options
- add missing version to some provides
- update dont propagate pthread patch (from debian)
- add fedora patches accepted upstream
  - fix bug in wesnoth windowed mode, updated from debian
  - fix nasm 2.09 compatibility
  - do not call memcpy on overlapping areas
  - fix xio error
  - fix linking with libx11-1.4.99.1

* Fri Jan 27 2012 fwang <fwang> 1.2.14-9.mga2
+ Revision: 202172
- add requires on libgl

* Sun Sep 11 2011 fwang <fwang> 1.2.14-7.mga2
+ Revision: 142354
- update file list
- rebuild for new directfb

* Mon Jul 18 2011 fwang <fwang> 1.2.14-6.mga2
+ Revision: 125763
- rebuild for new directfb

* Mon Jul 11 2011 ahmad <ahmad> 1.2.14-5.mga2
+ Revision: 122125
- Add a patch from upstream to fix some crashes with joysticks, (hint from Debian
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564831)
  should fix (mga#2084)

* Mon May 09 2011 misc <misc> 1.2.14-4.mga1
+ Revision: 96643
- disable esound ( deprecated and removed from the distribution )

* Wed Jan 12 2011 supp <supp> 1.2.14-3.mga1
+ Revision: 7736
- fix SPEC typo
- get rid of old macros...
- imported package SDL12