summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2013-03-03 12:57:39 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2013-03-03 12:57:39 +0000
commit5b1fd467cbeed65a0091510e62cf5ec7434c4715 (patch)
tree388be38ad13b7b1c688eac59b1c06d53063ead8c /dev-libs/STLport
parentStable for sh, wrt bug #458188 (diff)
downloadgentoo-2-5b1fd467cbeed65a0091510e62cf5ec7434c4715.tar.gz
gentoo-2-5b1fd467cbeed65a0091510e62cf5ec7434c4715.tar.bz2
gentoo-2-5b1fd467cbeed65a0091510e62cf5ec7434c4715.zip
Add debian patch to fix building with gcc-4.7 wrt #422575 by Diego Elio Pettenò <flameeyes@gentoo.org>
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 895192F9)
Diffstat (limited to 'dev-libs/STLport')
-rw-r--r--dev-libs/STLport/ChangeLog8
-rw-r--r--dev-libs/STLport/STLport-5.2.1-r1.ebuild96
2 files changed, 103 insertions, 1 deletions
diff --git a/dev-libs/STLport/ChangeLog b/dev-libs/STLport/ChangeLog
index a2243578a8c1..2a5ffdc4f933 100644
--- a/dev-libs/STLport/ChangeLog
+++ b/dev-libs/STLport/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/STLport
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/ChangeLog,v 1.80 2013/01/04 15:15:25 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/ChangeLog,v 1.81 2013/03/03 12:57:39 xarthisius Exp $
+
+*STLport-5.2.1-r1 (03 Mar 2013)
+
+ 03 Mar 2013; Kacper Kowalik <xarthisius@gentoo.org> +STLport-5.2.1-r1.ebuild:
+ Add debian patch to fix building with gcc-4.7 wrt #422575 by Diego Elio
+ Pettenò <flameeyes@gentoo.org>
04 Jan 2013; Ulrich Müller <ulm@gentoo.org> STLport-5.2.1.ebuild:
Fix LICENSE, bug 448166.
diff --git a/dev-libs/STLport/STLport-5.2.1-r1.ebuild b/dev-libs/STLport/STLport-5.2.1-r1.ebuild
new file mode 100644
index 000000000000..c7f4af0098c8
--- /dev/null
+++ b/dev-libs/STLport/STLport-5.2.1-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/STLport-5.2.1-r1.ebuild,v 1.1 2013/03/03 12:57:39 xarthisius Exp $
+
+EAPI="2"
+
+inherit eutils versionator toolchain-funcs multilib
+
+PATCH_V="2"
+
+DESCRIPTION="C++ STL library"
+HOMEPAGE="http://stlport.sourceforge.net/"
+SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2
+ http://dev.gentoo.org/~xarthisius/distfiles/${PN}-patches-${PV}-${PATCH_V}.tbz2"
+
+LICENSE="boehm-gc HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="boost debug static static-libs threads"
+
+DEPEND="boost? ( >=dev-libs/boost-1.35.0-r5 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ # make sure OSNAME is not in the environment (bug #305399)
+ unset OSNAME
+}
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}/patches"
+ EPATCH_SUFFIX="diff"
+ epatch
+
+ # 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_configure() {
+ local myconf
+
+ if use boost ; then
+ BOOST_PKG="$(best_version ">=dev-libs/boost-1.35.0-r5")"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+
+ myconf+="--with-boost=${BOOST_INC} --with-system-boost "
+ # make sure user apps (e.g. other packges using STLport) use boost as well
+ sed -i \
+ -e 'N;N;N;s:/\**\n\(#define _STLP_USE_BOOST_SUPPORT 1\)*\n\*/:\1:' \
+ stlport/stl/config/user_config.h
+ fi
+
+ use debug || myconf+="--without-debug "
+ use static-libs && myconf+="--enable-static "
+ use threads || myconf+="--without-thread "
+ use static && myconf+="--use-static-gcc "
+
+ # It's not an autoconf script
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ --use-compiler-family=gcc \
+ ${myconf} \
+ --with-cc="$(tc-getCC)" \
+ --with-cxx="$(tc-getCXX)" \
+ --with-extra-cflags="${CFLAGS}" \
+ --with-extra-cxxflags="${CXXFLAGS}" \
+ --with-extra-ldflags="${LDFLAGS}" || die "configure failed"
+}
+
+src_install() {
+ # precreate some directories
+ dodir /usr/$(get_libdir)
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc README etc/ChangeLog etc/*.txt doc/*.txt doc/{FAQ,README.utf8}
+}
+
+src_test() {
+ if use static ; then
+ ewarn "Tests don't work when building with USE=static. Skipping..."
+ return
+ fi
+ default
+}