From aeea831cbfbb7e96c9058167175d8c0a9cf93ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 30 Jun 2022 14:15:24 +0200 Subject: [PATCH] Help generators to recognize Perl scripts --- perl-Devel-ArgNames.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/perl-Devel-ArgNames.spec b/perl-Devel-ArgNames.spec index e20d8cd..ec43680 100644 --- a/perl-Devel-ArgNames.spec +++ b/perl-Devel-ArgNames.spec @@ -10,6 +10,7 @@ BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter +BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) # Run-time: @@ -40,6 +41,11 @@ with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Devel-ArgNames-%{version} +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1