Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] pkg-perl: add patch_subdir_makefile function
@ 2018-10-13 14:12 Francois Perrad
  2018-10-13 14:12 ` [Buildroot] [PATCH 2/2] perl-netaddr-ip: fix build of the XS version Francois Perrad
  2018-10-14  7:26 ` [Buildroot] [PATCH 1/2] pkg-perl: add patch_subdir_makefile function Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Francois Perrad @ 2018-10-13 14:12 UTC (permalink / raw)
  To: buildroot

based on an initial work of Christopher McCrory <chrismcc@gmail.com>

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/pkg-perl.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
index 07348bd5d..a78c1cd95 100644
--- a/package/pkg-perl.mk
+++ b/package/pkg-perl.mk
@@ -22,6 +22,21 @@
 PERL_ARCHNAME = $(ARCH)-linux
 PERL_RUN = PERL5LIB= PERL_USE_UNSAFE_INC=1 $(HOST_DIR)/bin/perl
 
+# Some arguments to Makefile.PL do not get propagated to subdirectories
+# similar to:
+# https://rt.cpan.org/Public/Bug/Display.html?id=28632
+define patch_subdir_makefile
+	$(SED) "s:^AR = .*:AR = $(TARGET_AR):g" $(1)
+	$(SED) "s:^FULL_AR = .*:FULL_AR = $(TARGET_AR):g" $(1)
+	$(SED) "s:^CC = .*:CC = $(TARGET_CC):g" $(1)
+	$(SED) "s:^CCFLAGS = .*:CCFLAGS = $(TARGET_CFLAGS):g" $(1)
+	$(SED) "s:^LD = .*:LD = $(TARGET_CC):g" $(1)
+	$(SED) "s:^LDDLFLAGS = .*:LDDLFLAGS = -shared $(TARGET_LDFLAGS):g" $(1)
+	$(SED) "s:^LDLFLAGS = .*:LDLFLAGS = $(TARGET_LDFLAGS):g" $(1)
+	$(SED) "s:^DESTDIR = .*:DESTDIR = $(TARGET_DIR):g" $(1)
+	$(SED) "s:^PERL_INC = .*:PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE:g" $(1)
+endef
+
 ################################################################################
 # inner-perl-package -- defines how the configuration, compilation and
 # installation of a perl package should be done, implements a
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-14  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-13 14:12 [Buildroot] [PATCH 1/2] pkg-perl: add patch_subdir_makefile function Francois Perrad
2018-10-13 14:12 ` [Buildroot] [PATCH 2/2] perl-netaddr-ip: fix build of the XS version Francois Perrad
2018-10-14  7:26 ` [Buildroot] [PATCH 1/2] pkg-perl: add patch_subdir_makefile function Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox