From f7522108fc1ade1fceefd54b88f8a03422e7e204 Mon Sep 17 00:00:00 2001 From: yosh Date: Mon, 23 Oct 2023 15:54:24 -0400 Subject: [PATCH] New package: perl-IO-Compress-Brotli-0.004001 --- .../patches/no-bundled-brotli.patch | 50 +++++++++++++++++++ srcpkgs/perl-IO-Compress-Brotli/template | 15 ++++++ 2 files changed, 65 insertions(+) create mode 100644 srcpkgs/perl-IO-Compress-Brotli/patches/no-bundled-brotli.patch create mode 100644 srcpkgs/perl-IO-Compress-Brotli/template diff --git a/srcpkgs/perl-IO-Compress-Brotli/patches/no-bundled-brotli.patch b/srcpkgs/perl-IO-Compress-Brotli/patches/no-bundled-brotli.patch new file mode 100644 index 0000000000000..473d30e4bdcaf --- /dev/null +++ b/srcpkgs/perl-IO-Compress-Brotli/patches/no-bundled-brotli.patch @@ -0,0 +1,50 @@ +--- IO-Compress-Brotli-0.004001/Makefile.PL.orig 2022-08-02 09:39:14.249801914 +0200 ++++ IO-Compress-Brotli-0.004001/Makefile.PL 2022-08-02 09:39:03.236639950 +0200 +@@ -1,5 +1,23 @@ + use 5.014000; + use ExtUtils::MakeMaker; ++use ExtUtils::PkgConfig; ++ ++my @requirements = qw(libbrotlidec libbrotlienc); ++my $libs = ''; ++my $inc = ''; ++ ++my %pkgcfg; ++foreach my $req (@requirements) { ++ eval{ ++ %pkgcfg = ExtUtils::PkgConfig->find($req); ++ }; ++ if ($@) { ++ die "Could not determine location of library $req."; ++ } ++ $libs .= $pkgcfg{libs}.' '; ++ $inc .= $pkgcfg{cflags}.' '; ++} ++ + + WriteMakefile( + NAME => 'IO::Compress::Brotli', +@@ -16,20 +34,12 @@ WriteMakefile( + 'Time::HiRes' => '0', + }, + BUILD_REQUIRES => {}, +- INC => '-Ibrotli/c/include', +- MYEXTLIB => 'brotli/libbrotli$(LIB_EXT)', +- clean => { FILES => 'brotli/libbrotli$(LIB_EXT)' }, + META_ADD => { + dynamic_config => 0, + resources => { + repository => 'https://git.ieval.ro/?p=io-compress-brotli.git', + }, +- } ++ }, ++ LIBS => $libs, ++ INC => $inc, + ); +- +-sub MY::postamble { +-' +-$(MYEXTLIB): brotli/Makefile +- cd brotli && CFLAGS=-fPIC `which gmake || echo $(MAKE)` lib +-' +-} diff --git a/srcpkgs/perl-IO-Compress-Brotli/template b/srcpkgs/perl-IO-Compress-Brotli/template new file mode 100644 index 0000000000000..8c41e392cd9da --- /dev/null +++ b/srcpkgs/perl-IO-Compress-Brotli/template @@ -0,0 +1,15 @@ +# Template file for 'perl-IO-Compress-Brotli' +pkgname=perl-IO-Compress-Brotli +version=0.004001 +revision=1 +build_style=perl-module +hostmakedepends="perl perl-ExtUtils-PkgConfig" +makedepends="perl-File-Slurper brotli-devel" +depends="perl-File-Slurper" +short_desc="Modules for compressing and uncompressing Brotli data" +maintainer="yosh " +license="Artistic-1.0-Perl, GPL-1.0-or-later" +homepage="https://metacpan.org/dist/IO-Compress-Brotli" +changelog="https://fastapi.metacpan.org/source/MGV/IO-Compress-Brotli-0.004001/Changes" +distfiles="https://search.cpan.org/CPAN/authors/id/M/MG/MGV/IO-Compress-Brotli-$version.tar.gz" +checksum=8ba5c0167e966f487bde159c18bc1b3486528013b3235d39f2fcb375ca4bf410