--- STLport-5.1.3.ebuild 2007-09-25 22:22:27.000000000 +0200 +++ STLport-5.1.5.ebuild 2008-04-27 15:25:20.000000000 +0200 @@ -3,11 +3,11 @@ # $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/STLport-5.1.3.ebuild,v 1.1 2007/09/25 20:22:27 dev-zero Exp $ inherit eutils versionator eutils toolchain-funcs multilib flag-o-matic KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" - +#Arches that should be able to build this: ~mips ~alpha ~hppa ~arm DESCRIPTION="C++ STL library" HOMEPAGE="http://stlport.sourceforge.net/" SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2" LICENSE="as-is" SLOT="0" @@ -18,23 +18,30 @@ src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}/${PN}-5.1.2-fix_bashism.patch" + epatch "${FILESDIR}/${P}-portability-hack.patch" #Debian bug 356570 http://bugs.debian.org/356570 + epatch "${FILESDIR}/${P}-bashism.patch" #Gentoo bug 183060 http://bugs.gentoo.org/183060 + epatch "${FILESDIR}/${P}-cxx_use_c99.patch" #Debian bug 443234 http://bugs.debian.org/443234 + epatch "${FILESDIR}/${P}-hppa.patch" #Debian bug 389316 http://bugs.debian.org/389316 + epatch "${FILESDIR}/${P}-alpha.patch" #Debian bug 384247 http://bugs.debian.org/384247 + epatch "${FILESDIR}/${P}-fix-warnings.patch" #Debian bug 465395 http://bugs.debian.org/465395 + epatch "${FILESDIR}/${P}-gcc-4.3.patch" #Debian bug 468063 http://bugs.debian.org/468063 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/_STLP_VENDOR_CSTD::wcsftime/::wcsftime/' \ - stlport/stl/_cwchar.h || die "sed failed" -} + -e 's/echo ${CXX_VERSION}/echo "${CXX_VERSION}"/' \ + $(find build/Makefiles/gmake -maxdepth '1' -name '*.mak') \ + || die "sed CXX_VERSION failed" -src_compile() { # 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 */ @@ -42,10 +49,13 @@ /* 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} |" \