Accepting request 530786 from devel:languages:perl
1 OBS-URL: https://build.opensuse.org/request/show/530786 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Task-Weaken?expand=0&rev=19
This commit is contained in:
commit
c8b9a43a13
3
cpanspec.yml
Normal file
3
cpanspec.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
post_prep:
|
||||
sed -i -e 's/use inc::Module::Install/use lib q[.];\nuse inc::Module::Install/' Makefile.PL
|
@ -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
|
||||
|
||||
|
@ -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 <adamk@cpan.org>
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user