commit:     b33a4a865fb21ae991014499c19df4905fe6db24
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sun Nov 10 21:27:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 21:43:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b33a4a86

dev-util/clazy: move clazy script

Putting the clazy script into CMAKE_RUNTIME_OUTPUT_DIRECTORY gets it covered by
the already set PATH.

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/clazy/clazy-1.12.ebuild                   |  5 +++--
 .../files/clazy-1.12-clazy-install-location.patch  | 25 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/dev-util/clazy/clazy-1.12.ebuild b/dev-util/clazy/clazy-1.12.ebuild
index bcf6a9d8df19..a2e4a824b8d5 100644
--- a/dev-util/clazy/clazy-1.12.ebuild
+++ b/dev-util/clazy/clazy-1.12.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-LIBRARY_DIRS.patch
        "${FILESDIR}"/${P}-INCLUDE_DIRS.patch
        "${FILESDIR}"/${P}-standalone-install-location.patch
+       "${FILESDIR}"/${P}-clazy-install-location.patch
 )
 
 pkg_setup() {
@@ -78,10 +79,10 @@ src_test() {
 
        # Run tests against built copy, not installed
        # bug #811723
-       local -x 
PATH="${BUILD_DIR}/${LLVM_ROOT}/bin:${BUILD_DIR}/bin:${BUILD_DIR}:${PATH}"
+       local -x PATH="${BUILD_DIR}/${LLVM_ROOT}/bin:${BUILD_DIR}/bin:${PATH}"
        local -x LD_LIBRARY_PATH="${BUILD_DIR}/lib"
 
-       chmod +x "${BUILD_DIR}"/clazy || die
+       chmod +x "${BUILD_DIR}/bin/clazy" || die
 
        cmake_src_test
 }

diff --git a/dev-util/clazy/files/clazy-1.12-clazy-install-location.patch 
b/dev-util/clazy/files/clazy-1.12-clazy-install-location.patch
new file mode 100644
index 000000000000..651dcf282b08
--- /dev/null
+++ b/dev-util/clazy/files/clazy-1.12-clazy-install-location.patch
@@ -0,0 +1,25 @@
+From b5600e28b0720a9a43d20717e79ba26dae6b9359 Mon Sep 17 00:00:00 2001
+From: Paul Zander <[email protected]>
+Date: Sun, 10 Nov 2024 22:22:07 +0100
+Subject: [PATCH] move clazy script to CMAKE_RUNTIME_OUTPUT_DIRECTORY
+
+Signed-off-by: Paul Zander <[email protected]>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 765083c..c7c1cea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -229,8 +229,8 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
+     endif()
+     file(RELATIVE_PATH BIN_RELATIVE_LIBDIR "${CMAKE_INSTALL_FULL_BINDIR}" 
"${CMAKE_INSTALL_FULL_LIBDIR}")
+     file(RELATIVE_PATH BIN_RELATIVE_SHAREDIR "${CMAKE_INSTALL_FULL_BINDIR}" 
"${CMAKE_INSTALL_FULL_DATAROOTDIR}")
+-    configure_file(${CMAKE_CURRENT_LIST_DIR}/clazy.cmake 
${CMAKE_BINARY_DIR}/clazy @ONLY)
+-    install(PROGRAMS ${CMAKE_BINARY_DIR}/clazy DESTINATION bin)
++    configure_file(${CMAKE_CURRENT_LIST_DIR}/clazy.cmake 
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/clazy @ONLY)
++    install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/clazy DESTINATION bin)
+   else()
+     install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION 
${CMAKE_INSTALL_BINDIR})
+     if(MSVC)
+-- 
+2.47.0
+

Reply via email to