diff --git a/.gitignore b/.gitignore index 61fbcb9..66fa952 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /v3.7.2.tar.gz /v3.7.3.tar.gz /v3.8.0.tar.gz +/json_test_data-2.0.0.tar.gz diff --git a/json.spec b/json.spec index 13095b5..7e4ff6f 100644 --- a/json.spec +++ b/json.spec @@ -1,4 +1,5 @@ -%global debug_package %{nil} +%global debug_package %{nil} +%global test_data_version 2.0.0 Name: json Version: 3.8.0 @@ -9,6 +10,7 @@ License: MIT # test/catch.hpp: Boost Software License, Version 1.0 URL: https://github.com/nlohmann/%{name} Source0: %{url}/archive/v%{version}.tar.gz +Source1: https://github.com/nlohmann/json_test_data/archive/v%{test_data_version}/json_test_data-%{test_data_version}.tar.gz BuildRequires: ninja-build BuildRequires: gcc-c++ @@ -18,6 +20,9 @@ BuildRequires: cmake3 BuildRequires: cmake %endif +# Workaround to https://github.com/nlohmann/json/issues/2189 +BuildRequires: git + %description This is a packages version of the nlohmann/json header-only C++ library available at Github. @@ -36,9 +41,18 @@ applications that use %{name}. %autosetup mkdir -p %{_target_platform} +# Extracting json_test_data... +pushd %{_target_platform} + tar -xf %{SOURCE1} + mv json_test_data-%{test_data_version} json_test_data +popd + # Some tests are broken: https://github.com/nlohmann/json/issues/887 sed -e '/unit-regression/d' -i test/CMakeLists.txt +# Some tests require access to the Internet... +sed -e '/cmake_fetch_content/d' -i test/CMakeLists.txt + %build pushd %{_target_platform} %if 0%{?rhel} && 0%{?rhel} == 7 diff --git a/sources b/sources index 994b78d..e3520f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v3.8.0.tar.gz) = cb629ca1fc89298755374aa23098eb7a05ba47fb248acef85e96c57cb42303f7c5250df2c22f442bfb53796a72e7107554f49abdfb9e7991fe010c8fb0e2b1df +SHA512 (json_test_data-2.0.0.tar.gz) = eb08a31b09929a027cdacded2e11b9caf47fa0079619c0fa67bcb766bff1be1642a11c8ccd2f4c48521387fe1d42625d4f53f6a063a290d4664b17813f784051