Summary: A cross-platform multimedia library Name: SDL Version: 1.2.13 Release: 2 Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source1: http://www.libsdl.org/release/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch URL: http://www.libsdl.org/ License: LGPL Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: audiofile-devel BuildRequires: esound-devel BuildRequires: libXrender-devel, gettext >= 0.17 BuildRequires: pth-devel >= 2.0.7-3 Requires: audiofile Requires: esound Requires: libXrender, gettext >= 0.17 Requires: pth >= 2.0.7-3 %description Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide fast access to the graphics frame buffer and audio device. The library is available as 32-bit and 64-bit. %package devel Summary: Files needed to develop Simple DirectMedia Layer applications Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: audiofile-devel Requires: esound-devel Requires: libXrender-devel Requires: pkg-config %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. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %prep %setup -q %patch0 %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc_r -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --disable-dga \ --disable-pthreads \ --enable-pth make %{?_smp_mflags} cp ./build/.libs/libSDL-1.2.so.0 . cp ./build/libSDLmain.a . make distclean # now build the 32-bit version export CC="xlc_r" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --disable-dga \ --disable-pthreads \ --enable-pth make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q ./build/.libs/libSDL-1.2.a ./libSDL-1.2.so.0 ar -X64 -t ./libSDLmain.a > arlist ar -X64 -x ./libSDLmain.a for f in `cat arlist` ; do ${AR} -q ./build/libSDLmain.a $f done %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc README-SDL.txt COPYING CREDITS BUGS %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system) %doc README WhatsNew docs.html docs/html %doc docs/index.html %{_bindir}/* %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/* %{_mandir}/man3/* /usr/bin/* /usr/include/* /usr/lib/*.la %changelog * Thu May 27 2010 Michael Perzl - 1.2.13-2 - changed threads to GNU pth for better portability across all AIX versions * Mon Apr 21 2008 Michael Perzl - 1.2.13-1 - first version for AIX5L v5.1 and higher