diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /dev-util/clazy | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'dev-util/clazy')
-rw-r--r-- | dev-util/clazy/Manifest | 7 | ||||
-rw-r--r-- | dev-util/clazy/clazy-1.5-r1.ebuild | 8 | ||||
-rw-r--r-- | dev-util/clazy/clazy-1.6-r1.ebuild (renamed from dev-util/clazy/clazy-1.5.ebuild) | 20 | ||||
-rw-r--r-- | dev-util/clazy/files/clazy-1.6-clang-cpp.patch | 60 | ||||
-rw-r--r-- | dev-util/clazy/files/clazy-1.6-llvm-10.patch | 75 |
5 files changed, 161 insertions, 9 deletions
diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest index 48017c6e57e1..654aad009f81 100644 --- a/dev-util/clazy/Manifest +++ b/dev-util/clazy/Manifest @@ -1,4 +1,7 @@ +AUX clazy-1.6-clang-cpp.patch 2138 BLAKE2B c51fe27ced22c25f754583ec3b39f92dbc2f68e6ad823802b764dc85385c1f103db6f54fe0fa213386b092dd968e8b70e2fe7cb424b83ce26964ba22a26eac0f SHA512 f916a6a5dc2a25e7dfc3c75ddc9b31d189c7a1b88db8ef3bdd6168e571e03472f099877c1c998917edcc3ccc1e4eb22bac481e95ced9c8efa98aaf9d90f59de7 +AUX clazy-1.6-llvm-10.patch 3309 BLAKE2B e984da005e3ba4a07f55995e569035e52e8f897afc408313f73ea361b49b3a62df779a278cb7dfade7d814016bad3734a24fb0b1c3216f7cf09b8bb21cac01fd SHA512 6f5ef3e745159da352e867be1c3ffecbf143c3763e08dfccb8bd85db1a7676fc84d9577b53d9809d5c29ac3b570278f8e6fa426a11bd38a2706e21b426caa92b DIST clazy-1.5.tar.xz 352344 BLAKE2B 0f7200900f1a8bcad3020cf98522e3ac9ba01dddc9b2200f08a8a86102e4389af7a4a86e1832ee4c0e750267948a908627032385a01af94d8d0ae5f438114b9e SHA512 863cb9609d02a2260b61bc6cb3e6d8a84975d3b4e4f1c94a82e8c600d95a28483c323f47ac39c39ecef24d0f51871b358055868c63a49b136cf8ee3060df5a52 -EBUILD clazy-1.5-r1.ebuild 1236 BLAKE2B 381df225a577f1a9c801629ac08e7a4d755c98c3bacf94ed2c116472e00fb41a1325a1c0a1076bb1e9ed8ca3cfea7668d4b6b64367fe4e1d8b1788f25d95aadc SHA512 36994dab1861a6a42ab03050b64d285710d708b5f139e42329f6d64f0e8dbd89e07e6efa111933077424ebf346287cb90e4474f9a996889c8d5d82731ac4c6ca -EBUILD clazy-1.5.ebuild 847 BLAKE2B 52865bc6ed518633036e513316d5648aac2e05e208d21c9677e2ca75d4a84aaaf9e98bc8c2a92defdba831ff24ff4b217ce4278a7c93757406616fe362d59818 SHA512 d8081cf01c51604f5f742f8c1c2f3d81b2384429d378d964eb93d90755df5211b30e3a0eb31aaeb59e33e1ddcece9fc4d64cb875f28aca20e2e852aa0ecd8548 +DIST clazy-1.6.tar.xz 364292 BLAKE2B 01da58e34d5a7cb1e812d10264cebe15e90369589535e07f2c9f4520971f2e95b2c70494e99e34f7077957ec1bf01352fa6a72a64f0572e8a5db422267ab727a SHA512 dc7cb9590bbc40a2ac51abe305b6520ebc1ff7128ff21b4f6111d18f14eb8c2ab66d907636a18c7508143b708e70ba69f9d6fad88ffce12dec981a9bdd0edcc0 +EBUILD clazy-1.5-r1.ebuild 1245 BLAKE2B 423002fe1ef029ede892c00fc8819aaf147dc9b9599778a23029b596014f27785f3c02fe61560bbb35f55d3783954f0bd4f8d1a6e22539b2b142d8cfa9acf98a SHA512 fdaba609e73bc2ccaf91d780f703736408dc4fca493f9b8d28fa950345c213867353836b312eb58c954ad048b9f1d760c0b39da799e2373e4293fdff8e38ed1e +EBUILD clazy-1.6-r1.ebuild 1302 BLAKE2B b1b45ad5116fa3d9617c81b5a239ada8cb508bb691b9b90aa25cf98e5d45e6ff06a67c5d94ee44cd38cab2e64795dc8bb9d0988ec312a544df4949ef39cfc246 SHA512 8ed130e6a5930c1ed58fc8bd6b2e74d36d42c311f758f8a20117e34faee7eeb8135d70351346f90a433e4c29ac76a7fe641c2e8193bbd166af56727b1d3733a9 MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/dev-util/clazy/clazy-1.5-r1.ebuild b/dev-util/clazy/clazy-1.5-r1.ebuild index d3f38a652bb6..cc5cf804601c 100644 --- a/dev-util/clazy/clazy-1.5-r1.ebuild +++ b/dev-util/clazy/clazy-1.5-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,11 +11,11 @@ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" LICENSE="LGPL-2+" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="amd64" IUSE="" RDEPEND=" - sys-devel/clang:= + <sys-devel/clang-10:= >=sys-devel/llvm-3.8:= " DEPEND="${RDEPEND}" @@ -37,7 +37,7 @@ src_configure() { # clang pulls in the equivalent llvm version, but not vice versa. # so, we must find llvm based on the installed clang version. # bug #681568 - local clang_version=$(best_version sys-devel/clang) + local clang_version=$(best_version "<sys-devel/clang-10") export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" cmake_src_configure } diff --git a/dev-util/clazy/clazy-1.5.ebuild b/dev-util/clazy/clazy-1.6-r1.ebuild index ba0428212c7a..2627d7b7becb 100644 --- a/dev-util/clazy/clazy-1.5.ebuild +++ b/dev-util/clazy/clazy-1.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,17 +11,21 @@ SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" LICENSE="LGPL-2+" SLOT="0" -KEYWORDS="amd64" +KEYWORDS="~amd64" IUSE="" RDEPEND=" - sys-devel/clang:= >=sys-devel/llvm-3.8:= " DEPEND="${RDEPEND}" DOCS=( README.md ) +PATCHES=( + "${FILESDIR}/${P}-llvm-10.patch" + "${FILESDIR}/${P}-clang-cpp.patch" +) + src_prepare() { cmake_src_prepare @@ -32,6 +36,16 @@ src_prepare() { -i docs/man/CMakeLists.txt || die } +src_configure() { + # this package requires both llvm and clang of the same version. + # clang pulls in the equivalent llvm version, but not vice versa. + # so, we must find llvm based on the installed clang version. + # bug #681568 + local clang_version=$(best_version "sys-devel/clang") + export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" + cmake_src_configure +} + src_install() { cmake_src_install mv "${D}"/usr/share/doc/clazy/* "${D}"/usr/share/doc/${PF} || die diff --git a/dev-util/clazy/files/clazy-1.6-clang-cpp.patch b/dev-util/clazy/files/clazy-1.6-clang-cpp.patch new file mode 100644 index 000000000000..16b9af00ce37 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.6-clang-cpp.patch @@ -0,0 +1,60 @@ +From 0e295e5a926496f5a5d46ea4feb1b285b084f5e0 Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux <christophe@krop.fr> +Date: Mon, 11 Nov 2019 10:31:49 +0100 +Subject: Check if clazy should be linked to clang-cpp + +Summary: +According to [1], clang can now provide a single shared library instead of split +ones. + +We have to check if this library exists and link to it if available. + +[1] https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#build-system-changes + +Reviewers: smartins, kde-buildsystem + +Reviewed By: smartins + +Differential Revision: https://phabricator.kde.org/D25163 +--- + CMakeLists.txt | 11 ++++++++--- + cmake/FindClang.cmake | 1 + + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7301ed..ce1f887 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,9 +125,14 @@ macro(link_to_llvm name is_standalone) + if(WIN32) + target_link_libraries(${name} version.lib) + endif() +- target_link_libraries(${name} clangTooling) +- target_link_libraries(${name} clangToolingCore) +- target_link_libraries(${name} ${clang_tooling_refactoring_lib}) ++ # clang >= 9.0 can provide a single shared library instead of split ones ++ if(CLANG_CLANG-CPP_LIB) ++ target_link_libraries(${name} clang-cpp) ++ else() ++ target_link_libraries(${name} clangTooling) ++ target_link_libraries(${name} clangToolingCore) ++ target_link_libraries(${name} ${clang_tooling_refactoring_lib}) ++ endif() + endmacro() + + macro(add_clang_plugin name) +diff --git a/cmake/FindClang.cmake b/cmake/FindClang.cmake +index 542172e..50e0829 100644 +--- a/cmake/FindClang.cmake ++++ b/cmake/FindClang.cmake +@@ -62,6 +62,7 @@ if (LLVM_FOUND AND LLVM_LIBRARY_DIRS) + # note: On Windows there's 'libclang.dll' instead of 'clang.dll' -> search for 'libclang', too + find_library(CLANG_LIBCLANG_LIB NAMES clang libclang HINTS ${LLVM_LIBRARY_DIRS}) # LibClang: high-level C interface + ++ FIND_AND_ADD_CLANG_LIB(clang-cpp) + FIND_AND_ADD_CLANG_LIB(clangFrontend) + FIND_AND_ADD_CLANG_LIB(clangDriver) + FIND_AND_ADD_CLANG_LIB(clangCodeGen) +-- +cgit v1.1 + diff --git a/dev-util/clazy/files/clazy-1.6-llvm-10.patch b/dev-util/clazy/files/clazy-1.6-llvm-10.patch new file mode 100644 index 000000000000..f00695f52117 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.6-llvm-10.patch @@ -0,0 +1,75 @@ +From df41bd29433937111edca3654a7beb11ec765029 Mon Sep 17 00:00:00 2001 +From: Johannes Ziegenbalg <Johannes.Ziegenbalg@tu-dresden.de> +Date: Fri, 27 Mar 2020 14:18:32 +0100 +Subject: Fix build issues using llvm 10.0.0 + +--- + CMakeLists.txt | 2 +- + src/ClazyStandaloneMain.cpp | 10 ++++++++++ + src/checks/level0/qstring-ref.cpp | 4 ++++ + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1463cf..a30813f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,7 @@ if(MSVC) + # disable trigger-happy warnings from Clang/LLVM headers + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244 /wd4291 /wd4800 /wd4141 /wd4146 /wd4251") + elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti") + endif() + + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,suppress") +diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp +index aada189..6baae32 100644 +--- a/src/ClazyStandaloneMain.cpp ++++ b/src/ClazyStandaloneMain.cpp +@@ -93,7 +93,11 @@ public: + { + } + ++#if LLVM_VERSION_MAJOR >= 10 ++ std::unique_ptr<FrontendAction> create() override ++#else + FrontendAction *create() override ++#endif + { + ClazyContext::ClazyOptions options = ClazyContext::ClazyOption_None; + +@@ -116,9 +120,15 @@ public: + options |= ClazyContext::ClazyOption_IgnoreIncludedFiles; + + // TODO: We need to agregate the fixes with previous run ++#if LLVM_VERSION_MAJOR >= 10 ++ return std::make_unique<ClazyStandaloneASTAction>(s_checks.getValue(), s_headerFilter.getValue(), ++ s_ignoreDirs.getValue(), s_exportFixes.getValue(), ++ m_paths, options); ++#else + return new ClazyStandaloneASTAction(s_checks.getValue(), s_headerFilter.getValue(), + s_ignoreDirs.getValue(), s_exportFixes.getValue(), + m_paths, options); ++#endif + } + std::vector<std::string> m_paths; + }; +diff --git a/src/checks/level0/qstring-ref.cpp b/src/checks/level0/qstring-ref.cpp +index d1d8a4e..ec9e890 100644 +--- a/src/checks/level0/qstring-ref.cpp ++++ b/src/checks/level0/qstring-ref.cpp +@@ -117,7 +117,11 @@ static bool containsChild(Stmt *s, Stmt *target) + return true; + + if (auto mte = dyn_cast<MaterializeTemporaryExpr>(s)) { ++#if LLVM_VERSION_MAJOR >= 10 ++ return containsChild(mte->getSubExpr(), target); ++#else + return containsChild(mte->getTemporary(), target); ++#endif + } else if (auto ice = dyn_cast<ImplicitCastExpr>(s)) { + return containsChild(ice->getSubExpr(), target); + } else if (auto bte = dyn_cast<CXXBindTemporaryExpr>(s)) { +-- +cgit v1.1 + |