diff --git a/perl-YAML-LibYAML-no-plan.patch b/perl-YAML-LibYAML-no-plan.patch new file mode 100644 index 0000000..8b448bf --- /dev/null +++ b/perl-YAML-LibYAML-no-plan.patch @@ -0,0 +1,24 @@ +From: Ben Harris +Date: Wed, 18 Mar 2015 10:54:16 +0000 +Subject: Don't depend on Test::More 0.87_01 + +done_testing was introduced in Test::More 0.87_01, but SLES 11 shipped with +Test::More 0.72. This patch removes the use of done_testing so that the +package is buildable on SLES 11. + +diff -ur YAML-LibYAML-0.59.orig/t/000-require-modules.t YAML-LibYAML-0.59/t/000-require-modules.t +--- YAML-LibYAML-0.59.orig/t/000-require-modules.t 2015-01-26 23:04:24.000000000 +0000 ++++ YAML-LibYAML-0.59/t/000-require-modules.t 2015-03-17 19:39:15.000000000 +0000 +@@ -1,5 +1,5 @@ + # This test does a basic `use` check on all the code. +-use Test::More; ++use Test::More qw(no_plan); + + use File::Find; + +@@ -13,5 +13,3 @@ + wanted => \&test, + no_chdir => 1, + }, 'lib'; +- +-done_testing; diff --git a/perl-YAML-LibYAML.changes b/perl-YAML-LibYAML.changes index b2af626..c602ca9 100644 --- a/perl-YAML-LibYAML.changes +++ b/perl-YAML-LibYAML.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 23 16:30:00 UTC 2015 - bjh21@cam.ac.uk + +- Added perl-YAML-LibYAML-no-plan.patch, which lets the package build + on SLES 11. + ------------------------------------------------------------------- Tue Feb 10 10:24:37 UTC 2015 - vcizek@suse.com diff --git a/perl-YAML-LibYAML.spec b/perl-YAML-LibYAML.spec index 8a39ae6..fb8756a 100644 --- a/perl-YAML-LibYAML.spec +++ b/perl-YAML-LibYAML.spec @@ -28,6 +28,7 @@ Source: http://www.cpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros +Patch0: %{name}-no-plan.patch %{perl_requires} %description @@ -37,6 +38,11 @@ Perl YAML Serialization using XS and libyaml %setup -q -n %{cpan_name}-%{version} find . -type f -print0 | xargs -0 chmod 644 +# This patch is only necessary for systems without Test::More >= 0.87_01 +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%patch0 -p1 +%endif + %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__make} %{?_smp_mflags}