- fix build on distributions with old Test::More module

( perl-namespace-clean-use_lib.patch )

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-namespace-clean?expand=0&rev=7
This commit is contained in:
Lars Vogdt 2011-06-04 20:51:48 +00:00 committed by Git OBS Bridge
parent 2ad2d62d84
commit 1f98da15a4
3 changed files with 205 additions and 1 deletions

View File

@ -0,0 +1,192 @@
Index: namespace-clean-0.20/Makefile.PL
===================================================================
--- namespace-clean-0.20.orig/Makefile.PL
+++ namespace-clean-0.20/Makefile.PL
@@ -1,7 +1,7 @@
use strict;
use warnings;
-
+use lib '__vendorperl__';
use ExtUtils::MakeMaker 6.31;
Index: namespace-clean-0.20/t/00-basic.t
===================================================================
--- namespace-clean-0.20.orig/t/00-basic.t
+++ namespace-clean-0.20/t/00-basic.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 4;
Index: namespace-clean-0.20/t/01-function-wipeout.t
===================================================================
--- namespace-clean-0.20.orig/t/01-function-wipeout.t
+++ namespace-clean-0.20/t/01-function-wipeout.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 9;
Index: namespace-clean-0.20/t/02-inheritance.t
===================================================================
--- namespace-clean-0.20.orig/t/02-inheritance.t
+++ namespace-clean-0.20/t/02-inheritance.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 10;
Index: namespace-clean-0.20/t/03-unimport.t
===================================================================
--- namespace-clean-0.20.orig/t/03-unimport.t
+++ namespace-clean-0.20/t/03-unimport.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 6;
Index: namespace-clean-0.20/t/04-except.t
===================================================================
--- namespace-clean-0.20.orig/t/04-except.t
+++ namespace-clean-0.20/t/04-except.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 6;
Index: namespace-clean-0.20/t/05-explicit-cleanee.t
===================================================================
--- namespace-clean-0.20.orig/t/05-explicit-cleanee.t
+++ namespace-clean-0.20/t/05-explicit-cleanee.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 19;
Index: namespace-clean-0.20/t/06-other-types.t
===================================================================
--- namespace-clean-0.20.orig/t/06-other-types.t
+++ namespace-clean-0.20/t/06-other-types.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use warnings;
use strict;
-
+use lib '__vendorperl__';
use FindBin;
use lib "$FindBin::Bin/lib";
use Test::More tests => 17;
Index: namespace-clean-0.20/t/08-const-sub.t
===================================================================
--- namespace-clean-0.20.orig/t/08-const-sub.t
+++ namespace-clean-0.20/t/08-const-sub.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-
+use lib '__vendorperl__';
use Test::More 0.88;
use constant CONST => 123;
Index: namespace-clean-0.20/t/author-07-debugger.t
===================================================================
--- namespace-clean-0.20.orig/t/author-07-debugger.t
+++ namespace-clean-0.20/t/author-07-debugger.t
@@ -6,6 +6,7 @@ BEGIN {
}
}
+use lib '__vendorperl__';
use Test::More;
BEGIN {
Index: namespace-clean-0.20/t/release-eol.t
===================================================================
--- namespace-clean-0.20.orig/t/release-eol.t
+++ namespace-clean-0.20/t/release-eol.t
@@ -1,6 +1,7 @@
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
+ use lib '__vendorperl__';
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
@@ -8,6 +9,7 @@ BEGIN {
use strict;
use warnings;
+use lib '__vendorperl__';
use Test::More;
eval 'use Test::EOL';
Index: namespace-clean-0.20/t/release-no-tabs.t
===================================================================
--- namespace-clean-0.20.orig/t/release-no-tabs.t
+++ namespace-clean-0.20/t/release-no-tabs.t
@@ -1,6 +1,7 @@
BEGIN {
unless ($ENV{RELEASE_TESTING}) {
+ use lib '__vendorperl__';
require Test::More;
Test::More::plan(skip_all => 'these tests are for release candidate testing');
}
@@ -8,6 +9,7 @@ BEGIN {
use strict;
use warnings;
+use lib '__vendorperl__';
use Test::More;
eval 'use Test::NoTabs';
Index: namespace-clean-0.20/t/release-pod-coverage.t
===================================================================
--- namespace-clean-0.20.orig/t/release-pod-coverage.t
+++ namespace-clean-0.20/t/release-pod-coverage.t
@@ -8,6 +8,7 @@ BEGIN {
}
+use lib '__vendorperl__';
use Test::More;
eval "use Test::Pod::Coverage 1.08";
Index: namespace-clean-0.20/t/release-pod-syntax.t
===================================================================
--- namespace-clean-0.20.orig/t/release-pod-syntax.t
+++ namespace-clean-0.20/t/release-pod-syntax.t
@@ -7,6 +7,7 @@ BEGIN {
}
}
+use lib '__vendorperl__';
use Test::More;
eval "use Test::Pod 1.41";

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jun 4 20:50:41 UTC 2011 - lars@linux-schulserver.de
- fix build on distributions with old Test::More module
( perl-namespace-clean-use_lib.patch )
-------------------------------------------------------------------
Thu Mar 31 08:09:45 UTC 2011 - coolo@novell.com

View File

@ -1,7 +1,7 @@
#
# spec file for package perl-namespace-clean (Version 0.20)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,6 +25,7 @@ Url: http://search.cpan.org/dist/namespace-clean/
Group: Development/Libraries/Perl
#Source: http://www.cpan.org/authors/id/F/FL/FLORA/namespace-clean-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.gz
Patch1: perl-namespace-clean-use_lib.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
@ -36,6 +37,7 @@ BuildRequires: perl(Package::Stash) >= 0.22
BuildRequires: perl(Sub::Identify) >= 0.04
BuildRequires: perl(Sub::Name) >= 0.04
BuildRequires: perl(vars)
BuildRequires: perl(Test::More) >= 0.88
Requires: perl(B::Hooks::EndOfScope) >= 0.07
Requires: perl(Package::Stash) >= 0.22
Requires: perl(Sub::Identify) >= 0.04
@ -58,6 +60,10 @@ name, but they won't show up as methods on your class or instances.
%prep
%setup -q -n %{cpan_name}-%{version}
%if 0%{?suse_version} <= 1110
%patch1 -p1
sed -i "s|__vendorperl__|%{perl_vendorlib}|g" Makefile.PL t/*.t
%endif
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor