diff --git a/Digest-SHA-5.93-Reset-CFLAGS.patch b/Digest-SHA-5.93-Reset-CFLAGS.patch new file mode 100644 index 0000000000000000000000000000000000000000..0c9f5d736a51842f0f6e5f58fc8216cb7ee46b6f --- /dev/null +++ b/Digest-SHA-5.93-Reset-CFLAGS.patch @@ -0,0 +1,33 @@ +From 6c9234f3b27b3be7d89c277302464015f413e462 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 11 Mar 2013 09:44:22 +0100 +Subject: [PATCH] Reset CFLAGS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Makefile.PL | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index af2c0c3..65f4771 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -64,12 +64,6 @@ if ($^O eq 'VMS') { + } + } + +- # Enhance performance on Intel when using gcc +- +-if ($Config{archname} =~ /^i[3456]86/ && $Config{ccname} eq 'gcc') { +- push(@extra, OPTIMIZE => '-O1 -fomit-frame-pointer'); +-} +- + my $fussy = '-Wall -Wextra -Wconversion -Wcast-align -Wpointer-arith '; + push(@extra, CCFLAGS => $fussy . $Config{ccflags}) if $opt_w; + +-- +1.9.3 + diff --git a/Digest-SHA-6.02.tar.gz b/Digest-SHA-6.02.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2121827a25bb3952b446a19f1ddb5448e8f69ea7 Binary files /dev/null and b/Digest-SHA-6.02.tar.gz differ diff --git a/perl-Digest-SHA.spec b/perl-Digest-SHA.spec new file mode 100644 index 0000000000000000000000000000000000000000..4c2a90cd507d227573d8d1d1cf3d5f2d082a95c8 --- /dev/null +++ b/perl-Digest-SHA.spec @@ -0,0 +1,98 @@ +%define anolis_release 1 +# Inherit additional methods from Digest::Base +%bcond_without perl_Digest_SHA_enables_digest_base +# Run optional test +%bcond_without perl_Digest_SHA_enables_optional_test + +Name: perl-Digest-SHA +Epoch: 2 +Version: 6.02 +Release: %{anolis_release}%{?dist} +Summary: Perl extension for SHA-1/224/256/384/512 +License: GPL+ or Artistic +URL: https://metacpan.org/release/Digest-SHA +Source0: https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-%{version}.tar.gz +# Since 5.80, upstream overrides CFLAGS because they think it improves +# performance. Revert it. +Patch0: Digest-SHA-5.93-Reset-CFLAGS.patch +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(Getopt::Std) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +# Run-time +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(Fcntl) +# Getopt::Long not used at tests +BuildRequires: perl(integer) +BuildRequires: perl(warnings) +# XSLoader or DynaLoader +BuildRequires: perl(XSLoader) +# Optional run-time +%if %{with perl_Digest_SHA_enables_digest_base} +BuildRequires: perl(Digest::base) +%endif +# Tests +BuildRequires: perl(FileHandle) +%if %{with perl_Digest_SHA_enables_optional_test} +# Optional tests +%if !%{defined perl_bootstrap} +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 0.08 +%endif +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Carp) +# Optional but recommended +%if %{with perl_Digest_SHA_enables_digest_base} +Requires: perl(Digest::base) +%endif +# XSLoader or DynaLoader +Requires: perl(XSLoader) + +%{?perl_default_filter} + +%description +Digest::SHA is a complete implementation of the NIST Secure Hash Standard. It +gives Perl programmers a convenient way to calculate SHA-1, SHA-224, SHA-256, +SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests. The module can +handle all types of input, including partial-byte data. + +%prep +%setup -q -n Digest-SHA-%{version} +%patch0 -p1 +chmod -x examples/* +perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(q{examples/dups})' + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE='%{optflags}' +%{make_build} + +%install +%{make_install} +find '%{buildroot}' -type f -name '*.bs' -empty -delete +%{_fixperms} -c '%{buildroot}' + +%check +make test + +%files +%doc Changes examples/ README +%{_bindir}/shasum +%{perl_vendorarch}/auto/Digest/ +%{perl_vendorarch}/Digest/ +%{_mandir}/man1/shasum.1* +%{_mandir}/man3/Digest::SHA.3* + +%changelog +* Wed Apr 20 2022 Chunmei Xu - 2:6.02-1 +- init from upstream