From 5b0981513a753ff31ffdb870d3596d80a79ff077649387b3e4b103e6f80be958 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 3 Oct 2017 08:53:49 +0000 Subject: [PATCH] Accepting request 530748 from devel:languages:perl:tobefixed fix OBS-URL: https://build.opensuse.org/request/show/530748 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Task-Weaken?expand=0&rev=25 --- cpanspec.yml | 3 ++ perl-Task-Weaken.changes | 5 ++++ perl-Task-Weaken.spec | 62 ++++++++++++++++++++++++---------------- 3 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 cpanspec.yml diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..a09effb --- /dev/null +++ b/cpanspec.yml @@ -0,0 +1,3 @@ +--- +post_prep: + sed -i -e 's/use inc::Module::Install/use lib q[.];\nuse inc::Module::Install/' Makefile.PL diff --git a/perl-Task-Weaken.changes b/perl-Task-Weaken.changes index e53a09d..bdc0f94 100644 --- a/perl-Task-Weaken.changes +++ b/perl-Task-Weaken.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 3 08:20:55 UTC 2017 - coolo@suse.com + +- patch the Makefile to build with perl 5.26 + ------------------------------------------------------------------- Wed Dec 14 12:20:43 UTC 2011 - coolo@suse.com diff --git a/perl-Task-Weaken.spec b/perl-Task-Weaken.spec index 0e09903..783a0a5 100644 --- a/perl-Task-Weaken.spec +++ b/perl-Task-Weaken.spec @@ -1,7 +1,7 @@ # # spec file for package perl-Task-Weaken # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,40 +17,54 @@ Name: perl-Task-Weaken -%define cpan_name Task-Weaken -Summary: Task::Weaken - Ensure that a platform has weaken support -License: GPL-1.0+ or Artistic-1.0 -Group: Development/Libraries/Perl Version: 1.04 Release: 0 +%define cpan_name Task-Weaken +Summary: Ensure that a platform has weaken support +License: Artistic-1.0 or GPL-1.0+ +Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Task-Weaken/ -Source: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/%{cpan_name}-%{version}.tar.gz +Source0: https://cpan.metacpan.org/authors/id/A/AD/ADAMK/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml +BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} BuildRequires: perl BuildRequires: perl-macros -Provides: %{cpan_name} +%{perl_requires} %description -One recurring problem in modules that use Scalar::Util's "weaken" -function is that it is not present in the pure-perl variant. +One recurring problem in modules that use Scalar::Util's 'weaken' function +is that it is not present in the pure-perl variant. -While this isn't necessarily always a problem in a straight CPAN-based -Perl environment, some operating system distributions only include the -pure-Perl versions, don't include the XS version, and so weaken is then -"missing" from the platform, despite passing a dependency on -Scalar::Util successfully. +While this isn't necesarily always a problem in a straight CPAN-based Perl +environment, some operating system distributions only include the pure-Perl +versions, don't include the XS version, and so weaken is then "missing" +from the platform, *despite* passing a dependency on Scalar::Util +successfully. -Authors: --------- - Adam Kennedy +Most notably this is RedHat Linux at time of writing, but other come and go +and do the same thing, hence "recurring problem". + +The normal solution is to manually write tests in each distribution to +ensure that 'weaken' is available. + +This restores the functionality testing to a dependency you do once in your +_Makefile.PL_, rather than something you have to write extra tests for each +time you write a module. + +It should also help make the package auto-generators for the various +operating systems play more nicely, because it introduces a dependency that +they *have* to have a proper weaken in order to work. %prep %setup -q -n %{cpan_name}-%{version} +# MANUAL BEGIN +sed -i -e 's/use inc::Module::Install/use lib q[.];\nuse inc::Module::Install/' Makefile.PL +# MANUAL END %build -echo y | perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" -%{__make} +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} %check %{__make} test @@ -60,11 +74,9 @@ echo y | perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall" %perl_process_packlist %perl_gen_filelist -%clean -%{__rm} -rf $RPM_BUILD_ROOT - %files -f %{name}.files -%defattr(-, root, root) -%doc Changes LICENSE README +%defattr(-,root,root,755) +%doc Changes README +%license LICENSE %changelog