perlPackages.IOCompressBrotli: init at 0.019
https://github.com/timlegge/perl-IO-Compress-Brotli
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
brotli,
|
||||
buildPerlPackage,
|
||||
fetchurl,
|
||||
perlPackages,
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
buildPerlPackage {
|
||||
pname = "IO-Compress-Brotli";
|
||||
version = "0.019";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/T/TI/TIMLEGGE/IO-Compress-Brotli-0.019.tar.gz";
|
||||
hash = "sha256-N/QN187kSs6iby92Onc+YdTsIjMF3e7KRhJEPL8oj78=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Use system brotli in Makefile.PL
|
||||
./use-system-brotli.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.PL \
|
||||
--replace-fail "@LIBS@" "-L${lib.getLib brotli}/lib -lbrotlienc -lbrotlidec -lbrotlicommon"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
brotli
|
||||
perlPackages.FileSlurper
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with perlPackages; [
|
||||
FileSlurper
|
||||
GetoptLong
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev brotli}/include";
|
||||
|
||||
meta = {
|
||||
description = "Write Brotli buffers/streams";
|
||||
homepage = "https://github.com/timlegge/perl-IO-Compress-Brotli";
|
||||
changelog = "https://github.com/timlegge/perl-IO-Compress-Brotli/blob/main/Changes";
|
||||
license = with lib.licenses; [
|
||||
artistic1
|
||||
gpl1Plus
|
||||
];
|
||||
maintainers = [ lib.maintainers.anthonyroussel ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -1,6 +1,5 @@
|
||||
use 5.014000;
|
||||
use ExtUtils::MakeMaker;
|
||||
-use Alien::cmake3;
|
||||
use File::Spec::Functions qw/catfile/;
|
||||
|
||||
WriteMakefile(
|
||||
@@ -17,16 +16,7 @@
|
||||
'Getopt::Long' => '0',
|
||||
'Time::HiRes' => '0',
|
||||
},
|
||||
- CONFIGURE_REQUIRES => {
|
||||
- 'Alien::cmake3' => '0',
|
||||
- },
|
||||
- BUILD_REQUIRES => {
|
||||
- 'Alien::cmake3' => '0',
|
||||
- },
|
||||
- INC => '-Ibrotli/c/include',
|
||||
- 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 => "@LIBS@",
|
||||
META_ADD => {
|
||||
dynamic_config => 0,
|
||||
resources => {
|
||||
@@ -33,12 +24,3 @@
|
||||
},
|
||||
}
|
||||
);
|
||||
-
|
||||
-sub MY::postamble {
|
||||
- my @dirs = Alien::cmake3->bin_dir;
|
||||
- my $cmake = defined $dirs[0] ? catfile($dirs[0] , Alien::cmake3->exe) : Alien::cmake3->exe;
|
||||
-'
|
||||
-$(MYEXTLIB): brotli/CMakeLists.txt
|
||||
- cd brotli && "' . $cmake . '"' . $cmake_options . ' -DCMAKE_MAKE_PROGRAM=$(MAKE) -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed . && $(MAKE)
|
||||
-'
|
||||
-}
|
||||
@@ -17446,6 +17446,8 @@ with self;
|
||||
};
|
||||
};
|
||||
|
||||
IOCompressBrotli = callPackage ../development/perl-modules/IOCompressBrotli { };
|
||||
|
||||
IODigest = buildPerlPackage {
|
||||
pname = "IO-Digest";
|
||||
version = "0.11";
|
||||
|
||||
Reference in New Issue
Block a user