sys-libs/libcxx: Backport libsupc++ build fix to 7.0.0
authorMichał Górny <mgorny@gentoo.org>
Fri, 5 Oct 2018 18:36:13 +0000 (20:36 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 5 Oct 2018 18:48:32 +0000 (20:48 +0200)
Closes: https://bugs.gentoo.org/667174
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch [new file with mode: 0644]
sys-libs/libcxx/libcxx-7.0.0.ebuild

diff --git a/sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch b/sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch
new file mode 100644 (file)
index 0000000..35b04e2
--- /dev/null
@@ -0,0 +1,32 @@
+From 84f960980e5bbaf136bc130cb385379b8f610335 Mon Sep 17 00:00:00 2001
+From: Petr Hosek <phosek@chromium.org>
+Date: Thu, 4 Oct 2018 05:38:53 +0000
+Subject: [PATCH] [CMake] Use just basename when copying C++ ABI headers
+
+This avoids duplicate directories when the filename includes path.
+
+Fixes PR39145
+
+Differential Revision: https://reviews.llvm.org/D52762
+
+git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343753 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ cmake/Modules/HandleLibCXXABI.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index ef3b4f5dd..1c19d7e01 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -41,7 +41,7 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
+         get_filename_component(ifile ${fpath} NAME)
+         set(src ${incpath}/${fpath})
+-        set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${fpath})
++        set(dst ${LIBCXX_BINARY_INCLUDE_DIR}/${dstdir}/${ifile})
+         add_custom_command(OUTPUT ${dst}
+             DEPENDS ${src}
+             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+-- 
+2.19.0
+
index d94f0c1c617eb2358401a08921c9d21fdd169fcd..790f5dc12210ceeef4077348a6668546adb54f3b 100644 (file)
@@ -46,6 +46,10 @@ PATCHES=(
        # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
        # out-of-tree build.
        "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
+
+       # Fix installing when using libsupc++ backend.
+       # https://bugs.gentoo.org/667174
+       "${FILESDIR}/${PN}-7.0.0-libsupcxx-install.patch"
 )
 
 # least intrusive of all