From 54ebdfd8052736093c6987d76021d1051d143f57 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 24 Aug 2025 00:16:07 +0800 Subject: [PATCH] use GNUInstallDirs for installation --- rapidjson-1.1.0-use-GNUInstallDirs.patch | 14 ++++++++++++++ rapidjson.spec | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 rapidjson-1.1.0-use-GNUInstallDirs.patch diff --git a/rapidjson-1.1.0-use-GNUInstallDirs.patch b/rapidjson-1.1.0-use-GNUInstallDirs.patch new file mode 100644 index 0000000..02ba639 --- /dev/null +++ b/rapidjson-1.1.0-use-GNUInstallDirs.patch @@ -0,0 +1,14 @@ +--- rapidjson-1.1.0/CMakeLists.txt.orig 2025-08-23 12:34:50.470547500 +0800 ++++ rapidjson-1.1.0/CMakeLists.txt 2025-08-23 12:35:52.657464500 +0800 +@@ -93,8 +93,9 @@ + endif() + + #add extra search paths for libraries and includes +-SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in") +-SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") ++include(GNUInstallDirs) ++SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}" CACHE PATH "The directory the headers are installed in") ++SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Directory where lib will install") + SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") + + IF(UNIX OR CYGWIN) diff --git a/rapidjson.spec b/rapidjson.spec index ba1ee27..d9ae576 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: rapidjson Version: 1.1.0 -Release: 16 +Release: 17 Summary: small & selft-contained fast JSON parser and generator for C++ License: MIT URL: http://miloyip.github.io/rapidjson @@ -10,6 +10,7 @@ Patch0000: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch Patch0001: backport-CVE-2024-38517.patch Patch0002: backport-add-forgotten-ppc64-case.patch Patch0003: backport-Increase-CMake-minimum-version-to-3.5.patch +Patch0004: rapidjson-1.1.0-use-GNUInstallDirs.patch BuildRequires: cmake gcc-c++ gtest-devel %ifarch %{valgrind_arches} BuildRequires: valgrind @@ -88,6 +89,9 @@ CTEST_EXCLUDE=".*valgrind.*" %doc %{_pkgdocdir} %changelog +* Sat Aug 23 2025 Funda Wang - 1.1.0-17 +- use GNUInstallDirs for installation + * Fri Mar 07 2025 Funda Wang - 1.1.0-16 - fix build with cmake 4.0 -- Gitee