sys-devel/llvm: Update the patch and ebuild partially scan-* changes
authorMichał Górny <mgorny@gentoo.org>
Sun, 22 Nov 2015 20:05:56 +0000 (21:05 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 22 Nov 2015 20:11:44 +0000 (21:11 +0100)
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.

sys-devel/llvm/files/clang-3.8-gentoo-install.patch [new file with mode: 0644]
sys-devel/llvm/files/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
sys-devel/llvm/llvm-9999.ebuild

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 (file)
index 0000000..25c4fca
--- /dev/null
@@ -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
+
index cf2ca5947016d1024715fbf824374a138b8f5fc4..931eb56e5a960d8f660daa7e6856bf36817777f9 100644 (file)
@@ -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)
index 7150aa89d74ec430af64773c576df7030ecec854..a41369233a8a69a0bea9003e096ea6cc39b2dd07 100644 (file)
@@ -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