Update to 4.00

- New upstream release 4.00
  - BACKWARD INCOMPATIBILITY: As JSON::XS 4.0 changed its policy and enabled
    allow_nonref by default, JSON::PP also enabled allow_nonref by default
  - Implement allow_tags that was introduced by JSON::XS 3.0
  - Add boolean_values that was introduced by JSON::XS 4.0
  - Allow literal tags in strings in relaxed mode, as JSON::XS 3.02 does
  - Allow PERL_JSON_PP_USE_B environmental variable to restore old number
    detection behavior for compatibility
  - Various documentation updates
- Drop provides filter, no longer needed
This commit is contained in:
Paul Howarth 2018-12-07 14:39:14 +00:00
parent 0d3a85569c
commit e7fed58e2a
2 changed files with 20 additions and 29 deletions

View File

@ -1,26 +1,18 @@
# Need to provide five digit version numbers until 3.x,
# so that BR: perl(JSON::PP) >= 2.27200 etc. will still work
%global our_version 2.97.001
%global five_digit_version 2.97001
# Need to tweak provides differently if we don't have rpm ≥ 4.9
%global rpm49 %(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e' 2>/dev/null || echo 0)
Name: perl-JSON-PP Name: perl-JSON-PP
Epoch: 1 Epoch: 1
Version: %{our_version} Version: 4.00
Release: 418%{?dist} Release: 1%{?dist}
Summary: JSON::XS compatible pure-Perl module Summary: JSON::XS compatible pure-Perl module
License: GPL+ or Artistic License: GPL+ or Artistic
URL: https://metacpan.org/release/JSON-PP URL: https://metacpan.org/release/JSON-PP
Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-PP-%{five_digit_version}.tar.gz Source0: https://cpan.metacpan.org/modules/by-module/JSON/JSON-PP-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
# Module Build # Module Build
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: findutils BuildRequires: findutils
BuildRequires: make BuildRequires: make
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl%{?fedora:-interpreter} BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(lib) BuildRequires: perl(lib)
# Module Runtime # Module Runtime
@ -40,12 +32,13 @@ BuildRequires: perl(warnings)
BuildRequires: perl(Data::Dumper) BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Getopt::Long) BuildRequires: perl(Getopt::Long)
# Test Suite # Test Suite
BuildRequires: perl(Test)
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
BuildRequires: perl(Tie::Array) BuildRequires: perl(Tie::Array)
BuildRequires: perl(Tie::Hash) BuildRequires: perl(Tie::Hash)
# Optional tests # Optional tests
%if !%{defined perl_bootstrap} %if !%{defined perl_bootstrap}
# Disable non-core dependencies when bootstraping a core module # Disable non-core dependencies when bootstrapping a core module
BuildRequires: perl(Tie::IxHash) BuildRequires: perl(Tie::IxHash)
%endif %endif
# Runtime # Runtime
@ -58,12 +51,6 @@ Requires: perl(Scalar::Util) >= 1.08
Requires: perl(utf8) Requires: perl(utf8)
Conflicts: perl-JSON < 2.50 Conflicts: perl-JSON < 2.50
# Provide the five-digit version of the module
%if "%{our_version}" != "%{five_digit_version}"
Provides: perl(JSON::PP) = %{five_digit_version}
%global __provides_exclude ^perl\\(JSON::PP\\)
%endif
%description %description
JSON::XS is the fastest and most proper JSON module on CPAN. It is written by JSON::XS is the fastest and most proper JSON module on CPAN. It is written by
Marc Lehmann in C, so must be compiled and installed in the used environment. Marc Lehmann in C, so must be compiled and installed in the used environment.
@ -71,15 +58,7 @@ Marc Lehmann in C, so must be compiled and installed in the used environment.
JSON::PP is a pure-Perl module and is compatible with JSON::XS. JSON::PP is a pure-Perl module and is compatible with JSON::XS.
%prep %prep
%setup -q -n JSON-PP-%{five_digit_version} %setup -q -n JSON-PP-%{version}
# Don't provide less than five-digit version of the module (prior to rpm 4.9)
%if ! %{rpm49}
%if "%{our_version}" != "%{five_digit_version}"
%global perl_prov /bin/sh -c "%{__perl_provides} | sed -e '/^perl(JSON::PP)/d'"
%global __perl_provides %{perl_prov}
%endif
%endif
%build %build
perl Makefile.PL INSTALLDIRS=vendor perl Makefile.PL INSTALLDIRS=vendor
@ -102,6 +81,18 @@ make test
%{_mandir}/man3/JSON::PP::Boolean.3* %{_mandir}/man3/JSON::PP::Boolean.3*
%changelog %changelog
* Fri Dec 7 2018 Paul Howarth <paul@city-fan.org> - 1:4.00-1
- Update to 4.00
- BACKWARD INCOMPATIBILITY: As JSON::XS 4.0 changed its policy and enabled
allow_nonref by default, JSON::PP also enabled allow_nonref by default
- Implement allow_tags that was introduced by JSON::XS 3.0
- Add boolean_values that was introduced by JSON::XS 4.0
- Allow literal tags in strings in relaxed mode, as JSON::XS 3.02 does
- Allow PERL_JSON_PP_USE_B environmental variable to restore old number
detection behavior for compatibility
- Various documentation updates
- Drop provides filter, no longer needed
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.97.001-418 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.97.001-418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (JSON-PP-2.97001.tar.gz) = bb629873346e0ec789423a2aefd08f95f7ff2e105aec065f142263d9dd08eb1d2e55384aa7ba6c4a7964cd87e803c79c4a773558c885f94fb8a06b7f89473f02 SHA512 (JSON-PP-4.00.tar.gz) = e908d188cac8c90e91c097ceb5b9389d23b74ab8dc2c1f8809545a4817283b74307bfa30650c254bb3a4d8830c68005843de3d35e92c4af9935c7a868dacf759