- update by Fedora::App::MaintainerTools 0.003

- PERL_INSTALL_ROOT => DESTDIR
- dropped old BR on perl(JSON)
- dropped old BR on perl(JSON::Syck)
epel9
Chris Weyl 15 years ago
parent fa5757e733
commit 948032da88

@ -1 +1 @@
JSON-Any-1.21.tar.gz
JSON-Any-1.22.tar.gz

@ -0,0 +1,5 @@
[add_build_requires]
perl(JSON::XS)=0
[add_requires]
perl(JSON::XS)=0

@ -1,41 +1,26 @@
Name: perl-JSON-Any
Version: 1.21
Release: 2%{?dist}
Summary: A meta-module to make working with JSON easier
Version: 1.22
Release: 1%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/JSON-Any-%{version}.tar.gz
URL: http://search.cpan.org/dist/JSON-Any/
Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/JSON-Any-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
Patch0: with_older_json.patch
# JSON::XS is fastest, so we require it
Requires: perl(JSON::XS)
# core
BuildRequires: perl(Carp)
BuildRequires: perl(CPAN)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
# testing
BuildRequires: perl(JSON::XS) >= 1.52
BuildRequires: perl(Test::More) >= 0.42
BuildRequires: perl(JSON::XS) >= 1.52
# optional tests -- JSON::Any can handle any of the following to actually do
# the JSON parsing. We use JSON::XS above, as it's both already in Fedora and
# the fastest of the following. As other JSON modules are added to Fedora,
# we'll uncomment the tests below.
BuildRequires: perl(JSON)
#BuildRequires: perl(JSON::DWIM)
#BuildRequires: perl(JSON::PC)
BuildRequires: perl(JSON::Syck)
### auto-added reqs!
Requires: perl(Carp)
Requires: perl(JSON::XS) >= 1.52
### auto-added brs!
BuildRequires: perl(CPAN)
%{?perl_default_filter}
%{?perl_default_subpackage_tests}
%description
JSON::Any provides a coherent API to bring together the various JSON modules
@ -43,10 +28,8 @@ currently on CPAN.
%prep
%setup -q -n JSON-Any-%{version}
%patch0 -p1
find . -type f -exec chmod -c -x {} +
find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} +
cat Changes | iconv -f ISO-8859-1 -t UTF-8 > Changes.foo
mv Changes.foo Changes
@ -58,7 +41,7 @@ make
%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} +
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
@ -73,11 +56,17 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes README t/
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Tue Feb 23 2010 Chris Weyl <cweyl@alumni.drew.edu> 1.22-1
- update by Fedora::App::MaintainerTools 0.003
- PERL_INSTALL_ROOT => DESTDIR
- dropped old BR on perl(JSON)
- dropped old BR on perl(JSON::Syck)
* Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 1.21-2
- rebuild against perl 5.10.1

@ -1 +1 @@
3e5d6f943b03c2c0c688be1295719c09 JSON-Any-1.21.tar.gz
c576a6765c310ad36135e2c090eb0be7 JSON-Any-1.22.tar.gz

@ -1,33 +0,0 @@
diff -ur JSON-Any-1.16.orig/lib/JSON/Any.pm JSON-Any-1.16/lib/JSON/Any.pm
--- JSON-Any-1.16.orig/lib/JSON/Any.pm 2008-02-13 15:15:46.000000000 -0800
+++ JSON-Any-1.16/lib/JSON/Any.pm 2008-03-22 10:50:12.831848606 -0700
@@ -110,6 +110,8 @@
max_depth
);
+ local $conf->{utf8} = !$conf->{utf8}; # it means the opposite
+
my $obj = $handler->new;
for my $mutator (@params) {
next unless exists $conf->{$mutator};
@@ -199,6 +201,7 @@
foreach my $testmod (@order) {
$testmod = "JSON::$testmod" unless $testmod eq "JSON";
eval "require $testmod";
+ $@ = 'JSON too old' if $testmod eq 'JSON' && "$JSON::VERSION" =~ /^1/;
unless ($@) {
$handler = $testmod;
my $key = _make_key($handler);
diff -ur JSON-Any-1.16.orig/t/04-ENV.t JSON-Any-1.16/t/04-ENV.t
--- JSON-Any-1.16.orig/t/04-ENV.t 2008-01-01 12:05:35.000000000 -0800
+++ JSON-Any-1.16/t/04-ENV.t 2008-03-22 10:36:06.260856865 -0700
@@ -13,7 +13,8 @@
SKIP: {
eval { require JSON; };
- skip "JSON not installed: $@", 1 if $@;
+ skip "JSON unusable or not installed: $@", 1
+ if $@ || $JSON::VERSION =~ /^1/;
$ENV{JSON_ANY_ORDER} = qw(JSON);
JSON::Any->import();
Loading…
Cancel
Save