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
|
|
|
#
|
2019-01-28 18:08:31 +00:00
|
|
|
# Copyright (c) 2019 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.
|
|
|
|
|
2019-01-28 18:08:31 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-11-23 14:09:51 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: perl-Task-Weaken
|
2018-04-20 13:44:28 +00:00
|
|
|
Version: 1.06
|
2011-12-14 12:23:29 +00:00
|
|
|
Release: 0
|
2019-01-28 18:18:07 +00:00
|
|
|
%define cpan_name Task-Weaken
|
2017-10-03 08:53:49 +00:00
|
|
|
Summary: Ensure that a platform has weaken support
|
2018-04-20 13:44:28 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2017-10-03 08:53:49 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2019-01-28 18:18:07 +00:00
|
|
|
Url: https://metacpan.org/release/%{cpan_name}
|
2018-02-08 05:53:32 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
|
2017-10-03 08:53:49 +00:00
|
|
|
Source1: cpanspec.yml
|
2019-01-28 18:18:07 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-03-08 17:19:43 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2019-01-28 18:18:07 +00:00
|
|
|
%{perl_requires}
|
|
|
|
# MANUAL BEGIN
|
2019-01-28 18:08:31 +00:00
|
|
|
BuildRequires: perl(Config)
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
|
BuildRequires: perl(File::Spec)
|
|
|
|
BuildRequires: perl(File::Spec::Functions)
|
|
|
|
BuildRequires: perl(Scalar::Util) >= 1.14
|
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
BuildRequires: perl(Test::Warn)
|
|
|
|
Requires: perl(Scalar::Util) >= 1.14
|
2019-01-28 18:18:07 +00:00
|
|
|
# MANUAL END
|
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.
|
|
|
|
|
2018-02-08 05:53:32 +00:00
|
|
|
While this isn't necessarily always a problem in a straight CPAN-based Perl
|
2017-10-03 08:53:49 +00:00
|
|
|
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
|
2019-01-28 18:08:31 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
make %{?_smp_mflags}
|
2010-03-08 17:19:43 +00:00
|
|
|
|
|
|
|
%check
|
2019-01-28 18:18:07 +00:00
|
|
|
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)
|
2018-02-08 05:53:32 +00:00
|
|
|
%doc Changes CONTRIBUTING Makefile.footer Makefile.header README
|
2017-10-03 08:53:49 +00:00
|
|
|
%license LICENSE
|
2009-11-23 14:09:51 +00:00
|
|
|
|
|
|
|
%changelog
|