diff --git a/Compress-LZ4-0.22-Build-against-system-lz4.patch b/Compress-LZ4-0.22-Build-against-system-lz4.patch new file mode 100644 index 0000000000000000000000000000000000000000..88b73e5d1ce71eca565d6e58224283f5d59cf00d --- /dev/null +++ b/Compress-LZ4-0.22-Build-against-system-lz4.patch @@ -0,0 +1,40 @@ +From 9e36ac1856e67d12f36b7640d446355ec69f3cd9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 9 Sep 2015 16:26:42 +0200 +Subject: [PATCH] Build against system lz4 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Makefile.PL | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index d2ee0a0..8ba4107 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -19,8 +19,7 @@ my %conf = ( + }, + }, + +- MYEXTLIB => 'src/lz4$(LIB_EXT)', +- INC => '-Isrc', ++ LIBS => '-llz4', + + dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, + clean => { FILES => 'Compress-LZ4-*' }, +@@ -40,9 +39,6 @@ WriteMakefile(%conf); + + sub MY::postamble { + return <<" MAKE_FRAG"; +-\$(MYEXTLIB): src/Makefile +-\tcd src && \$(MAKE) \$(PASSTHRU) +- + authortest: + \t\$(MAKE) -e \$(TEST_TYPE) TEST_FILES="xt/*.t" + MAKE_FRAG +-- +2.4.3 + diff --git a/Compress-LZ4-0.25.tar.gz b/Compress-LZ4-0.25.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f4b22f77c901be31ce4aa6e2234fa41d608a784e Binary files /dev/null and b/Compress-LZ4-0.25.tar.gz differ diff --git a/perl-Compress-LZ4.spec b/perl-Compress-LZ4.spec new file mode 100644 index 0000000000000000000000000000000000000000..a40d4635e362e2171bfb22fe3ac169400367ef31 --- /dev/null +++ b/perl-Compress-LZ4.spec @@ -0,0 +1,70 @@ +Name: perl-Compress-LZ4 +Version: 0.25 +Release: 1 +Summary: Perl interface to the LZ4 compression library +# other files: GPL+ or Artistic +## Not in binary package +# src: BSD +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/Compress-LZ4 +Source0: https://cpan.metacpan.org/modules/by-module/Compress/Compress-LZ4-%{version}.tar.gz +# Do not use bundled lz4 sources +Patch0: Compress-LZ4-0.22-Build-against-system-lz4.patch +BuildRequires: gcc +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: lz4-devel +BuildRequires: perl-interpreter +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: sed +# Run-time: +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(XSLoader) +# Tests: +BuildRequires: perl(Config) +BuildRequires: perl(overload) +BuildRequires: perl(Test::More) >= 0.82 +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Exporter) >= 5.57 + +# Filter under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Exporter\\)$ + +%description +The Compress::LZ4 module provides an interface to the LZ4 compression library + +%prep +%setup -q -n Compress-LZ4-%{version} +%patch0 -p1 +# Remove bundled lz4 +rm -Rf src +sed -i -e '/^src\//d' MANIFEST +# Correct permissions +chmod -c -x ex/* + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -delete +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Changes README ex +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/Compress* +%{_mandir}/man3/* + +%changelog +* Thu Feb 1 2024 Dongxing Wang - 0.25-1 +- Initial package