|
1 ## |
|
2 ## stlport.spec -- OpenPKG RPM Package Specification |
|
3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
4 ## |
|
5 ## Permission to use, copy, modify, and distribute this software for |
|
6 ## any purpose with or without fee is hereby granted, provided that |
|
7 ## the above copyright notice and this permission notice appear in all |
|
8 ## copies. |
|
9 ## |
|
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
21 ## SUCH DAMAGE. |
|
22 ## |
|
23 |
|
24 # package information |
|
25 Name: stlport |
|
26 Summary: C++ Standard Template Library |
|
27 URL: http://www.stlport.org/ |
|
28 Vendor: Boris Fomitchev et al. |
|
29 Packager: OpenPKG Foundation e.V. |
|
30 Distribution: OpenPKG Community |
|
31 Class: EVAL |
|
32 Group: Language |
|
33 License: STLport |
|
34 Version: 5.0.2 |
|
35 Release: 20080101 |
|
36 |
|
37 # package options |
|
38 %option with_debug yes |
|
39 |
|
40 # list of sources |
|
41 Source0: http://switch.dl.sourceforge.net/stlport/STLport-%{version}.tar.gz |
|
42 |
|
43 # build information |
|
44 Prefix: %{l_prefix} |
|
45 BuildRoot: %{l_buildroot} |
|
46 BuildPreReq: OpenPKG, openpkg >= 20040130, gcc |
|
47 PreReq: OpenPKG, openpkg >= 20040130, gcc |
|
48 AutoReq: no |
|
49 AutoReqProv: no |
|
50 |
|
51 %description |
|
52 STLport is a reimplementation of the classic SGI C++ Standard |
|
53 Template Library (STL), introducing unique features like Debug mode |
|
54 and Safe STL. It offers higher portability while complying with |
|
55 standards and retaining full functionality. |
|
56 |
|
57 The Standard Template Library (STL) is a C++ library of container |
|
58 classes, algorithms, and iterators providing many of the basic |
|
59 algorithms and data structures of computer science. |
|
60 |
|
61 %track |
|
62 prog stlport = { |
|
63 version = %{version} |
|
64 url = http://prdownloads.sourceforge.net/stlport/ |
|
65 regex = STLport-(\d+\.\d+\.\d+)\.tar\.gz |
|
66 } |
|
67 |
|
68 %prep |
|
69 %setup -q -n STLport |
|
70 %{l_shtool} subst \ |
|
71 -e 's;\(define _STLP_NATIVE_INCLUDE_PATH\).*;\1 %{l_prefix}/include/g++;' \ |
|
72 stlport/config/stl_gcc.h |
|
73 %{l_shtool} subst \ |
|
74 -e 's;^\(# if defined (__QNXNTO__) || ( defined(__GNUC__)\) && defined(__APPLE__);\1;' \ |
|
75 src/num_put_float.cpp |
|
76 |
|
77 %build |
|
78 buildtargets="release-static" |
|
79 %if "%{with_debug}" == "yes" |
|
80 buildtargets="$buildtargets dbg-static stldbg-static" |
|
81 %endif |
|
82 cd build/lib && %{l_make} %{l_mflags} -f gcc.mak $buildtargets |
|
83 |
|
84 %install |
|
85 rm -rf $RPM_BUILD_ROOT |
|
86 %{l_shtool} mkdir -f -p -m 755 \ |
|
87 $RPM_BUILD_ROOT%{l_prefix}/include |
|
88 ( cd build/lib |
|
89 installtargets="install-release-static" |
|
90 %if "%{with_debug}" == "yes" |
|
91 installtargets="$installtargets install-dbg-static install-stldbg-static" |
|
92 %endif |
|
93 %{l_make} %{l_mflags} -f gcc.mak $installtargets \ |
|
94 INSTALL="%{l_shtool}"" install -c" \ |
|
95 INSTALL_LIB_DIR="$RPM_BUILD_ROOT%{l_prefix}/lib" \ |
|
96 INSTALL_LIB_DIR_DBG="$RPM_BUILD_ROOT%{l_prefix}/lib" \ |
|
97 INSTALL_LIB_DIR_STLDBG="$RPM_BUILD_ROOT%{l_prefix}/lib" |
|
98 ) || exit $? |
|
99 rm -rf stlport/BC50 stlport/config/new_compiler |
|
100 %{l_tar} cf - stlport | (cd $RPM_BUILD_ROOT%{l_prefix}/include && %{l_tar} xf -) || exit $? |
|
101 chmod -R a+r $RPM_BUILD_ROOT%{l_prefix}/include/stlport |
|
102 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
103 |
|
104 %files -f files |
|
105 |
|
106 %clean |
|
107 rm -rf $RPM_BUILD_ROOT |
|
108 |