|
|
# $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 $ | # $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 | inherit eutils versionator eutils toolchain-funcs multilib flag-o-matic |
| |
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" | KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" |
|
#Arches that should be able to build this: ~mips ~alpha ~hppa ~arm |
DESCRIPTION="C++ STL library" | DESCRIPTION="C++ STL library" |
HOMEPAGE="http://stlport.sourceforge.net/" | HOMEPAGE="http://stlport.sourceforge.net/" |
SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2" | SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2" |
LICENSE="as-is" | LICENSE="as-is" |
SLOT="0" | SLOT="0" |
|
|
| |
src_unpack() { | src_unpack() { |
unpack ${A} | unpack ${A} |
cd "${S}" | 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 \ | sed -i \ |
-e 's/\(OPT += \)-O2/\1/' \ | -e 's/\(OPT += \)-O2/\1/' \ |
build/Makefiles/gmake/*cc.mak \ | build/Makefiles/gmake/*cc.mak \ |
|| die "sed opts failed" | || die "sed opts failed" |
| |
|
#CXX_VERSION on gentoo has ()s in them, they need to be quoted. |
|
|
sed -i \ | sed -i \ |
-e 's/_STLP_VENDOR_CSTD::wcsftime/::wcsftime/' \ |
-e 's/echo ${CXX_VERSION}/echo "${CXX_VERSION}"/' \ |
stlport/stl/_cwchar.h || die "sed failed" |
$(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 | # We have to add this to host.h to make sure |
# that dependencies of STLport use the same settings | # that dependencies of STLport use the same settings |
cat <<- EOF >> stlport/stl/config/host.h | cat <<- EOF >> stlport/stl/config/host.h |
#define _STLP_NATIVE_INCLUDE_PATH ../g++-v$(gcc-major-version) | #define _STLP_NATIVE_INCLUDE_PATH ../g++-v$(gcc-major-version) |
/* use pthreads for threading */ | /* use pthreads for threading */ |
|
|
/* enable largefile support */ | /* enable largefile support */ |
#define _FILE_OFFSET_BITS 64 | #define _FILE_OFFSET_BITS 64 |
#define _LARGEFILE_SOURCE | #define _LARGEFILE_SOURCE |
#define _LARGEFILE64_SOURCE | #define _LARGEFILE64_SOURCE |
EOF | EOF |
|
} |
|
|
|
src_compile() { |
| |
sed -i \ | sed -i \ |
-e "s|\(CC :=\) gcc|\1 $(tc-getCC)|" \ | -e "s|\(CC :=\) gcc|\1 $(tc-getCC)|" \ |
-e "s|\(CXX :=\) c++|\1 $(tc-getCXX)|" \ | -e "s|\(CXX :=\) c++|\1 $(tc-getCXX)|" \ |
-e "s|^\(CFLAGS = \)|\1 ${CFLAGS} |" \ | -e "s|^\(CFLAGS = \)|\1 ${CFLAGS} |" \ |