perlPackages.ArchiveLibarchive: init at 0.08

This commit is contained in:
TomaSajt 2023-08-20 22:10:44 +02:00
parent 77867843fb
commit d12237ef2f
No known key found for this signature in database
GPG Key ID: F011163C050122A1
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,25 @@
diff --git a/lib/Archive/Libarchive/Lib.pm b/lib/Archive/Libarchive/Lib.pm
index 3fcbcf4..214df7a 100644
--- a/lib/Archive/Libarchive/Lib.pm
+++ b/lib/Archive/Libarchive/Lib.pm
@@ -3,7 +3,7 @@ package Archive::Libarchive::Lib;
use strict;
use warnings;
use 5.020;
-use FFI::CheckLib 0.30 qw( find_lib_or_die );
+use FFI::CheckLib qw( find_lib_or_die );
use Encode qw( decode );
use experimental qw( signatures );
index 3fcbcf4..718caed 100644
--- a/lib/Archive/Libarchive/Lib.pm
+++ b/lib/Archive/Libarchive/Lib.pm
@@ -23,7 +23,7 @@ L<Archive::Libarchive>.
sub lib
{
- $ENV{ARCHIVE_LIBARCHIVE_LIB_DLL} // find_lib_or_die( lib => 'archive', symbol => ['archive_read_free','archive_write_free','archive_free'], alien => ['Alien::Libarchive3'] );
+ $ENV{ARCHIVE_LIBARCHIVE_LIB_DLL} // find_lib_or_die( lib => 'archive', symbol => ['archive_read_free','archive_write_free','archive_free'], libpath => '@@libarchive@@' );
}
sub ffi

View File

@ -1011,6 +1011,27 @@ with self; {
};
};
ArchiveLibarchive = buildPerlPackage {
pname = "Archive-Libarchive";
version = "0.08";
src = fetchurl {
url = "mirror://cpan/authors/id/P/PL/PLICEASE/Archive-Libarchive-0.08.tar.gz";
hash = "sha256-6ONC1U/T1uXn4xYP4IjBOgpQM8/76JSBodJHHUNyAFk=";
};
patches = [ ../development/perl-modules/ArchiveLibarchive-set-findlib-path.patch ];
postPatch = ''
substituteInPlace lib/Archive/Libarchive/Lib.pm --replace "@@libarchive@@" "${pkgs.libarchive.lib}/lib"
'';
buildInputs = [ FFIC Filechdir PathTiny SubIdentify TermTable Test2Suite Test2ToolsMemoryCycle TestArchiveLibarchive TestScript ];
propagatedBuildInputs = [ FFICStat FFICheckLib FFIPlatypus FFIPlatypusTypeEnum FFIPlatypusTypePtrObject RefUtil ];
meta = {
homepage = "https://metacpan.org/pod/Archive::Libarchive";
description = "Modern Perl bindings to libarchive";
license = with lib.licenses; [ artistic1 gpl1Plus ];
maintainers = with maintainers; [ tomasajt ];
};
};
ArrayCompare = buildPerlModule {
pname = "Array-Compare";
version = "3.0.7";