source: spec/trunk/SPECS/SDL.spec@ 1010

Last change on this file since 1010 was 817, checked in by valerius, 9 years ago

spec: SDL: remove unneeded -I./src/thread/os2 from include path.

File size: 6.3 KB
Line 
1%define svn_url http://svn.netlabs.org/repos/ports/libsdl/trunk
2%define svn_rev 1636
3
4Name: SDL
5Version: 1.2.15
6Release: 5%{?dist}
7Summary: A cross-platform multimedia library
8Group: System Environment/Libraries
9URL: 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.
13License: LGPLv2+
14# Source: http://www.libsdl.org/release/%%{name}-%%{version}.tar.gz
15# To create the repackaged archive use ./repackage.sh %%{version}
16Source0: %{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
40BuildRequires: coreutils
41#%if %{with esound}
42#BuildRequires: esound-devel
43#%endif
44BuildRequires: gcc
45BuildRequires: 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
52BuildRequires: make
53#%if %{with nas}
54#BuildRequires: nas-devel
55#%endif
56#%ifarch %{ix86}
57BuildRequires: nasm
58#%endif
59#BuildRequires: pulseaudio-libs-devel
60#%if %{with esound}
61#BuildRequires: sed
62#%endif
63# Autotools
64BuildRequires: automake
65BuildRequires: autoconf
66BuildRequires: libtool
67
68%description
69Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
70to provide fast access to the graphics frame buffer and audio device.
71
72%package devel
73Summary: Files needed to develop Simple DirectMedia Layer applications
74Group: Development/Libraries
75Requires: %{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
85Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed
86to provide fast access to the graphics frame buffer and audio device. This
87package provides the libraries, include files, and other resources needed for
88developing 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
108svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
109rm -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
115libtoolize -fci
116./autogen.sh
117
118%build
119export 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
144rm -rf $RPM_BUILD_ROOT
145%makeinstall
146
147# create OMF libs
148emximp -o %{buildroot}%{_libdir}/SDL_dll.lib %{buildroot}%{_libdir}/SDL120.dll
149emximp -o %{buildroot}%{_libdir}/SDL120_dll.lib %{buildroot}%{_libdir}/SDL120.dll
150emximp -o %{buildroot}%{_libdir}/SDL_dll.a %{buildroot}%{_libdir}/SDL120.dll
151emximp -o %{buildroot}%{_libdir}/SDL120_dll.a %{buildroot}%{_libdir}/SDL120.dll
152rm -rf %{buildroot}%{_libdir}/SDLmain.a
153
154# create forwarder
155gcc -Zomf -c %{_specdir}/SDL/wrap.c -o %{buildroot}%{_libdir}/wrap.o
156gcc -Zomf -Zdll -g -o %{buildroot}%{_libdir}/SDL12.dll %{_specdir}/SDL/SDL12.def \
157 %{buildroot}%{_libdir}/wrap.o -L%{buildroot}%{_libdir} -lSDL
158rm -rf %{buildroot}%{_libdir}/wrap.o
159
160%clean
161rm -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
Note: See TracBrowser for help on using the repository browser.