diff --git a/URL-Encode-XS-0.03-Fix-building-on-Perl-without-.-in-INC.patch b/URL-Encode-XS-0.03-Fix-building-on-Perl-without-.-in-INC.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa825ff2e0ecaf4885028e942573a8bcef3203c3 --- /dev/null +++ b/URL-Encode-XS-0.03-Fix-building-on-Perl-without-.-in-INC.patch @@ -0,0 +1,26 @@ +From 1e04604613026854370599037b0390dbc74e19f2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 15 May 2017 15:13:34 +0200 +Subject: [PATCH] Fix building on Perl without "." in @INC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Makefile.PL | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.PL b/Makefile.PL +index 052c32f..9952db4 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -1,4 +1,5 @@ + use strict; ++BEGIN { push @INC, '.'; } + use inc::Module::Install; + + name 'URL-Encode-XS'; +-- +2.9.4 + diff --git a/URL-Encode-XS-0.03.tar.gz b/URL-Encode-XS-0.03.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cc0b560461286fc4b4b215997629149d4e4f1864 Binary files /dev/null and b/URL-Encode-XS-0.03.tar.gz differ diff --git a/perl-URL-Encode-XS.spec b/perl-URL-Encode-XS.spec new file mode 100644 index 0000000000000000000000000000000000000000..d2fcfc9ff016327812a7c0819670cd08ccf9b6f9 --- /dev/null +++ b/perl-URL-Encode-XS.spec @@ -0,0 +1,71 @@ +Name: perl-URL-Encode-XS +Version: 0.03 +Release: 1 +Summary: XS implementation of URL::Encode +License: GPL+ or Artistic +URL: https://metacpan.org/release/URL-Encode-XS +Source0: https://cpan.metacpan.org/modules/by-module/URL/URL-Encode-XS-%{version}.tar.gz +Patch0: URL-Encode-XS-0.03-Fix-building-on-Perl-without-.-in-INC.patch +# Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59 +BuildRequires: perl(inc::Module::Install) +BuildRequires: perl(Module::Install::ReadmeFromPod) +# Module +BuildRequires: perl(Exporter) +BuildRequires: perl(strict) +BuildRequires: perl(XSLoader) +BuildRequires: perl(warnings) +# Test Suite +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(utf8) +# Dependencies +Requires: perl(Exporter) +Requires: perl(XSLoader) + +%description +This package implements the original URL::Encode via XS interface. The main +URL::Encode package will use this package automatically if it can find it. +Do not use this package directly, use URL::Encode instead. + +%prep +%setup -qn URL-Encode-XS-%{version} + +# Unbundle inc::Module::Install and friends +rm -rf inc/ +sed -i -e '/^inc\// d' MANIFEST + +# Fix build on Perl without "." in @INC, CPAN RT#121686 +%patch0 -p1 + +# Avoid doc-file dependencies +chmod -c -x dev/* + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +find %{buildroot} -type f -name '*.bs' -empty -delete -print +%{_fixperms} -c %{buildroot} + +%check +make test + +%files +%doc Changes dev/ README +%{perl_vendorarch}/auto/URL/ +%{perl_vendorarch}/URL/ +%{_mandir}/man3/URL::Encode::XS.3* + +%changelog +* Tue Apr 23 2024 Han Jinpeng - 0.03-1 +- Package init diff --git a/perl-URL-Encode-XS.yaml b/perl-URL-Encode-XS.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8a33ac9e5d01f40a08ec191b6502052999224eba --- /dev/null +++ b/perl-URL-Encode-XS.yaml @@ -0,0 +1,4 @@ +version_control: metacpan +src_repo: URL-Encode-XS +tag_prefix: "" +separator: "."