perl: add host variant
PATCH 1/6 perl: add host variant
--- package/perl/perl.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
package/perl/perl.mk +18 -0
@@ -121,7 +121,25 @@ endef PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_CORE_H +HOST_PERL_CONF_OPT = \ + -des \ + -Dprefix="$(HOST_DIR)/usr" \ + -Dcc="$(HOSTCC)" + +define HOST_PERL_CONFIGURE_CMDS + (cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./Configure $(HOST_PERL_CONF_OPT)) +endef + +define HOST_PERL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_PERL_INSTALL_CMDS + $(MAKE) -C $(@D) INSTALL_DEPENDENCE='' install +endef + $(eval $(generic-package)) +$(eval $(host-generic-package)) define PERL_FINALIZE_TARGET rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
Signature · 1 line
1.9.1
PATCH 2/6 perl: remove useless hacks
--- .../perl-gdgraph-01-fix-Makefile-PL.patch | 24 ---------------------- package/perl/perl.mk | 22 -------------------- 2 files changed, 46 deletions(-) delete mode 100644 package/perl-gdgraph/perl-gdgraph-01-fix-Makefile-PL.patch
package/perl-gdgraph/perl-gdgraph-01-fix-Makefile-PL.patch deleted +0 -24
@@ -1,24 +0,0 @@ -partial revert to 1.47 in order to work with an old perl 5.10.1 - -With old ExtUtils::MakeMaker, AUTHOR takes a string/number not a ARRAY reference. -See http://api.metacpan.org/source/RUZ/GDGraph-1.48/CHANGES - -Signed-off-by: Francois Perrad <[email protected]> - -Index: b/Makefile.PL -=================================================================== ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -19,11 +19,7 @@ - - ($] >= 5.005 ? - ('ABSTRACT' => 'Produces charts with GD', -- 'AUTHOR' => [ -- 'Martien Verbruggen <[email protected]>', -- 'Benjamin Warfield <[email protected]>', -- 'Ruslan Zakirov <[email protected]>', -- ] -+ 'AUTHOR' => 'Martien Verbruggen <[email protected]>', - ):() - ), -
package/perl/perl.mk +0 -22
@@ -99,28 +99,6 @@ define PERL_INSTALL_TARGET_CMDS $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" install.perl endef -# perl infra: fix for Perl XS packages configured by Makefile.PL -# -# ExtUtils::MakeMaker adds all the header files used by the perl as -# dependencies to the generated Makefile. This means that the generated -# Makefile will depend on the system's header files. -# -# Usually this is not a problem, because when building the target package, -# these header files will indeed be found in $(STAGING_DIR). However, some -# distro's add an extra header file to the system's perl. This header is -# also included in the generated Makefile, which makes the build fail -# because it doesn't exist in $(STAGING_DIR). -# -# As a work-around, explicitly create this header file in $(STAGING_DIR). -# It doesn't hurt to create it even if the system perl doesn't need it. -# -define PERL_ADD_CORE_H - touch $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h - touch $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/cc_runtime.h -endef - -PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_CORE_H - HOST_PERL_CONF_OPT = \ -des \ -Dprefix="$(HOST_DIR)/usr" \
Signature · 1 line
1.9.1
PATCH 3/6 pkg-perl: refactor with host-perl
In reply to Francois Perrad--- package/Makefile.in | 3 --- package/pkg-perl.mk | 21 +++++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-)
package/Makefile.in +0 -3
@@ -232,9 +232,6 @@ HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/ HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \ sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p') -HOST_PERL_ARCHNAME := $(shell perl -MConfig -e "print Config->{archname}") -export PERL5LIB := $(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 - TARGET_CONFIGURE_OPTS = PATH=$(BR_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \
package/pkg-perl.mk +9 -12
@@ -20,6 +20,7 @@ ################################################################################ PERL_ARCHNAME = $(ARCH)-linux +PERL_RUN = $(HOST_DIR)/usr/bin/perl ################################################################################ # inner-perl-package -- defines how the configuration, compilation and
@@ -51,7 +52,7 @@ define $(2)_CONFIGURE_CMDS cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ $$($(2)_CONF_ENV) \ PERL_MM_USE_DEFAULT=1 \ - perl Build.PL \ + $$(PERL_RUN) Build.PL \ --config ar="$$(TARGET_AR)" \ --config full_ar="$$(TARGET_AR)" \ --config cc="$$(TARGET_CC)" \
@@ -74,7 +75,7 @@ define $(2)_CONFIGURE_CMDS $$($(2)_CONF_ENV) \ PERL_MM_USE_DEFAULT=1 \ PERL_AUTOINSTALL=--skipdeps \ - perl Makefile.PL \ + $$(PERL_RUN) Makefile.PL \ AR="$$(TARGET_AR)" \ FULL_AR="$$(TARGET_AR)" \ CC="$$(TARGET_CC)" \
@@ -101,17 +102,13 @@ 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 \ + $$(PERL_RUN) Build.PL \ $$($(2)_CONF_OPT); \ else \ $$($(2)_CONF_ENV) \ PERL_MM_USE_DEFAULT=1 \ PERL_AUTOINSTALL=--skipdeps \ - perl Makefile.PL \ - INSTALL_BASE=$$(HOST_DIR)/usr \ - INSTALLDIRS=vendor \ + $$(PERL_RUN) Makefile.PL \ $$($(2)_CONF_OPT); \ fi endef
@@ -129,7 +126,7 @@ ifeq ($(4),target) # Build package for target define $(2)_BUILD_CMDS cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ - perl Build $$($(2)_BUILD_OPT) build; \ + $$(PERL_RUN) Build $$($(2)_BUILD_OPT) build; \ else \ $$(MAKE1) \ PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$$(PERL_ARCHNAME)/CORE \
@@ -141,7 +138,7 @@ else # Build package for host define $(2)_BUILD_CMDS cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ - perl Build $$($(2)_BUILD_OPT) build; \ + $$(PERL_RUN) Build $$($(2)_BUILD_OPT) build; \ else \ $$(MAKE1) $$($(2)_BUILD_OPT) pure_all; \ fi
@@ -156,7 +153,7 @@ endif ifndef $(2)_INSTALL_CMDS define $(2)_INSTALL_CMDS cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ - perl Build $$($(2)_INSTALL_TARGET_OPT) install; \ + $$(PERL_RUN) Build $$($(2)_INSTALL_TARGET_OPT) install; \ else \ $$(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \ fi
@@ -170,7 +167,7 @@ endif ifndef $(2)_INSTALL_TARGET_CMDS define $(2)_INSTALL_TARGET_CMDS cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ - perl Build $$($(2)_INSTALL_TARGET_OPT) install; \ + $$(PERL_RUN) Build $$($(2)_INSTALL_TARGET_OPT) install; \ else \ $$(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \ fi
Signature · 1 line
1.9.1
PATCH 4/6 pkg-perl: add host-perl dependency
In reply to Francois Perrad--- package/perl-module-build/perl-module-build.mk | 1 + package/perl-xml-parser/perl-xml-parser.mk | 2 +- support/scripts/scancpan | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-)
package/perl-module-build/perl-module-build.mk +1 -0
@@ -7,6 +7,7 @@ PERL_MODULE_BUILD_VERSION = 0.4206 PERL_MODULE_BUILD_SOURCE = Module-Build-$(PERL_MODULE_BUILD_VERSION).tar.gz PERL_MODULE_BUILD_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LE/LEONT +HOST_PERL_MODULE_BUILD_DEPENDENCIES = host-perl PERL_MODULE_BUILD_LICENSE = Artistic or GPLv1+ $(eval $(host-perl-package))
package/perl-xml-parser/perl-xml-parser.mk +1 -1
@@ -7,7 +7,7 @@ PERL_XML_PARSER_VERSION = 2.41 PERL_XML_PARSER_SOURCE = XML-Parser-$(PERL_XML_PARSER_VERSION).tar.gz PERL_XML_PARSER_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR -PERL_XML_PARSER_DEPENDENCIES = expat +HOST_PERL_XML_PARSER_DEPENDENCIES = host-perl host-expat PERL_XML_PARSER_LICENSE = Artistic or GPLv1+ HOST_PERL_XML_PARSER_CONF_OPT = \
support/scripts/scancpan +4 -4
@@ -636,10 +636,10 @@ while (my ($distname, $dist) = each %dist) { # the scheme is not used, because the job is done by the BR download infrastructure # the auth part is not used, because we use $(BR2_CPAN_MIRROR) my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} ); - my $dependencies = join q{ }, qw( = perl ), + my $dependencies = join q{ }, qw( perl ), map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ), map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} ); - my $host_dependencies = join q{ }, qw( = ), + my $host_dependencies = join q{ }, qw( host-perl ), map { q{host-} . fsname( $_ ); } sort( @{$deps_build{$distname}}, @{$deps_runtime{$distname}} ); my $license = ref $dist->{license} eq 'ARRAY'
@@ -663,8 +663,8 @@ while (my ($distname, $dist) = each %dist) { say {$fh} qq{${brname}_VERSION = ${version}}; say {$fh} qq{${brname}_SOURCE = ${distname}-\$(${brname}_VERSION).${suffix}}; say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}}; - say {$fh} qq{${brname}_DEPENDENCIES ${dependencies}} if $need_target{$distname}; - say {$fh} qq{HOST_${brname}_DEPENDENCIES ${host_dependencies}} if $need_host{$distname}; + say {$fh} qq{${brname}_DEPENDENCIES = ${dependencies}} if $need_target{$distname}; + say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}} if $need_host{$distname}; say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown}; say {$fh} qq{${brname}_LICENSE_FILES = ${license_files}} if $license_files; say {$fh} qq{};
Signature · 1 line
1.9.1
PATCH 5/6 intltool: refactor with host-perl
In reply to Francois Perrad--- package/intltool/intltool.mk | 2 ++ 1 file changed, 2 insertions(+)
package/intltool/intltool.mk +2 -0
@@ -11,5 +11,7 @@ INTLTOOL_LICENSE_FILES = COPYING HOST_INTLTOOL_DEPENDENCIES = host-gettext host-perl-xml-parser +HOST_INTLTOOL_CONF_ENV = PERL=$(PERL_RUN) + $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
1.9.1
PATCH 5/6 intltool: refactor with host-perl
Dear Francois Perrad,
Quoted 10 lines · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>--- package/intltool/intltool.mk | 2 ++ 1 file changed, 2 insertions(+)package/intltool/intltool.mk +0
-0
package/intltool/intltool.mk INTLTOOL_LICENSE_FILES = COPYING · line 14
Quoted 4 lines
package/intltool/intltool.mk +1
-0@@ -11,5 +11,7 @@ INTLTOOL_LICENSE_FILES = COPYING HOST_INTLTOOL_DEPENDENCIES = host-gettext host-perl-xml-parser +HOST_INTLTOOL_CONF_ENV = PERL=$(PERL_RUN)
Doesn't this makes the assumption that host-perl has been built as a dependency of host-intltool? If that's the case, then it's a problem I would really like to avoid bringing host-perl as a dependency of builds that don't have any Perl stuff on the target.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 5/6 intltool: refactor with host-perl
2014-08-20 14:21 GMT+02:00 Thomas Petazzoni
<[email protected]>:
Quoted 14 lines
Dear Francois Perrad,
Quoted 11 lines · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>--- package/intltool/intltool.mk | 2 ++ 1 file changed, 2 insertions(+)package/intltool/intltool.mk +0
-0@@ -11,5 +11,7 @@ INTLTOOL_LICENSE_FILES = COPYING
Quoted 9 lines
package/intltool/intltool.mk INTLTOOL_LICENSE_FILES = COPYING · line 14
Quoted 3 lines
package/intltool/intltool.mk +1
-0HOST_INTLTOOL_DEPENDENCIES = host-gettext host-perl-xml-parser +HOST_INTLTOOL_CONF_ENV = PERL=$(PERL_RUN)Doesn't this makes the assumption that host-perl has been built as a dependency of host-intltool? If that's the case, then it's a problem I would really like to avoid bringing host-perl as a dependency of builds that don't have any Perl stuff on the target.
host-intltool depends on host-perl-xml-parser, and now, host-perl-xml-parser depends on host-perl.
A host-perl-foo-module cannot depend on host-perl OR system-perl. All host-perl-foo-module must depend on host-perl.
Fran?ois
Quoted 9 lines
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 5/6 intltool: refactor with host-perl
Dear Fran?ois Perrad,
Quoted 5 lines · Fran?ois Perrad
host-intltool depends on host-perl-xml-parser, and now, host-perl-xml-parser depends on host-perl.
A host-perl-foo-module cannot depend on host-perl OR system-perl. All host-perl-foo-module must depend on host-perl.
Sorry, but it's not acceptable to have host-intltool depend on host-perl. It's bringing a huge dependency (host-perl) in a large number of configurations, since host-intltool is used by so many packages.
I had a discussion with Gustavo about this not long ago, and here is our proposal: change host-perl-xml-parser to *not* use the perl package infrastructure, as an exception. This way, it will not depend on host-perl, and we'll be happy. Of course, it's a bit ugly because we have a Perl package not handled by the package infrastructure, but that's a reasonable solution for this problem.
Another approach would be to make host-intltool not depend on XML::Parser. It seems like it's possible to get rid of the XML::Parser dependency by passing no-xml as the second argument of the IT_PROG_INTLTOOL macro. But this needs to be done in each and every package using intltool. All of the packages that are not using XML based translation files could pass no-xml, and we would get rid of the dependency on host-perl-xml-parser for those packages. That could be one option.
Since the vast majority of projects seem to be using "ini style" translation files, we could probably use no-xml on many of them and get rid of the problem.
Thoughts?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[Buildroot] [UNSURE]Re: [PATCH 5/6] intltool: refactor with host-perl
2014-10-06 17:37 GMT+02:00 Thomas Petazzoni
<[email protected]>:
Quoted 15 lines
Dear Fran?ois Perrad,
Quoted 5 lines · Fran?ois Perrad
host-intltool depends on host-perl-xml-parser, and now, host-perl-xml-parser depends on host-perl.
A host-perl-foo-module cannot depend on host-perl OR system-perl. All host-perl-foo-module must depend on host-perl.
Sorry, but it's not acceptable to have host-intltool depend on host-perl. It's bringing a huge dependency (host-perl) in a large number of configurations, since host-intltool is used by so many packages.
Quoted 7 lines
I had a discussion with Gustavo about this not long ago, and here is our proposal: change host-perl-xml-parser to *not* use the perl package infrastructure, as an exception. This way, it will not depend on host-perl, and we'll be happy. Of course, it's a bit ugly because we have a Perl package not handled by the package infrastructure, but that's a reasonable solution for this problem.
Ok, I'll experiment this proposal.
Fran?ois
Quoted 22 lines
Another approach would be to make host-intltool not depend on
XML::Parser. It seems like it's possible to get rid of theXML::Parserdependency by passing no-xml as the second argument of theIT_PROG_INTLTOOLmacro. But this needs to be done in each and every package using intltool. All of the packages that are not using XML based translation files could pass no-xml, and we would get rid of the dependency on host-perl-xml-parser for those packages. That could be one option.Since the vast majority of projects seem to be using "ini style" translation files, we could probably use no-xml on many of them and get rid of the problem.
Thoughts?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH 6/6 metacity: refactor with host-perl
In reply to Francois Perrad--- package/metacity/metacity.mk | 2 ++ 1 file changed, 2 insertions(+)
package/metacity/metacity.mk +2 -0
@@ -12,6 +12,8 @@ METACITY_SITE = http://ftp.gnome.org/pub/gnome/sources/metacity/$(METACITY_VERSI METACITY_LICENSE = GPLv2+ METACITY_LICENSE_FILES = COPYING +METACITY_CONF_ENV = INTLTOOL_PERL=$(PERL_RUN) + METACITY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ --x-libraries=$(STAGING_DIR)/usr/lib \ --disable-glibtest --disable-gconf \
Signature · 1 line
1.9.1