diff --git a/srcpkgs/perl-XS-Parse-Keyword/patches/cross-fix.patch b/srcpkgs/perl-XS-Parse-Keyword/patches/cross-fix.patch new file mode 100644 index 00000000000..d4b3a6b6b3c --- /dev/null +++ b/srcpkgs/perl-XS-Parse-Keyword/patches/cross-fix.patch @@ -0,0 +1,28 @@ +Compiles and runs a test binary for testing cflags which fails in cross builds. +A check for cflags is not necessary anyway, so remove it completely. + +--- a/Build.PL 2025-01-09 17:25:50.000000000 +0100 ++++ b/Build.PL 2025-05-01 15:32:22.200963362 +0200 +@@ -21,22 +21,6 @@ + + my $cc = ExtUtils::CChecker->new( quiet => 1 ); + +-$cc->try_find_cflags_for( +- cflags => [ +- # Most systems will need no extra cflags +- [], +- # HPUX may need to be told +std=gnu in order to accept anon inner unions +- ( $^O eq "hpux" ) ? [ "+std=gnu" ] : (), +- ], +- source => <<'EOF' +-struct Named { +- union { int a, b; }; +- int c; +-}; +-int main(void) { struct Named n; n.a = 0; return n.a; } +-EOF +-) or die "OS unsupported - C compiler does not support anonymous inner unions\n"; +- + my $build = Module::Build::with::XSTests->new( + module_name => 'XS::Parse::Keyword', + requires => { diff --git a/srcpkgs/perl-XS-Parse-Keyword/template b/srcpkgs/perl-XS-Parse-Keyword/template new file mode 100644 index 00000000000..b24ed639b9a --- /dev/null +++ b/srcpkgs/perl-XS-Parse-Keyword/template @@ -0,0 +1,20 @@ +# Template file for 'perl-XS-Parse-Keyword' +pkgname=perl-XS-Parse-Keyword +version=0.48 +revision=1 +build_style=perl-ModuleBuild +hostmakedepends="perl perl-ExtUtils-CChecker perl-Module-Build" +makedepends="perl perl-File-ShareDir" +depends="perl perl-File-ShareDir" +checkdepends="perl-Test-Pod" +short_desc="XS functions to assist in parsing keyword syntax" +maintainer="newbluemoon " +license="Artistic-1.0-Perl, GPL-1.0-or-later" +homepage="https://metacpan.org/pod/XS::Parse::Keyword" +changelog="https://metacpan.org/dist/XS-Parse-Keyword/changes" +distfiles="${CPAN_SITE}/Syntax/PEVANS/XS-Parse-Keyword-${version}.tar.gz" +checksum=857a070ba465ab5b89d4d8d36d92358edd66e5e7b4a91584611d85125ac9a9c7 + +do_check() { + LD="$CC" ./Build test +}