michael@32: ## michael@32: ## stlport.spec -- OpenPKG RPM Package Specification michael@32: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@32: ## michael@32: ## Permission to use, copy, modify, and distribute this software for michael@32: ## any purpose with or without fee is hereby granted, provided that michael@32: ## the above copyright notice and this permission notice appear in all michael@32: ## copies. michael@32: ## michael@32: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@32: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@32: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@32: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@32: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@32: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@32: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@32: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@32: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@32: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@32: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@32: ## SUCH DAMAGE. michael@32: ## michael@32: michael@32: # package information michael@32: Name: stlport michael@32: Summary: C++ Standard Template Library michael@32: URL: http://www.stlport.org/ michael@32: Vendor: Boris Fomitchev et al. michael@32: Packager: OpenPKG Foundation e.V. michael@32: Distribution: OpenPKG Community michael@32: Class: EVAL michael@32: Group: Language michael@32: License: STLport michael@33: Version: 5.2.1 michael@33: Release: 20090106 michael@32: michael@32: # package options michael@32: %option with_debug yes michael@32: michael@32: # list of sources michael@32: Source0: http://switch.dl.sourceforge.net/stlport/STLport-%{version}.tar.gz michael@33: Patch0: stlport.patch michael@32: michael@32: # build information michael@32: Prefix: %{l_prefix} michael@32: BuildRoot: %{l_buildroot} michael@91: BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, gcc::with_cxx = yes, make michael@91: PreReq: OpenPKG, openpkg >= 20040130, gcc, gcc::with_cxx = yes michael@32: AutoReq: no michael@32: AutoReqProv: no michael@32: michael@32: %description michael@32: STLport is a reimplementation of the classic SGI C++ Standard michael@32: Template Library (STL), introducing unique features like Debug mode michael@32: and Safe STL. It offers higher portability while complying with michael@32: standards and retaining full functionality. michael@32: michael@32: The Standard Template Library (STL) is a C++ library of container michael@32: classes, algorithms, and iterators providing many of the basic michael@32: algorithms and data structures of computer science. michael@32: michael@32: %track michael@32: prog stlport = { michael@32: version = %{version} michael@32: url = http://prdownloads.sourceforge.net/stlport/ michael@32: regex = STLport-(\d+\.\d+\.\d+)\.tar\.gz michael@32: } michael@32: michael@32: %prep michael@33: %setup -q -n STLport-%{version} michael@33: %patch -p0 michael@32: %{l_shtool} subst \ michael@33: -e 's;^\(# if defined (__QNXNTO__) || ( defined(__GNUC__)\) && defined(__APPLE__) );\1;' \ michael@33: src/num_put_float.cpp michael@32: %{l_shtool} subst \ michael@33: -e 's/__f->_file;/fileno((FILE *)__f);/g' \ michael@33: src/_stdio_file.h michael@33: %{l_shtool} subst \ michael@33: -e 's;\(_STLP_STATIC_ASSERT( sizeof(long double).*\);//\1;' \ michael@33: src/num_get_float.cpp michael@33: %{l_shtool} subst \ michael@33: -e 's;( \(defined(__GNUC__)\);\1;' \ michael@32: src/num_put_float.cpp michael@32: michael@32: %build michael@32: buildtargets="release-static" michael@32: %if "%{with_debug}" == "yes" michael@32: buildtargets="$buildtargets dbg-static stldbg-static" michael@32: %endif michael@33: cd build/lib && %{l_make} %{l_mflags -O} -f gcc.mak $buildtargets michael@32: michael@32: %install michael@32: rm -rf $RPM_BUILD_ROOT michael@32: %{l_shtool} mkdir -f -p -m 755 \ michael@32: $RPM_BUILD_ROOT%{l_prefix}/include michael@32: ( cd build/lib michael@32: installtargets="install-release-static" michael@32: %if "%{with_debug}" == "yes" michael@32: installtargets="$installtargets install-dbg-static install-stldbg-static" michael@32: %endif michael@32: %{l_make} %{l_mflags} -f gcc.mak $installtargets \ michael@32: INSTALL="%{l_shtool}"" install -c" \ michael@32: INSTALL_LIB_DIR="$RPM_BUILD_ROOT%{l_prefix}/lib" \ michael@32: INSTALL_LIB_DIR_DBG="$RPM_BUILD_ROOT%{l_prefix}/lib" \ michael@32: INSTALL_LIB_DIR_STLDBG="$RPM_BUILD_ROOT%{l_prefix}/lib" michael@32: ) || exit $? michael@32: rm -rf stlport/BC50 stlport/config/new_compiler michael@32: %{l_tar} cf - stlport | (cd $RPM_BUILD_ROOT%{l_prefix}/include && %{l_tar} xf -) || exit $? michael@32: chmod -R a+r $RPM_BUILD_ROOT%{l_prefix}/include/stlport michael@32: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@32: michael@32: %files -f files michael@32: michael@32: %clean michael@32: rm -rf $RPM_BUILD_ROOT michael@32: