Skip to contentSkip to conversation

perl-net-ssleay: fix build

PATCH New Francois Perrad 3 participants 3 messages Jul 3, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perl-net-ssleay: fix build

add $(2)_CONV_ENV in perl infrastructure

see http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/

---
 package/perl-net-ssleay/perl-net-ssleay.mk | 7 +++++++
 package/pkg-perl.mk                        | 4 ++++
 2 files changed, 11 insertions(+)
package/perl-net-ssleay/perl-net-ssleay.mk +7 -0
index 413fdf0..48ff715 100644
@@ -11,4 +11,11 @@ PERL_NET_SSLEAY_DEPENDENCIES = perl openssl
 PERL_NET_SSLEAY_LICENSE = OpenSSL
 PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 
+PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
+
+define PERL_NET_SSLEAY_FIX_MAKEFILE
+	$(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile
+endef
+PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
+
 $(eval $(perl-package))
package/pkg-perl.mk +4 -0
index 5cfdc77..8c45001 100644
@@ -49,6 +49,7 @@ ifeq ($(4),target)
 # Configure package for target
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--config ar="$$(TARGET_AR)" \
@@ -69,6 +70,7 @@ define $(2)_CONFIGURE_CMDS
 			--install_path libdoc=/usr/share/man/man3 \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
@@ -95,12 +97,14 @@ else
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--install_base $$(HOST_DIR)/usr \
 			--installdirs vendor \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 perl-net-ssleay: fix build

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

add $(2)_CONV_ENV in perl infrastructure

Please send that as a seperate patch.

Quoted 14 lines

see http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/

---
 package/perl-net-ssleay/perl-net-ssleay.mk | 7 +++++++
 package/pkg-perl.mk                        | 4 ++++
 2 files changed, 11 insertions(+)
package/perl-net-ssleay/perl-net-ssleay.mk +0 -0
index 413fdf0..48ff715 100644

package/perl-net-ssleay/perl-net-ssleay.mk PERL_NET_SSLEAY_DEPENDENCIES = perl openssl · line 17

Quoted 7 lines
package/perl-net-ssleay/perl-net-ssleay.mk +4 -0
@@ -11,4 +11,11 @@ PERL_NET_SSLEAY_DEPENDENCIES = perl openssl
 PERL_NET_SSLEAY_LICENSE = OpenSSL
 PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 
+PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
+
+define PERL_NET_SSLEAY_FIX_MAKEFILE
+	$(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile

What about BR2_PREFER_STATIC_LIB builds?

Looking at the build failure, the problem seems to be about a mix of host and target flags (E.G. the -L/usr/lib), rather than anything about static/shared linking.

Quoted 46 lines
package/perl-net-ssleay/perl-net-ssleay.mk +3 -0
+endef
+PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
+
 $(eval $(perl-package))
package/pkg-perl.mk +4 -0
index 5cfdc77..8c45001 100644
@@ -49,6 +49,7 @@ ifeq ($(4),target)
 # Configure package for target
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--config ar="$$(TARGET_AR)" \
@@ -69,6 +70,7 @@ define $(2)_CONFIGURE_CMDS
 			--install_path libdoc=/usr/share/man/man3 \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
@@ -95,12 +97,14 @@ else
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--install_base $$(HOST_DIR)/usr \
 			--installdirs vendor \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 perl-net-ssleay: fix build

Peter, Fran?ois,

Quoted 5 lines · Peter Korsgaard
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

add $(2)_CONV_ENV in perl infrastructure

Please send that as a seperate patch.

And update the Buildroot documentation accordingly :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com