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
|
Wed Dec 14 12:20:43 UTC 2011 - coolo@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Task-Weaken
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,40 +17,54 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: perl-Task-Weaken
|
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
|
Version: 1.04
|
||||||
Release: 0
|
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/
|
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
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%{perl_requires}
|
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
Provides: %{cpan_name}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
One recurring problem in modules that use Scalar::Util's "weaken"
|
One recurring problem in modules that use Scalar::Util's 'weaken' function
|
||||||
function is that it is not present in the pure-perl variant.
|
is that it is not present in the pure-perl variant.
|
||||||
|
|
||||||
While this isn't necessarily always a problem in a straight CPAN-based
|
While this isn't necesarily always a problem in a straight CPAN-based Perl
|
||||||
Perl environment, some operating system distributions only include the
|
environment, some operating system distributions only include the pure-Perl
|
||||||
pure-Perl versions, don't include the XS version, and so weaken is then
|
versions, don't include the XS version, and so weaken is then "missing"
|
||||||
"missing" from the platform, despite passing a dependency on
|
from the platform, *despite* passing a dependency on Scalar::Util
|
||||||
Scalar::Util successfully.
|
successfully.
|
||||||
|
|
||||||
Authors:
|
Most notably this is RedHat Linux at time of writing, but other come and go
|
||||||
--------
|
and do the same thing, hence "recurring problem".
|
||||||
Adam Kennedy <adamk@cpan.org>
|
|
||||||
|
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
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%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
|
%build
|
||||||
echo y | perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
%{__make}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__make} test
|
%{__make} test
|
||||||
@ -60,11 +74,9 @@ echo y | perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
|
|||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-, root, root)
|
%defattr(-,root,root,755)
|
||||||
%doc Changes LICENSE README
|
%doc Changes README
|
||||||
|
%license LICENSE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user