| 1 | %define svn_url http://svn.netlabs.org/repos/ports/libsdl/trunk
|
|---|
| 2 | %define svn_rev 1636
|
|---|
| 3 |
|
|---|
| 4 | Name: SDL
|
|---|
| 5 | Version: 1.2.15
|
|---|
| 6 | Release: 5%{?dist}
|
|---|
| 7 | Summary: A cross-platform multimedia library
|
|---|
| 8 | Group: System Environment/Libraries
|
|---|
| 9 | URL: http://www.libsdl.org/
|
|---|
| 10 | # The license of the file src/video/fbcon/riva_mmio.h is bad, but the contents
|
|---|
| 11 | # of the file has been relicensed to MIT in 2008 by Nvidia for the
|
|---|
| 12 | # xf86_video-nv driver, therefore it can be considered ok.
|
|---|
| 13 | License: LGPLv2+
|
|---|
| 14 | # Source: http://www.libsdl.org/release/%%{name}-%%{version}.tar.gz
|
|---|
| 15 | # To create the repackaged archive use ./repackage.sh %%{version}
|
|---|
| 16 | Source0: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 17 | #Patch0: SDL-os2-2.patch
|
|---|
| 18 | # Rejected by upstream as sdl1155, rh480065
|
|---|
| 19 | #Patch0: SDL-1.2.10-GrabNotViewable.patch
|
|---|
| 20 | # Proposed to upstream as sdl1680, rh891973
|
|---|
| 21 | #Patch1: SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch
|
|---|
| 22 | # Proposded to upstream as sdl1769
|
|---|
| 23 | #Patch2: SDL-1.2.15-const_XData32.patch
|
|---|
| 24 | # sdl-config(1) manual from Debian, rh948864
|
|---|
| 25 | #Patch3: SDL-1.2.15-add_sdl_config_man.patch
|
|---|
| 26 | # Upstream fix for sdl1486, rh990677
|
|---|
| 27 | #Patch4: SDL-1.2.15-ignore_insane_joystick_axis.patch
|
|---|
| 28 | # Do not use backing store by default, sdl2383, rh1073057, rejected by
|
|---|
| 29 | # upstream
|
|---|
| 30 | #Patch5: SDL-1.2.15-no-default-backing-store.patch
|
|---|
| 31 | # Fix processing keyboard events if SDL_EnableUNICODE() is enabled, sdl2325,
|
|---|
| 32 | # rh1126136, in upstream after 1.2.15
|
|---|
| 33 | #Patch6: SDL-1.2.15-SDL_EnableUNICODE_drops_keyboard_events.patch
|
|---|
| 34 |
|
|---|
| 35 | #BuildRequires: alsa-lib-devel
|
|---|
| 36 | #%if %{with arts}
|
|---|
| 37 | #BuildRequires: arts-devel
|
|---|
| 38 | #%endif
|
|---|
| 39 | #BuildRequires: audiofile-devel
|
|---|
| 40 | BuildRequires: coreutils
|
|---|
| 41 | #%if %{with esound}
|
|---|
| 42 | #BuildRequires: esound-devel
|
|---|
| 43 | #%endif
|
|---|
| 44 | BuildRequires: gcc
|
|---|
| 45 | BuildRequires: libc-devel
|
|---|
| 46 | #BuildRequires: mesa-libGL-devel
|
|---|
| 47 | #BuildRequires: mesa-libGLU-devel
|
|---|
| 48 | #BuildRequires: libXext-devel
|
|---|
| 49 | #BuildRequires: libX11-devel
|
|---|
| 50 | #BuildRequires: libXrandr-devel
|
|---|
| 51 | #BuildRequires: libXrender-devel
|
|---|
| 52 | BuildRequires: make
|
|---|
| 53 | #%if %{with nas}
|
|---|
| 54 | #BuildRequires: nas-devel
|
|---|
| 55 | #%endif
|
|---|
| 56 | #%ifarch %{ix86}
|
|---|
| 57 | BuildRequires: nasm
|
|---|
| 58 | #%endif
|
|---|
| 59 | #BuildRequires: pulseaudio-libs-devel
|
|---|
| 60 | #%if %{with esound}
|
|---|
| 61 | #BuildRequires: sed
|
|---|
| 62 | #%endif
|
|---|
| 63 | # Autotools
|
|---|
| 64 | BuildRequires: automake
|
|---|
| 65 | BuildRequires: autoconf
|
|---|
| 66 | BuildRequires: libtool
|
|---|
| 67 |
|
|---|
| 68 | %description
|
|---|
| 69 | Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
|
|---|
| 70 | to provide fast access to the graphics frame buffer and audio device.
|
|---|
| 71 |
|
|---|
| 72 | %package devel
|
|---|
| 73 | Summary: Files needed to develop Simple DirectMedia Layer applications
|
|---|
| 74 | Group: Development/Libraries
|
|---|
| 75 | Requires: %{name} = %{version}-%{release}
|
|---|
| 76 | #Requires: alsa-lib-devel
|
|---|
| 77 | #Requires: mesa-libGL-devel
|
|---|
| 78 | #Requires: mesa-libGLU-devel
|
|---|
| 79 | #Requires: libX11-devel
|
|---|
| 80 | #Requires: libXext-devel
|
|---|
| 81 | #Requires: libXrandr-devel
|
|---|
| 82 | #Requires: libXrender-devel
|
|---|
| 83 |
|
|---|
| 84 | %description devel
|
|---|
| 85 | Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
|
|---|
| 86 | to provide fast access to the graphics frame buffer and audio device. This
|
|---|
| 87 | package provides the libraries, include files, and other resources needed for
|
|---|
| 88 | developing SDL applications.
|
|---|
| 89 |
|
|---|
| 90 | #%package static
|
|---|
| 91 | #Summary: Files needed to develop static Simple DirectMedia Layer applications
|
|---|
| 92 | #Group: Development/Libraries
|
|---|
| 93 | #Requires: SDL-devel = %{version}-%{release}
|
|---|
| 94 |
|
|---|
| 95 | #%description static
|
|---|
| 96 | #Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
|
|---|
| 97 | #to provide fast access to the graphics frame buffer and audio device. This
|
|---|
| 98 | #package provides the static libraries needed for developing static SDL
|
|---|
| 99 | #applications.
|
|---|
| 100 |
|
|---|
| 101 | %debug_package
|
|---|
| 102 |
|
|---|
| 103 | %prep
|
|---|
| 104 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 105 | %setup -q
|
|---|
| 106 | %else
|
|---|
| 107 | %setup -q -n "%{name}-%{version}" -Tc
|
|---|
| 108 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 109 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 110 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 111 | %endif
|
|---|
| 112 |
|
|---|
| 113 | #%patch0 -p1
|
|---|
| 114 |
|
|---|
| 115 | libtoolize -fci
|
|---|
| 116 | ./autogen.sh
|
|---|
| 117 |
|
|---|
| 118 | %build
|
|---|
| 119 | export CFLAGS="-g -DBUILD_SDL -DUSE_ASM_MIXER_VC -DICONV_INBUF_NONCONST -DUSE_DOSSETPRIORITY \
|
|---|
| 120 | -DSDL_AUDIO_DRIVER_DARTALT -DUSE_OS2_TOOLKIT_HEADERS -idirafter /@unixroot/usr/include/os2tk45" \
|
|---|
| 121 | CXXFLAGS="-g -DBUILD_SDL -DUSE_ASM_MIXER_VC -DICONV_INBUF_NONCONST -DUSE_DOSSETPRIORITY \
|
|---|
| 122 | -DSDL_AUDIO_DRIVER_DARTALT -DUSE_OS2_TOOLKIT_HEADERS -idirafter /@unixroot/usr/include/os2tk45" \
|
|---|
| 123 | LDFLAGS="-Zomf -Zhigh-mem -g -lmmpm2"
|
|---|
| 124 |
|
|---|
| 125 | %configure \
|
|---|
| 126 | --enable-audio \
|
|---|
| 127 | --enable-video \
|
|---|
| 128 | --enable-events \
|
|---|
| 129 | --enable-joystick \
|
|---|
| 130 | --enable-cdrom \
|
|---|
| 131 | --enable-threads \
|
|---|
| 132 | --enable-timers \
|
|---|
| 133 | --enable-file \
|
|---|
| 134 | --enable-loadso \
|
|---|
| 135 | --enable-cpuinfo \
|
|---|
| 136 | --enable-assembly \
|
|---|
| 137 | --disable-static \
|
|---|
| 138 | --enable-shared
|
|---|
| 139 |
|
|---|
| 140 | %{__make} %{?_smp_mflags}
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 | %install
|
|---|
| 144 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 145 | %makeinstall
|
|---|
| 146 |
|
|---|
| 147 | # create OMF libs
|
|---|
| 148 | emximp -o %{buildroot}%{_libdir}/SDL_dll.lib %{buildroot}%{_libdir}/SDL120.dll
|
|---|
| 149 | emximp -o %{buildroot}%{_libdir}/SDL120_dll.lib %{buildroot}%{_libdir}/SDL120.dll
|
|---|
| 150 | emximp -o %{buildroot}%{_libdir}/SDL_dll.a %{buildroot}%{_libdir}/SDL120.dll
|
|---|
| 151 | emximp -o %{buildroot}%{_libdir}/SDL120_dll.a %{buildroot}%{_libdir}/SDL120.dll
|
|---|
| 152 | rm -rf %{buildroot}%{_libdir}/SDLmain.a
|
|---|
| 153 |
|
|---|
| 154 | # create forwarder
|
|---|
| 155 | gcc -Zomf -c %{_specdir}/SDL/wrap.c -o %{buildroot}%{_libdir}/wrap.o
|
|---|
| 156 | gcc -Zomf -Zdll -g -o %{buildroot}%{_libdir}/SDL12.dll %{_specdir}/SDL/SDL12.def \
|
|---|
| 157 | %{buildroot}%{_libdir}/wrap.o -L%{buildroot}%{_libdir} -lSDL
|
|---|
| 158 | rm -rf %{buildroot}%{_libdir}/wrap.o
|
|---|
| 159 |
|
|---|
| 160 | %clean
|
|---|
| 161 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 162 |
|
|---|
| 163 | %files
|
|---|
| 164 | %doc README-SDL.txt COPYING CREDITS BUGS README.OS2 README-Digi.OS2 sdl.ini
|
|---|
| 165 | %{_libdir}/SDL12*.dll
|
|---|
| 166 |
|
|---|
| 167 | %files devel
|
|---|
| 168 | %doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html
|
|---|
| 169 | %doc docs/index.html docs/html
|
|---|
| 170 | %{_bindir}/*-config
|
|---|
| 171 | %{_libdir}/SDL*.a
|
|---|
| 172 | %{_libdir}/SDL*.lib
|
|---|
| 173 | %exclude %{_libdir}/lib*.la
|
|---|
| 174 | %dir %{_includedir}/SDL
|
|---|
| 175 | %{_includedir}/SDL/*.h
|
|---|
| 176 | %{_libdir}/pkgconfig/sdl.pc
|
|---|
| 177 | %{_datadir}/aclocal/*
|
|---|
| 178 | %{_mandir}/man3/*
|
|---|
| 179 |
|
|---|
| 180 | #%files static
|
|---|
| 181 | #%{_libdir}/lib*.a
|
|---|
| 182 |
|
|---|
| 183 | %changelog
|
|---|
| 184 | * Thu Jun 30 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.2.15-5
|
|---|
| 185 | - Remove uneeded -I./src/thread/os2 from include path.
|
|---|
| 186 |
|
|---|
| 187 | * Mon Apr 18 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.2.15-4
|
|---|
| 188 | - Moved wrap.c and SDL12.def to SDL subdir
|
|---|
| 189 |
|
|---|
| 190 | * Thu Apr 14 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.2.15-3
|
|---|
| 191 | - Made the .spec in accordance with Fedora version, renamed to SDL in caps
|
|---|
| 192 |
|
|---|
| 193 | * Tue Mar 15 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.2.15-2
|
|---|
| 194 | - Adding the debug info for forwarder/wrapper
|
|---|
| 195 |
|
|---|
| 196 | * Sat Mar 12 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.2.15-1
|
|---|
| 197 | - Initial OS/2 packaging
|
|---|