summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-09-22 17:33:38 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-09-22 17:46:31 +0200
commit7a2e0589b95ea6ce11c71cbbade2a2fb1958a539 (patch)
tree2e9e920597c5f96e615ba45ef8f7898fee56abe9 /sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild
parentsys-kernel/hardened-sources: version bump to 4.7.4-r1, remove 4.7.4 (diff)
downloadgentoo-7a2e0589b95ea6ce11c71cbbade2a2fb1958a539.tar.gz
gentoo-7a2e0589b95ea6ce11c71cbbade2a2fb1958a539.tar.bz2
gentoo-7a2e0589b95ea6ce11c71cbbade2a2fb1958a539.zip
sys-libs/libcxxrt: bump a new snapshot
Package-Manager: portage-2.3.1
Diffstat (limited to 'sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild')
-rw-r--r--sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild b/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild
new file mode 100644
index 000000000000..bcb21bd8e197
--- /dev/null
+++ b/sys-libs/libcxxrt/libcxxrt-0.0_p20160922.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI="git://github.com/pathscale/libcxxrt.git"
+
+[ "${PV%9999}" != "${PV}" ] && SCM="git-2" || SCM=""
+
+inherit flag-o-matic toolchain-funcs portability ${SCM} multilib-minimal
+
+DESCRIPTION="C++ Runtime from PathScale, FreeBSD and NetBSD"
+HOMEPAGE="https://github.com/pathscale/libcxxrt http://www.pathscale.com/node/265"
+if [ "${PV%9999}" = "${PV}" ] ; then
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ DEPEND="app-arch/xz-utils"
+else
+ SRC_URI=""
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+if [ "${PV%9999}" = "${PV}" ] ; then
+ KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+else
+ KEYWORDS=""
+fi
+IUSE="libunwind +static-libs"
+
+RDEPEND="libunwind? ( || ( >=sys-libs/libunwind-1.0.1-r1[static-libs?]
+ sys-libs/llvm-libunwind[static-libs?] ) )"
+DEPEND="${RDEPEND}
+ ${DEPEND}"
+
+DOCS=( AUTHORS COPYRIGHT README )
+
+src_prepare() {
+ cp "${FILESDIR}/Makefile" src/ || die
+ cp "${FILESDIR}/Makefile.test" test/Makefile || die
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ # Notes: we build -nodefaultlibs to avoid linking to gcc libs.
+ # libcxxrt needs: dladdr (dlopen_lib), libunwind or libgcc_s and the libc.
+ tc-export CC CXX AR
+ append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
+ cd "${BUILD_DIR}/src"
+ LIBS="$(dlopen_lib) -l$(usex libunwind unwind gcc_s) -lc" emake shared
+ use static-libs && emake static
+}
+
+multilib_src_test() {
+ cd "${BUILD_DIR}/test"
+ LD_LIBRARY_PATH="${BUILD_DIR}/src:${LD_LIBRARY_PATH}" \
+ LIBS="-L${BUILD_DIR}/src -lcxxrt -l$(usex libunwind unwind gcc_s) -lc" \
+ emake check
+}
+
+multilib_src_install() {
+ # TODO: See README. Maybe hide it in a subdir and let only libcxx know about
+ # it. FreeBSD head installs it in /lib
+ dolib.so src/${PN}.so*
+ use static-libs && dolib.a src/${PN}.a
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ insinto /usr/include/libcxxrt/
+ doins src/cxxabi.h src/unwind*.h
+}