From 0652498d2a3325aa14b4ff7ae37c20bcc6b0b019 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Aug 18 2021 13:43:28 +0000 Subject: Unbundled hedley. --- diff --git a/json.spec b/json.spec index 5076753..4394458 100644 --- a/json.spec +++ b/json.spec @@ -1,7 +1,6 @@ %undefine __cmake_in_source_build %global debug_package %{nil} %global test_data_version 3.0.0 -%global bundled_hedley_version 15 Name: json Version: 3.10.0 @@ -17,11 +16,11 @@ Source1: https://github.com/nlohmann/json_test_data/archive/v%{test_data_ BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: hedley-devel BuildRequires: ninja-build # Build requirements for the tests. BuildRequires: doctest-devel -BuildRequires: gawk %description This is a packages version of the nlohmann/json header-only C++ @@ -30,7 +29,7 @@ library available at Github. %package devel Summary: Development files for %{name} Provides: %{name}-static = %{?epoch:%{epoch}:}%{version}-%{release} -Provides: bundled(hedley) = %{bundled_hedley_version} +Requires: hedley-devel%{?_isa} Requires: libstdc++-devel%{?_isa} %description devel @@ -41,6 +40,10 @@ applications that use %{name}. %autosetup -p1 %setup -q -D -T -a1 +# Unbundle hedley. Use packaged version. +rm -f include/nlohmann/thirdparty/hedley/hedley.hpp +sed -e 's@nlohmann/thirdparty/hedley/@@g' -i include/nlohmann/detail/macro_scope.hpp + # Unbundle doctest. Used only in tests. ln -svf %{_includedir}/doctest/doctest.h ./test/thirdparty/doctest/doctest.h @@ -55,12 +58,6 @@ ln -svf %{_includedir}/doctest/doctest.h ./test/thirdparty/doctest/doctest.h %check %ctest --label-exclude 'git_required' --timeout 3600 -# Verify version of virtual Provides for bundled Hedley matches actual header -[ "$(awk ' -/^[[:blank:]]*#[[:blank:]]*define[[:blank:]]+JSON_HEDLEY_VERSION[[:blank:]]/ { - print $NF }' include/nlohmann/thirdparty/hedley/hedley.hpp -)" = '%{bundled_hedley_version}' ] - %install %cmake_install @@ -74,6 +71,8 @@ ln -svf %{_includedir}/doctest/doctest.h ./test/thirdparty/doctest/doctest.h %changelog * Wed Aug 18 2021 Vitaly Zaitsev - 3.10.0-1 - Updated to version 3.10.0. +- Switched to multi-header version. +- Unbundled hedley. * Thu Jul 22 2021 Fedora Release Engineering - 3.9.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild