Init package

This commit is contained in:
misaka00251 2022-07-15 22:22:00 +08:00
parent 67af3fbd2e
commit 32c133c999
No known key found for this signature in database
GPG Key ID: 4AA100DC964EDE26
4 changed files with 170 additions and 0 deletions

View File

@ -0,0 +1,72 @@
From 64fcb58c734bc6f3903e4f02d308214ef4d8aa54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 27 Jan 2021 10:09:30 +0100
Subject: [PATCH] English is for author tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If author tests are not performed (default), English module is
not used (t/author-critic.t). But because it is listed in META.yml,
t/000-report-versions.t fails if English is not installed:
t/00-compile.t ............... ok
# Testing with Perl 5.032000, /usr/bin/perl
# Carp version is 1.50
# Failed test 'use English;'
# at t/000-report-versions.t line 424.
# Tried to use 'English'.
# Error: Can't locate English.pm in @INC (you may need to install the English module) (@INC contains: /home/test/fedora/perl-Scalar-Properties/Scalar-Properties-1.100860/blib/lib /home/test/fedora/perl-Scalar-Properties/Scalar-Properties-1.100860/blib/arch /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/000-report-versions.t line 424.
# BEGIN failed--compilation aborted at t/000-report-versions.t line 424.
Bailout called. Further testing stopped: can't load English
FAILED--Further testing stopped: can't load English
This patch fixes it by removing English from a list of the hard dependencies.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
META.json | 1 -
META.yml | 1 -
Makefile.PL | 1 -
3 files changed, 3 deletions(-)
diff --git a/META.json b/META.json
index e82205e..17820db 100644
--- a/META.json
+++ b/META.json
@@ -26,7 +26,6 @@
"Test::More" : "0.88",
"perl" : "5.008",
"Scalar::Util" : "0",
- "English" : "0",
"File::Find" : "0",
"File::Temp" : "0",
"overload" : "0",
diff --git a/META.yml b/META.yml
index 1c24c9f..ea1d90e 100644
--- a/META.yml
+++ b/META.yml
@@ -17,7 +17,6 @@ provides:
version: 1.100860
requires:
Carp: 0
- English: 0
File::Find: 0
File::Temp: 0
Scalar::Util: 0
diff --git a/Makefile.PL b/Makefile.PL
index f190a17..c4c950b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -25,7 +25,6 @@ my %WriteMakefileArgs = (
'PREREQ_PM' => {
'Test::More' => '0.88',
'Scalar::Util' => '0',
- 'English' => '0',
'File::Find' => '0',
'File::Temp' => '0',
'overload' => '0',
--
2.26.2

View File

@ -0,0 +1,11 @@
--- Scalar-Properties/MANIFEST.SKIP
+++ Scalar-Properties/MANIFEST.SKIP
@@ -7,6 +7,8 @@
# Makemaker/Build.PL generated files and dirs.
MANIFEST.old
+MYMETA.json
+MYMETA.yml
^Makefile$
^Build$
^blib

Binary file not shown.

View File

@ -0,0 +1,87 @@
%bcond_with perl_Scalar_Properties_enables_extra_test
# no debug package because it's noarch
%global debug_package %{nil}
# Similarly for .package_note* files
%undefine _package_note_file
Name: perl-Scalar-Properties
Version: 1.100860
Release: 1
Summary: Run-time properties on scalar variables
License: GPL+ or Artistic
URL: https://metacpan.org/release/Scalar-Properties
Source0: https://cpan.metacpan.org/authors/id/M/MA/MARCEL/Scalar-Properties-%{version}.tar.gz
Patch0: Scalar-Properties-1.100860-English-is-for-author-tests.patch
Patch3: Scalar-Properties-1.100860-skip-MYMETA.yml.patch
BuildArch: noarch
# Build requirements
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.11
# Module requirements
BuildRequires: perl(overload)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Test requirements
BuildRequires: perl(Carp)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Test::More) >= 0.88
%if %{with perl_Scalar_Properties_enables_extra_test}
BuildRequires: perl(English)
BuildConflicts: perl(Test::Perl::Critic)
BuildRequires: perl(Pod::Coverage::TrustPod)
BuildConflicts: perl(Pod::Wordlist::hanekomu)
BuildRequires: perl(Test::CheckChanges)
BuildRequires: perl(Test::CPAN::Meta)
BuildRequires: perl(Test::DistManifest)
BuildRequires: perl(Test::HasVersion)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: perl(Test::MinimumVersion)
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
BuildRequires: perl(Test::Portability::Files)
BuildRequires: perl(Test::Synopsis)
%endif
# Runtime requirements
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
Scalar::Properties attempts to make Perl more object-oriented by taking an idea
from Ruby: Everything you manipulate is an object, and the results of those
manipulations are objects themselves.
%prep
%setup -q -n Scalar-Properties-%{version}
%patch0 -p1
%patch3 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}
%check
%if %{with perl_Scalar_Properties_enables_extra_test}
make test AUTHOR_TESTING=1 RELEASE_TESTING=1
%else
make test
%endif
%files
%license LICENSE
%doc Changes README
%{perl_vendorlib}/Scalar/
%{_mandir}/man3/Scalar::Properties.3*
%changelog
* Wed Jun 29 2022 misaka00251 <misaka00251@misakanet.cn> - 1.100860-1
- Init package (Thanks to fedora team)