summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch')
-rw-r--r--dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch b/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch
new file mode 100644
index 000000000000..c58093a2db25
--- /dev/null
+++ b/dev-util/clazy/files/clazy-1.7-gnuinstalldirs.patch
@@ -0,0 +1,82 @@
+From 111c6971cd791f336eaaa8ef142c8212a7e65a3a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 30 Jun 2020 12:56:56 +0200
+Subject: [PATCH] Use more GNUInstallDirs (doc, man)
+
+---
+ CMakeLists.txt | 21 ++++++++-------------
+ docs/man/CMakeLists.txt | 2 +-
+ 2 files changed, 9 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c55103b..2532a8d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,7 +15,7 @@ endif()
+
+ include(FeatureSummary)
+ include(GenerateExportHeader)
+-include("GNUInstallDirs")
++include(GNUInstallDirs)
+
+ # Version setup
+ set(CLAZY_VERSION_MAJOR "1")
+@@ -184,8 +184,6 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
+- set(SHARE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR} CACHE STRING "Share directory name")
+-
+ if(NOT WIN32)
+ if(APPLE)
+ find_program(READLINK_CMD greadlink)
+@@ -200,27 +198,24 @@ if (NOT CLAZY_BUILD_WITH_CLANG)
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/clazy.cmake ${CMAKE_BINARY_DIR}/clazy @ONLY)
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/clazy DESTINATION bin)
+ else()
+- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION bin)
++ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy.bat DESTINATION ${CMAKE_INSTALL_BINDIR})
+ if(MSVC)
+- install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION bin)
++ install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/clazy-cl.bat DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endif()
+ endif()
+
+ # Install the explanation README's
+- set(DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/clazy)
+-
+ include(${CMAKE_CURRENT_LIST_DIR}/readmes.cmake)
+
+- install(FILES ${README_LEVEL0_FILES} DESTINATION ${DOC_INSTALL_DIR}/level0)
+- install(FILES ${README_LEVEL1_FILES} DESTINATION ${DOC_INSTALL_DIR}/level1)
+- install(FILES ${README_LEVEL2_FILES} DESTINATION ${DOC_INSTALL_DIR}/level2)
+- install(FILES ${README_manuallevel_FILES} DESTINATION ${DOC_INSTALL_DIR}/manuallevel)
++ install(FILES ${README_LEVEL0_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level0)
++ install(FILES ${README_LEVEL1_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level1)
++ install(FILES ${README_LEVEL2_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/level2)
++ install(FILES ${README_manuallevel_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR}/manuallevel)
+
+ # Install more doc files
+- install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${DOC_INSTALL_DIR})
++ install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION ${CMAKE_INSTALL_DOCDIR})
+
+ # Build docs
+- set(MAN_INSTALL_DIR "${SHARE_INSTALL_DIR}/man/man1")
+ add_subdirectory(docs)
+
+ # rpath
+diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt
+index 5d86813..d9b3937 100644
+--- a/docs/man/CMakeLists.txt
++++ b/docs/man/CMakeLists.txt
+@@ -14,6 +14,6 @@ if(UNIX)
+ )
+ add_custom_target(man ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clazy.1)
+
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${MAN_INSTALL_DIR})
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clazy.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ endif()
+ endif()
+--
+2.27.0
+