Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/13] perl: new package v6
@ 2012-09-08 12:28 Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 02/13] perl: add an option for miniperl Francois Perrad
                   ` (12 more replies)
  0 siblings, 13 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

---
 package/Config.in                      |    1 +
 package/perl/Config.in                 |   17 +++++
 package/perl/perl-configure-qemu.patch |   32 +++++++++
 package/perl/perl-make-ext.patch       |   24 +++++++
 package/perl/perl-mkppport.patch       |   37 ++++++++++
 package/perl/perl.mk                   |  121 ++++++++++++++++++++++++++++++++
 6 files changed, 232 insertions(+)
 create mode 100644 package/perl/Config.in
 create mode 100644 package/perl/perl-configure-qemu.patch
 create mode 100644 package/perl/perl-make-ext.patch
 create mode 100644 package/perl/perl-mkppport.patch
 create mode 100644 package/perl/perl.mk

diff --git a/package/Config.in b/package/Config.in
index f308de7..00a79ab 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -262,6 +262,7 @@ source "package/wsapi/Config.in"
 source "package/xavante/Config.in"
 endmenu
 endif
+source "package/perl/Config.in"
 source "package/microperl/Config.in"
 source "package/php/Config.in"
 source "package/python/Config.in"
diff --git a/package/perl/Config.in b/package/perl/Config.in
new file mode 100644
index 0000000..286b09e
--- /dev/null
+++ b/package/perl/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_PERL
+	bool "perl"
+	help
+	  Larry Wall's Practical Extraction and Report Language
+	  An interpreted scripting language, known among some as "Unix's Swiss
+	  Army Chainsaw".
+
+	  http://www.perl.org/
+
+if BR2_PACKAGE_PERL
+
+config BR2_PACKAGE_PERL_CUSTOM_CONFIGURE
+	string "configuration flags"
+	help
+	  Allows to add some flags to Configure.
+
+endif
diff --git a/package/perl/perl-configure-qemu.patch b/package/perl/perl-configure-qemu.patch
new file mode 100644
index 0000000..00f7539
--- /dev/null
+++ b/package/perl/perl-configure-qemu.patch
@@ -0,0 +1,32 @@
+Add qemu support
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Configure
+===================================================================
+--- a/Configure
++++ b/Configure
+@@ -2908,6 +2908,14 @@
+ $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
+ EOF
+ 	    ;;
++	qemu*)
++	    to=:
++	    from=:
++	    cat >$run <<EOF
++#!/bin/sh
++$targetrun -L $qemulib "\$@"
++EOF
++	    ;;
+ 	*)  echo "Unknown targetrun '$targetrun'" >&4
+ 	    exit 1
+ 	    ;;
+@@ -5048,7 +5056,7 @@
+ echo " ";
+ echo "Checking if your compiler accepts $flag" 2>&1;
+ echo "int main(void) { return 0; }" > gcctest.c;
+-if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
++if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
+     echo "Yes, it does." 2>&1;
+     if $test -s gcctest.out ; then
+         echo "But your platform does not like it:";
diff --git a/package/perl/perl-make-ext.patch b/package/perl/perl-make-ext.patch
new file mode 100644
index 0000000..e0195e7
--- /dev/null
+++ b/package/perl/perl-make-ext.patch
@@ -0,0 +1,24 @@
+Don't use RUN with make (only for perl)
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/make_ext.pl
+===================================================================
+--- a/make_ext.pl
++++ b/make_ext.pl
+@@ -458,11 +458,13 @@
+ 	# Give makefile an opportunity to rewrite itself.
+ 	# reassure users that life goes on...
+ 	my @args = ('config', @$pass_through);
+-	system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
++#	system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
++	system(@make, @args) and print "@make @args failed, continuing anyway...\n";
+     }
+     my @targ = ($target, @$pass_through);
+     print "Making $target in $ext_dir\n at run @make @targ\n";
+-    my $code = system(@run, @make, @targ);
++#    my $code = system(@run, @make, @targ);
++    my $code = system(@make, @targ);
+     die "Unsuccessful make($ext_dir): code=$code" if $code != 0;
+ 
+     chdir $return_dir || die "Cannot cd to $return_dir: $!";
diff --git a/package/perl/perl-mkppport.patch b/package/perl/perl-mkppport.patch
new file mode 100644
index 0000000..97f27a2
--- /dev/null
+++ b/package/perl/perl-mkppport.patch
@@ -0,0 +1,37 @@
+Add RUN
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/mkppport
+===================================================================
+--- a/mkppport
++++ b/mkppport
+@@ -1,6 +1,7 @@
+ use strict;
+ use warnings;
+ 
++use Config;
+ use Getopt::Long;
+ use File::Spec;
+ use File::Compare qw( compare );
+@@ -136,14 +137,18 @@
+ #----------------------------------------------
+ sub run
+ {
++  my @run = $Config{run};
++  @run = () if not defined $run[0] or $run[0] eq '';
+   my @args = ("-I" . File::Spec->catdir((File::Spec->updir) x 2, 'lib'), @_);
+   my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
+   for (@args) {
+     $_ = qq("$_") if $^O eq 'VMS' && /^[^"]/;
+     $run .= " $_";
+   }
+-  print "running $run\n";
+-  system $run and die "$run failed: $?\n";
++#  print "running $run\n";
++#  system $run and die "$run failed: $?\n";
++  print "running ", join(' ', @run, $run), "\n";
++  system join(' ', @run, $run) and die "@run $run failed: $?\n";
+ }
+ 
+ __END__
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
new file mode 100644
index 0000000..2a8da79
--- /dev/null
+++ b/package/perl/perl.mk
@@ -0,0 +1,121 @@
+#############################################################
+#
+# perl
+#
+#############################################################
+
+PERL_VERSION_MAJOR = 16
+PERL_VERSION = 5.$(PERL_VERSION_MAJOR).1
+PERL_SITE = http://www.cpan.org/src/5.0
+PERL_SOURCE = perl-$(PERL_VERSION).tar.bz2
+PERL_LICENSE = Artistic
+PERL_LICENSE_FILES = Artistic
+PERL_INSTALL_STAGING = YES
+
+ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
+    PERL_USE_DEVEL=-Dusedevel
+endif
+
+ifneq ($(BR2_LARGEFILE),y)
+    PERL_NO_LARGEFILE=-Uuselargefiles
+endif
+
+PERL_ARCH=$(call qstrip,$(BR2_ARCH))
+ifeq ($(PERL_ARCH),i686)
+    PERL_ARCH=i386
+endif
+PERL_QEMU_USER_MODE=qemu-$(PERL_ARCH)
+
+define PERL_CONFIGURE_CMDS
+	rm -f $(@D)/config.sh
+	cd $(@D); ./Configure -des \
+		-Dusecrosscompile \
+		-Dtargetrun=$(PERL_QEMU_USER_MODE) \
+		-Dqemulib=$(STAGING_DIR) \
+		-Dtargethost=dummy \
+		-Dar="$(TARGET_AR)" \
+		-Dcc="$(TARGET_CC)" \
+		-Dcpp="$(TARGET_CC)" \
+		-Dld="$(TARGET_LD)" \
+		-Dnm="$(TARGET_NM)" \
+		-Dranlib="$(TARGET_RANLIB)" \
+		-Dccflags="$(TARGET_CFLAGS)" \
+		-Dldflags="$(TARGET_LDFLAGS) -l gcc_s" \
+		-Dlddlflags="-shared" \
+		-Dlibc=$(TARGET_HOST)/usr/$(GNU_TARGET_NAME)/sysroot/lib/libc.so \
+		-Duseshrplib \
+		-Dprefix=/usr \
+		-Uoptimize \
+		$(PERL_USE_DEVEL) \
+		$(PERL_NO_LARGEFILE) \
+		$(call qstrip,$(BR2_PACKAGE_PERL_CUSTOM_CONFIGURE))
+	echo "# patched values"                 >>$(@D)/config.sh
+	$(SED) '/^myarchname=/d' \
+		-e '/^mydomain=/d' \
+		-e '/^myhostname=/d' \
+		-e '/^myuname=/d' \
+		-e '/^osname=/d' \
+		-e '/^osvers=/d' \
+		-e '/^perladmin=/d' \
+		$(@D)/config.sh
+	echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
+	echo "mydomain=''"                                      >>$(@D)/config.sh
+	echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
+	echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
+	echo "osname='linux'"                                   >>$(@D)/config.sh
+	echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
+	echo "perladmin='root'"                                 >>$(@D)/config.sh
+	cd $(@D); ./Configure -S
+	cp $(@D)/config.h $(@D)/xconfig.h
+	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
+endef
+
+define PERL_BUILD_CMDS
+	echo "#!/bin/sh"                                                        > $(@D)/Cross/miniperl
+	echo "$(PERL_QEMU_USER_MODE) -L $(STAGING_DIR) $(@D)/miniperl \"\$$@\"" >>$(@D)/Cross/miniperl
+	chmod +x $(@D)/Cross/miniperl
+	PERL_MM_OPT="PERL=$(@D)/Cross/miniperl" \
+	$(MAKE) -C $(@D) all
+endef
+
+define PERL_INSTALL_STAGING_CMDS
+	$(MAKE) INSTALL_DEPENDENCE= \
+		INSTALLFLAGS= \
+		DESTDIR="$(STAGING_DIR)" \
+		-C $(@D) install.perl
+	$(INSTALL) -m 755 $(@D)/libperl.so $(STAGING_DIR)/usr/lib/libperl.so
+endef
+
+define PERL_INSTALL_TARGET_CMDS
+	$(MAKE) INSTALL_DEPENDENCE= \
+		INSTALLFLAGS=-p \
+		DESTDIR="$(TARGET_DIR)" \
+		-C $(@D) install.perl
+endef
+
+define PERL_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+define HOST_PERL_CONFIGURE_CMDS
+	cd $(@D); ./Configure -des \
+		-Dcc="$(HOSTCC)" \
+		-Dprefix="$(HOST_DIR)/usr" \
+		$(PERL_USE_DEVEL)
+endef
+
+define HOST_PERL_BUILD_CMDS
+	$(MAKE) -C $(@D) all
+endef
+
+define HOST_PERL_INSTALL_CMDS
+	$(MAKE) INSTALL_DEPENDENCE= \
+		-C $(@D) install
+endef
+
+define HOST_PERL_CLEAN_CMDS
+	-$(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.7.9.5

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

* [Buildroot] [PATCH 02/13] perl: add an option for miniperl
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 03/13] perl: add DB_File Francois Perrad
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

---
 package/perl/Config.in                   |    6 ++
 package/perl/perl-install-miniperl.patch |  129 ++++++++++++++++++++++++++++++
 package/perl/perl.mk                     |    6 +-
 3 files changed, 140 insertions(+), 1 deletion(-)
 create mode 100644 package/perl/perl-install-miniperl.patch

diff --git a/package/perl/Config.in b/package/perl/Config.in
index 286b09e..1f044eb 100644
--- a/package/perl/Config.in
+++ b/package/perl/Config.in
@@ -14,4 +14,10 @@ config BR2_PACKAGE_PERL_CUSTOM_CONFIGURE
 	help
 	  Allows to add some flags to Configure.
 
+config BR2_PACKAGE_PERL_ONLY_MINIPERL
+	bool "only miniperl"
+	help
+	  Install only miniperl (without dynamic module loader)
+	  Usually used to bootstrap a full Perl (@INC contains only .).
+
 endif
diff --git a/package/perl/perl-install-miniperl.patch b/package/perl/perl-install-miniperl.patch
new file mode 100644
index 0000000..7e6f8e6
--- /dev/null
+++ b/package/perl/perl-install-miniperl.patch
@@ -0,0 +1,129 @@
+Add an option -miniperl
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/installperl
+===================================================================
+--- a/installperl
++++ b/installperl
+@@ -14,7 +14,7 @@
+ use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare
+ 	    %opts $packlist);
+ my ($dostrip, $versiononly, $force,
+-    $otherperls, $archname, $nwinstall, $nopods);
++    $otherperls, $archname, $nwinstall, $nopods, $miniperl);
+ 
+ BEGIN {
+     if ($Is_VMS) { eval 'use VMS::Filespec;' }
+@@ -83,6 +83,7 @@
+     $force = 1 if $ARGV[0] eq '-f';
+     $opts{verbose} = 1 if $ARGV[0] eq '-V' || $ARGV [0] eq '-n';
+     $archname = 1 if $ARGV[0] eq '-A';
++    $miniperl = 1 if $ARGV[0] eq '-miniperl';
+     $nwinstall = 1 if $ARGV[0] eq '-netware';
+     $nopods = 1 if $ARGV[0] eq '-p';
+     $opts{destdir} = $1 if $ARGV[0] =~ /^-?-destdir=(.*)$/;
+@@ -102,6 +103,7 @@
+   -A        Also install perl with the architecture's name in the perl binary's
+             name.
+   -p        Don't install the pod files. [This will break use diagnostics;]
++  -miniperl Install only miniperl.
+   -netware  Install correctly on a Netware server.
+   -destdir  Prefix installation directories by this string.
+ EOT
+@@ -114,6 +116,7 @@
+ my (@scripts, @tolink);
+ open SCRIPTS, "utils.lst" or die "Can't open utils.lst: $!";
+ while (<SCRIPTS>) {
++    next if $miniperl;
+     next if /^#/;
+     next if /a2p/; # a2p is binary, to be installed separately
+     chomp;
+@@ -310,7 +313,7 @@
+     link($Config{perlpath}, "$installbin/perl$ver$exe_ext");
+ }
+ elsif ($^O ne 'dos') {
+-    if (!$Is_NetWare) {
++    if (!$Is_NetWare && !$miniperl) {
+ 	safe_unlink("$installbin/$perl_verbase$ver$exe_ext");
+ 	copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext");
+ 	strip("$installbin/$perl_verbase$ver$exe_ext");
+@@ -384,8 +387,9 @@
+       push(@corefiles, $coredll)
+     )
+ } else {
++    @corefiles = <*.h>;
+     # [als] hard-coded 'libperl' name... not good!
+-    @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
++    push @corefiles, <libperl*.* perl*$Config{lib_ext}> unless $miniperl;
+ 
+     # AIX needs perl.exp installed as well.
+     push(@corefiles,'perl.exp') if $^O eq 'aix';
+@@ -411,7 +415,7 @@
+ # Install main perl executables
+ # Make links to ordinary names if installbin directory isn't current directory.
+ 
+-if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS && ! $Is_NetWare) {
++if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS && ! $Is_NetWare && ! $miniperl) {
+     safe_unlink("$installbin/$perl$exe_ext", "$installbin/suid$perl$exe_ext");
+     if ($^O eq 'mpeix') {
+ 	# MPE doesn't support hard links, so use a symlink.
+@@ -429,7 +433,7 @@
+ 
+ # For development purposes it can be very useful to have multiple perls
+ # build for different "architectures" (eg threading or not) simultaneously.
+-if ($archname && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS) {
++if ($archname && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS && ! $miniperl) {
+     my $archperl = "$perl_verbase$ver-$Config{archname}$exe_ext";
+     safe_unlink("$installbin/$archperl");
+     if ($^O eq 'mpeix') {
+@@ -451,7 +455,7 @@
+ 
+ if ($Config{installusrbinperl} && $Config{installusrbinperl} eq 'define' &&
+     !$versiononly && !$opts{notify} && !$Is_W32 && !$Is_NetWare && !$Is_VMS && -t STDIN && -t STDERR
+-	&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
++	&& -w $mainperldir && ! samepath($mainperldir, $installbin) && ! $miniperl) {
+     my($usrbinperl)	= "$mainperldir/$perl$exe_ext";
+     my($instperl)	= "$installbin/$perl$exe_ext";
+     my($expinstperl)	= "$binexp/$perl$exe_ext";
+@@ -480,7 +484,7 @@
+ }
+ 
+ # Make links to ordinary names if installbin directory isn't current directory.
+-if (!$Is_NetWare && $dbg eq '') {
++if (!$Is_NetWare && $dbg eq '' && !$miniperl) {
+     if (! samepath($installbin, 'x2p')) {
+ 	my $base = 'a2p';
+ 	$base .= $ver if $versiononly;
+@@ -495,12 +499,18 @@
+ # it can't safely be shared.  Place it in $installbin.
+ # Note that Configure doesn't build cppstin if it isn't needed, so
+ # we skip this if cppstdin doesn't exist.
+-if (! $versiononly && (-f 'cppstdin') && (! samepath($installbin, '.'))) {
++if (! $versiononly && (-f 'cppstdin') && (! samepath($installbin, '.')) && !$miniperl) {
+     safe_unlink("$installbin/cppstdin");
+     copy("cppstdin", "$installbin/cppstdin");
+     chmod(0755, "$installbin/cppstdin");
+ }
+ 
++if ($miniperl && (-f 'miniperl')) {
++    safe_unlink("$installbin/miniperl$exe_ext");
++    copy("miniperl$exe_ext", "$installbin/miniperl$exe_ext");
++    chmod(0755, "$installbin/miniperl$exe_ext");
++}
++
+ sub script_alias {
+     my ($installscript, $orig, $alias, $scr_ext) = @_;
+ 
+@@ -761,6 +771,11 @@
+ 
+     return if $name eq 'ExtUtils/XSSymSet.pm' and !$Is_VMS;
+ 
++    if ($miniperl && $dir =~ /^auto\//) {
++        # Don't copy
++        return;
++    }
++
+     my $installlib = $installprivlib;
+     if ($dir =~ /^auto\// ||
+ 	  ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) ||
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 2a8da79..b00116f 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -20,6 +20,10 @@ ifneq ($(BR2_LARGEFILE),y)
     PERL_NO_LARGEFILE=-Uuselargefiles
 endif
 
+ifdef BR2_PACKAGE_PERL_ONLY_MINIPERL
+    PERL_INSTALL_ONLY_MINIPERL = -miniperl
+endif
+
 PERL_ARCH=$(call qstrip,$(BR2_ARCH))
 ifeq ($(PERL_ARCH),i686)
     PERL_ARCH=i386
@@ -88,7 +92,7 @@ endef
 
 define PERL_INSTALL_TARGET_CMDS
 	$(MAKE) INSTALL_DEPENDENCE= \
-		INSTALLFLAGS=-p \
+		INSTALLFLAGS="-p $(PERL_INSTALL_ONLY_MINIPERL)"\
 		DESTDIR="$(TARGET_DIR)" \
 		-C $(@D) install.perl
 endef
-- 
1.7.9.5

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

* [Buildroot] [PATCH 03/13] perl: add DB_File
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 02/13] perl: add an option for miniperl Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-20 19:57   ` Thomas Petazzoni
  2012-09-08 12:28 ` [Buildroot] [PATCH 04/13] gdbm: new package Francois Perrad
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl/Config.in |    6 ++++++
 package/perl/perl.mk   |    5 +++++
 2 files changed, 11 insertions(+)

diff --git a/package/perl/Config.in b/package/perl/Config.in
index 1f044eb..9df487a 100644
--- a/package/perl/Config.in
+++ b/package/perl/Config.in
@@ -20,4 +20,10 @@ config BR2_PACKAGE_PERL_ONLY_MINIPERL
 	  Install only miniperl (without dynamic module loader)
 	  Usually used to bootstrap a full Perl (@INC contains only .).
 
+config BR2_PACKAGE_PERL_DB_FILE
+	bool "DB_File"
+	select BR2_PACKAGE_BERKELEYDB
+	help
+	  Build the DB_File module.
+
 endif
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index b00116f..2225f0c 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -12,6 +12,11 @@ PERL_LICENSE = Artistic
 PERL_LICENSE_FILES = Artistic
 PERL_INSTALL_STAGING = YES
 
+ifdef BR2_PACKAGE_PERL_DB_FILE
+    PERL_DEPENDENCIES += berkeleydb
+endif
+HOST_PERL_DEPENDENCIES =
+
 ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
     PERL_USE_DEVEL=-Dusedevel
 endif
-- 
1.7.9.5

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

* [Buildroot] [PATCH 04/13] gdbm: new package
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 02/13] perl: add an option for miniperl Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 03/13] perl: add DB_File Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-12  5:30   ` Arnout Vandecappelle
  2012-09-08 12:28 ` [Buildroot] [PATCH 05/13] perl: add GDBM_File Francois Perrad
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/Config.in      |    1 +
 package/gdbm/Config.in |    8 ++++++++
 package/gdbm/gdbm.mk   |   12 ++++++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 package/gdbm/Config.in
 create mode 100644 package/gdbm/gdbm.mk

diff --git a/package/Config.in b/package/Config.in
index 00a79ab..d9cadf9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -324,6 +324,7 @@ endmenu
 
 menu "Database"
 source "package/berkeleydb/Config.in"
+source "package/gdbm/Config.in"
 source "package/mysql_client/Config.in"
 source "package/sqlcipher/Config.in"
 source "package/sqlite/Config.in"
diff --git a/package/gdbm/Config.in b/package/gdbm/Config.in
new file mode 100644
index 0000000..d5aae83
--- /dev/null
+++ b/package/gdbm/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_GDBM
+	bool "gdbm"
+	help
+	  GNU dbm is a set of database routines that use extensible hashing.
+	  It works similar to the standard UNIX dbm routines.
+
+	  http://www.gnu.org/software/gdbm/gdbm.html
+
diff --git a/package/gdbm/gdbm.mk b/package/gdbm/gdbm.mk
new file mode 100644
index 0000000..250fd0a
--- /dev/null
+++ b/package/gdbm/gdbm.mk
@@ -0,0 +1,12 @@
+#############################################################
+#
+# gdbm
+#
+#############################################################
+GDBM_VERSION = 1.10
+GDBM_SITE = ftp://ftp.gnu.org/gnu/gdbm
+GDBM_LICENSE = GPLv3
+GDBM_LICENSE_FILES = COPYING
+GDBM_INSTALL_STAGING = YES
+
+$(eval $(autotools-package))
-- 
1.7.9.5

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

* [Buildroot] [PATCH 05/13] perl: add GDBM_File
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (2 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 04/13] gdbm: new package Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-20 19:59   ` Thomas Petazzoni
  2012-09-08 12:28 ` [Buildroot] [PATCH 06/13] cpanminus: new package v3 Francois Perrad
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl/Config.in |    6 ++++++
 package/perl/perl.mk   |    3 +++
 2 files changed, 9 insertions(+)

diff --git a/package/perl/Config.in b/package/perl/Config.in
index 9df487a..8a042cc 100644
--- a/package/perl/Config.in
+++ b/package/perl/Config.in
@@ -26,4 +26,10 @@ config BR2_PACKAGE_PERL_DB_FILE
 	help
 	  Build the DB_File module.
 
+config BR2_PACKAGE_PERL_GDBM_FILE
+	bool "GDBM_File"
+	select BR2_PACKAGE_GDBM
+	help
+	  Build the GDBM_File module.
+
 endif
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 2225f0c..e0628e6 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -15,6 +15,9 @@ PERL_INSTALL_STAGING = YES
 ifdef BR2_PACKAGE_PERL_DB_FILE
     PERL_DEPENDENCIES += berkeleydb
 endif
+ifdef BR2_PACKAGE_PERL_GDBM_FILE
+    PERL_DEPENDENCIES += gdbm
+endif
 HOST_PERL_DEPENDENCIES =
 
 ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
-- 
1.7.9.5

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

* [Buildroot] [PATCH 06/13] cpanminus: new package v3
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (3 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 05/13] perl: add GDBM_File Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-20 20:04   ` Thomas Petazzoni
  2012-09-08 12:28 ` [Buildroot] [PATCH 07/13] microperl: build extensions at build time Francois Perrad
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

---
 package/Config.in              |    5 +++++
 package/cpanminus/Config.in    |   28 ++++++++++++++++++++++++++++
 package/cpanminus/cpanminus.mk |   39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+)
 create mode 100644 package/cpanminus/Config.in
 create mode 100644 package/cpanminus/cpanminus.mk

diff --git a/package/Config.in b/package/Config.in
index d9cadf9..06050f2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -263,6 +263,11 @@ source "package/xavante/Config.in"
 endmenu
 endif
 source "package/perl/Config.in"
+if BR2_PACKAGE_PERL
+menu "Perl libraries/modules"
+source "package/cpanminus/Config.in"
+endmenu
+endif
 source "package/microperl/Config.in"
 source "package/php/Config.in"
 source "package/python/Config.in"
diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
new file mode 100644
index 0000000..d265c2e
--- /dev/null
+++ b/package/cpanminus/Config.in
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_CPANMINUS
+	bool "cpanminus"
+	help
+	  cpanminus is a script to get, unpack, build and install Perl modules
+	  from CPAN.
+
+	  Why? It's dependency free, requires zero configuration, and stands
+	  alone. When running, it requires only 10MB of RAM.
+
+	  http://github.com/miyagawa/cpanminus
+
+if BR2_PACKAGE_CPANMINUS
+
+config BR2_PACKAGE_CPANMINUS_MODULES
+	string "Perl modules from CPAN"
+	help
+	  List of space-separated Perl modules to install from CPAN.
+
+	  Examples: Try::Tiny Dancer YAML Moo
+
+	  Install the listed modules and their dependencies.
+
+config BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES
+	string "native dependencies"
+	help
+	  Some XS modules require native libraries.
+
+endif
diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
new file mode 100644
index 0000000..d7f689e
--- /dev/null
+++ b/package/cpanminus/cpanminus.mk
@@ -0,0 +1,39 @@
+#############################################################
+#
+# cpanminus
+#
+#############################################################
+
+CPANMINUS_VERSION = 1.5017
+CPANMINUS_SOURCE = miyagawa-cpanminus-$(CPANMINUS_VERSION)-0-g917a607.tar.gz
+CPANMINUS_SITE = https://github.com/miyagawa/cpanminus/tarball/$(CPANMINUS_VERSION)
+CPANMINUS_DEPENDENCIES = perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES))
+
+CPANMINUS_ARCH=$(call qstrip,$(BR2_ARCH))
+ifeq ($(CPANMINUS_ARCH),i686)
+    CPANMINUS_ARCH=i386
+endif
+CPANMINUS_QEMU_USER_MODE=qemu-$(CPANMINUS_ARCH) -L $(STAGING_DIR)
+CPANMINUS_RUN_PERL=$(CPANMINUS_QEMU_USER_MODE) $(STAGING_DIR)/usr/bin/perl
+CPANMINUS_ARCHNAME=$(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}")
+CPANMINUS_PERL_LIB=$(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)
+CPANMINUS_PERL_ARCHLIB=$(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(CPANMINUS_ARCHNAME)
+CPANMINUS_PERL_SITELIB=$(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)
+CPANMINUS_PERL_SITEARCH=$(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)/$(CPANMINUS_ARCHNAME)
+CPANMINUS_PERL5LIB=$(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB)
+
+define CPANMINUS_INSTALL_TARGET_CMDS
+	echo "#!/bin/sh"                                                        > $(@D)/run_perl
+	echo "PERL5LIB=$(CPANMINUS_PERL5LIB) $(CPANMINUS_RUN_PERL) \"\$$@\""    >>$(@D)/run_perl
+	chmod +x $(@D)/run_perl
+	PERL5LIB=$(CPANMINUS_PERL5LIB) \
+	PERL_MM_OPT="DESTDIR=$(TARGET_DIR) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
+	PERL_MB_OPT="--destdir $(TARGET_DIR)" \
+	$(CPANMINUS_RUN_PERL) $(@D)/cpanm \
+		--perl=$(@D)/run_perl \
+		--notest \
+		--no-man-pages \
+		$(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
+endef
+
+$(eval $(generic-package))
-- 
1.7.9.5

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

* [Buildroot] [PATCH 07/13] microperl: build extensions at build time
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (4 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 06/13] cpanminus: new package v3 Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 08/13] microperl: bump version to 5.14.2 Francois Perrad
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

just set PERL5LIB in build tree
optim: symlink only one time, before the loop

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/microperl.mk |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index b2a912a..fa92144 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -97,6 +97,7 @@ define MICROPERL_CONFIGURE_CMDS
 	cp -f $(@D)/uconfig.sh $(@D)/config.sh
 	echo "ccname='$(TARGET_CC)'" >>$(@D)/config.sh
 	echo "PERL_CONFIG_SH=true" >>$(@D)/config.sh
+	touch $(@D)/config.h    # avoid warning : out of date
 	cd $(@D) ; $(HOST_DIR)/usr/bin/perl make_patchnum.pl ; \
 	$(HOST_DIR)/usr/bin/perl configpm
 endef
@@ -106,16 +107,17 @@ define MICROPERL_BUILD_CMDS
 		CC="$(HOSTCC)" bitcount.h
 	$(MAKE) -f Makefile.micro -C $(@D) \
 		CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)"
+	$(MICROPERL_BUILD_EXTENSIONS)
 endef
 
 # Some extensions don't need a build run
 # We try to build anyway to avoid a huge black list
 # Just ignore make_ext.pl warning/errors
 define MICROPERL_BUILD_EXTENSIONS
+	cd $(@D); rm -f miniperl; ln -s $(HOST_DIR)/usr/bin/perl miniperl;
 	for i in $(MICROPERL_MODS); do \
-	cd $(@D); ln -sf $(HOST_DIR)/usr/bin/perl miniperl; \
-		PERL5LIB=$(TARGET_DIR)/$(MICROPERL_ARCH_DIR) \
-		$(HOST_DIR)/usr/bin/perl make_ext.pl MAKE="$(MAKE)" --nonxs \
+	cd $(@D); PERL5LIB=lib \
+		./miniperl make_ext.pl MAKE="$(MAKE)" --nonxs \
 		`echo $$i|sed -e 's/.pm//'`; \
 	done
 endef
@@ -131,7 +133,6 @@ define MICROPERL_INSTALL_TARGET_CMDS
 		$(INSTALL) -m 0644 -D $(@D)/lib/$$i \
 			$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \
 	done
-	$(MICROPERL_BUILD_EXTENSIONS)
 	for i in $(MICROPERL_MODS); do \
 		j=`echo $$i|cut -d : -f 1` ; \
 		if [ -d $(@D)/lib/$$j ] ; then \
-- 
1.7.9.5

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

* [Buildroot] [PATCH 08/13] microperl: bump version to 5.14.2
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (5 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 07/13] microperl: build extensions at build time Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 09/13] microperl: improve configure step on 64bits platform Francois Perrad
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

patches have been merged in upstream
perl -V requires more modules

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 .../microperl/microperl-no-signal-handlers.patch   |   22 ---------
 package/microperl/microperl-uudmap.patch           |   47 --------------------
 package/microperl/microperl.mk                     |   10 ++---
 3 files changed, 5 insertions(+), 74 deletions(-)
 delete mode 100644 package/microperl/microperl-no-signal-handlers.patch
 delete mode 100644 package/microperl/microperl-uudmap.patch

diff --git a/package/microperl/microperl-no-signal-handlers.patch b/package/microperl/microperl-no-signal-handlers.patch
deleted file mode 100644
index 3c9aa41..0000000
--- a/package/microperl/microperl-no-signal-handlers.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Backport of http://perl5.git.perl.org/perl.git/commitdiff/01d65469392dfc0a?hp=a82b5f080d91ffe184d8ac4795ac71e72e612c2f
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura perl-5.12.3/miniperlmain.c perl-5.12.3-nosig/miniperlmain.c
---- perl-5.12.3/miniperlmain.c	2011-01-09 17:20:57.000000000 -0300
-+++ perl-5.12.3-nosig/miniperlmain.c	2011-04-14 10:16:53.564639438 -0300
-@@ -116,12 +116,14 @@
-     if (!exitstatus)
-         perl_run(my_perl);
- 
-+#ifndef PERL_MICRO
-     /* Unregister our signal handler before destroying my_perl */
-     for (i = 0; PL_sig_name[i]; i++) {
- 	if (rsignal_state(PL_sig_num[i]) == (Sighandler_t) PL_csighandlerp) {
- 	    rsignal(PL_sig_num[i], (Sighandler_t) SIG_DFL);
- 	}
-     }
-+#endif
- 
-     exitstatus = perl_destruct(my_perl);
- 
diff --git a/package/microperl/microperl-uudmap.patch b/package/microperl/microperl-uudmap.patch
deleted file mode 100644
index c72f9c9..0000000
--- a/package/microperl/microperl-uudmap.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From a82b5f080d91ffe184d8ac4795ac71e72e612c2f Mon Sep 17 00:00:00 2001
-From: David Leadbeater <dgl@dgl.cx>
-Date: Mon, 7 Mar 2011 18:40:55 +0000
-Subject: [PATCH] microperl: Update generate_uudmap in Makefile.micro
-
-Makefile.micro hadn't kept up with the changes for generate_uudmap,
-make it match the real Makefile.
----
- Makefile.micro |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.micro b/Makefile.micro
-index 4b738f5..567d98a 100644
---- a/Makefile.micro
-+++ b/Makefile.micro
-@@ -35,7 +35,7 @@ H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \
- HE = $(H) EXTERN.h
- 
- clean:
--	-rm -f $(O) microperl generate_uudmap$(_X) uudmap.h
-+	-rm -f $(O) microperl generate_uudmap$(_X) uudmap.h bitcount.h
- 
- distclean:	clean
- 
-@@ -74,7 +74,7 @@ udoop$(_O):	$(HE) doop.c
- udump$(_O):	$(HE) dump.c regcomp.h regnodes.h
- 	$(CC) $(CCFLAGS) -o $@ $(CFLAGS) dump.c
- 
--uglobals$(_O):	$(H) globals.c INTERN.h perlapi.h
-+uglobals$(_O):	$(H) globals.c INTERN.h perlapi.h uudmap.h bitcount.h
- 	$(CC) $(CCFLAGS) -o $@ $(CFLAGS) globals.c
- 
- ugv$(_O):	$(HE) gv.c
-@@ -173,8 +173,8 @@ uutil$(_O):	$(HE) util.c
- uperlapi$(_O):	$(HE) perlapi.c perlapi.h
- 	$(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c
- 
--uudmap.h: generate_uudmap$(_X)
--	$(RUN) ./generate_uudmap$(_X) >uudmap.h
-+uudmap.h bitcount.h: generate_uudmap$(_X)
-+	$(RUN) ./generate_uudmap$(_X) uudmap.h bitcount.h
- 
- generate_uudmap$(_O): generate_uudmap.c
- 	$(CC) $(CCFLAGS) -o $@ $(CFLAGS) generate_uudmap.c
--- 
-1.6.5.2.74.g610f9.dirty
-
diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index fa92144..1899e03 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -4,7 +4,8 @@
 #
 #############################################################
 
-MICROPERL_VERSION = 5.12.4
+MICROPERL_VERSION_MAJOR = 14
+MICROPERL_VERSION = 5.$(MICROPERL_VERSION_MAJOR).2
 MICROPERL_SITE = http://www.cpan.org/src/5.0
 MICROPERL_SOURCE = perl-$(MICROPERL_VERSION).tar.bz2
 MICROPERL_LICENSE = Artistic
@@ -16,12 +17,11 @@ MICROPERL_MODS = $(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES))
 
 # Minimal set of modules required for 'perl -V' to work
 MICROPERL_ARCH_MODS = Config.pm Config_git.pl Config_heavy.pl
-MICROPERL_BASE_MODS = strict.pm
+MICROPERL_BASE_MODS = strict.pm vars.pm warnings.pm warnings/register.pm
 
 # CGI bundle
 ifeq ($(BR2_PACKAGE_MICROPERL_BUNDLE_CGI),y)
-MICROPERL_MODS += constant.pm CGI CGI.pm Carp.pm Exporter.pm overload.pm \
-	vars.pm warnings.pm warnings/register.pm
+MICROPERL_MODS += constant.pm CGI CGI.pm Carp.pm Exporter.pm overload.pm
 endif
 
 # Host microperl is actually full-blown perl
@@ -70,7 +70,7 @@ define MICROPERL_CONFIGURE_CMDS
 		-e '/^osname=/d' -e '/^u32type=/d' -e '/^d_archlib=/d' \
 		-e '/^d_memset=/d' -e '/^i_fcntl=/d' -e '/^useperlio=/d' \
 		-e '/^need_va_copy=/d' $(@D)/uconfig.sh
-	$(SED) 's/5.12/$(MICROPERL_VERSION)/' $(@D)/uconfig.sh
+	$(SED) 's/5\.$(MICROPERL_VERSION_MAJOR)/$(MICROPERL_VERSION)/' $(@D)/uconfig.sh
 	echo "archlib='$(MICROPERL_ARCH_DIR)'" >>$(@D)/uconfig.sh
 	echo "archlibexp='$(MICROPERL_ARCH_DIR)'" >>$(@D)/uconfig.sh
 	echo "d_archlib='define'" >>$(@D)/uconfig.sh
-- 
1.7.9.5

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

* [Buildroot] [PATCH 09/13] microperl: improve configure step on 64bits platform
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (6 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 08/13] microperl: bump version to 5.14.2 Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 10/13] microperl: install more modules by default Francois Perrad
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

use uconfig64.sh instead of uconfig.sh

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/microperl.mk |   74 ++++++++++++++++++++++------------------
 1 file changed, 41 insertions(+), 33 deletions(-)

diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index 1899e03..4b68567 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -15,6 +15,18 @@ MICROPERL_MODS_DIR = /usr/lib/perl5/$(MICROPERL_VERSION)
 MICROPERL_ARCH_DIR = $(MICROPERL_MODS_DIR)/$(GNU_TARGET_NAME)
 MICROPERL_MODS = $(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES))
 
+ifeq ($(BR2_ARCH_IS_64),y)
+MICROPERL_UCONFIG_SH = $(@D)/uconfig64.sh
+define MICROPERL_REGEN_CONFIG
+	$(MAKE) -C $(@D) -f Makefile.micro regen_uconfig64
+endef
+else
+MICROPERL_UCONFIG_SH = $(@D)/uconfig.sh
+define MICROPERL_REGEN_CONFIG
+	$(MAKE) -C $(@D) -f Makefile.micro regen_uconfig
+endef
+endif
+
 # Minimal set of modules required for 'perl -V' to work
 MICROPERL_ARCH_MODS = Config.pm Config_git.pl Config_heavy.pl
 MICROPERL_BASE_MODS = strict.pm vars.pm warnings.pm warnings/register.pm
@@ -41,60 +53,56 @@ endef
 
 ifeq ($(BR2_ENDIAN),"BIG")
 define MICROPERL_BIGENDIAN
-	$(SED) '/^byteorder=/d' $(@D)/uconfig.sh
-	echo "byteorder='4321'" >>$(@D)/uconfig.sh
+	$(SED) '/^byteorder=/d' $(MICROPERL_UCONFIG_SH)
+	echo "byteorder='4321'" >>$(MICROPERL_UCONFIG_SH)
 endef
 endif
 
 ifeq ($(BR2_LARGEFILE),y)
 define MICROPERL_LARGEFILE
-	$(SED) '/^uselargefiles=/d' $(@D)/uconfig.sh
-	echo "uselargefiles='define'" >>$(@D)/uconfig.sh
+	$(SED) '/^uselargefiles=/d' $(MICROPERL_UCONFIG_SH)
+	echo "uselargefiles='define'" >>$(MICROPERL_UCONFIG_SH)
 endef
 endif
 
 ifeq ($(BR2_USE_WCHAR),y)
 define MICROPERL_WCHAR
 	$(SED) '/^d_mbstowcs=/d' -e '/^d_mbtowc=/d' -e '/^d_wcstombs=/d' \
-		-e '/^d_wctomb=/d' $(@D)/uconfig.sh
-	echo "d_mbstowcs='define'" >>$(@D)/uconfig.sh
-	echo "d_mbtowc='define'" >>$(@D)/uconfig.sh
-	echo "d_wcstombs='define'" >>$(@D)/uconfig.sh
-	echo "d_wctomb='define'" >>$(@D)/uconfig.sh
+		-e '/^d_wctomb=/d' $(MICROPERL_UCONFIG_SH)
+	echo "d_mbstowcs='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "d_mbtowc='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "d_wcstombs='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "d_wctomb='define'" >>$(MICROPERL_UCONFIG_SH)
 endef
 endif
 
 define MICROPERL_CONFIGURE_CMDS
 	$(SED) '/^archlib=/d' -e '/^archlibexp=/d' -e '/^optimize=/d' \
 		-e '/^archname=/d' -e '/^d_poll=/d' -e '/^i_poll=/d' \
-		-e '/^osname=/d' -e '/^u32type=/d' -e '/^d_archlib=/d' \
-		-e '/^d_memset=/d' -e '/^i_fcntl=/d' -e '/^useperlio=/d' \
-		-e '/^need_va_copy=/d' $(@D)/uconfig.sh
-	$(SED) 's/5\.$(MICROPERL_VERSION_MAJOR)/$(MICROPERL_VERSION)/' $(@D)/uconfig.sh
-	echo "archlib='$(MICROPERL_ARCH_DIR)'" >>$(@D)/uconfig.sh
-	echo "archlibexp='$(MICROPERL_ARCH_DIR)'" >>$(@D)/uconfig.sh
-	echo "d_archlib='define'" >>$(@D)/uconfig.sh
-	echo "archname='$(GNU_TARGET_NAME)'" >>$(@D)/uconfig.sh
-	echo "osname='linux'" >>$(@D)/uconfig.sh
-	echo "cc='$(TARGET_CC)'" >>$(@D)/uconfig.sh
-	echo "ccflags='$(TARGET_CFLAGS)'" >>$(@D)/uconfig.sh
-	echo "optimize='$(TARGET_CFLAGS)'" >>$(@D)/uconfig.sh
-	echo "usecrosscompile='define'" >>$(@D)/uconfig.sh
-	echo "d_memset='define'" >>$(@D)/uconfig.sh
-	echo "i_fcntl='define'" >>$(@D)/uconfig.sh
-	echo "useperlio='define'" >>$(@D)/uconfig.sh
-	echo "u32type='unsigned int'" >>$(@D)/uconfig.sh
-	echo "need_va_copy='define'" >>$(@D)/uconfig.sh
-	echo "d_poll='define'" >>$(@D)/uconfig.sh
-	echo "i_poll='define'" >>$(@D)/uconfig.sh
-	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
-	$(SED) 's/local\///' $(@D)/uconfig.sh
+		-e '/^osname=/d' -e '/^d_archlib=/d' -e '/^i_fcntl=/d' \
+		-e '/^useperlio=/d' $(MICROPERL_UCONFIG_SH)
+	$(SED) 's/5\.$(MICROPERL_VERSION_MAJOR)/$(MICROPERL_VERSION)/' $(MICROPERL_UCONFIG_SH)
+	echo "archlib='$(MICROPERL_ARCH_DIR)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "archlibexp='$(MICROPERL_ARCH_DIR)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "d_archlib='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "archname='$(GNU_TARGET_NAME)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "osname='linux'" >>$(MICROPERL_UCONFIG_SH)
+	echo "cc='$(TARGET_CC)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "ccflags='$(TARGET_CFLAGS)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "optimize='$(TARGET_CFLAGS)'" >>$(MICROPERL_UCONFIG_SH)
+	echo "usecrosscompile='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "i_fcntl='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "useperlio='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "d_poll='define'" >>$(MICROPERL_UCONFIG_SH)
+	echo "i_poll='define'" >>$(MICROPERL_UCONFIG_SH)
 	$(MICROPERL_BIGENDIAN)
 	$(MICROPERL_LARGEFILE)
 	$(MICROPERL_WCHAR)
-	$(MAKE) -C $(@D) -f Makefile.micro regen_uconfig
+	$(SED) 's/local\///' $(MICROPERL_UCONFIG_SH)
+	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
+	$(MICROPERL_REGEN_CONFIG)
 	cp -f $(@D)/uconfig.h $(@D)/config.h
-	cp -f $(@D)/uconfig.sh $(@D)/config.sh
+	cp -f $(MICROPERL_UCONFIG_SH) $(@D)/config.sh
 	echo "ccname='$(TARGET_CC)'" >>$(@D)/config.sh
 	echo "PERL_CONFIG_SH=true" >>$(@D)/config.sh
 	touch $(@D)/config.h    # avoid warning : out of date
-- 
1.7.9.5

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

* [Buildroot] [PATCH 10/13] microperl: install more modules by default
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (7 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 09/13] microperl: improve configure step on 64bits platform Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 11/13] microperl: bump version to 5.16.1 Francois Perrad
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/microperl.mk |   45 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index 4b68567..c0f6029 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -31,9 +31,52 @@ endif
 MICROPERL_ARCH_MODS = Config.pm Config_git.pl Config_heavy.pl
 MICROPERL_BASE_MODS = strict.pm vars.pm warnings.pm warnings/register.pm
 
+# other pragma modules (from lib/)
+MICROPERL_BASE_MODS += \
+  bytes.pm \
+  deprecate.pm \
+  feature.pm \
+  integer.pm \
+  less.pm \
+  locale.pm \
+  overloading.pm \
+  overload.pm \
+  sigtrap.pm \
+  sort.pm \
+  subs.pm \
+  utf8.pm utf8_heavy.pl \
+  version.pm
+
+# some common modules (from lib/)
+MICROPERL_BASE_MODS += \
+  Benchmark.pm \
+  Carp.pm \
+  Class/Struct.pm \
+  Exporter.pm Exporter/Heavy.pm \
+  File/Basename.pm \
+  File/Compare.pm \
+  Getopt/Std.pm \
+  Tie/Array.pm \
+  Tie/Hash.pm \
+  Tie/Scalar.pm \
+  UNIVERSAL.pm
+
+# other common modules (from dist/)
+MICROPERL_MODS += \
+  Dumpvalue.pm \
+  Env.pm \
+  autouse.pm \
+  base.pm \
+  constant.pm
+
+# other common modules (from cpan/)
+MICROPERL_MODS += \
+  Getopt/Long.pm \
+  parent.pm
+
 # CGI bundle
 ifeq ($(BR2_PACKAGE_MICROPERL_BUNDLE_CGI),y)
-MICROPERL_MODS += constant.pm CGI CGI.pm Carp.pm Exporter.pm overload.pm
+MICROPERL_MODS += CGI CGI.pm
 endif
 
 # Host microperl is actually full-blown perl
-- 
1.7.9.5

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

* [Buildroot] [PATCH 11/13] microperl: bump version to 5.16.1
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (8 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 10/13] microperl: install more modules by default Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 12/13] microperl: remove host-microperl Francois Perrad
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/microperl-fix-build.patch |   76 +++++++++++++++++++++++++++
 package/microperl/microperl.mk              |    8 +--
 2 files changed, 80 insertions(+), 4 deletions(-)
 create mode 100644 package/microperl/microperl-fix-build.patch

diff --git a/package/microperl/microperl-fix-build.patch b/package/microperl/microperl-fix-build.patch
new file mode 100644
index 0000000..fe01395
--- /dev/null
+++ b/package/microperl/microperl-fix-build.patch
@@ -0,0 +1,76 @@
+Backport of http://perl5.git.perl.org/perl.git/commitdiff/d40eae8f110fb9900e82648a2c44710def9f117d
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+From: Nicholas Clark <nick@ccl4.org>
+Date: Fri, 27 Jul 2012 17:36:40 +0200
+Subject: [PATCH] Restore microperl, which has been unable to build since January.
+
+microperl was broken by commit 82ad65bb0613be64 on 2012-01-16, which used
+IN_LOCALE_COMPILETIME for the first time in the C code. Unlike
+IN_LOCALE_RUNTIME, it had no fallback definition for microperl.
+
+Commit f90a9a0230170cc0 on 2012-01-28 added the first use of Strtol(),
+which means that microperl now needs to assume that the system has strtol().
+(Which is not unreasonable, as it's part of C89).
+---
+ perl.h       |    1 +
+ uconfig.h    |    2 +-
+ uconfig.sh   |    2 +-
+ uconfig64.sh |    2 +-
+ 4 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/perl.h b/perl.h
+index e532af2..9e92ae4 100644
+--- a/perl.h
++++ b/perl.h
+@@ -5311,6 +5311,7 @@ typedef struct am_table_short AMTS;
+ #define RESTORE_NUMERIC_STANDARD()	/**/
+ #define Atof				my_atof
+ #define IN_LOCALE_RUNTIME		0
++#define IN_LOCALE_COMPILETIME		0
+ 
+ #endif /* !USE_LOCALE_NUMERIC */
+ 
+diff --git a/uconfig.h b/uconfig.h
+index 20b1f23..60c7ca7 100644
+--- a/uconfig.h
++++ b/uconfig.h
+@@ -527,7 +527,7 @@
+  *	This symbol, if defined, indicates that the strtol routine is available
+  *	to provide better numeric string conversion than atoi() and friends.
+  */
+-/*#define HAS_STRTOL	/ **/
++#define HAS_STRTOL	/**/
+ 
+ /* HAS_STRXFRM:
+  *	This symbol, if defined, indicates that the strxfrm() routine is
+diff --git a/uconfig.sh b/uconfig.sh
+index e96b7e8..d761d5c 100644
+--- a/uconfig.sh
++++ b/uconfig.sh
+@@ -424,7 +424,7 @@ d_strftime='undef'
+ d_strlcat='undef'
+ d_strlcpy='undef'
+ d_strtod='undef'
+-d_strtol='undef'
++d_strtol='define'
+ d_strtold='undef'
+ d_strtoll='undef'
+ d_strtoq='undef'
+diff --git a/uconfig64.sh b/uconfig64.sh
+index 80e6f7f..f57c979 100644
+--- a/uconfig64.sh
++++ b/uconfig64.sh
+@@ -425,7 +425,7 @@ d_strftime='undef'
+ d_strlcat='undef'
+ d_strlcpy='undef'
+ d_strtod='undef'
+-d_strtol='undef'
++d_strtol='define'
+ d_strtold='undef'
+ d_strtoll='undef'
+ d_strtoq='undef'
+-- 
+1.7.9.5
+
diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index c0f6029..b601754 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -4,8 +4,8 @@
 #
 #############################################################
 
-MICROPERL_VERSION_MAJOR = 14
-MICROPERL_VERSION = 5.$(MICROPERL_VERSION_MAJOR).2
+MICROPERL_VERSION_MAJOR = 16
+MICROPERL_VERSION = 5.$(MICROPERL_VERSION_MAJOR).1
 MICROPERL_SITE = http://www.cpan.org/src/5.0
 MICROPERL_SOURCE = perl-$(MICROPERL_VERSION).tar.bz2
 MICROPERL_LICENSE = Artistic
@@ -50,7 +50,6 @@ MICROPERL_BASE_MODS += \
 # some common modules (from lib/)
 MICROPERL_BASE_MODS += \
   Benchmark.pm \
-  Carp.pm \
   Class/Struct.pm \
   Exporter.pm Exporter/Heavy.pm \
   File/Basename.pm \
@@ -63,6 +62,7 @@ MICROPERL_BASE_MODS += \
 
 # other common modules (from dist/)
 MICROPERL_MODS += \
+  Carp.pm \
   Dumpvalue.pm \
   Env.pm \
   autouse.pm \
@@ -155,7 +155,7 @@ endef
 
 define MICROPERL_BUILD_CMDS
 	$(MAKE) -f Makefile.micro -C $(@D) \
-		CC="$(HOSTCC)" bitcount.h
+		CC="$(HOSTCC)" ubitcount.h
 	$(MAKE) -f Makefile.micro -C $(@D) \
 		CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)"
 	$(MICROPERL_BUILD_EXTENSIONS)
-- 
1.7.9.5

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

* [Buildroot] [PATCH 12/13] microperl: remove host-microperl
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (9 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 11/13] microperl: bump version to 5.16.1 Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-08 12:28 ` [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED Francois Perrad
  2012-09-20 19:56 ` [Buildroot] [PATCH 01/13] perl: new package v6 Thomas Petazzoni
  12 siblings, 0 replies; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/microperl.mk |   24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index b601754..a3d1018 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -10,7 +10,7 @@ MICROPERL_SITE = http://www.cpan.org/src/5.0
 MICROPERL_SOURCE = perl-$(MICROPERL_VERSION).tar.bz2
 MICROPERL_LICENSE = Artistic
 MICROPERL_LICENSE_FILES = Artistic
-MICROPERL_DEPENDENCIES = host-microperl
+MICROPERL_DEPENDENCIES = host-perl
 MICROPERL_MODS_DIR = /usr/lib/perl5/$(MICROPERL_VERSION)
 MICROPERL_ARCH_DIR = $(MICROPERL_MODS_DIR)/$(GNU_TARGET_NAME)
 MICROPERL_MODS = $(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES))
@@ -79,21 +79,6 @@ ifeq ($(BR2_PACKAGE_MICROPERL_BUNDLE_CGI),y)
 MICROPERL_MODS += CGI CGI.pm
 endif
 
-# Host microperl is actually full-blown perl
-define HOST_MICROPERL_CONFIGURE_CMDS
-	cd $(@D) ; \
-	./Configure -Dcc="$(HOSTCC)" -Dprefix="$(HOST_DIR)/usr" \
-		-Dloclibpth='/lib /lib64 /usr/lib /usr/lib64' -des
-endef
-
-define HOST_MICROPERL_BUILD_CMDS
-	$(MAKE) -C $(@D)
-endef
-
-define HOST_MICROPERL_INSTALL_CMDS
-	$(MAKE) -C $(@D) install
-endef
-
 ifeq ($(BR2_ENDIAN),"BIG")
 define MICROPERL_BIGENDIAN
 	$(SED) '/^byteorder=/d' $(MICROPERL_UCONFIG_SH)
@@ -149,8 +134,8 @@ define MICROPERL_CONFIGURE_CMDS
 	echo "ccname='$(TARGET_CC)'" >>$(@D)/config.sh
 	echo "PERL_CONFIG_SH=true" >>$(@D)/config.sh
 	touch $(@D)/config.h    # avoid warning : out of date
-	cd $(@D) ; $(HOST_DIR)/usr/bin/perl make_patchnum.pl ; \
-	$(HOST_DIR)/usr/bin/perl configpm
+	cd $(@D) ; $(HOST_DIR)/usr/bin/perl$(PERL_VERSION) make_patchnum.pl ; \
+	$(HOST_DIR)/usr/bin/perl$(PERL_VERSION) configpm
 endef
 
 define MICROPERL_BUILD_CMDS
@@ -165,7 +150,7 @@ endef
 # We try to build anyway to avoid a huge black list
 # Just ignore make_ext.pl warning/errors
 define MICROPERL_BUILD_EXTENSIONS
-	cd $(@D); rm -f miniperl; ln -s $(HOST_DIR)/usr/bin/perl miniperl;
+	cd $(@D); rm -f miniperl; ln -s $(HOST_DIR)/usr/bin/perl$(PERL_VERSION) miniperl;
 	for i in $(MICROPERL_MODS); do \
 	cd $(@D); PERL5LIB=lib \
 		./miniperl make_ext.pl MAKE="$(MAKE)" --nonxs \
@@ -205,4 +190,3 @@ define MICROPERL_UNINSTALL_TARGET_CMDS
 endef
 
 $(eval $(generic-package))
-$(eval $(host-generic-package))
-- 
1.7.9.5

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (10 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 12/13] microperl: remove host-microperl Francois Perrad
@ 2012-09-08 12:28 ` Francois Perrad
  2012-09-20 20:22   ` Thomas Petazzoni
  2012-09-20 19:56 ` [Buildroot] [PATCH 01/13] perl: new package v6 Thomas Petazzoni
  12 siblings, 1 reply; 34+ messages in thread
From: Francois Perrad @ 2012-09-08 12:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/microperl/Config.in |    1 +
 1 file changed, 1 insertion(+)

diff --git a/package/microperl/Config.in b/package/microperl/Config.in
index 66bbedd..19d104a 100644
--- a/package/microperl/Config.in
+++ b/package/microperl/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_MICROPERL
 	bool "microperl"
 	# needs fork()
 	depends on BR2_USE_MMU
+	depends on BR2_DEPRECATED
 	help
 	  Perl without operating-specific functions such as readdir.
 
-- 
1.7.9.5

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

* [Buildroot] [PATCH 04/13] gdbm: new package
  2012-09-08 12:28 ` [Buildroot] [PATCH 04/13] gdbm: new package Francois Perrad
@ 2012-09-12  5:30   ` Arnout Vandecappelle
  0 siblings, 0 replies; 34+ messages in thread
From: Arnout Vandecappelle @ 2012-09-12  5:30 UTC (permalink / raw)
  To: buildroot

On 09/08/12 14:28, Francois Perrad wrote:
> Signed-off-by: Francois Perrad<francois.perrad@gadz.org>
[snip]
> +#############################################################
> +#
> +# gdbm
> +#
> +#############################################################
> +GDBM_VERSION = 1.10
> +GDBM_SITE = ftp://ftp.gnu.org/gnu/gdbm

  This should be

GDBM_SITE = $(BR2_GNU_MIRROR)/gdbm

  After this fix,
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(untested)

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 01/13] perl: new package v6
  2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
                   ` (11 preceding siblings ...)
  2012-09-08 12:28 ` [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED Francois Perrad
@ 2012-09-20 19:56 ` Thomas Petazzoni
  2012-09-21 21:29   ` [Buildroot] [UNSURE]Re: " François Perrad
  12 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 19:56 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

Thanks for your continued work on this. Some comments below.

First, do not put the patch version in the patch title. If you want to
have a version, it should be between the [] at the beginning of the
title. Here is how you can do that with git:

git format-patch --subject-prefix="PATCH v7" <yourbasebranch>

On Sat,  8 Sep 2012 14:28:33 +0200, Francois Perrad wrote:
> ---
>  package/Config.in                      |    1 +
>  package/perl/Config.in                 |   17 +++++
>  package/perl/perl-configure-qemu.patch |   32 +++++++++
>  package/perl/perl-make-ext.patch       |   24 +++++++
>  package/perl/perl-mkppport.patch       |   37 ++++++++++
>  package/perl/perl.mk                   |  121 ++++++++++++++++++++++++++++++++
>  6 files changed, 232 insertions(+)
>  create mode 100644 package/perl/Config.in
>  create mode 100644 package/perl/perl-configure-qemu.patch
>  create mode 100644 package/perl/perl-make-ext.patch
>  create mode 100644 package/perl/perl-mkppport.patch
>  create mode 100644 package/perl/perl.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index f308de7..00a79ab 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -262,6 +262,7 @@ source "package/wsapi/Config.in"
>  source "package/xavante/Config.in"
>  endmenu
>  endif
> +source "package/perl/Config.in"
>  source "package/microperl/Config.in"
>  source "package/php/Config.in"
>  source "package/python/Config.in"
> diff --git a/package/perl/Config.in b/package/perl/Config.in
> new file mode 100644
> index 0000000..286b09e
> --- /dev/null
> +++ b/package/perl/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_PERL
> +	bool "perl"
> +	help
> +	  Larry Wall's Practical Extraction and Report Language
> +	  An interpreted scripting language, known among some as "Unix's Swiss
> +	  Army Chainsaw".
> +
> +	  http://www.perl.org/
> +
> +if BR2_PACKAGE_PERL
> +
> +config BR2_PACKAGE_PERL_CUSTOM_CONFIGURE
> +	string "configuration flags"
> +	help
> +	  Allows to add some flags to Configure.

We don't typically offer such choice for packages. Is there a good
reason for doing so in the case of Perl, rather than providing a few
additional kconfig configuration options if needed?

> +endif
> diff --git a/package/perl/perl-configure-qemu.patch b/package/perl/perl-configure-qemu.patch
> new file mode 100644
> index 0000000..00f7539
> --- /dev/null
> +++ b/package/perl/perl-configure-qemu.patch
> @@ -0,0 +1,32 @@
> +Add qemu support
> +

Please explain in more details what this means, and whether this patch
has a chance of being upstream or not.

Also, it seems to imply that the build process of Perl would require
Qemu. Or, Qemu is not amongst the requirements of Buildroot, and there
is no host-qemu package in the dependencies of your package (and we
don't have a host-qemu package). Yann E. Morin has posted a target
package for qemu a while ago, but it hasn't been merged so far.

That said, even so it is certainly possible to create a host-qemu
package, I am a bit annoyed to see the build process of a package
requiring qemu. Is there really no other way? I guess it uses qemu to
run a bunch of tests on the target system. Is there no way to provide
pre-defined values for those tests, on a per-architecture basis, rather
than running those test applications in Qemu?

> diff --git a/package/perl/perl-make-ext.patch b/package/perl/perl-make-ext.patch
> new file mode 100644
> index 0000000..e0195e7
> --- /dev/null
> +++ b/package/perl/perl-make-ext.patch
> @@ -0,0 +1,24 @@
> +Don't use RUN with make (only for perl)
> +
> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Sorry, but the patch description is insufficient to understand what is
going on here.

> +
> +Index: b/make_ext.pl
> +===================================================================
> +--- a/make_ext.pl
> ++++ b/make_ext.pl
> +@@ -458,11 +458,13 @@
> + 	# Give makefile an opportunity to rewrite itself.
> + 	# reassure users that life goes on...
> + 	my @args = ('config', @$pass_through);
> +-	system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
> ++#	system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
> ++	system(@make, @args) and print "@make @args failed, continuing anyway...\n";
> +     }
> +     my @targ = ($target, @$pass_through);
> +     print "Making $target in $ext_dir\n at run @make @targ\n";
> +-    my $code = system(@run, @make, @targ);
> ++#    my $code = system(@run, @make, @targ);
> ++    my $code = system(@make, @targ);
> +     die "Unsuccessful make($ext_dir): code=$code" if $code != 0;
> + 
> +     chdir $return_dir || die "Cannot cd to $return_dir: $!";
> diff --git a/package/perl/perl-mkppport.patch b/package/perl/perl-mkppport.patch
> new file mode 100644
> index 0000000..97f27a2
> --- /dev/null
> +++ b/package/perl/perl-mkppport.patch
> @@ -0,0 +1,37 @@
> +Add RUN
> +
> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Ditto.

> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
> new file mode 100644
> index 0000000..2a8da79
> --- /dev/null
> +++ b/package/perl/perl.mk
> @@ -0,0 +1,121 @@
> +#############################################################
> +#
> +# perl
> +#
> +#############################################################
> +
> +PERL_VERSION_MAJOR = 16
> +PERL_VERSION = 5.$(PERL_VERSION_MAJOR).1
> +PERL_SITE = http://www.cpan.org/src/5.0
> +PERL_SOURCE = perl-$(PERL_VERSION).tar.bz2
> +PERL_LICENSE = Artistic
> +PERL_LICENSE_FILES = Artistic
> +PERL_INSTALL_STAGING = YES
> +
> +ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
> +    PERL_USE_DEVEL=-Dusedevel
> +endif
> +
> +ifneq ($(BR2_LARGEFILE),y)
> +    PERL_NO_LARGEFILE=-Uuselargefiles
> +endif
> +
> +PERL_ARCH=$(call qstrip,$(BR2_ARCH))

You can use ARCH directly, it is already qstripped.

> +ifeq ($(PERL_ARCH),i686)
> +    PERL_ARCH=i386
> +endif
> +PERL_QEMU_USER_MODE=qemu-$(PERL_ARCH)
> +
> +define PERL_CONFIGURE_CMDS
> +	rm -f $(@D)/config.sh
> +	cd $(@D); ./Configure -des \

We generally like to put such commands into parenthesis, i.e:

	(cd $(@D); .... \
		.....   \
		.....)

> +		-Dusecrosscompile \
> +		-Dtargetrun=$(PERL_QEMU_USER_MODE) \
> +		-Dqemulib=$(STAGING_DIR) \
> +		-Dtargethost=dummy \
> +		-Dar="$(TARGET_AR)" \
> +		-Dcc="$(TARGET_CC)" \
> +		-Dcpp="$(TARGET_CC)" \
> +		-Dld="$(TARGET_LD)" \
> +		-Dnm="$(TARGET_NM)" \
> +		-Dranlib="$(TARGET_RANLIB)" \
> +		-Dccflags="$(TARGET_CFLAGS)" \
> +		-Dldflags="$(TARGET_LDFLAGS) -l gcc_s" \
> +		-Dlddlflags="-shared" \
> +		-Dlibc=$(TARGET_HOST)/usr/$(GNU_TARGET_NAME)/sysroot/lib/libc.so \
> +		-Duseshrplib \
> +		-Dprefix=/usr \
> +		-Uoptimize \
> +		$(PERL_USE_DEVEL) \
> +		$(PERL_NO_LARGEFILE) \
> +		$(call qstrip,$(BR2_PACKAGE_PERL_CUSTOM_CONFIGURE))
> +	echo "# patched values"                 >>$(@D)/config.sh
> +	$(SED) '/^myarchname=/d' \
> +		-e '/^mydomain=/d' \
> +		-e '/^myhostname=/d' \
> +		-e '/^myuname=/d' \
> +		-e '/^osname=/d' \
> +		-e '/^osvers=/d' \
> +		-e '/^perladmin=/d' \
> +		$(@D)/config.sh
> +	echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
> +	echo "mydomain=''"                                      >>$(@D)/config.sh
> +	echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
> +	echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
> +	echo "osname='linux'"                                   >>$(@D)/config.sh
> +	echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
> +	echo "perladmin='root'"                                 >>$(@D)/config.sh
> +	cd $(@D); ./Configure -S
> +	cp $(@D)/config.h $(@D)/xconfig.h
> +	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
> +endef
> +
> +define PERL_BUILD_CMDS
> +	echo "#!/bin/sh"                                                        > $(@D)/Cross/miniperl
> +	echo "$(PERL_QEMU_USER_MODE) -L $(STAGING_DIR) $(@D)/miniperl \"\$$@\"" >>$(@D)/Cross/miniperl
> +	chmod +x $(@D)/Cross/miniperl
> +	PERL_MM_OPT="PERL=$(@D)/Cross/miniperl" \
> +	$(MAKE) -C $(@D) all
> +endef
> +
> +define PERL_INSTALL_STAGING_CMDS
> +	$(MAKE) INSTALL_DEPENDENCE= \

Is it really INSTALL_DEPENDENCE ?

> +		INSTALLFLAGS= \
> +		DESTDIR="$(STAGING_DIR)" \
> +		-C $(@D) install.perl
> +	$(INSTALL) -m 755 $(@D)/libperl.so $(STAGING_DIR)/usr/lib/libperl.so

Maybe just a comment above on why the manual installation of this .so
file is needed.

> +endef
> +
> +define PERL_INSTALL_TARGET_CMDS
> +	$(MAKE) INSTALL_DEPENDENCE= \
> +		INSTALLFLAGS=-p \
> +		DESTDIR="$(TARGET_DIR)" \
> +		-C $(@D) install.perl
> +endef
> +
> +define PERL_CLEAN_CMDS
> +	-$(MAKE) -C $(@D) clean
> +endef
> +
> +define HOST_PERL_CONFIGURE_CMDS
> +	cd $(@D); ./Configure -des \
> +		-Dcc="$(HOSTCC)" \
> +		-Dprefix="$(HOST_DIR)/usr" \
> +		$(PERL_USE_DEVEL)
> +endef
> +
> +define HOST_PERL_BUILD_CMDS
> +	$(MAKE) -C $(@D) all
> +endef
> +
> +define HOST_PERL_INSTALL_CMDS
> +	$(MAKE) INSTALL_DEPENDENCE= \
> +		-C $(@D) install
> +endef
> +
> +define HOST_PERL_CLEAN_CMDS
> +	-$(MAKE) -C $(@D) clean
> +endef
> +
> +$(eval $(generic-package))
> +$(eval $(host-generic-package))

The host variant of perl seems to be here only as a build dependency of
microperl, which your patch set is deprecating. Is it really necessary
to have this host variant?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 03/13] perl: add DB_File
  2012-09-08 12:28 ` [Buildroot] [PATCH 03/13] perl: add DB_File Francois Perrad
@ 2012-09-20 19:57   ` Thomas Petazzoni
  2012-09-21 18:26     ` François Perrad
  0 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 19:57 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Sat,  8 Sep 2012 14:28:35 +0200, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/perl/Config.in |    6 ++++++
>  package/perl/perl.mk   |    5 +++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/package/perl/Config.in b/package/perl/Config.in
> index 1f044eb..9df487a 100644
> --- a/package/perl/Config.in
> +++ b/package/perl/Config.in
> @@ -20,4 +20,10 @@ config BR2_PACKAGE_PERL_ONLY_MINIPERL
>  	  Install only miniperl (without dynamic module loader)
>  	  Usually used to bootstrap a full Perl (@INC contains only .).
>  
> +config BR2_PACKAGE_PERL_DB_FILE
> +	bool "DB_File"
> +	select BR2_PACKAGE_BERKELEYDB
> +	help
> +	  Build the DB_File module.
> +
>  endif
> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
> index b00116f..2225f0c 100644
> --- a/package/perl/perl.mk
> +++ b/package/perl/perl.mk
> @@ -12,6 +12,11 @@ PERL_LICENSE = Artistic
>  PERL_LICENSE_FILES = Artistic
>  PERL_INSTALL_STAGING = YES
>  
> +ifdef BR2_PACKAGE_PERL_DB_FILE

ifeq ($(BR2_PACKAGE_PERL_DB_FILE),y)

> +    PERL_DEPENDENCIES += berkeleydb
> +endif
> +HOST_PERL_DEPENDENCIES =
> +
>  ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
>      PERL_USE_DEVEL=-Dusedevel
>  endif

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 05/13] perl: add GDBM_File
  2012-09-08 12:28 ` [Buildroot] [PATCH 05/13] perl: add GDBM_File Francois Perrad
@ 2012-09-20 19:59   ` Thomas Petazzoni
  2012-09-21 18:36     ` François Perrad
  0 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 19:59 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Sat,  8 Sep 2012 14:28:37 +0200, Francois Perrad wrote:

> +ifdef BR2_PACKAGE_PERL_GDBM_FILE

ifeq ($(BR2_PACKAGE_PERL_GDBM_FILE),y)

> +    PERL_DEPENDENCIES += gdbm
> +endif
>  HOST_PERL_DEPENDENCIES =

There is no configuration option or argument to pass to Perl to tell it
to use Gdbm (or Berkeley DB)? I am a bit worried that if GDBM is
available on the build machine (for the build machine architecture),
the Perl build system might get confused and think that GDBM or
Berkeley DB are available, while they are not available for the target.
I.e, for autotools packages, we typically have:

ifeq ($(BR2_PACKAGE_FOO_FEATURE_A),y)
FOO_DEPENDENCIES += liba
FOO_CONF_OPT += --enable-feature-a
else
FOO_CONT_OPT += --disable-feature-a
endif

Isn't a similar construct necessary here?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 06/13] cpanminus: new package v3
  2012-09-08 12:28 ` [Buildroot] [PATCH 06/13] cpanminus: new package v3 Francois Perrad
@ 2012-09-20 20:04   ` Thomas Petazzoni
  2012-09-20 21:35     ` Arnout Vandecappelle
  0 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 20:04 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Sat,  8 Sep 2012 14:28:38 +0200, Francois Perrad wrote:

> diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
> new file mode 100644
> index 0000000..d265c2e
> --- /dev/null
> +++ b/package/cpanminus/Config.in
> @@ -0,0 +1,28 @@
> +config BR2_PACKAGE_CPANMINUS
> +	bool "cpanminus"
> +	help
> +	  cpanminus is a script to get, unpack, build and install Perl modules
> +	  from CPAN.
> +
> +	  Why? It's dependency free, requires zero configuration, and stands
> +	  alone. When running, it requires only 10MB of RAM.
> +
> +	  http://github.com/miyagawa/cpanminus
> +
> +if BR2_PACKAGE_CPANMINUS
> +
> +config BR2_PACKAGE_CPANMINUS_MODULES
> +	string "Perl modules from CPAN"
> +	help
> +	  List of space-separated Perl modules to install from CPAN.
> +
> +	  Examples: Try::Tiny Dancer YAML Moo
> +
> +	  Install the listed modules and their dependencies.

Hum, do we really want a package which has configuration options that
allow to select a set of libraries/modules to be downloaded and
installed? It would be more natural to have those Perl modules properly
packaged into Buildroot, no? I suspect that they are all packaged
similarly, so a $(perl-package) infrastructure would work quite well.

This way, we still have the usual package infrastructure for licensing
report and things like this. I honestly don't know if we want packages
whose job is in turn to download/install a bunch of other things. It's
smart, but I'm not sure we want that.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-08 12:28 ` [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED Francois Perrad
@ 2012-09-20 20:22   ` Thomas Petazzoni
  2012-09-21 18:53     ` François Perrad
  0 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-20 20:22 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Sat,  8 Sep 2012 14:28:45 +0200, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/microperl/Config.in |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/microperl/Config.in b/package/microperl/Config.in
> index 66bbedd..19d104a 100644
> --- a/package/microperl/Config.in
> +++ b/package/microperl/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_MICROPERL
>  	bool "microperl"
>  	# needs fork()
>  	depends on BR2_USE_MMU
> +	depends on BR2_DEPRECATED

If microperl is deprecated, is it really useful to have patches 7, 8,
9, 10, 11 and 12 that are making improvements to it, and updating it to
a more recent version?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 06/13] cpanminus: new package v3
  2012-09-20 20:04   ` Thomas Petazzoni
@ 2012-09-20 21:35     ` Arnout Vandecappelle
  2012-09-21 18:25       ` François Perrad
  0 siblings, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2012-09-20 21:35 UTC (permalink / raw)
  To: buildroot

On 09/20/12 22:04, Thomas Petazzoni wrote:
> Hum, do we really want a package which has configuration options that
> allow to select a set of libraries/modules to be downloaded and
> installed? It would be more natural to have those Perl modules properly
> packaged into Buildroot, no? I suspect that they are all packaged
> similarly, so a $(perl-package) infrastructure would work quite well.
>
> This way, we still have the usual package infrastructure for licensing
> report and things like this. I honestly don't know if we want packages
> whose job is in turn to download/install a bunch of other things. It's
> smart, but I'm not sure we want that.

  I'm not sure we want to add 100,000 .mk files either...

  Ideally, the cpanminus module should be able to do the right thing for
the -source, -source-check and -legal-info targets.


  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 06/13] cpanminus: new package v3
  2012-09-20 21:35     ` Arnout Vandecappelle
@ 2012-09-21 18:25       ` François Perrad
  2012-09-21 19:02         ` Thomas Petazzoni
  0 siblings, 1 reply; 34+ messages in thread
From: François Perrad @ 2012-09-21 18:25 UTC (permalink / raw)
  To: buildroot

2012/9/20 Arnout Vandecappelle <arnout@mind.be>:
> On 09/20/12 22:04, Thomas Petazzoni wrote:
>>
>> Hum, do we really want a package which has configuration options that
>> allow to select a set of libraries/modules to be downloaded and
>> installed? It would be more natural to have those Perl modules properly
>> packaged into Buildroot, no? I suspect that they are all packaged
>> similarly, so a $(perl-package) infrastructure would work quite well.
>>
>> This way, we still have the usual package infrastructure for licensing
>> report and things like this. I honestly don't know if we want packages
>> whose job is in turn to download/install a bunch of other things. It's
>> smart, but I'm not sure we want that.
>
>
>  I'm not sure we want to add 100,000 .mk files either...
>
>  Ideally, the cpanminus module should be able to do the right thing for
> the -source, -source-check and -legal-info targets.
>

Perl is useless without a CPAN client.
The Perl packages are fine grained (compared to Python or Ruby ones),
for example the web framework Dancer (without any plugins) requires 22
dependencies (direct or indirect).
Debian has more then thousand Perl packages; I don't want to do the same thing.

Most of CPAN packages haven't a license file; usually the
documentation contains an information, like : "LICENSE - same as Perl
itself".

The reproductibility of a project (with an identified version of each
CPAN module) could be done with a local CPAN mirror.

Fran?ois

>
>  Regards,
>  Arnout
> --
> Arnout Vandecappelle                               arnout at mind be
> Senior Embedded Software Architect                 +32-16-286540
> Essensium/Mind                                     http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 03/13] perl: add DB_File
  2012-09-20 19:57   ` Thomas Petazzoni
@ 2012-09-21 18:26     ` François Perrad
  0 siblings, 0 replies; 34+ messages in thread
From: François Perrad @ 2012-09-21 18:26 UTC (permalink / raw)
  To: buildroot

2012/9/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Sat,  8 Sep 2012 14:28:35 +0200, Francois Perrad wrote:
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>  package/perl/Config.in |    6 ++++++
>>  package/perl/perl.mk   |    5 +++++
>>  2 files changed, 11 insertions(+)
>>
>> diff --git a/package/perl/Config.in b/package/perl/Config.in
>> index 1f044eb..9df487a 100644
>> --- a/package/perl/Config.in
>> +++ b/package/perl/Config.in
>> @@ -20,4 +20,10 @@ config BR2_PACKAGE_PERL_ONLY_MINIPERL
>>         Install only miniperl (without dynamic module loader)
>>         Usually used to bootstrap a full Perl (@INC contains only .).
>>
>> +config BR2_PACKAGE_PERL_DB_FILE
>> +     bool "DB_File"
>> +     select BR2_PACKAGE_BERKELEYDB
>> +     help
>> +       Build the DB_File module.
>> +
>>  endif
>> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
>> index b00116f..2225f0c 100644
>> --- a/package/perl/perl.mk
>> +++ b/package/perl/perl.mk
>> @@ -12,6 +12,11 @@ PERL_LICENSE = Artistic
>>  PERL_LICENSE_FILES = Artistic
>>  PERL_INSTALL_STAGING = YES
>>
>> +ifdef BR2_PACKAGE_PERL_DB_FILE
>
> ifeq ($(BR2_PACKAGE_PERL_DB_FILE),y)

ok.

>
>> +    PERL_DEPENDENCIES += berkeleydb
>> +endif
>> +HOST_PERL_DEPENDENCIES =
>> +
>>  ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
>>      PERL_USE_DEVEL=-Dusedevel
>>  endif
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 05/13] perl: add GDBM_File
  2012-09-20 19:59   ` Thomas Petazzoni
@ 2012-09-21 18:36     ` François Perrad
  2012-09-21 19:01       ` Thomas Petazzoni
  2012-09-24  8:43       ` Arnout Vandecappelle
  0 siblings, 2 replies; 34+ messages in thread
From: François Perrad @ 2012-09-21 18:36 UTC (permalink / raw)
  To: buildroot

2012/9/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Sat,  8 Sep 2012 14:28:37 +0200, Francois Perrad wrote:
>
>> +ifdef BR2_PACKAGE_PERL_GDBM_FILE
>
> ifeq ($(BR2_PACKAGE_PERL_GDBM_FILE),y)

ok

>
>> +    PERL_DEPENDENCIES += gdbm
>> +endif
>>  HOST_PERL_DEPENDENCIES =
>
> There is no configuration option or argument to pass to Perl to tell it
> to use Gdbm (or Berkeley DB)? I am a bit worried that if GDBM is
> available on the build machine (for the build machine architecture),
> the Perl build system might get confused and think that GDBM or
> Berkeley DB are available, while they are not available for the target.
> I.e, for autotools packages, we typically have:
>
> ifeq ($(BR2_PACKAGE_FOO_FEATURE_A),y)
> FOO_DEPENDENCIES += liba
> FOO_CONF_OPT += --enable-feature-a
> else
> FOO_CONT_OPT += --disable-feature-a
> endif
>
> Isn't a similar construct necessary here?
>

The Configure script is not created by autotools, by a tool named 'metaconfig'.
So, an option --enable-gdbm is not needed.
The Configure script detects the include and the lib.
The parameter libc defines a path with SYSROOT, so, there is not
confusion with build machine.

Fran?ois

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-20 20:22   ` Thomas Petazzoni
@ 2012-09-21 18:53     ` François Perrad
  2012-09-21 18:59       ` Thomas Petazzoni
  0 siblings, 1 reply; 34+ messages in thread
From: François Perrad @ 2012-09-21 18:53 UTC (permalink / raw)
  To: buildroot

2012/9/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Sat,  8 Sep 2012 14:28:45 +0200, Francois Perrad wrote:
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>  package/microperl/Config.in |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/package/microperl/Config.in b/package/microperl/Config.in
>> index 66bbedd..19d104a 100644
>> --- a/package/microperl/Config.in
>> +++ b/package/microperl/Config.in
>> @@ -2,6 +2,7 @@ config BR2_PACKAGE_MICROPERL
>>       bool "microperl"
>>       # needs fork()
>>       depends on BR2_USE_MMU
>> +     depends on BR2_DEPRECATED
>
> If microperl is deprecated, is it really useful to have patches 7, 8,
> 9, 10, 11 and 12 that are making improvements to it, and updating it to
> a more recent version?
>

Thomas,

I added this commit after your request in
http://patchwork.ozlabs.org/patch/180227/ (Aug. 27, 2012, 9:54 p.m.)

Fran?ois


> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-21 18:53     ` François Perrad
@ 2012-09-21 18:59       ` Thomas Petazzoni
  2012-09-23 15:11         ` François Perrad
  0 siblings, 1 reply; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-21 18:59 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Fri, 21 Sep 2012 20:53:08 +0200, Fran?ois Perrad wrote:

> I added this commit after your request in
> http://patchwork.ozlabs.org/patch/180227/ (Aug. 27, 2012, 9:54 p.m.)

Yes, I perfectly remember asking you to mark microperl as deprecated,
since you were saying that microperl was a dead-end. My question here
is different: knowing that microperl is deprecated, why would we bother
bumping its version, making fixes and so on? It doesn't look really
interesting to write patches against deprecated and even less
interesting to review such patches :-)

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 05/13] perl: add GDBM_File
  2012-09-21 18:36     ` François Perrad
@ 2012-09-21 19:01       ` Thomas Petazzoni
  2012-09-24  8:43       ` Arnout Vandecappelle
  1 sibling, 0 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-21 19:01 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Fri, 21 Sep 2012 20:36:45 +0200, Fran?ois Perrad wrote:

> The Configure script is not created by autotools, by a tool named 'metaconfig'.
> So, an option --enable-gdbm is not needed.
> The Configure script detects the include and the lib.
> The parameter libc defines a path with SYSROOT, so, there is not
> confusion with build machine.

Ok, thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 06/13] cpanminus: new package v3
  2012-09-21 18:25       ` François Perrad
@ 2012-09-21 19:02         ` Thomas Petazzoni
  0 siblings, 0 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-21 19:02 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Fri, 21 Sep 2012 20:25:14 +0200, Fran?ois Perrad wrote:

> Perl is useless without a CPAN client.
> The Perl packages are fine grained (compared to Python or Ruby ones),
> for example the web framework Dancer (without any plugins) requires 22
> dependencies (direct or indirect).
> Debian has more then thousand Perl packages; I don't want to do the same thing.
> 
> Most of CPAN packages haven't a license file; usually the
> documentation contains an information, like : "LICENSE - same as Perl
> itself".
> 
> The reproductibility of a project (with an identified version of each
> CPAN module) could be done with a local CPAN mirror.

Ok. I am not a big fan, but I don't care too much about Perl for
embedded systems, and you are the one interested in Perl support, so
let's bring in what you believe is the right solution.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [UNSURE]Re:  [PATCH 01/13] perl: new package v6
  2012-09-20 19:56 ` [Buildroot] [PATCH 01/13] perl: new package v6 Thomas Petazzoni
@ 2012-09-21 21:29   ` François Perrad
  2012-09-22  3:38     ` Thomas Petazzoni
  2012-09-24 20:20     ` [Buildroot] " Arnout Vandecappelle
  0 siblings, 2 replies; 34+ messages in thread
From: François Perrad @ 2012-09-21 21:29 UTC (permalink / raw)
  To: buildroot

2012/9/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> Thanks for your continued work on this. Some comments below.
>
> First, do not put the patch version in the patch title. If you want to
> have a version, it should be between the [] at the beginning of the
> title. Here is how you can do that with git:
>
> git format-patch --subject-prefix="PATCH v7" <yourbasebranch>
>
> On Sat,  8 Sep 2012 14:28:33 +0200, Francois Perrad wrote:
>> ---
>>  package/Config.in                      |    1 +
>>  package/perl/Config.in                 |   17 +++++
>>  package/perl/perl-configure-qemu.patch |   32 +++++++++
>>  package/perl/perl-make-ext.patch       |   24 +++++++
>>  package/perl/perl-mkppport.patch       |   37 ++++++++++
>>  package/perl/perl.mk                   |  121 ++++++++++++++++++++++++++++++++
>>  6 files changed, 232 insertions(+)
>>  create mode 100644 package/perl/Config.in
>>  create mode 100644 package/perl/perl-configure-qemu.patch
>>  create mode 100644 package/perl/perl-make-ext.patch
>>  create mode 100644 package/perl/perl-mkppport.patch
>>  create mode 100644 package/perl/perl.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index f308de7..00a79ab 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -262,6 +262,7 @@ source "package/wsapi/Config.in"
>>  source "package/xavante/Config.in"
>>  endmenu
>>  endif
>> +source "package/perl/Config.in"
>>  source "package/microperl/Config.in"
>>  source "package/php/Config.in"
>>  source "package/python/Config.in"
>> diff --git a/package/perl/Config.in b/package/perl/Config.in
>> new file mode 100644
>> index 0000000..286b09e
>> --- /dev/null
>> +++ b/package/perl/Config.in
>> @@ -0,0 +1,17 @@
>> +config BR2_PACKAGE_PERL
>> +     bool "perl"
>> +     help
>> +       Larry Wall's Practical Extraction and Report Language
>> +       An interpreted scripting language, known among some as "Unix's Swiss
>> +       Army Chainsaw".
>> +
>> +       http://www.perl.org/
>> +
>> +if BR2_PACKAGE_PERL
>> +
>> +config BR2_PACKAGE_PERL_CUSTOM_CONFIGURE
>> +     string "configuration flags"
>> +     help
>> +       Allows to add some flags to Configure.
>
> We don't typically offer such choice for packages. Is there a good
> reason for doing so in the case of Perl, rather than providing a few
> additional kconfig configuration options if needed?
>
>> +endif
>> diff --git a/package/perl/perl-configure-qemu.patch b/package/perl/perl-configure-qemu.patch
>> new file mode 100644
>> index 0000000..00f7539
>> --- /dev/null
>> +++ b/package/perl/perl-configure-qemu.patch
>> @@ -0,0 +1,32 @@
>> +Add qemu support
>> +
>
> Please explain in more details what this means, and whether this patch
> has a chance of being upstream or not.
>
> Also, it seems to imply that the build process of Perl would require
> Qemu. Or, Qemu is not amongst the requirements of Buildroot, and there
> is no host-qemu package in the dependencies of your package (and we
> don't have a host-qemu package). Yann E. Morin has posted a target
> package for qemu a while ago, but it hasn't been merged so far.
>
> That said, even so it is certainly possible to create a host-qemu
> package, I am a bit annoyed to see the build process of a package
> requiring qemu. Is there really no other way? I guess it uses qemu to
> run a bunch of tests on the target system. Is there no way to provide
> pre-defined values for those tests, on a per-architecture basis, rather
> than running those test applications in Qemu?
>

Qemu is not used for test, but for the configure and build step.
Perl is 'bootstrapped' by miniperl (a perl without any extension module),
during the build process, miniperl is running via qemu (user mode).

Perl doesn't use the "standard" autotools, Perl has a limited support
for cross-compiling
where the target executables are running on a real target through a
ssh connection.
The use of qemu (user mode) removes the need of a real target and the
ssh connection.

BR is shipped with 12 configs/qemu_*_defconfig files,
many users have already run 'apt-get install qemu-kvm qemu-kvm-extras'.

A host-qemu package (with the latest version) could be nice in the future.


>> diff --git a/package/perl/perl-make-ext.patch b/package/perl/perl-make-ext.patch
>> new file mode 100644
>> index 0000000..e0195e7
>> --- /dev/null
>> +++ b/package/perl/perl-make-ext.patch
>> @@ -0,0 +1,24 @@
>> +Don't use RUN with make (only for perl)
>> +
>> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>
> Sorry, but the patch description is insufficient to understand what is
> going on here.
>
>> +
>> +Index: b/make_ext.pl
>> +===================================================================
>> +--- a/make_ext.pl
>> ++++ b/make_ext.pl
>> +@@ -458,11 +458,13 @@
>> +     # Give makefile an opportunity to rewrite itself.
>> +     # reassure users that life goes on...
>> +     my @args = ('config', @$pass_through);
>> +-    system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
>> ++#   system(@run, @make, @args) and print "@run @make @args failed, continuing anyway...\n";
>> ++    system(@make, @args) and print "@make @args failed, continuing anyway...\n";
>> +     }
>> +     my @targ = ($target, @$pass_through);
>> +     print "Making $target in $ext_dir\n at run @make @targ\n";
>> +-    my $code = system(@run, @make, @targ);
>> ++#    my $code = system(@run, @make, @targ);
>> ++    my $code = system(@make, @targ);
>> +     die "Unsuccessful make($ext_dir): code=$code" if $code != 0;
>> +
>> +     chdir $return_dir || die "Cannot cd to $return_dir: $!";
>> diff --git a/package/perl/perl-mkppport.patch b/package/perl/perl-mkppport.patch
>> new file mode 100644
>> index 0000000..97f27a2
>> --- /dev/null
>> +++ b/package/perl/perl-mkppport.patch
>> @@ -0,0 +1,37 @@
>> +Add RUN
>> +
>> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>
> Ditto.
>
>> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
>> new file mode 100644
>> index 0000000..2a8da79
>> --- /dev/null
>> +++ b/package/perl/perl.mk
>> @@ -0,0 +1,121 @@
>> +#############################################################
>> +#
>> +# perl
>> +#
>> +#############################################################
>> +
>> +PERL_VERSION_MAJOR = 16
>> +PERL_VERSION = 5.$(PERL_VERSION_MAJOR).1
>> +PERL_SITE = http://www.cpan.org/src/5.0
>> +PERL_SOURCE = perl-$(PERL_VERSION).tar.bz2
>> +PERL_LICENSE = Artistic
>> +PERL_LICENSE_FILES = Artistic
>> +PERL_INSTALL_STAGING = YES
>> +
>> +ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
>> +    PERL_USE_DEVEL=-Dusedevel
>> +endif
>> +
>> +ifneq ($(BR2_LARGEFILE),y)
>> +    PERL_NO_LARGEFILE=-Uuselargefiles
>> +endif
>> +
>> +PERL_ARCH=$(call qstrip,$(BR2_ARCH))
>
> You can use ARCH directly, it is already qstripped.

ok.

>
>> +ifeq ($(PERL_ARCH),i686)
>> +    PERL_ARCH=i386
>> +endif
>> +PERL_QEMU_USER_MODE=qemu-$(PERL_ARCH)
>> +
>> +define PERL_CONFIGURE_CMDS
>> +     rm -f $(@D)/config.sh
>> +     cd $(@D); ./Configure -des \
>
> We generally like to put such commands into parenthesis, i.e:
>
>         (cd $(@D); .... \
>                 .....   \
>                 .....)
>

ok.

>> +             -Dusecrosscompile \
>> +             -Dtargetrun=$(PERL_QEMU_USER_MODE) \
>> +             -Dqemulib=$(STAGING_DIR) \
>> +             -Dtargethost=dummy \
>> +             -Dar="$(TARGET_AR)" \
>> +             -Dcc="$(TARGET_CC)" \
>> +             -Dcpp="$(TARGET_CC)" \
>> +             -Dld="$(TARGET_LD)" \
>> +             -Dnm="$(TARGET_NM)" \
>> +             -Dranlib="$(TARGET_RANLIB)" \
>> +             -Dccflags="$(TARGET_CFLAGS)" \
>> +             -Dldflags="$(TARGET_LDFLAGS) -l gcc_s" \
>> +             -Dlddlflags="-shared" \
>> +             -Dlibc=$(TARGET_HOST)/usr/$(GNU_TARGET_NAME)/sysroot/lib/libc.so \
>> +             -Duseshrplib \
>> +             -Dprefix=/usr \
>> +             -Uoptimize \
>> +             $(PERL_USE_DEVEL) \
>> +             $(PERL_NO_LARGEFILE) \
>> +             $(call qstrip,$(BR2_PACKAGE_PERL_CUSTOM_CONFIGURE))
>> +     echo "# patched values"                 >>$(@D)/config.sh
>> +     $(SED) '/^myarchname=/d' \
>> +             -e '/^mydomain=/d' \
>> +             -e '/^myhostname=/d' \
>> +             -e '/^myuname=/d' \
>> +             -e '/^osname=/d' \
>> +             -e '/^osvers=/d' \
>> +             -e '/^perladmin=/d' \
>> +             $(@D)/config.sh
>> +     echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
>> +     echo "mydomain=''"                                      >>$(@D)/config.sh
>> +     echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
>> +     echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
>> +     echo "osname='linux'"                                   >>$(@D)/config.sh
>> +     echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
>> +     echo "perladmin='root'"                                 >>$(@D)/config.sh
>> +     cd $(@D); ./Configure -S
>> +     cp $(@D)/config.h $(@D)/xconfig.h
>> +     $(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
>> +endef
>> +
>> +define PERL_BUILD_CMDS
>> +     echo "#!/bin/sh"                                                        > $(@D)/Cross/miniperl
>> +     echo "$(PERL_QEMU_USER_MODE) -L $(STAGING_DIR) $(@D)/miniperl \"\$$@\"" >>$(@D)/Cross/miniperl
>> +     chmod +x $(@D)/Cross/miniperl
>> +     PERL_MM_OPT="PERL=$(@D)/Cross/miniperl" \
>> +     $(MAKE) -C $(@D) all
>> +endef
>> +
>> +define PERL_INSTALL_STAGING_CMDS
>> +     $(MAKE) INSTALL_DEPENDENCE= \
>
> Is it really INSTALL_DEPENDENCE ?

yes.
Makefile contains these 2 lines :
    # Set this to an empty string to avoid an attempt of rebuild before install
    INSTALL_DEPENDENCE = all

>
>> +             INSTALLFLAGS= \
>> +             DESTDIR="$(STAGING_DIR)" \
>> +             -C $(@D) install.perl
>> +     $(INSTALL) -m 755 $(@D)/libperl.so $(STAGING_DIR)/usr/lib/libperl.so
>
> Maybe just a comment above on why the manual installation of this .so
> file is needed.
>

In fact useless, so removed.

>> +endef
>> +
>> +define PERL_INSTALL_TARGET_CMDS
>> +     $(MAKE) INSTALL_DEPENDENCE= \
>> +             INSTALLFLAGS=-p \
>> +             DESTDIR="$(TARGET_DIR)" \
>> +             -C $(@D) install.perl
>> +endef
>> +
>> +define PERL_CLEAN_CMDS
>> +     -$(MAKE) -C $(@D) clean
>> +endef
>> +
>> +define HOST_PERL_CONFIGURE_CMDS
>> +     cd $(@D); ./Configure -des \
>> +             -Dcc="$(HOSTCC)" \
>> +             -Dprefix="$(HOST_DIR)/usr" \
>> +             $(PERL_USE_DEVEL)
>> +endef
>> +
>> +define HOST_PERL_BUILD_CMDS
>> +     $(MAKE) -C $(@D) all
>> +endef
>> +
>> +define HOST_PERL_INSTALL_CMDS
>> +     $(MAKE) INSTALL_DEPENDENCE= \
>> +             -C $(@D) install
>> +endef
>> +
>> +define HOST_PERL_CLEAN_CMDS
>> +     -$(MAKE) -C $(@D) clean
>> +endef
>> +
>> +$(eval $(generic-package))
>> +$(eval $(host-generic-package))
>
> The host variant of perl seems to be here only as a build dependency of
> microperl, which your patch set is deprecating. Is it really necessary
> to have this host variant?
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [UNSURE]Re:  [PATCH 01/13] perl: new package v6
  2012-09-21 21:29   ` [Buildroot] [UNSURE]Re: " François Perrad
@ 2012-09-22  3:38     ` Thomas Petazzoni
  2012-09-24 20:20     ` [Buildroot] " Arnout Vandecappelle
  1 sibling, 0 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-22  3:38 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Fri, 21 Sep 2012 23:29:57 +0200, Fran?ois Perrad wrote:

> > Please explain in more details what this means, and whether this
> > patch has a chance of being upstream or not.
> >
> > Also, it seems to imply that the build process of Perl would require
> > Qemu. Or, Qemu is not amongst the requirements of Buildroot, and
> > there is no host-qemu package in the dependencies of your package
> > (and we don't have a host-qemu package). Yann E. Morin has posted a
> > target package for qemu a while ago, but it hasn't been merged so
> > far.
> >
> > That said, even so it is certainly possible to create a host-qemu
> > package, I am a bit annoyed to see the build process of a package
> > requiring qemu. Is there really no other way? I guess it uses qemu
> > to run a bunch of tests on the target system. Is there no way to
> > provide pre-defined values for those tests, on a per-architecture
> > basis, rather than running those test applications in Qemu?
> >
> 
> Qemu is not used for test, but for the configure and build step.
> Perl is 'bootstrapped' by miniperl (a perl without any extension
> module), during the build process, miniperl is running via qemu (user
> mode).
> 
> Perl doesn't use the "standard" autotools, Perl has a limited support
> for cross-compiling
> where the target executables are running on a real target through a
> ssh connection.
> The use of qemu (user mode) removes the need of a real target and the
> ssh connection.
> 
> BR is shipped with 12 configs/qemu_*_defconfig files,
> many users have already run 'apt-get install qemu-kvm
> qemu-kvm-extras'.
> 
> A host-qemu package (with the latest version) could be nice in the
> future.

I understand the need for Qemu in the Perl context (even though I
generally don't understand why they can't bring normal
cross-compilation support in the Perl build system), but the solution
you're proposing cannot be accepted as is. We need to either:

 * Make qemu a hard requirement to run Buildroot, and in that case, add
   a check for it in support/dependencies/dependencies.sh. Since it is
   such an unusual dependency, we may special case it, and add it as a
   dependency only if the Perl package is selected, a bit like we
   already do for the version control tools (that are only requested as
   dependencies if at least one package needing a given version control
   tool is selected)

 * Add a host-qemu package. We can quite certainly find a commonality
   here with Yann's work on Qemu.

At the moment, your package will break on auto-builders, because they
don't necessarily have Qemu installed.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-21 18:59       ` Thomas Petazzoni
@ 2012-09-23 15:11         ` François Perrad
  2012-09-23 15:25           ` Thomas Petazzoni
  0 siblings, 1 reply; 34+ messages in thread
From: François Perrad @ 2012-09-23 15:11 UTC (permalink / raw)
  To: buildroot

2012/9/21 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Fran?ois Perrad,
>
> On Fri, 21 Sep 2012 20:53:08 +0200, Fran?ois Perrad wrote:
>
>> I added this commit after your request in
>> http://patchwork.ozlabs.org/patch/180227/ (Aug. 27, 2012, 9:54 p.m.)
>
> Yes, I perfectly remember asking you to mark microperl as deprecated,
> since you were saying that microperl was a dead-end. My question here
> is different: knowing that microperl is deprecated, why would we bother
> bumping its version, making fixes and so on? It doesn't look really
> interesting to write patches against deprecated and even less
> interesting to review such patches :-)
>

Today, 5 packages depend on microperl :
    autoconf
    automake
    ntp
    samba
    libxml-parser-perl (requires only a full host perl)
So, I think that it is not a good idea to remove it (after a deprecation).

Fran?ois

> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

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

* [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED
  2012-09-23 15:11         ` François Perrad
@ 2012-09-23 15:25           ` Thomas Petazzoni
  0 siblings, 0 replies; 34+ messages in thread
From: Thomas Petazzoni @ 2012-09-23 15:25 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Sun, 23 Sep 2012 17:11:56 +0200, Fran?ois Perrad wrote:

> > Yes, I perfectly remember asking you to mark microperl as
> > deprecated, since you were saying that microperl was a dead-end. My
> > question here is different: knowing that microperl is deprecated,
> > why would we bother bumping its version, making fixes and so on? It
> > doesn't look really interesting to write patches against deprecated
> > and even less interesting to review such patches :-)
> >
> 
> Today, 5 packages depend on microperl :
>     autoconf
>     automake
>     ntp
>     samba
>     libxml-parser-perl (requires only a full host perl)
> So, I think that it is not a good idea to remove it (after a
> deprecation).

Ehh, can't those packages be changed to depend on perl or miniperl
instead of microperl?

I think you still don't get the point I'm making: you have said
yourself that microperl is a dead end, because it is no longer
maintained upstream. Therefore we mark it deprecated, with the idea of
removing it during the next release cycle. For this reason, I don't
think it's worth spending time making more fixes, upgrades and so on on
microperl (which half of your patch series is doing). Is my point
clearer?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 05/13] perl: add GDBM_File
  2012-09-21 18:36     ` François Perrad
  2012-09-21 19:01       ` Thomas Petazzoni
@ 2012-09-24  8:43       ` Arnout Vandecappelle
  1 sibling, 0 replies; 34+ messages in thread
From: Arnout Vandecappelle @ 2012-09-24  8:43 UTC (permalink / raw)
  To: buildroot

On 09/21/12 20:36, Fran?ois Perrad wrote:
> 2012/9/20 Thomas Petazzoni<thomas.petazzoni@free-electrons.com>:
>> On Sat,  8 Sep 2012 14:28:37 +0200, Francois Perrad wrote:
>>> +    PERL_DEPENDENCIES += gdbm
>>> +endif
>>>   HOST_PERL_DEPENDENCIES =
>>
>> There is no configuration option or argument to pass to Perl to tell it
>> to use Gdbm (or Berkeley DB)? I am a bit worried that if GDBM is
>> available on the build machine (for the build machine architecture),
>> the Perl build system might get confused and think that GDBM or
>> Berkeley DB are available, while they are not available for the target.
>> I.e, for autotools packages, we typically have:
>>
>> ifeq ($(BR2_PACKAGE_FOO_FEATURE_A),y)
>> FOO_DEPENDENCIES += liba
>> FOO_CONF_OPT += --enable-feature-a
>> else
>> FOO_CONT_OPT += --disable-feature-a
>> endif
>>
>> Isn't a similar construct necessary here?
>>
>
> The Configure script is not created by autotools, by a tool named 'metaconfig'.
> So, an option --enable-gdbm is not needed.
> The Configure script detects the include and the lib.
> The parameter libc defines a path with SYSROOT, so, there is not
> confusion with build machine.

  Another reason to explicitly enable/disable options is to be more robust
against dependency problems.  E.g. if --enable-feature-a is specified but
the configure script can't find feature a, then it will (hopefully) error out
and we can detect this in the autobuilders.  So if metaconf allows to
explicitly enable/disable features, we would prefer to use that.

  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 01/13] perl: new package v6
  2012-09-21 21:29   ` [Buildroot] [UNSURE]Re: " François Perrad
  2012-09-22  3:38     ` Thomas Petazzoni
@ 2012-09-24 20:20     ` Arnout Vandecappelle
  2012-09-25 17:17       ` [Buildroot] [UNSURE]Re: " François Perrad
  1 sibling, 1 reply; 34+ messages in thread
From: Arnout Vandecappelle @ 2012-09-24 20:20 UTC (permalink / raw)
  To: buildroot

On 09/21/12 23:29, Fran?ois Perrad wrote:
>> >  That said, even so it is certainly possible to create a host-qemu
>> >  package, I am a bit annoyed to see the build process of a package
>> >  requiring qemu. Is there really no other way? I guess it uses qemu to
>> >  run a bunch of tests on the target system. Is there no way to provide
>> >  pre-defined values for those tests, on a per-architecture basis, rather
>> >  than running those test applications in Qemu?
>> >
> Qemu is not used for test, but for the configure and build step.
> Perl is 'bootstrapped' by miniperl (a perl without any extension module),
> during the build process, miniperl is running via qemu (user mode).
>
> Perl doesn't use the "standard" autotools, Perl has a limited support
> for cross-compiling
> where the target executables are running on a real target through a
> ssh connection.
> The use of qemu (user mode) removes the need of a real target and the
> ssh connection.

  Probably a stupid question, but is it possible to build a host-miniperl
and use that for the perl build?  If necessary, we could patch the
host-miniperl a bit to point into the sysroot'ed perl directories, like
is done with host-pkg-config.  Or is the issue that the perl build generates
files with native endianness and struct layout?  That would be more or less
impossible to work around without qemu...


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [UNSURE]Re: [PATCH 01/13] perl: new package v6
  2012-09-24 20:20     ` [Buildroot] " Arnout Vandecappelle
@ 2012-09-25 17:17       ` François Perrad
  0 siblings, 0 replies; 34+ messages in thread
From: François Perrad @ 2012-09-25 17:17 UTC (permalink / raw)
  To: buildroot

2012/9/24 Arnout Vandecappelle <arnout@mind.be>:
> On 09/21/12 23:29, Fran?ois Perrad wrote:
>>>
>>> >  That said, even so it is certainly possible to create a host-qemu
>>> >  package, I am a bit annoyed to see the build process of a package
>>> >  requiring qemu. Is there really no other way? I guess it uses qemu to
>>> >  run a bunch of tests on the target system. Is there no way to provide
>>> >  pre-defined values for those tests, on a per-architecture basis,
>>> > rather
>>> >  than running those test applications in Qemu?
>>> >
>>
>> Qemu is not used for test, but for the configure and build step.
>> Perl is 'bootstrapped' by miniperl (a perl without any extension module),
>> during the build process, miniperl is running via qemu (user mode).
>>
>> Perl doesn't use the "standard" autotools, Perl has a limited support
>> for cross-compiling
>> where the target executables are running on a real target through a
>> ssh connection.
>> The use of qemu (user mode) removes the need of a real target and the
>> ssh connection.
>
>
>  Probably a stupid question, but is it possible to build a host-miniperl
> and use that for the perl build?  If necessary, we could patch the
> host-miniperl a bit to point into the sysroot'ed perl directories, like
> is done with host-pkg-config.  Or is the issue that the perl build generates
> files with native endianness and struct layout?  That would be more or less
> impossible to work around without qemu...
>

I've already explored this path.
A host-miniperl could be used during the build of target-perl, instead
of target-miniperl via qemu.

But qemu is also used during the configure step.
Without qemu, a target configuration could be obtained by a large
patching a host configuration.
So, most of the logic of configure must be rewrited/duplicated in perl.mk.

Fran?ois

>
>  Regards,
>  Arnout
>
> --
> Arnout Vandecappelle                               arnout at mind be
> Senior Embedded Software Architect                 +32-16-286540
> Essensium/Mind                                     http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

end of thread, other threads:[~2012-09-25 17:17 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-08 12:28 [Buildroot] [PATCH 01/13] perl: new package v6 Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 02/13] perl: add an option for miniperl Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 03/13] perl: add DB_File Francois Perrad
2012-09-20 19:57   ` Thomas Petazzoni
2012-09-21 18:26     ` François Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 04/13] gdbm: new package Francois Perrad
2012-09-12  5:30   ` Arnout Vandecappelle
2012-09-08 12:28 ` [Buildroot] [PATCH 05/13] perl: add GDBM_File Francois Perrad
2012-09-20 19:59   ` Thomas Petazzoni
2012-09-21 18:36     ` François Perrad
2012-09-21 19:01       ` Thomas Petazzoni
2012-09-24  8:43       ` Arnout Vandecappelle
2012-09-08 12:28 ` [Buildroot] [PATCH 06/13] cpanminus: new package v3 Francois Perrad
2012-09-20 20:04   ` Thomas Petazzoni
2012-09-20 21:35     ` Arnout Vandecappelle
2012-09-21 18:25       ` François Perrad
2012-09-21 19:02         ` Thomas Petazzoni
2012-09-08 12:28 ` [Buildroot] [PATCH 07/13] microperl: build extensions at build time Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 08/13] microperl: bump version to 5.14.2 Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 09/13] microperl: improve configure step on 64bits platform Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 10/13] microperl: install more modules by default Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 11/13] microperl: bump version to 5.16.1 Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 12/13] microperl: remove host-microperl Francois Perrad
2012-09-08 12:28 ` [Buildroot] [PATCH 13/13] microperl: mark as DEPRECATED Francois Perrad
2012-09-20 20:22   ` Thomas Petazzoni
2012-09-21 18:53     ` François Perrad
2012-09-21 18:59       ` Thomas Petazzoni
2012-09-23 15:11         ` François Perrad
2012-09-23 15:25           ` Thomas Petazzoni
2012-09-20 19:56 ` [Buildroot] [PATCH 01/13] perl: new package v6 Thomas Petazzoni
2012-09-21 21:29   ` [Buildroot] [UNSURE]Re: " François Perrad
2012-09-22  3:38     ` Thomas Petazzoni
2012-09-24 20:20     ` [Buildroot] " Arnout Vandecappelle
2012-09-25 17:17       ` [Buildroot] [UNSURE]Re: " François Perrad

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