diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2008-04-30 18:54:27 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2008-04-30 18:54:27 +0000 |
commit | 594a7b6673ff4974050af3c74d9fa5bbb34d7485 (patch) | |
tree | 0e2ce68d17a3b4d0e6252191c6db3c34c586221f /dev-libs/STLport | |
parent | Stable on alpha, bug #219728 (diff) | |
download | gentoo-2-594a7b6673ff4974050af3c74d9fa5bbb34d7485.tar.gz gentoo-2-594a7b6673ff4974050af3c74d9fa5bbb34d7485.tar.bz2 gentoo-2-594a7b6673ff4974050af3c74d9fa5bbb34d7485.zip |
Version bump (including a lot fixes, thanks to Peter Alfredsen and Debian, bug #219457).
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'dev-libs/STLport')
-rw-r--r-- | dev-libs/STLport/ChangeLog | 15 | ||||
-rw-r--r-- | dev-libs/STLport/STLport-5.1.5.ebuild | 130 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-alpha.patch | 21 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-bashism.patch | 38 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-cxx_use_c99.patch | 49 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch | 96 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-gcc-4.3.patch | 40 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-hppa.patch | 24 | ||||
-rw-r--r-- | dev-libs/STLport/files/STLport-5.1.5-portability-hack.patch | 26 |
9 files changed, 437 insertions, 2 deletions
diff --git a/dev-libs/STLport/ChangeLog b/dev-libs/STLport/ChangeLog index 06021181bb1e..2292bb435a02 100644 --- a/dev-libs/STLport/ChangeLog +++ b/dev-libs/STLport/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-libs/STLport -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/ChangeLog,v 1.64 2007/09/25 20:22:27 dev-zero Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/ChangeLog,v 1.65 2008/04/30 18:54:27 dev-zero Exp $ + +*STLport-5.1.5 (30 Apr 2008) + + 30 Apr 2008; Tiziano Müller <dev-zero@gentoo.org> + +files/STLport-5.1.5-alpha.patch, +files/STLport-5.1.5-bashism.patch, + +files/STLport-5.1.5-cxx_use_c99.patch, + +files/STLport-5.1.5-fix-warnings.patch, + +files/STLport-5.1.5-gcc-4.3.patch, +files/STLport-5.1.5-hppa.patch, + +files/STLport-5.1.5-portability-hack.patch, +STLport-5.1.5.ebuild: + Version bump (including a lot fixes, thanks to Peter Alfredsen and Debian, + bug #219457). *STLport-5.1.3 (25 Sep 2007) diff --git a/dev-libs/STLport/STLport-5.1.5.ebuild b/dev-libs/STLport/STLport-5.1.5.ebuild new file mode 100644 index 000000000000..34adffbe91b2 --- /dev/null +++ b/dev-libs/STLport/STLport-5.1.5.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/STLport-5.1.5.ebuild,v 1.1 2008/04/30 18:54:27 dev-zero Exp $ + +inherit eutils versionator eutils toolchain-funcs multilib flag-o-matic + +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +DESCRIPTION="C++ STL library" +HOMEPAGE="http://stlport.sourceforge.net/" +SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2" +LICENSE="as-is" +SLOT="0" +IUSE="boost" + +DEPEND="boost? ( dev-libs/boost )" +RDEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + #Debian bug 356570 http://bugs.debian.org/356570 + #Gentoo bug 183060 http://bugs.gentoo.org/183060 + #Debian bug 443234 http://bugs.debian.org/443234 + #Debian bug 389316 http://bugs.debian.org/389316 + #Debian bug 384247 http://bugs.debian.org/384247 + #Debian bug 465395 http://bugs.debian.org/465395 + #Debian bug 468063 http://bugs.debian.org/468063 + epatch "${FILESDIR}/${P}-portability-hack.patch" \ + "${FILESDIR}/${P}-bashism.patch" \ + "${FILESDIR}/${P}-cxx_use_c99.patch" \ + "${FILESDIR}/${P}-hppa.patch" \ + "${FILESDIR}/${P}-alpha.patch" \ + "${FILESDIR}/${P}-fix-warnings.patch" \ + "${FILESDIR}/${P}-gcc-4.3.patch" + + sed -i \ + -e 's/\(OPT += \)-O2/\1/' \ + build/Makefiles/gmake/*cc.mak \ + || die "sed opts failed" + + # CXX_VERSION on gentoo has ( )s in them, they need to be quoted. + + sed -i \ + -e 's/echo ${CXX_VERSION}/echo "${CXX_VERSION}"/' \ + build/Makefiles/gmake/*.mak \ + || die "sed CXX_VERSION failed" + + # We have to add this to host.h to make sure + # that dependencies of STLport use the same settings + cat <<- EOF >> stlport/stl/config/host.h + #define _STLP_NATIVE_INCLUDE_PATH ../g++-v$(gcc-major-version) + /* use pthreads for threading */ + #define _PTHREADS + /* enable largefile support */ + #define _FILE_OFFSET_BITS 64 + #define _LARGEFILE_SOURCE + #define _LARGEFILE64_SOURCE + EOF +} + +src_compile() { + + sed -i \ + -e "s|\(CC :=\) gcc|\1 $(tc-getCC)|" \ + -e "s|\(CXX :=\) c++|\1 $(tc-getCXX)|" \ + -e "s|^\(CFLAGS = \)|\1 ${CFLAGS} |" \ + -e "s|^\(CCFLAGS = \)|\1 ${CFLAGS} |" \ + -e "s|^\(CPPFLAGS = \)|\1 ${CPPFLAGS} |" \ + build/Makefiles/gmake/gcc.mak || die "sed failed" + + local myconf + if use boost ; then + myconf="${myconf} --with-boost=/usr/include" + sed -i \ + -e 'N;N;N;s:/\**\n\(#define _STLP_USE_BOOST_SUPPORT 1\)*\n\*/:\1:' \ + stlport/stl/config/user_config.h + fi + + cd "${S}/build/lib" + + # It's not an autoconf script + ./configure \ + ${myconf} \ + --with-extra-cxxflags="${CXXFLAGS}" || die "configure failed" + + cd "${S}" + + cat <<- EOF >> build/Makefiles/config.mak + CFLAGS := ${CFLAGS} + EOF + + local targets + targets="all-shared all-static" + + # The build-system is broken in respect to parallel builds, bug #161881 + emake \ + -j1 \ + -C build/lib \ + -f gcc.mak \ + depend ${targets} || die "Compile failed" + +} + +src_install() { + emake -C build/lib -f gcc.mak install + dolib.so lib/* + + emake -C build/lib -f gcc.mak install-static + dolib.a lib/*.a + + insinto /usr/include + doins -r stlport + + dodoc README etc/ChangeLog* etc/*.txt doc/* +} + +src_test() { + cd "${S}/build" + + sed -i \ + -e "1aLDFLAGS := -L${S}/build/lib/obj/gcc/so -L${S}/build/lib/obj/gcc/so_g -L${S}/build/lib/obj/gcc/so_stlg" \ + test/unit/gcc.mak || die "sed failed" + + emake -j1 -C test/unit -f gcc.mak || die "emake tests failed" + + export LD_LIBRARY_PATH="./lib/obj/gcc/so_stlg" + ./test/unit/obj/gcc/so_stlg/stl_unit_test || die "unit tests failed" +} diff --git a/dev-libs/STLport/files/STLport-5.1.5-alpha.patch b/dev-libs/STLport/files/STLport-5.1.5-alpha.patch new file mode 100644 index 000000000000..93cfbf334747 --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-alpha.patch @@ -0,0 +1,21 @@ +--- stlport5.1.orig/stlport/stl/_cwchar.h ++++ stlport5.1/stlport/stl/_cwchar.h +@@ -105,18 +105,6 @@ + # define WCHAR_MAX ((wchar_t)~0) + # endif + # endif +-# if defined (__GNUC__) && defined (__alpha__) +-/* Definition of WCHAR_MIN and MAX are wrong for alpha platform +- * as gcc consider wchar_t as an unsigned type. Static assertion are +- * here to check that a future alpha SDK or a future gcc won't change the +- * situation making this workaround useless. +- */ +-_STLP_STATIC_ASSERT(((wchar_t)-1 > 0) && (WCHAR_MIN < 0)) +-# undef WCHAR_MIN +-# define WCHAR_MIN 0 +-# undef WCHAR_MAX +-# define WCHAR_MAX ((wchar_t)~0) +-# endif + # if defined(__HP_aCC) && (__HP_aCC >= 60000) + /* Starting with B.11.31, HP-UX/ia64 provides C99-compliant definitions + * of WCHAR_MIN/MAX macros without having to define diff --git a/dev-libs/STLport/files/STLport-5.1.5-bashism.patch b/dev-libs/STLport/files/STLport-5.1.5-bashism.patch new file mode 100644 index 000000000000..23abf2f3ab64 --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-bashism.patch @@ -0,0 +1,38 @@ +--- STLport-5.1.5.orig/build/Makefiles/gmake/lib/gcc.mak ++++ STLport-5.1.5/build/Makefiles/gmake/lib/gcc.mak +@@ -89,9 +89,9 @@ + # Include whole language support archive (libsupc++.a) into libstlport: + # all C++ issues are in libstlport now. + ifeq ($(OSNAME),linux) +-START_OBJ := $(shell for o in crt{i,beginS}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++START_OBJ := $(shell for o in crti.o crtbeginS.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + #START_A_OBJ := $(shell for o in crt{i,beginT}.o; do ${CXX} -print-file-name=$$o; done) +-END_OBJ := $(shell for o in crt{endS,n}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++END_OBJ := $(shell for o in crtendS.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + STDLIBS := -Wl,--whole-archive -lsupc++ ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -lpthread -lc -lm + endif + ifeq ($(OSNAME),openbsd) +@@ -107,8 +107,8 @@ + STDLIBS := -Wl,--whole-archive -lsupc++ ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -l${PTHR} -lc -lm + endif + ifeq ($(OSNAME),netbsd) +-START_OBJ := $(shell for o in crt{i,beginS}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) +-END_OBJ := $(shell for o in crt{endS,n}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++START_OBJ := $(shell for o in crti.o crtbeginS.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++END_OBJ := $(shell for o in crtendS.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + STDLIBS := -Wl,--whole-archive -lsupc++ ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -lpthread -lc -lm + endif + ifeq ($(OSNAME),sunos) +--- STLport-5.1.5.orig/build/Makefiles/gmake/app/gcc.mak ++++ STLport-5.1.5/build/Makefiles/gmake/app/gcc.mak +@@ -104,8 +104,8 @@ + endif + + ifeq ($(OSNAME),linux) +-START_OBJ := $(shell for o in crt{1,i,begin}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) +-END_OBJ := $(shell for o in crt{end,n}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++START_OBJ := $(shell for o in crt1.o crti.o crtbegin.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) ++END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm + endif + ifeq ($(OSNAME),openbsd) diff --git a/dev-libs/STLport/files/STLport-5.1.5-cxx_use_c99.patch b/dev-libs/STLport/files/STLport-5.1.5-cxx_use_c99.patch new file mode 100644 index 000000000000..68fa98b9737d --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-cxx_use_c99.patch @@ -0,0 +1,49 @@ +--- STLport-5.1.5.orig/stlport/stl/_cstdlib.h ++++ STLport-5.1.5/stlport/stl/_cstdlib.h +@@ -16,12 +16,27 @@ + #ifndef _STLP_INTERNAL_CSTDLIB + #define _STLP_INTERNAL_CSTDLIB + ++/* Work around inconsistent definition of _GLIBCXX_USE_C99 across arches; on ++ * these arches std::llabs is therefore not available. ++ * ++ * See http://bugs.debian.org/443234 ++ */ ++#ifndef _GLIBCXX_USE_C99 ++#define _GLIBCXX_USE_C99 1 ++#define _HACK_CXX_USE_C99 1 ++#endif ++ + #if defined (_STLP_USE_NEW_C_HEADERS) + # include _STLP_NATIVE_CPP_C_HEADER(cstdlib) + #else + # include <stdlib.h> + #endif + ++#ifdef _HACK_CXX_USE_C99 ++#undef _GLIBCXX_USE_C99 ++#undef _HACK_CXX_USE_C99 ++#endif ++ + #if defined (__BORLANDC__) + /* Borland process.h header do not bring anything here and is just included + * in order to avoid inclusion later. This header cannot be included later +--- STLport-5.1.5.orig/stlport/stl/_cmath.h ++++ STLport-5.1.5/stlport/stl/_cmath.h +@@ -21,7 +21,16 @@ + * so cstdlib has to be included first. + */ + #if defined (__GNUC__) && defined (_STLP_USE_NEW_C_HEADERS) ++/* See http://bugs.debian.org/443234 */ ++# ifndef _GLIBCXX_USE_C99 ++# define _GLIBCXX_USE_C99 1 ++# define _HACK_CXX_USE_C99 1 ++# endif + # include _STLP_NATIVE_CPP_C_HEADER(cstdlib) ++# ifdef _HACK_CXX_USE_C99 ++# undef _GLIBCXX_USE_C99 ++# undef _HACK_CXX_USE_C99 ++# endif + #endif + + #if defined (_STLP_USE_NEW_C_HEADERS) diff --git a/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch b/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch new file mode 100644 index 000000000000..fc155482f53f --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-fix-warnings.patch @@ -0,0 +1,96 @@ +--- STLport-5.1.5.orig/stlport/stl/_num_put.c ++++ STLport-5.1.5/stlport/stl/_num_put.c +@@ -158,7 +158,7 @@ + //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation + //is larger than ptrdiff_t one. + _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) || +- (sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed) ++ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed)) + ptrdiff_t __pad = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()), + __STATIC_CAST(streamsize, __wid - __len))); + ios_base::fmtflags __dir = __flg & ios_base::adjustfield; +--- STLport-5.1.5.orig/stlport/stl/_istream.c ++++ STLport-5.1.5/stlport/stl/_istream.c +@@ -647,7 +647,7 @@ + //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation + //is larger than ptrdiff_t one. + _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) || +- (sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed) ++ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed)) + ptrdiff_t __request = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()), _Num - __n)); + + const _CharT* __p = __scan_delim(__first, __last); +--- STLport-5.1.5.orig/stlport/stl/_locale.h ++++ STLport-5.1.5/stlport/stl/_locale.h +@@ -308,11 +308,11 @@ + #endif + + template <class _Facet> +-bool _HasFacet(const locale& __loc, const _Facet* __facet) _STLP_NOTHROW ++bool _HasFacet(const locale& __loc, const _Facet*) _STLP_NOTHROW + { return (__loc._M_get_facet(_Facet::id) != 0); } + + template <class _Facet> +-_Facet* _UseFacet(const locale& __loc, const _Facet* __facet) ++_Facet* _UseFacet(const locale& __loc, const _Facet*) + { return __STATIC_CAST(_Facet*, __loc._M_use_facet(_Facet::id)); } + + _STLP_END_NAMESPACE +--- STLport-5.1.5.orig/stlport/stl/_algo.c ++++ STLport-5.1.5/stlport/stl/_algo.c +@@ -1342,7 +1342,7 @@ + template <class _ForwardIter, class _Tp, + class _Compare1, class _Compare2, class _Distance> + _ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, +- _Compare1 __comp1, _Compare2 __comp2, _Distance*) { ++ _Compare1 _STLP_VERBOSE_PARAM(__comp1), _Compare2 __comp2, _Distance*) { + _Distance __len = distance(__first, __last); + _Distance __half; + +--- STLport-5.1.5.orig/stlport/stl/_algobase.c ++++ STLport-5.1.5/stlport/stl/_algobase.c +@@ -371,7 +371,7 @@ + + template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance> + _ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, +- _Compare1 __comp1, _Compare2 __comp2, _Distance*) { ++ _Compare1 __comp1, _Compare2 _STLP_VERBOSE_PARAM(__comp2), _Distance*) { + _Distance __len = distance(__first, __last); + _Distance __half; + _ForwardIter __middle; +--- STLport-5.1.5.orig/stlport/stl/config/features.h ++++ STLport-5.1.5/stlport/stl/config/features.h +@@ -415,6 +415,7 @@ + + #if !defined (_STLP_DEBUG) + # define _STLP_VERBOSE_ASSERT(expr,diagnostic) ++# define _STLP_VERBOSE_PARAM(param) + # define _STLP_DEBUG_CHECK(expr) + # define _STLP_DEBUG_DO(expr) + #endif +--- STLport-5.1.5.orig/stlport/stl/debug/_debug.h ++++ STLport-5.1.5/stlport/stl/debug/_debug.h +@@ -184,6 +184,7 @@ + } + # endif + ++# define _STLP_VERBOSE_PARAM(param) param + # define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr) + # define _STLP_DEBUG_DO(expr) expr; + +--- STLport-5.1.5.orig/src/strstream.cpp ++++ STLport-5.1.5/src/strstream.cpp +@@ -266,11 +266,12 @@ + } + + void strstreambuf::_M_free(char* p) { +- if (p) ++ if (p) { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; ++ } + } + + void strstreambuf::_M_setup(char* get, char* put, streamsize n) { diff --git a/dev-libs/STLport/files/STLport-5.1.5-gcc-4.3.patch b/dev-libs/STLport/files/STLport-5.1.5-gcc-4.3.patch new file mode 100644 index 000000000000..270890f80de9 --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-gcc-4.3.patch @@ -0,0 +1,40 @@ +--- STLport-5.1.5.orig/build/Makefiles/gmake/gcc.mak ++++ STLport-5.1.5/build/Makefiles/gmake/gcc.mak +@@ -29,6 +29,11 @@ + CXX_VERSION := $(shell ${CXX} --version | grep GCC | awk '{ print $$3; }') + + ifeq ($(CXX_VERSION),) ++# Current g++-4.3 ++CXX_VERSION := $(shell ${CXX} --version | grep '^g++' | awk '{ print $$4; }') ++endif ++ ++ifeq ($(CXX_VERSION),) + # 2.95 report only version + CXX_VERSION := $(shell ${CXX} --version) + endif +--- STLport-5.1.5.orig/stlport/limits.h ++++ STLport-5.1.5/stlport/limits.h +@@ -24,7 +24,11 @@ + struct _exception; + #endif + +-#include _STLP_NATIVE_C_HEADER(limits.h) ++#if defined (_STLP_HAS_INCLUDE_NEXT) ++# include_next <limits.h> ++#else ++# include _STLP_NATIVE_C_HEADER(limits.h) ++#endif + + #if (_STLP_OUTERMOST_HEADER_ID == 0x201) + # if ! defined (_STLP_DONT_POP_HEADER_ID) +--- STLport-5.1.5.orig/stlport/stl/config/_gcc.h ++++ STLport-5.1.5/stlport/stl/config/_gcc.h +@@ -4,6 +4,8 @@ + + #define _STLP_COMPILER "gcc" + ++#define _STLP_HAS_INCLUDE_NEXT 1 ++ + /* Systems having GLIBC installed have different traits */ + #if defined (__linux__) + # ifndef _STLP_USE_GLIBC diff --git a/dev-libs/STLport/files/STLport-5.1.5-hppa.patch b/dev-libs/STLport/files/STLport-5.1.5-hppa.patch new file mode 100644 index 000000000000..57e6ef7791cf --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-hppa.patch @@ -0,0 +1,24 @@ +--- STLport-5.1.5.orig/build/Makefiles/gmake/lib/gcc.mak ++++ STLport-5.1.5/build/Makefiles/gmake/lib/gcc.mak +@@ -93,6 +93,9 @@ + #START_A_OBJ := $(shell for o in crt{i,beginT}.o; do ${CXX} -print-file-name=$$o; done) + END_OBJ := $(shell for o in crtendS.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + STDLIBS := -Wl,--whole-archive -lsupc++ ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -lpthread -lc -lm ++ifneq (,$(findstring $(M_ARCH),hppa parisc64 parisc)) ++STDLIBS += -lgcc ++endif + endif + ifeq ($(OSNAME),openbsd) + START_OBJ := $(shell for o in crtbeginS.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) +--- STLport-5.1.5.orig/build/Makefiles/gmake/app/gcc.mak ++++ STLport-5.1.5/build/Makefiles/gmake/app/gcc.mak +@@ -107,6 +107,9 @@ + START_OBJ := $(shell for o in crt1.o crti.o crtbegin.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) + STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm ++ifneq (,$(findstring $(M_ARCH),hppa parisc64 parisc)) ++STDLIBS += -lgcc ++endif + endif + ifeq ($(OSNAME),openbsd) + START_OBJ := $(shell for o in crt{0,begin}.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) diff --git a/dev-libs/STLport/files/STLport-5.1.5-portability-hack.patch b/dev-libs/STLport/files/STLport-5.1.5-portability-hack.patch new file mode 100644 index 000000000000..70b978dd596f --- /dev/null +++ b/dev-libs/STLport/files/STLport-5.1.5-portability-hack.patch @@ -0,0 +1,26 @@ +--- STLport-5.1.5.orig/stlport/stl/config/_gcc.h ++++ STLport-5.1.5/stlport/stl/config/_gcc.h +@@ -459,3 +459,23 @@ + # define _STLP_STATIC_TEMPLATE_DATA 1 + #endif + ++/* Ugly hack here ; we pull in GNU libc <bits/mathdef.h> to find out whether ++ * this platform has `long double' type. It solves #356570. ++ * ++ * THIS IS BAD BECAUSE WE POLLUTE THE GLOBAL NAMESPACE. ++ */ ++#ifdef __GLIBC__ ++# if !defined(_MATH_H) ++# define _HACK_UNDEF_MATH_H ++# define _MATH_H ++# endif ++# include <bits/mathdef.h> ++# if defined(__NO_LONG_DOUBLE_MATH) ++# define _STLP_NO_LONG_DOUBLE ++# endif ++# if defined(_HACK_UNDEF_MATH_H) ++# undef _HACK_UNDEF_MATH_H ++# undef _MATH_H ++# endif ++#endif ++ |