ChangeLog

# ChangeLog for dev-libs/STLport
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/ChangeLog,v 1.66 2008/05/04 09:06:55 dev-zero Exp $

04 May 2008; Tiziano Müller STLport-5.1.5.ebuild:
Reapplied the 'sed'-line from 5.1.3 (bug #219909)

*STLport-5.1.5 (30 Apr 2008)

30 Apr 2008; Tiziano Müller
+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)

25 Sep 2007; Tiziano Müller
-files/STLport-5.0.2-gcc41.patch, -files/STLport-5.0.3-ppc.patch,
-files/STLport-5.0.3-sparc.patch, -files/STLport-5.1.0-ppc.patch,
-files/STLport-5.1.0-wrong_russian_currency_name.patch,
-STLport-5.0.3.ebuild, -STLport-5.1.0.ebuild, +STLport-5.1.3.ebuild:
Version bump (bug #185896), dropped old versions and patches. Added LFS
defines to host.h (together with some more, bug #182736).

23 Jul 2007; Gustavo Zacarias STLport-5.1.2.ebuild:
Stable on sparc

11 Jul 2007; Tiziano Müller
+files/STLport-5.1.2-fix_bashism.patch, STLport-5.1.2.ebuild:
Fixed bashism in Makefile (bug #183060)

15 Apr 2007; Markus Rothe STLport-5.1.2.ebuild:
Stable on ppc64

13 Apr 2007; Chris Gianelloni STLport-5.1.2.ebuild:
Stable on amd64 wrt bug #173175.

07 Apr 2007; Matti Bickel STLport-5.1.2.ebuild:
ppc stable (bug #173175)

03 Apr 2007; Christian Faulhammer STLport-5.1.2.ebuild:
x86 stable, bug 173175

02 Apr 2007; Tiziano Müller STLport-5.1.2.ebuild:
Re-keyworded the accidentally dropped ~sparc.

02 Apr 2007; Joseph Jezak STLport-5.1.2.ebuild:
Marked ~ppc.

*STLport-5.1.2 (01 Apr 2007)

01 Apr 2007; Tiziano Müller
+files/STLport-5.1.2-wrong_russian_currency_name.patch,
+STLport-5.1.2.ebuild:
Version bump. Fixes bug #172860, thanks to Robin Johnson.

12 Mar 2007; Raúl Porcel STLport-5.1.0.ebuild:
x86 stable

08 Mar 2007; Gustavo Zacarias STLport-5.1.0.ebuild:
Keyworded ~sparc

20 Feb 2007; Tiziano Müller -files/50STLport-4.0,
-files/4.6.2-gcc-includes.patch, -files/4.6.2-optimize.patch,
-files/STLport-vector.patch, -STLport-4.6.2-r2.ebuild,
-STLport-5.0.2.ebuild:
Dropped old versions

18 Feb 2007; Tobias Scherbaum
STLport-5.1.0.ebuild:
Stable on ppc wrt bug #165837.

17 Feb 2007; Jason Wever STLport-5.0.3.ebuild:
Stable on SPARC wrt security bug #165837.

16 Feb 2007; Tiziano Müller STLport-5.0.3.ebuild,
STLport-5.1.0.ebuild:
Removed ${ROOT}, bug #167271.

14 Feb 2007; Tiziano Müller
+files/STLport-5.0.3-ppc.patch, +files/STLport-5.0.3-sparc.patch,
STLport-5.0.3.ebuild:
Added patches for sparc and ppc.

13 Feb 2007; Steve Dibb STLport-5.1.0.ebuild:
amd64 stable, security bug 165837

13 Feb 2007; Markus Rothe STLport-5.1.0.ebuild:
Stable on ppc64; bug #165837

12 Feb 2007; Christian Faulhammer STLport-5.0.3.ebuild:
stable x86; security bug 165837

*STLport-5.0.3 (11 Feb 2007)

11 Feb 2007; Tiziano Müller +STLport-5.0.3.ebuild,
STLport-5.1.0.ebuild:
Version bump (bug #165837). Dropped static USE-flag.

26 Jan 2007; Tiziano Müller
files/STLport-5.1.0-wrong_russian_currency_name.patch:
Corrected the test-fix to make it work with older glibc versions.

26 Jan 2007; Tiziano Müller STLport-5.1.0.ebuild:
Changed sed separators to fix bug when CXX contains a full path (bug
#163828, thanks to truedfx).

13 Jan 2007; Tiziano Müller
+files/STLport-5.1.0-wrong_russian_currency_name.patch,
STLport-5.1.0.ebuild:
Added patch for the unittests. Added static USE-flag.

13 Jan 2007; Tiziano Müller STLport-5.1.0.ebuild:
Disabled parallel builds for building the library as well.

13 Jan 2007; Tiziano Müller STLport-5.1.0.ebuild:
Disabled parallel builds for building the tests, bug #161881.

08 Jan 2007; Joseph Jezak STLport-5.1.0.ebuild:
Marked ~ppc for bug #132054.

31 Dec 2006; Markus Rothe STLport-5.1.0.ebuild:
Added ~ppc64; bug #132054

24 Dec 2006; Tiziano Müller STLport-5.1.0.ebuild:
Fixed boost support (thanks to geki for pointing this out)

24 Dec 2006; Tiziano Müller
+files/STLport-5.1.0-ppc.patch, STLport-5.1.0.ebuild:
Added patch for compilation-failure on ppc (bug #132054, thanks to illusion)

24 Dec 2006; Tiziano Müller STLport-5.1.0.ebuild:
Added large file support (bug #146242, thanks to Hanno Meyer-Thurow)

*STLport-5.1.0 (24 Dec 2006)

24 Dec 2006; Tiziano Müller
-files/STLport-4.5.3-gcc3.patch, -files/STLport-4.5.3-optimize.patch,
-STLport-4.5.3-r3.ebuild, -STLport-5.0.1.ebuild, +STLport-5.1.0.ebuild:
Version bump. Dropped old versions.

01 May 2006; Markus Rothe STLport-4.6.2-r2.ebuild:
let's apply STLport-vector.patch on ppc64, too.

27 Apr 2006; Marien Zwart
files/digest-STLport-4.5.3-r3, files/digest-STLport-4.6.2-r2, Manifest:
Fixing SHA256 digest, pass four

09 Apr 2006; Mark Loeser STLport-5.0.2.ebuild:
That should have been --without-boost

09 Apr 2006; Mark Loeser
+files/STLport-5.0.2-gcc41.patch, STLport-5.0.2.ebuild:
Disable linking with boost for now, use --with-extra-cxxflags, and add patch
to fix compilation with gcc-4 by Hanno Meyer-Thurow ;
bug #127676 and bug #127188

*STLport-5.0.2 (02 Mar 2006)

02 Mar 2006; Mike Frysinger +STLport-5.0.2.ebuild:
Version bump.

*STLport-5.0.1 (08 Feb 2006)

08 Feb 2006; Mike Frysinger +STLport-5.0.1.ebuild:
Version bump by Sebastien Fabbro #122000.

28 Nov 2005; Tom Gall STLport-4.6.2-r2.ebuild:
stable on ppc64

19 Sep 2005; Mark Loeser +metadata.xml:
Adding to cpp herd

23 Aug 2005; Diego Pettenò STLport-5.0_rc2.ebuild:
Don't use cp -a.

15 Jun 2005; Markus Rothe STLport-4.6.2-r2.ebuild:
added ~ppc64

*STLport-5.0_rc2 (04 Jun 2005)

04 Jun 2005; Mike Frysinger
+files/STLport-5.0_rc2-stlp-float-type.patch, +STLport-5.0_rc2.ebuild:
Version bump for solar.

07 May 2005; Joseph Jezak +files/STLport-vector.patch,
STLport-4.6.2-r2.ebuild:
Added compile fix for ppc.

*STLport-4.6.2-r2 (06 Jul 2004)

06 Jul 2004; Mike Frysinger +STLport-4.6.2-r2.ebuild:
Make sure all the include files can be read by everyone #56245 by Akim Boyko.

01 Jul 2004; Jeremy Huddleston
STLport-4.5.3-r3.ebuild, STLport-4.6.2.ebuild:
virtual/glibc -> virtual/libc

*STLport-4.6.2 (29 May 2004)

29 May 2004; Mike Frysinger
+files/4.6.2-gcc-includes.patch, +files/4.6.2-optimize.patch,
files/STLport-4.5.3-gcc3.patch, -files/STLport-4.5.3-gcc3.patch2,
-STLport-4.5.3-r1.ebuild, -STLport-4.5.3-r2.ebuild, STLport-4.5.3-r3.ebuild,
+STLport-4.6.2.ebuild:
Version bump and clean up old ebuilds #45278

*STLport-4.5.3-r3 (29 May 2004)

29 May 2004; Mike Frysinger +STLport-4.5.3-r3.ebuild:
Version bump to make sure the libstlport_gcc_debug.so symlink isnt broken.

18 Mar 2004; David Holm STLport-4.5.3-r2.ebuild:
Added to ~ppc.

14 Mar 2004; Michael Sterrett
STLport-4.5.3-r1.ebuild, STLport-4.5.3-r2.ebuild:
Don't assign default to S; header fix

16 Dec 2002; Martin Schlemmer STLport-4.5.3-r2.ebuild :

Only apply the gcc3 g++-v3? patches if we do not use the multi spec gcc
ebuild ...

06 Dec 2002; Rodney Rees : changed sparc ~sparc keywords

*STLport-4.5.3-r2 (13 Sep 2002)

13 Sep 2002; Brandon Low STLport-4.5.3-r2.ebuild :

Fix for gcc-3.2, and follow make.conf optimizations. Thanks to
nwourms@netscape.net (Nicholas Wourms) closes bug 6111.

15 Aug 2002; Dan Armak ChangeLog :

Fix compilation - wrong path to makefile was being specified. Fixes
bug #6023.

*STLport-4.5.3-r1 (12 Jul 2002)

12 Jul 2002; Brandon Low STLport-4.5.3-r1.ebuild :

Fix for gcc-3, add LICENSE, KEYWORDS, SLOT.

*STLport-4.5.3 (13 Apr 2002)

13 Apr 2002; Bruce A. Locke STLport-4.5.3.ebuild :

Update to 4.5.3

*STLport-4.5 (21 Mar 2002)

21 Mar 2002; Seemant Kulleen STLport-4.5.ebuild :

HTML documentation does not get gzipped any more.

*STLport-4.5 (1 Feb 2002)

1 Feb 2002; G.Bevin ChangeLog :

Added initial ChangeLog which should be updated whenever the package is
updated in any way. This changelog is targetted to users. This means that the
comments should well explained and written in clean English. The details about
writing correct changelogs are explained in the skel.ChangeLog file which you
can find in the root directory of the portage repository.

Manifest

AUX STLport-5.1.2-fix_bashism.patch 3380 RMD160 e75b86bf16d688a702fe23be781f8d903226f8cd SHA1 0e78e50dae1801abece7088cb6cfc491c0947312 SHA256 b32e22a987679c849bbe7998ab819ba789ba4543dcc6c611897dfb178553dbdb
AUX STLport-5.1.2-wrong_russian_currency_name.patch 1050 RMD160 66bd42c7d7ee7a14a6be3f69a057162d5f8abacc SHA1 2f0e3291cb538c66531c2a7e037ca245a170b61c SHA256 07658cdd06c472fb6fa84254517db48931662fcd26f0bc56d41687fe9f8c115c
AUX STLport-5.1.5-alpha.patch 840 RMD160 de220df85c3ff598cb5c91452bca34bfe2b7f302 SHA1 d598db0da8db80b640545998a317e93c98e5e301 SHA256 2c7fd337165a301e50111a8d5305d6ec3c74b73940b1598d66ab703cebc633e4
AUX STLport-5.1.5-bashism.patch 2210 RMD160 6db5caa622725378aa73c2942a72a8d5c125f908 SHA1 2c3e0153fc61aafddce7d8d13579ba4a80d5bc9d SHA256 5626718d9698300577bbecbef88f9c7e30d5e59797f01925c4e8bf1093275a78
AUX STLport-5.1.5-cxx_use_c99.patch 1387 RMD160 e372afafa212ff6ff016cdef950303c32802976d SHA1 064a178eb7b43a48c1dc01a627505e89efc6a1a4 SHA256 d68ce2e9a19e3d86f6a96f8c5424f502814550a5086dbe8d99db12cdad8975bb
AUX STLport-5.1.5-fix-warnings.patch 4193 RMD160 d80618eb1cfb592117a106b7a04a1576de590a18 SHA1 109069f90181db7ef5b5169ed8cb49c98b5e982f SHA256 dfb1efe35f045779301c2b72a9d5d43a23081ac801f5767c3b2022e4a660e689
AUX STLport-5.1.5-gcc-4.3.patch 1100 RMD160 75658abd5c083351e82aba5d4aa26757f3b66ebd SHA1 d6165ad989183ffdeb8748f214f5f7ea4ca7fc6c SHA256 df5f98b6548e9300b08cd599498bd46aa6b9bc8ed5015b9394bb050aef9979b9
AUX STLport-5.1.5-hppa.patch 1222 RMD160 6bd77741f7a00b56b477b9dcc62ae997eebe6147 SHA1 b0468151c03337e97d273a61ad454c88498ce40f SHA256 95aebbae47356fe94068a6834a8e28c278e1c06e3e01ba581f8c615d9154a862
AUX STLport-5.1.5-portability-hack.patch 693 RMD160 1336764fa42f7707238887c0eabbd519162bc1c1 SHA1 f9b55367cb17a34b5200ef765b6c22a3a72d584a SHA256 532eb37422adbe4b141487d0b14bf6e4f0ba87250c8ca44aa34578f4180b42a8
DIST STLport-5.1.2.tar.bz2 675633 RMD160 c3fd1af92d270179c6cf07a09a0e6e13173dc875 SHA1 35294b85ed95b93720325490259642d4128c657b SHA256 6f6189d4233e4195a45b3e3a3d5504fd0c66b44c6217549702e8440419e28d84
DIST STLport-5.1.3.tar.bz2 679697 RMD160 7e0b484849039893717caaeb9f5cdd35e7798267 SHA1 37c2174a8884e8c83c7378901031ccaf9a29cd6b SHA256 08ecdec9fccd5e629af9cf5b5ce88e3476e8caf396aa390520e0cc18bc9fd5b4
DIST STLport-5.1.5.tar.bz2 682914 RMD160 bc24cbba247821a9b94fbc7cdf8d2b421bcc6afb SHA1 0c8b188fe74162998aea17ad689397adf99b2d93 SHA256 2470ca40adc89750c69affffde8a9e6ab6a03f4e3c93640067089f99e76f6dc5
EBUILD STLport-5.1.2.ebuild 2598 RMD160 7cfacdf5377851591067c4d43c9f1833f746a162 SHA1 d2ab7b731084ea9b4c5eca59c50339cd36c82123 SHA256 40dd640cd154a7312a13bccbecde3d5828793d5cba71b80e36276aec861a1858
EBUILD STLport-5.1.3.ebuild 2794 RMD160 eb8a8798049d856ba0073001e9ba1aafe0299ba4 SHA1 b91428fbf46840659f3d9c638aedfcd8b61e570c SHA256 47b89010813f8d5c8a98da249a761f969b572c3d240e45260d6ba13ae4fffc32
EBUILD STLport-5.1.5.ebuild 3567 RMD160 38cca6962f0d440d5dbc07e0124ac1fca5e50f32 SHA1 e417db62fd516b8be6d08cfca1c4e721202345cc SHA256 03676921cc9f79d5861dbffb353d99fa7f3cfcedf99c4491e4dccbd32b94f945
MISC ChangeLog 9897 RMD160 a0b8d81ccff7e5007a2d49e8149c10b085182b6a SHA1 24a3f8a47075a62987f0c8f343239150887d6714 SHA256 487937bf46c9a93ad541a9df9e6504d112bded1c7ae4a3483ced79f16117d76e
MISC metadata.xml 156 RMD160 537178ef5a820896e97475fb9aded47d50474bef SHA1 2a4ef4879b918a28132d21cd6d1bbaa2a30dccde SHA256 0e8490f9c62cb74e5894b52f643a02de0024d97dbfebad43082dce6bcb39555f

STLport-5.1.2.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/STLport-5.1.2.ebuild,v 1.9 2007/07/23 13:32:05 gustavoz 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}"

epatch "${FILESDIR}/${P}-wrong_russian_currency_name.patch"
epatch "${FILESDIR}/${P}-fix_bashism.patch"

sed -i \
-e 's/\(OPT += \)-O2/\1/' \
build/Makefiles/gmake/*cc.mak \
|| die "sed opts failed"

sed -i \
-e 's/_STLP_VENDOR_CSTD::wcsftime/::wcsftime/' \
stlport/stl/_cwchar.h || die "sed failed"
}

src_compile() {
cat <<- EOF >> stlport/stl/config/user_config.h
#define _STLP_NATIVE_INCLUDE_PATH ../g++-v$(gcc-major-version)
EOF

append-lfs-flags

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"
}

STLport-5.1.3.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $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"

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}"

epatch "${FILESDIR}/${PN}-5.1.2-fix_bashism.patch"

sed -i \
-e 's/\(OPT += \)-O2/\1/' \
build/Makefiles/gmake/*cc.mak \
|| die "sed opts failed"

sed -i \
-e 's/_STLP_VENDOR_CSTD::wcsftime/::wcsftime/' \
stlport/stl/_cwchar.h || die "sed 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 */
#define _PTHREADS
/* enable largefile support */
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
EOF

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"
}

STLport-5.1.5.ebuild

# 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.2 2008/05/04 09:06:55 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"

sed -i \
-e 's/_STLP_VENDOR_CSTD::wcsftime/::wcsftime/' \
stlport/stl/_cwchar.h || die "sed 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"
}

files

metadata.xml




cpp