commit:     5c39e60eb1090bb54f673f7ab03eb8edaecf32e3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  5 18:36:13 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Oct  5 18:48:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c39e60e

sys-libs/libcxx: Backport libsupc++ build fix to 7.0.0

Closes: https://bugs.gentoo.org/667174
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/libcxx-7.0.0-libsupcxx-install.patch     | 32 ++++++++++++++++++++++
 sys-libs/libcxx/libcxx-7.0.0.ebuild                |  4 +++
 2 files changed, 36 insertions(+)

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
index 00000000000..35b04e253e6
--- /dev/null
+++ b/sys-libs/libcxx/files/libcxx-7.0.0-libsupcxx-install.patch
@@ -0,0 +1,32 @@
+From 84f960980e5bbaf136bc130cb385379b8f610335 Mon Sep 17 00:00:00 2001
+From: Petr Hosek <[email protected]>
+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
+

diff --git a/sys-libs/libcxx/libcxx-7.0.0.ebuild 
b/sys-libs/libcxx/libcxx-7.0.0.ebuild
index d94f0c1c617..790f5dc1221 100644
--- a/sys-libs/libcxx/libcxx-7.0.0.ebuild
+++ b/sys-libs/libcxx/libcxx-7.0.0.ebuild
@@ -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

Reply via email to