summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-05-30 23:21:43 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-05-30 23:21:43 +0000
commit60e8890fbe1c06a710734b2687640c375fb90110 (patch)
tree88048e125fb205343662dc5c1408972d82f388ff /sys-libs
parentFix build with new automake/aclocal. Also bug #343341: _FORTIFY_SOURCE. (diff)
downloadgentoo-2-60e8890fbe1c06a710734b2687640c375fb90110.tar.gz
gentoo-2-60e8890fbe1c06a710734b2687640c375fb90110.tar.bz2
gentoo-2-60e8890fbe1c06a710734b2687640c375fb90110.zip
add a static-libs useflag and link tests with -lm
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libcxx/ChangeLog5
-rw-r--r--sys-libs/libcxx/libcxx-9999.ebuild24
2 files changed, 22 insertions, 7 deletions
diff --git a/sys-libs/libcxx/ChangeLog b/sys-libs/libcxx/ChangeLog
index 40f0e694f949..3e4ada5b7bde 100644
--- a/sys-libs/libcxx/ChangeLog
+++ b/sys-libs/libcxx/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-libs/libcxx
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.13 2013/05/30 21:51:41 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.14 2013/05/30 23:21:43 aballier Exp $
+
+ 30 May 2013; Alexis Ballier <aballier@gentoo.org> libcxx-9999.ebuild:
+ add a static-libs useflag and link tests with -lm
30 May 2013; Alexis Ballier <aballier@gentoo.org>
-libcxx-0.0_p20121105.ebuild:
diff --git a/sys-libs/libcxx/libcxx-9999.ebuild b/sys-libs/libcxx/libcxx-9999.ebuild
index ff51b70bf31a..95db05dda4fb 100644
--- a/sys-libs/libcxx/libcxx-9999.ebuild
+++ b/sys-libs/libcxx/libcxx-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.6 2013/05/30 21:48:05 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.7 2013/05/30 23:21:43 aballier Exp $
EAPI=5
@@ -25,9 +25,9 @@ if [ "${PV%9999}" = "${PV}" ] ; then
else
KEYWORDS=""
fi
-IUSE=""
+IUSE="static-libs"
-RDEPEND="sys-libs/libcxxrt"
+RDEPEND="sys-libs/libcxxrt[static-libs?]"
DEPEND="${RDEPEND}
sys-devel/clang
app-arch/xz-utils"
@@ -46,19 +46,31 @@ src_configure() {
# TODO: cross-compile ?
export CC=clang
export CXX=clang++
- cmake-utils_src_configure
+ use static-libs && BUILD_DIR="${S}_static" mycmakeargs="-DLIBCXX_ENABLE_SHARED=OFF" cmake-utils_src_configure
+ BUILD_DIR="${S}_shared" cmake-utils_src_configure
+}
+
+src_compile() {
+ use static-libs && BUILD_DIR="${S}_static" cmake-utils_src_compile
+ BUILD_DIR="${S}_shared" cmake-utils_src_compile
}
# Tests fail for now, if anybody is able to fix them, help is very welcome.
src_test() {
cd "${S}/test"
- LD_LIBRARY_PATH="${CMAKE_BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
+ LD_LIBRARY_PATH="${S}_shared/lib:${LD_LIBRARY_PATH}" \
CC="clang++" \
HEADER_INCLUDE="-I${S}/include" \
- SOURCE_LIB="-L${CMAKE_BUILD_DIR}/lib" \
+ SOURCE_LIB="-L${S}_shared/lib" \
+ LIBS="-lm" \
./testit || die
}
+src_install() {
+ use static-libs && BUILD_DIR="${S}_static" cmake-utils_src_install
+ BUILD_DIR="${S}_shared" cmake-utils_src_install
+}
+
pkg_postinst() {
elog "This package (${PN}) is mainly intended as a replacement for the C++"
elog "standard library when using clang."