summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-11-10 22:27:48 +0100
committerSam James <sam@gentoo.org>2024-11-10 21:43:19 +0000
commitb33a4a865fb21ae991014499c19df4905fe6db24 (patch)
tree23059bede3c8bb3d0f826fa9f5c48a9a7721791c /dev-util
parentdev-util/clazy: introduce more test DEPENDs (diff)
downloadgentoo-b33a4a865fb21ae991014499c19df4905fe6db24.tar.gz
gentoo-b33a4a865fb21ae991014499c19df4905fe6db24.tar.bz2
gentoo-b33a4a865fb21ae991014499c19df4905fe6db24.zip
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@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/clazy/clazy-1.12.ebuild5
-rw-r--r--dev-util/clazy/files/clazy-1.12-clazy-install-location.patch25
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 <negril.nx+gentoo@gmail.com>
+Date: Sun, 10 Nov 2024 22:22:07 +0100
+Subject: [PATCH] move clazy script to CMAKE_RUNTIME_OUTPUT_DIRECTORY
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+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
+