commit:     22a7695920dd985cbb8bf2e429723804e3fdce73
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 20:05:56 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov 22 20:11:44 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22a76959

sys-devel/llvm: Update the patch and ebuild partially scan-* changes

Upstream has added installation rules for scan-build and scan-view,
and make them FHS-aware. This is mostly neat, except that scan-view
expects Python modules in /usr/share. The patch and ebuild is partially
updated to accomodate this. It will require at least cleaning up
/usr/share still.

 .../llvm/files/clang-3.8-gentoo-install.patch      | 14 ++++++++++++++
 ...g-runtime-into-usr-lib-without-suffix-3.8.patch |  4 +---
 sys-devel/llvm/llvm-9999.ebuild                    | 22 ++++------------------
 3 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/sys-devel/llvm/files/clang-3.8-gentoo-install.patch 
b/sys-devel/llvm/files/clang-3.8-gentoo-install.patch
new file mode 100644
index 0000000..25c4fca
--- /dev/null
+++ b/sys-devel/llvm/files/clang-3.8-gentoo-install.patch
@@ -0,0 +1,14 @@
+---
+ tools/clang/tools/scan-view/scan-view   | 2 +-
+
+diff --git a/tools/clang/tools/scan-view/bin/scan-view 
b/tools/clang/tools/scan-view/bin/scan-view
+index fb27da6..1f8ddb8 100755
+--- a/tools/clang/tools/scan-view/bin/scan-view
++++ b/tools/clang/tools/scan-view/bin/scan-view
+@@ -66,2 +66,2 @@ def start_browser(port, options):
+-    import ScanView
++    from clang import ScanView
+     try:
+-- 
+1.8.4.4
+

diff --git 
a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
 
b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
index cf2ca59..931eb56 100644
--- 
a/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
+++ 
b/sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
@@ -29,9 +29,7 @@ diff --git a/lib/Headers/CMakeLists.txt 
b/lib/Headers/CMakeLists.txt
 index 7de5fbe..49f439b 100644
 --- a/tools/clang/lib/Headers/CMakeLists.txt
 +++ b/tools/clang/lib/Headers/CMakeLists.txt
-@@ -98,4 +98,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
- install(
-   FILES ${files} ${CMAKE_CURRENT_BINARY_DIR}/arm_neon.h
+@@ -100,4 +100,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER 
"Misc")
    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
 -  DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
 +  DESTINATION lib/clang/${CLANG_VERSION}/include)

diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
index 7150aa8..a413692 100644
--- a/sys-devel/llvm/llvm-9999.ebuild
+++ b/sys-devel/llvm/llvm-9999.ebuild
@@ -178,10 +178,7 @@ src_prepare() {
                # Automatically select active system GCC's libraries, bugs 
#406163 and #417913
                epatch 
"${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
 
-               epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
-
-               sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
-                       tools/clang/tools/scan-build/scan-build || die
+               epatch "${FILESDIR}"/clang-3.8-gentoo-install.patch
 
                # Install clang runtime into /usr/lib/clang
                # https://llvm.org/bugs/show_bug.cgi?id=23792
@@ -464,22 +461,9 @@ multilib_src_install_all() {
        if use clang; then
                pushd tools/clang >/dev/null || die
 
-               if use static-analyzer ; then
-                       pushd tools/scan-build >/dev/null || die
-
-                       dobin ccc-analyzer scan-build
-                       dosym ccc-analyzer /usr/bin/c++-analyzer
-                       doman scan-build.1
-
-                       insinto /usr/share/llvm
-                       doins scanview.css sorttable.js
-
-                       popd >/dev/null || die
-               fi
-
                python_inst() {
                        if use static-analyzer ; then
-                               pushd tools/scan-view >/dev/null || die
+                               pushd tools/scan-view/bin >/dev/null || die
 
                                python_doscript scan-view
 
@@ -488,6 +472,8 @@ multilib_src_install_all() {
                                python_domodule *.py Resources
 
                                popd >/dev/null || die
+
+                               # TODO: remove files installed in /usr/share
                        fi
 
                        if use python ; then

Reply via email to