2009-11-23 14:09:51 +00:00
|
|
|
#
|
2011-03-31 11:40:41 +00:00
|
|
|
# spec file for package perl-Task-Weaken
|
2009-11-23 14:09:51 +00:00
|
|
|
#
|
2017-10-03 08:53:49 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-11-23 14:09:51 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: perl-Task-Weaken
|
2011-12-14 12:23:29 +00:00
|
|
|
Version: 1.04
|
|
|
|
Release: 0
|
2017-10-03 08:53:49 +00:00
|
|
|
%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
|
2010-03-08 17:19:43 +00:00
|
|
|
Url: http://search.cpan.org/dist/Task-Weaken/
|
2017-10-03 08:53:49 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/A/AD/ADAMK/%{cpan_name}-%{version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
|
|
|
BuildArch: noarch
|
2009-11-23 14:09:51 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-03-08 17:19:43 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2017-10-03 08:53:49 +00:00
|
|
|
%{perl_requires}
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%description
|
2017-10-03 08:53:49 +00:00
|
|
|
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 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.
|
|
|
|
|
|
|
|
Most notably this is RedHat Linux at time of writing, but other come and go
|
|
|
|
and do the same thing, hence "recurring problem".
|
2010-03-08 17:19:43 +00:00
|
|
|
|
2017-10-03 08:53:49 +00:00
|
|
|
The normal solution is to manually write tests in each distribution to
|
|
|
|
ensure that 'weaken' is available.
|
2009-11-23 14:09:51 +00:00
|
|
|
|
2017-10-03 08:53:49 +00:00
|
|
|
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.
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%prep
|
2010-03-08 17:19:43 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2017-10-03 08:53:49 +00:00
|
|
|
# MANUAL BEGIN
|
|
|
|
sed -i -e 's/use inc::Module::Install/use lib q[.];\nuse inc::Module::Install/' Makefile.PL
|
|
|
|
# MANUAL END
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%build
|
2017-10-03 08:53:49 +00:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%{__make} %{?_smp_mflags}
|
2010-03-08 17:19:43 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%install
|
2010-03-08 17:19:43 +00:00
|
|
|
%perl_make_install
|
2009-11-23 14:09:51 +00:00
|
|
|
%perl_process_packlist
|
2010-03-08 17:19:43 +00:00
|
|
|
%perl_gen_filelist
|
2009-11-23 14:09:51 +00:00
|
|
|
|
2010-03-08 17:19:43 +00:00
|
|
|
%files -f %{name}.files
|
2017-10-03 08:53:49 +00:00
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%doc Changes README
|
|
|
|
%license LICENSE
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%changelog
|