diff --git a/.gitignore b/.gitignore index 30de4c1..c9a2521 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/TermReadKey-2.37.tar.gz +TermReadKey-2.38.tar.gz diff --git a/.perl-TermReadKey.metadata b/.perl-TermReadKey.metadata deleted file mode 100644 index e216a65..0000000 --- a/.perl-TermReadKey.metadata +++ /dev/null @@ -1 +0,0 @@ -27aa51e115d6eb63338a2f1bcaddc2b9150a8eaf SOURCES/TermReadKey-2.37.tar.gz diff --git a/perl-TermReadKey-configure-c99.patch b/perl-TermReadKey-configure-c99.patch new file mode 100644 index 0000000..c65e30a --- /dev/null +++ b/perl-TermReadKey-configure-c99.patch @@ -0,0 +1,139 @@ +Explicitly specify the return type of main as int for C99 compatibility. + +Submitted upstream: + +diff --git a/Configure.pm b/Configure.pm +index aabf136756ff2be5..82aab81c964c3350 100644 +--- a/Configure.pm ++++ b/Configure.pm +@@ -503,7 +503,7 @@ by the compiler is returned. + =cut + + sub CheckHeader { #Find a header (or set of headers) that exists +- ApplyHeaders("main(){}",@_); ++ ApplyHeaders("int main(){}",@_); + } + + =head2 CheckStructure +@@ -516,7 +516,7 @@ properly will be returned. B will be returned if nothing succeeds. + + sub CheckStructure { # Check existance of a structure. + my($structname,@headers) = @_; +- ApplyHeaders("main(){ struct $structname s;}",@headers); ++ ApplyHeaders("int main(){ struct $structname s;}",@headers); + } + + =head2 CheckField +@@ -530,7 +530,7 @@ be returned if nothing succeeds. + + sub CheckField { # Check for the existance of specified field in structure + my($structname,$fieldname,@headers) = @_; +- ApplyHeaders("main(){ struct $structname s1; struct $structname s2; ++ ApplyHeaders("int main(){ struct $structname s1; struct $structname s2; + s1.$fieldname = s2.$fieldname; }",@headers); + } + +@@ -544,7 +544,7 @@ that symbol will be returned. B will be returned if nothing succeeds. + + sub CheckLSymbol { # Check for linkable symbol + my($symbol,@libs) = @_; +- ApplyLibs("main() { void * f = (void *)($symbol); }",@libs); ++ ApplyLibs("int main() { void * f = (void *)($symbol); }",@libs); + } + + =head2 CheckSymbol +@@ -558,7 +558,8 @@ B will be returned if nothing succeeds. + + sub CheckSymbol { # Check for linkable/header symbol + my($symbol,@lookup) = @_; +- ApplyHeadersAndLibs("main() { void * f = (void *)($symbol); }",@lookup); ++ ApplyHeadersAndLibs("int main() { void * f = (void *)($symbol); }", ++ @lookup); + } + + =head2 CheckHSymbol +@@ -571,7 +572,7 @@ that symbol will be returned. B will be returned if nothing succeeds. + + sub CheckHSymbol { # Check for header symbol + my($symbol,@headers) = @_; +- ApplyHeaders("main() { void * f = (void *)($symbol); }",@headers); ++ ApplyHeaders("int main() { void * f = (void *)($symbol); }",@headers); + } + + =head2 CheckHPrototype (unexported) +@@ -591,7 +592,7 @@ sub CheckHPrototype { # Check for header prototype. + # names function doesn't exist, this call will _succeed_. Caveat Utilitor. + my($function,$proto,@headers) = @_; + my(@proto) = @{$proto}; +- ApplyHeaders("main() { extern ".$proto[0]." $function(". ++ ApplyHeaders("int main() { extern ".$proto[0]." $function(". + join(",",@proto[1..$#proto])."); }",@headers); + } + +@@ -612,7 +613,8 @@ Example: + sub GetSymbol { # Check for linkable/header symbol + my($symbol,$printf,$cast,@lookup) = @_,"",""; + scalar(ApplyHeadersAndLibsAndExecute( +- "main(){ printf(\"\%$printf\",($cast)($symbol));exit(0);}",@lookup)); ++ "int main(){ printf(\"\%$printf\",($cast)($symbol));exit(0);}", ++ @lookup)); + } + + =head2 GetTextSymbol +@@ -768,7 +770,7 @@ main(){ }"); + "double","long double", + "char","unsigned char","short int","unsigned short int"); + +- if(Compile("main(){flurfie a;}")) { @types = (); } ++ if(Compile("int main(){flurfie a;}")) { @types = (); } + + $Verbose=0; + +@@ -781,7 +783,7 @@ main(){ }"); + if(Compile(" + extern void func($types[$i]); + extern void func($types[$j]); +-main(){}")) { ++int main(){}")) { + print "Removing type $types[$j] because it equals $types[$i]\n"; + splice(@types,$j,1); + $j--; +@@ -795,7 +797,7 @@ main(){}")) { + if(Compile(" + $types[$i] func(void); + extern $types[$j] func(void); +-main(){}")) { ++int main(){}")) { + print "Removing type $types[$j] because it equals $types[$i]\n"; + splice(@types,$j,1); + $j--; +@@ -833,7 +835,7 @@ main(){}")) { + # Can we check the return type without worry about arguements? + if($checkreturn and (!$checknilargs or !$checkniletcargs)) { + for (@types) { +- if(ApplyHeaders("extern $_ $function(". ($checknilargs?"...":"").");main(){}",[@headers])) { ++ if(ApplyHeaders("extern $_ $function(". ($checknilargs?"...":"").");int main(){}",[@headers])) { + $rettype = $_; # Great, we found the return type. + last; + } +@@ -847,9 +849,9 @@ main(){}")) { + my $numargs=-1; + my $varargs=0; + for (0..32) { +- if(ApplyHeaders("main(){ $function(".join(",",("0") x $_).");}",@headers)) { ++ if(ApplyHeaders("int main(){ $function(".join(",",("0") x $_).");}",@headers)) { + $numargs=$_; +- if(ApplyHeaders("main(){ $function(".join(",",("0") x ($_+1)).");}",@headers)) { ++ if(ApplyHeaders("int main(){ $function(".join(",",("0") x ($_+1)).");}",@headers)) { + $varargs=1; + } + last +@@ -865,7 +867,7 @@ main(){}")) { + + if(@args>0 and !defined($rettype)) { + for (@types) { +- if(defined(ApplyHeaders("extern $_ $function(".join(",",@args).");main(){}",[@headers]))) { ++ if(defined(ApplyHeaders("extern $_ $function(".join(",",@args).");int main(){}",[@headers]))) { + $rettype = $_; # Great, we found the return type. + last; + } diff --git a/SPECS/perl-TermReadKey.spec b/perl-TermReadKey.spec similarity index 61% rename from SPECS/perl-TermReadKey.spec rename to perl-TermReadKey.spec index ec2d70c..9ddb9b9 100644 --- a/SPECS/perl-TermReadKey.spec +++ b/perl-TermReadKey.spec @@ -1,13 +1,12 @@ Name: perl-TermReadKey -Version: 2.37 -Release: 7%{?dist} +Version: 2.38 +Release: 24%{?dist} Summary: A perl module for simple terminal control -Group: Development/Libraries -License: (Copyright only) and (Artistic or GPL+) -URL: http://search.cpan.org/~jstowe/TermReadKey/ -Source0: http://www.cpan.org/authors/id/J/JS/JSTOWE/TermReadKey-%{version}.tar.gz +License: TermReadKey AND (GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/release/TermReadKey +Source0: https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-%{version}.tar.gz +Patch0: perl-TermReadKey-configure-c99.patch # Build -BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make @@ -16,6 +15,8 @@ BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Carp) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) # Runtime BuildRequires: perl(Config) BuildRequires: perl(Cwd) @@ -23,13 +24,10 @@ BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) -BuildRequires: perl(strict) BuildRequires: perl(vars) -BuildRequires: perl(warnings) # Tests only BuildRequires: perl(Fcntl) BuildRequires: perl(Test::More) -Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) %{?perl_default_filter} @@ -42,28 +40,135 @@ main goals is to have the functions as portable as possible, so you can just plug in "use Term::ReadKey" on any architecture and have a good likelyhood of it working. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep -%setup -q -n TermReadKey-%{version} +%autosetup -p1 -n TermReadKey-%{version} +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build -CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 -make %{?_smp_mflags} OPTIMIZE="%{optflags}" +CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} OPTIMIZE="%{optflags}" %install -make pure_install DESTDIR=%{buildroot} +%{make_install} find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + %check make test %files %doc Changes example README -%{perl_vendorarch}/* -%{perl_vendorarch}/auto/* -%{_mandir}/man3/* +%{perl_vendorarch}/Term* +%{perl_vendorarch}/auto/Term* +%{_mandir}/man3/Term::ReadKey* + +%files tests +%{_libexecdir}/%{name} %changelog +* Tue Oct 29 2024 Troy Dawson - 2.38-24 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Thu Aug 08 2024 Troy Dawson - 2.38-23 +- Bump release for Aug 2024 java mass rebuild + +* Mon Jun 24 2024 Troy Dawson - 2.38-22 +- Bump release for June 2024 mass rebuild + +* Thu Feb 01 2024 Jitka Plesnikova - 2.38-21 +- Package tests + +* Thu Jan 25 2024 Fedora Release Engineering - 2.38-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.38-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.38-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 Jitka Plesnikova - 2.38-17 +- Perl 5.38 rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 2.38-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 25 2022 Florian Weimer - 2.38-15 +- Port Configure.pm to C99 + +* Fri Jul 22 2022 Fedora Release Engineering - 2.38-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon May 30 2022 Jitka Plesnikova - 2.38-13 +- Perl 5.36 rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 2.38-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.38-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri May 21 2021 Jitka Plesnikova - 2.38-10 +- Perl 5.34 rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 2.38-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.38-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jun 22 2020 Jitka Plesnikova - 2.38-7 +- Perl 5.32 rebuild + +* Thu Feb 06 2020 Tom Stellard - 2.38-6 +- Spec file cleanups: Use make_build and make_install macros +- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make +- https://fedoraproject.org/wiki/Perl/Tips#ExtUtils::MakeMake + +* Thu Jan 30 2020 Fedora Release Engineering - 2.38-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 2.38-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu May 30 2019 Jitka Plesnikova - 2.38-3 +- Perl 5.30 rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 2.38-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 07 2019 Jitka Plesnikova - 2.38-1 +- 2.38 bump + +* Fri Jul 13 2018 Fedora Release Engineering - 2.37-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jun 27 2018 Jitka Plesnikova - 2.37-8 +- Perl 5.28 rebuild + * Mon Feb 19 2018 Jitka Plesnikova - 2.37-7 - Add build-require gcc diff --git a/sources b/sources new file mode 100644 index 0000000..40b230e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (TermReadKey-2.38.tar.gz) = fb09f013f9f0d8a4397e39f6f3db7a6d023259219af8f76744094e396437a01b19141b3cdb39a158d3b518903fb010088bc37406763bfbeb3fcab810bb0bb157