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