From be52f902d8201bedf856843db17900be13127f2d Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Wed, 24 Jan 2018 18:10:37 -0700 Subject: [PATCH 1/4] Revert "perlmod: redux handling odd Makefile.PL eval value" This reverts commit f03cd7b5aca1c7b041ca120cbf684d1b3c48c236. Signed-off-by: Philip Prindeville --- lang/perl/perlmod.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index 04ae49053..2ad21e4b5 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -57,7 +57,7 @@ define perlmod/Configure (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \ PERL_MM_USE_DEFAULT=1 \ $(2) \ - $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; unshift(@INC, "."); unless (defined (do "./Makefile.PL")) { if ($$$$@) { die "couldn\047t parse Makefile.PL: $$$$@"; } elsif ($$$$!) { die "Could\047t run Makefile.PL: $$$$!"; } }; die "No Makefile generated!" unless -f "Makefile";' \ + $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; unshift(@INC, "."); unless (defined (do "./Makefile.PL")) { if ($$$$@) { die "couldn\047t parse Makefile.PL: $$$$@"; } else { die "couldn\047t do Makefile.PL: $$$$!"; } }; die "No Makefile generated!" unless -f "Makefile";' \ $(1) \ AR=ar \ CC=$(GNU_TARGET_NAME)-gcc \ From 531eb4404b40ec958706497ce6628e4477a5b3e5 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Wed, 24 Jan 2018 18:11:56 -0700 Subject: [PATCH 2/4] Revert "perl: when Makefile.PL fails give more feedback" This reverts commit a4aaaf8d8f2eb6d8431f8b1a97ba97380364aa04. Signed-off-by: Philip Prindeville --- lang/perl/perlmod.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index 2ad21e4b5..7adf16b1b 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -57,7 +57,7 @@ define perlmod/Configure (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \ PERL_MM_USE_DEFAULT=1 \ $(2) \ - $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; unshift(@INC, "."); unless (defined (do "./Makefile.PL")) { if ($$$$@) { die "couldn\047t parse Makefile.PL: $$$$@"; } else { die "couldn\047t do Makefile.PL: $$$$!"; } }; die "No Makefile generated!" unless -f "Makefile";' \ + $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "./Makefile.PL"' \ $(1) \ AR=ar \ CC=$(GNU_TARGET_NAME)-gcc \ From 6973d0e1d8422399762c9034f9e49f7bfa343afa Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Thu, 25 Jan 2018 15:41:16 -0700 Subject: [PATCH 3/4] Revert "perl-inline-c: patch Makefile.PL to not eval undef" This reverts commit 5470c60a91653fa34591540f38e119dc5e8ab5cc. Signed-off-by: Philip Prindeville --- .../patches/010-makefile_pl-dont-eval-undef.patch | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 lang/perl-inline-c/patches/010-makefile_pl-dont-eval-undef.patch diff --git a/lang/perl-inline-c/patches/010-makefile_pl-dont-eval-undef.patch b/lang/perl-inline-c/patches/010-makefile_pl-dont-eval-undef.patch deleted file mode 100644 index 50b764b43..000000000 --- a/lang/perl-inline-c/patches/010-makefile_pl-dont-eval-undef.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/Makefile.PL 2017-05-30 14:58:53.000000000 -0600 -+++ b/Makefile.PL 2017-11-07 13:40:05.172119764 -0700 -@@ -82,3 +82,5 @@ package - MY; - use File::ShareDir::Install qw(postamble); - } -+ -+1; From 1e0db9ba80fe0bd43c2312cf16dc1e2dd3a3e6b1 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Thu, 25 Jan 2018 18:34:32 -0700 Subject: [PATCH 4/4] perlmod: avoid 'do' semantics and just concatenate In Perl the 'do' construct has some odd side-effects regarding $@, $!, and return values (i.e. 'do'ing a file which evaluates to undef can be a little ambiguous). Instead, generate a preamble to the Makefile.PL and execute it as stdin. Signed-off-by: Philip Prindeville --- lang/perl/Makefile | 2 +- lang/perl/perlmod.mk | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 5e20f6cb3..b6111aad4 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=perl PKG_VERSION:=5.26.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=\ https://cpan.metacpan.org/src/5.0 \ diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk index 7adf16b1b..551d4532b 100644 --- a/lang/perl/perlmod.mk +++ b/lang/perl/perlmod.mk @@ -55,9 +55,10 @@ endef define perlmod/Configure (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \ - PERL_MM_USE_DEFAULT=1 \ - $(2) \ - $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "./Makefile.PL"' \ + (echo -e 'use Config;\n\n$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E";\n' ; cat Makefile.PL) | \ + PERL_MM_USE_DEFAULT=1 \ + $(2) \ + $(PERL_CMD) -I. -- - \ $(1) \ AR=ar \ CC=$(GNU_TARGET_NAME)-gcc \ @@ -103,8 +104,8 @@ define perlmod/Configure INSTALLVENDORMAN3DIR=" " \ LINKTYPE=dynamic \ DESTDIR=$(PKG_INSTALL_DIR) \ - ); - sed 's!^PERL_INC = .*!PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/!' -i $(if $(3),$(3),$(PKG_BUILD_DIR))/Makefile + ) + sed -i -e 's!^PERL_INC = .*!PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/!' $(if $(3),$(3),$(PKG_BUILD_DIR))/Makefile endef define perlmod/Compile