From be27ff6e649be2404f1fbf744936b71b1acc4ee3 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 23 Dec 2023 12:23:35 +0100 Subject: [PATCH 1/2] [json] Version 3.11.3; build with cmake --- json.spec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/json.spec b/json.spec index 10da73be45b..f4847874efb 100644 --- a/json.spec +++ b/json.spec @@ -1,16 +1,21 @@ -### RPM external json 3.10.2 +### RPM external json 3.11.3 ## NOCOMPILER -Source: https://github.com/nlohmann/%{n}/releases/download/v%{realversion}/include.zip +Source: https://github.com/nlohmann/json/archive/refs/tags/v%{realversion}.tar.gz %prep -%setup -c +%setup -n %{n}-%{realversion} +sed -i -e 's|JSON_BuildTests_INIT ON|JSON_BuildTests_INIT OFF|' CMakeLists.txt %build +rm -rf ../build; mkdir ../build; cd ../build +cmake ../%{n}-%{realversion} \ + -DCMAKE_INSTALL_PREFIX:PATH="%i" \ + -DCMAKE_BUILD_TYPE=%{cmake_build_type} \ + -DJSON_MultipleHeaders=OFF -%install -mkdir -p %{i}/include/nlohmann -cp -a include/nlohmann/json_fwd.hpp %{i}/include/nlohmann/ -cp -a single_include/nlohmann/json.hpp %{i}/include/nlohmann/ +make %makeprocesses VERBOSE=1 -%post +%install +cd ../build +make install From 5b63deb48dc10785dd2ae4c5d6cd788940c3b623 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 23 Dec 2023 16:35:37 +0100 Subject: [PATCH 2/2] set JSON_BuildTests=OFF --- json.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json.spec b/json.spec index f4847874efb..6f6788f6f06 100644 --- a/json.spec +++ b/json.spec @@ -5,13 +5,13 @@ Source: https://github.com/nlohmann/json/archive/refs/tags/v%{realversion}.tar.g %prep %setup -n %{n}-%{realversion} -sed -i -e 's|JSON_BuildTests_INIT ON|JSON_BuildTests_INIT OFF|' CMakeLists.txt %build rm -rf ../build; mkdir ../build; cd ../build cmake ../%{n}-%{realversion} \ -DCMAKE_INSTALL_PREFIX:PATH="%i" \ -DCMAKE_BUILD_TYPE=%{cmake_build_type} \ + -DJSON_BuildTests=OFF \ -DJSON_MultipleHeaders=OFF make %makeprocesses VERBOSE=1