mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-perl/IO-Compress-Brotli: add 0.19.0
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
30
dev-perl/IO-Compress-Brotli/IO-Compress-Brotli-0.19.0.ebuild
Normal file
30
dev-perl/IO-Compress-Brotli/IO-Compress-Brotli-0.19.0.ebuild
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DIST_AUTHOR=TIMLEGGE
|
||||
DIST_VERSION=0.019
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Read/write Brotli buffers/streams"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/brotli:=
|
||||
dev-perl/File-Slurper
|
||||
virtual/perl-Getopt-Long
|
||||
virtual/perl-Time-HiRes
|
||||
"
|
||||
DEPEND="
|
||||
app-arch/brotli:=
|
||||
"
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
virtual/perl-ExtUtils-MakeMaker
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.019-unbundle.patch
|
||||
)
|
||||
@@ -1 +1,2 @@
|
||||
DIST IO-Compress-Brotli-0.017.tar.gz 7748620 BLAKE2B 32a5d5653dc60a3cbd49fa9ad2daa3d657b232ee469fb3c5dfe2d675290079ea9b89c3164fd0dd03849257b9d786de71a19404574999f96c3adbe19b5e9f6f71 SHA512 a20c6a569fef2820dc089175de90a7e889e6f4093552ab9579c2520f51c87863b55c796b3b1bd12839d173268d05625caef5f9f95eef977cfb7c0280f82bbce0
|
||||
DIST IO-Compress-Brotli-0.019.tar.gz 7814536 BLAKE2B 5e1df4da84c464c3bb1c595bf9f63660a274b99ff06dbe2dc5b490d5ec4410f08629b62c60b7c85fb2120ed2902c0610fd0085a4360883f3368d5b784bfd1e7e SHA512 d81fb94dfbdae24af3985349ccccfac9d5a863452b173542f7718e3a1ffcf18819b4456e2e0c305afabe0eeb336c0ad648d4d3f0fdb1f6229e82e0fad4751628
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 59541041bc3b39e8539fd12a8e584a63040ad7a5 Mon Sep 17 00:00:00 2001
|
||||
From: Kent Fredric <kentnl@gentoo.org>
|
||||
Date: Tue, 4 Feb 2020 23:17:49 +1300
|
||||
Subject: Disable using bundled brotli
|
||||
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -1,6 +1,5 @@
|
||||
use 5.008000;
|
||||
use ExtUtils::MakeMaker;
|
||||
-use Alien::cmake3;
|
||||
use File::Spec::Functions qw/catfile/;
|
||||
use Config;
|
||||
|
||||
@@ -19,6 +18,12 @@ if ($Config{myuname} =~ /strawberry/i || $Config{osname} =~ /MSWin/i ) {
|
||||
}
|
||||
}
|
||||
|
||||
+my $bundled = $ENV{IO_COMPRESS_BROTLI_BUNDLED} || 0;
|
||||
+
|
||||
+# Avoid unnecessary dependency
|
||||
+use if $bundled, 'Alien::cmake3';
|
||||
+
|
||||
+
|
||||
WriteMakefile(
|
||||
NAME => 'IO::Compress::Brotli',
|
||||
VERSION_FROM => 'lib/IO/Compress/Brotli.pm',
|
||||
@@ -33,6 +38,7 @@ WriteMakefile(
|
||||
'Getopt::Long' => '0',
|
||||
'Time::HiRes' => '0',
|
||||
},
|
||||
+ ( $bundled ) ? (
|
||||
CONFIGURE_REQUIRES => {
|
||||
'Alien::cmake3' => '0',
|
||||
},
|
||||
@@ -43,6 +49,9 @@ WriteMakefile(
|
||||
MYEXTLIB => $myextlib,
|
||||
EXTRALIBS => ' brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT) ',
|
||||
clean => { FILES => "brotli/Makefile $myextlib brotli/CMakeCache.txt brotli/CMakeFiles/* brotli/CTestTestfile.cmake brotli/DartConfiguration.tcl brotli/brotli* brotli/cmake_install.cmake brotli/libbrotlicommon.pc brotli/libbrotlidec.pc brotli/libbrotlienc.pc" },
|
||||
+ ) : (
|
||||
+ LIBS => ['-lbrotlienc -lbrotlidec'],
|
||||
+ ),
|
||||
META_ADD => {
|
||||
dynamic_config => 0,
|
||||
resources => {
|
||||
@@ -52,6 +61,7 @@ WriteMakefile(
|
||||
);
|
||||
|
||||
sub MY::postamble {
|
||||
+ return '' unless $bundled;
|
||||
my @dirs = Alien::cmake3->bin_dir;
|
||||
my $cmake = defined $dirs[0] ? catfile($dirs[0] , Alien::cmake3->exe) : Alien::cmake3->exe;
|
||||
'
|
||||
Reference in New Issue
Block a user