From 07a6e21d50ec40024dd799589c2a10ee4d546556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> Date: Thu, 11 May 2017 13:48:12 +0200 Subject: Allow building against perl <= 5.25.5
--- Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch | 34 +++++++++++++++++++++++++ perl-Data-Dumper.spec | 6 +++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch diff --git a/Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch b/Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch new file mode 100644 index 0000000..dcb46aa --- /dev/null +++ b/Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch @@ -0,0 +1,34 @@ +From c38b7faa8bb565553bf125da7244f013822735ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> +Date: Thu, 11 May 2017 13:44:14 +0200 +Subject: [PATCH] Provide SvPVCLEAR() macro +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +To build with perl <= 5.25.5. + +Signed-off-by: Petr Písař <[email protected]> +--- + Dumper.xs | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Dumper.xs b/Dumper.xs +index 0e7142e..5a21721 100644 +--- a/Dumper.xs ++++ b/Dumper.xs +@@ -8,6 +8,11 @@ + # include "ppport.h" + #endif + ++/* SvPVCLEAR was added after 5.25.5 and ppport.h does not provide it */ ++#if !defined SvPVCLEAR ++#define SvPVCLEAR(x) sv_setpvs((x), "") ++#endif ++ + #if PERL_VERSION < 8 + # define DD_USE_OLD_ID_FORMAT + #endif +-- +2.9.3 + diff --git a/perl-Data-Dumper.spec b/perl-Data-Dumper.spec index 775b0e9..52aa568 100644 --- a/perl-Data-Dumper.spec +++ b/perl-Data-Dumper.spec @@ -8,14 +8,15 @@ URL: http://search.cpan.org/dist/Data-Dumper/ Source0: http://www.cpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-%{cpan_version}.tar.gz # Unbundled from perl-5.25.12, requires perl > 5.25.5 Patch0: Data-Dumper-2.161-Upgrade-to-2.167.patch +# Allow building against perl <= 5.25.5, +# required for Data-Dumper-2.161-Upgrade-to-2.167.patch +Patch1: Data-Dumper-2.167-Provide-SvPVCLEAR-macro.patch BuildRequires: findutils BuildRequires: gcc BuildRequires: make BuildRequires: perl BuildRequires: perl-devel BuildRequires: perl-generators -# The XS implementation calls SvPVCLEAR() added into perl after 5.25.5 -BuildRequires: perl(:VERSION) > 5.25.5 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: sed # perl-Test-Simple is in cycle with perl-Data-Dumper @@ -57,6 +58,7 @@ structures correctly. %prep %setup -q -n Data-Dumper-%{cpan_version} %patch0 -p1 +%patch1 -p1 sed -i '/MAN3PODS/d' Makefile.PL %build -- cgit v1.1 https://src.fedoraproject.org/cgit/perl-Data-Dumper.git/commit/?h=master&id=07a6e21d50ec40024dd799589c2a10ee4d546556 _______________________________________________ perl-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
