diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-10-05 16:14:55 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-10-05 16:46:45 +0200 |
commit | f24f51ecacae2848e95c0fefedfd91708d53c564 (patch) | |
tree | b418d23c5cae35de67497d214d9b1056d517c407 /sys-libs/libcxx | |
parent | sys-libs/libcxxabi: Wrap up 3.9.0 release (diff) | |
download | gentoo-f24f51ecacae2848e95c0fefedfd91708d53c564.tar.gz gentoo-f24f51ecacae2848e95c0fefedfd91708d53c564.tar.bz2 gentoo-f24f51ecacae2848e95c0fefedfd91708d53c564.zip |
sys-libs/libcxx: Backport libcxxabi support to 3.9.0
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r-- | sys-libs/libcxx/libcxx-3.9.0.ebuild | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sys-libs/libcxx/libcxx-3.9.0.ebuild b/sys-libs/libcxx/libcxx-3.9.0.ebuild index 110038bf4280..656a9799a33d 100644 --- a/sys-libs/libcxx/libcxx-3.9.0.ebuild +++ b/sys-libs/libcxx/libcxx-3.9.0.ebuild @@ -32,11 +32,14 @@ if [[ ${PV} != 9999 ]] ; then else KEYWORDS="" fi -IUSE="elibc_glibc elibc_musl +libcxxrt libunwind +static-libs test" -REQUIRED_USE="libunwind? ( libcxxrt )" - -RDEPEND="libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) - !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )" +IUSE="elibc_glibc elibc_musl libcxxabi +libcxxrt libunwind +static-libs test" +REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) ) + ?? ( libcxxabi libcxxrt )" + +RDEPEND=" + libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) + libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) + !libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )" # llvm-3.9.0 needed because its cmake files installation path changed, which is # needed by libcxx # clang-3.9.0 installs necessary target symlinks unconditionally @@ -66,7 +69,7 @@ python_check_deps() { pkg_setup() { use test && python-any-r1_pkg_setup - if ! use libcxxrt && ! tc-is-gcc ; then + if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then eerror "To build ${PN} against libsupc++, you have to use gcc. Other" eerror "compilers are not supported. Please set CC=gcc and CXX=g++" eerror "and try again." @@ -87,7 +90,10 @@ src_configure() { multilib_src_configure() { local cxxabi cxxabi_incs - if use libcxxrt; then + if use libcxxabi; then + cxxabi=libcxxabi + cxxabi_incs="${EPREFIX}/usr/include/libcxxabi" + elif use libcxxrt; then cxxabi=libcxxrt cxxabi_incs="${EPREFIX}/usr/include/libcxxrt" else @@ -149,7 +155,7 @@ END_LDSCRIPT gen_static_ldscript() { local libdir=$(get_libdir) - local cxxabi_lib=$(usex libcxxrt "libcxxrt.a" "libsupc++.a") + local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")") # Move it first. mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die @@ -168,7 +174,7 @@ gen_static_ldscript() { gen_shared_ldscript() { local libdir=$(get_libdir) # libsupc++ doesn't have a shared version - local cxxabi_lib=$(usex libcxxrt "libcxxrt.so" "libsupc++.a") + local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")") mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die local deps="libc++_shared.so ${cxxabi_lib}" |