3 %bcond_with static_gcc # linkg libgcc* statically into libstlport.
5 Summary: C++ standard library
6 Summary(pl.UTF-8): Biblioteki standardowe C++
11 License: distributable (see README.gz)
13 Source0: http://dl.sourceforge.net/stlport/%{name}-%{version}.tar.bz2
14 # Source0-md5: e31d0dc9141c4f264d887754b559cc84
15 Source1: stlport-config.in
16 Source2: stlport.pc.in
17 Source3: stlport-debug.pc.in
18 Patch0: %{name}-endianness.patch
19 Patch1: %{name}-alpha.patch
20 Patch2: %{name}-valarray-copy-constructor.patch
21 Patch3: %{name}-vendor_gcc_detection.patch
22 Patch4: %{name}-fstream.patch
23 URL: http://stlport.sourceforge.net/
24 BuildRequires: libstdc++-devel >= 6:4.2.0-1
25 BuildRequires: sed >= 4.0
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 STLport is a multiplatform implementation of C++ Standard Template
30 Library based on SGI STL. It's used by e.g. OpenOffice.
32 %description -l pl.UTF-8
33 STLport to wieloplatformowa implementacja standardowej biblioteki
34 szablonów (Standard Template Library) C++ oparta na SGI STL. Jest
35 używana m.in. przez OpenOffice.
38 Summary: STLport heades files, documentation
39 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do STLport
40 Group: Development/Libraries
41 Requires: %{name} = %{epoch}:%{version}-%{release}
44 Header files and development documentation for STLport.
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe i dokumentacja dla STLport.
50 Summary: Static STLport libraries
51 Summary(pl.UTF-8): Biblioteki statyczne do STLport
52 Group: Development/Libraries
53 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
56 Static STLport libraries.
58 %description static -l pl.UTF-8
59 Biblioteki statyczne do STLport.
62 Summary: Debug version of STLport library
63 Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport
67 Debug version of STLport library.
69 %description dbg -l pl.UTF-8
70 Wersja diagnostyczna biblioteki STLport.
73 Summary: Debug version of STLport library - development files
74 Summary(pl.UTF-8): Wersja diagnostyczna biblioteki STLport - pliki programistyczne
75 Group: Development/Libraries
76 Requires: %{name}-dbg = %{epoch}:%{version}-%{release}
77 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
79 %description dbg-devel
80 Debug version of STLport library - development files.
82 %description dbg-devel -l pl.UTF-8
83 Wersja diagnostyczna biblioteki STLport - pliki programistyczne.
86 Summary: Static debug version of STLport library
87 Summary(pl.UTF-8): Statyczna wersja diagnostyczna biblioteki STLport
88 Group: Development/Libraries
89 Requires: %{name}-dbg-devel = %{epoch}:%{version}-%{release}
91 %description dbg-static
92 Static debug version of STLport library.
94 %description dbg-static -l pl.UTF-8
95 Statyczna wersja diagnostyczna biblioteki STLport.
105 sed -i -e 's/= -O2$/= %{rpmcflags}/' build/Makefiles/gmake/gcc.mak
107 cp -a %{SOURCE1} stlport-config.in
108 cp -a %{SOURCE2} stlport.pc.in
109 cp -a %{SOURCE3} stlport-debug.pc.in
114 %{?with_static_gcc:./configure --use-static-gcc}
116 %{__make} -f gcc.mak \
127 s,@prefix@,%{_prefix},g
128 s,@exec_prefix@,%{_exec_prefix},g
129 s,@libdir@,%{_libdir},g
130 s,@includedir@,%{_includedir},g
132 s,@VERSION@,%{version},g
135 %{__sed} -e "$subst" stlport-config.in > stlport-config
136 %{__sed} -e "$subst" stlport.pc.in > stlport.pc
137 %{__sed} -e "$subst" stlport-debug.pc.in > stlport-debug.pc
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT%{_includedir}
143 %{__make} -C build/lib -f gcc.mak \
144 install-stldbg-shared \
145 install-stldbg-static \
146 install-release-shared \
147 install-release-static \
148 INSTALL_BIN_DIR=$RPM_BUILD_ROOT%{_bindir} \
149 INSTALL_LIB_DIR_STLDBG=$RPM_BUILD_ROOT%{_libdir} \
150 INSTALL_LIB_DIR=$RPM_BUILD_ROOT%{_libdir}
152 cp -a stlport $RPM_BUILD_ROOT%{_includedir}
153 rm -rf $RPM_BUILD_ROOT%{_includedir}/stlport/BC50
155 # let libstlport{,stlg}.so point to real lib, not artificial libstlport{,stlg}.so.5 symlink
156 ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlport.so.*.*.*) \
157 $RPM_BUILD_ROOT%{_libdir}/libstlport.so
158 ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so.*.*.*) \
159 $RPM_BUILD_ROOT%{_libdir}/libstlportstlg.so
162 install -d $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_bindir}}
163 cp -a stlport.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
164 cp -a stlport-debug.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
165 install stlport-config $RPM_BUILD_ROOT%{_bindir}
168 rm -rf $RPM_BUILD_ROOT
170 %post -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
173 %post dbg -p /sbin/ldconfig
174 %postun dbg -p /sbin/ldconfig
177 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_libdir}/libstlport.so.*.*.*
180 %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5.1
181 %attr(755,root,root) %ghost %{_libdir}/libstlport.so.5
184 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_libdir}/libstlport.so
187 %attr(755,root,root) %{_bindir}/stlport-config
188 %{_includedir}/stlport
189 %{_pkgconfigdir}/stlport.pc
192 %defattr(644,root,root,755)
193 %{_libdir}/libstlport.a
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/libstlportstlg.so.*.*.*
198 %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5.1
199 %attr(755,root,root) %ghost %{_libdir}/libstlportstlg.so.5
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_libdir}/libstlportstlg.so
204 %{_pkgconfigdir}/stlport-debug.pc
207 %defattr(644,root,root,755)
208 %{_libdir}/libstlportstlg.a