Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] infra/pkg-perl: add possibility to pass extra env at configure time
@ 2014-07-12 23:02 Yann E. MORIN
  2014-07-12 23:02 ` [Buildroot] [PATCH 2/2] package/perl-net-ssleay: fix buildsystem for cross-compilation Yann E. MORIN
  2014-07-13  7:05 ` [Buildroot] [PATCH 1/2] infra/pkg-perl: add possibility to pass extra env at configure time François Perrad
  0 siblings, 2 replies; 6+ messages in thread
From: Yann E. MORIN @ 2014-07-12 23:02 UTC (permalink / raw)
  To: buildroot

Some perl package may use environment variables as a hint to how to be
configured.

That's for example the case for perl-net-ssleay that uses
OPENSSL_PREFIX, if it is set in the environment, as the prefix to
openssl.

Add a new variable that packages can set if they need extra environment
variables. Update the manual accordingly.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Francois Perrad <fperrad@gmail.com>
---
 docs/manual/adding-packages-perl.txt | 4 ++++
 package/pkg-perl.mk                  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt
index 4062646..52c18b9 100644
--- a/docs/manual/adding-packages-perl.txt
+++ b/docs/manual/adding-packages-perl.txt
@@ -104,6 +104,10 @@ cases, typical packages will therefore only use a few of them.
   configure options to pass to the +perl Makefile.PL+ or +perl Build.PL+.
   By default, empty.
 
+* +PERL_FOO_CONF_ENV+/+HOST_PERL_FOO_CONF_ENV+, to specify additional
+  environment variables to pass to the +perl Makefile.PL+ or
+  +perl Build.PL+. By default, empty.
+
 * +PERL_FOO_BUILD_OPT+/+HOST_PERL_FOO_BUILD_OPT+, to specify additional
   options to pass to +make pure_all+ or +perl Build build+ in the build step.
   By default, empty.
diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
index 5cfdc77..5867ccd 100644
--- a/package/pkg-perl.mk
+++ b/package/pkg-perl.mk
@@ -50,6 +50,7 @@ ifeq ($(4),target)
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
 		PERL_MM_USE_DEFAULT=1 \
+		$$($(2)_CONF_ENV) \
 		perl Build.PL \
 			--config ar="$$(TARGET_AR)" \
 			--config full_ar="$$(TARGET_AR)" \
@@ -71,6 +72,7 @@ define $(2)_CONFIGURE_CMDS
 	else \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
+		$$($(2)_CONF_ENV) \
 		perl Makefile.PL \
 			AR="$$(TARGET_AR)" \
 			FULL_AR="$$(TARGET_AR)" \
@@ -96,6 +98,7 @@ else
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
 		PERL_MM_USE_DEFAULT=1 \
+		$$($(2)_CONF_ENV) \
 		perl Build.PL \
 			--install_base $$(HOST_DIR)/usr \
 			--installdirs vendor \
@@ -103,6 +106,7 @@ define $(2)_CONFIGURE_CMDS
 	else \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
+		$$($(2)_CONF_ENV) \
 		perl Makefile.PL \
 			INSTALL_BASE=$$(HOST_DIR)/usr \
 			INSTALLDIRS=vendor \
-- 
1.9.1

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

end of thread, other threads:[~2014-07-13  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-12 23:02 [Buildroot] [PATCH 1/2] infra/pkg-perl: add possibility to pass extra env at configure time Yann E. MORIN
2014-07-12 23:02 ` [Buildroot] [PATCH 2/2] package/perl-net-ssleay: fix buildsystem for cross-compilation Yann E. MORIN
2014-07-13  7:07   ` François Perrad
2014-07-13  8:56     ` Yann E. MORIN
2014-07-13  7:05 ` [Buildroot] [PATCH 1/2] infra/pkg-perl: add possibility to pass extra env at configure time François Perrad
2014-07-13  8:52   ` Yann E. MORIN

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