1
0

Accepting request 292501 from home:bjh21:SLE

This adds a patch to make the package buildable on SLES 11, and addresses the comments on my previous submission (291273).

OBS-URL: https://build.opensuse.org/request/show/292501
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-YAML-LibYAML?expand=0&rev=18
This commit is contained in:
Stephan Kulow 2015-03-23 17:53:10 +00:00 committed by Git OBS Bridge
parent 04c0c17bcd
commit 1ff67d4ee4
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From: Ben Harris <bjh21@cam.ac.uk>
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;

View File

@ -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 Tue Feb 10 10:24:37 UTC 2015 - vcizek@suse.com

View File

@ -28,6 +28,7 @@ Source: http://www.cpan.org/authors/id/I/IN/INGY/%{cpan_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
Patch0: %{name}-no-plan.patch
%{perl_requires} %{perl_requires}
%description %description
@ -37,6 +38,11 @@ Perl YAML Serialization using XS and libyaml
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644 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 %build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}