* [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules
@ 2013-11-20 17:01 Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 01/12] perl: new infrastructure Francois Perrad
` (11 more replies)
0 siblings, 12 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
This patch set contains 3 parts :
1) the Perl/CPAN infrastructure
2) some cleanup : cpanminus, ...
3) few new packages using this infrastructure
Note: Perl/CPAN packages could be generated by a script (see 2/12 & 8/12)
Francois Perrad (12):
perl: new infrastructure
cpan: a home for Perl modules
cpanminus: remove it
perl: remove useless patch
qemu: add a Config.in.host
libxml-parser-perl: move and refactor with perl infrastructure
host-libmodule-build-perl: new package
manual: adding packages perl
libcurses-perl: new package
libnet-ssleay-perl: new package
libmoose-perl: new package
libxml-libxml-perl: new package
Config.in | 7 +
docs/manual/adding-packages-perl.txt | 91 +++
docs/manual/adding-packages.txt | 2 +
package/Config.in | 3 +-
package/Config.in.host | 1 +
package/Makefile.in | 9 +-
package/cpan/Config.in | 5 +
package/cpan/cpan.mk | 1 +
package/cpan/libcurses-perl/Config.in | 6 +
package/cpan/libcurses-perl/libcurses-perl.mk | 15 +
package/cpan/libmodule-build-perl/Config.in | 6 +
.../libmodule-build-perl/libmodule-build-perl.mk | 16 +
package/cpan/libmoose-perl/libmoose-perl.mk | 18 +
package/cpan/libnet-ssleay-perl/Config.in | 6 +
.../cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk | 16 +
package/cpan/libxml-libxml-perl/Config.in | 9 +
.../cpan/libxml-libxml-perl/libxml-libxml-perl.mk | 22 +
package/cpan/libxml-parser-perl/Config.in | 9 +
.../cpan/libxml-parser-perl/libxml-parser-perl.mk | 19 +
package/cpanminus/Config.in | 40 --
package/cpanminus/cpanminus.mk | 47 --
package/intltool/intltool.mk | 4 +-
package/libxml-parser-perl/Config.in | 11 -
package/libxml-parser-perl/libxml-parser-perl.mk | 35 --
package/metacity/metacity.mk | 3 +
package/perl/perl-fix-Module-Build.patch | 16 -
package/pkg-perl.mk | 220 +++++++
package/qemu/Config.in.host | 10 +
scancpan | 632 ++++++++++++++++++++
29 files changed, 1120 insertions(+), 159 deletions(-)
create mode 100644 docs/manual/adding-packages-perl.txt
create mode 100644 package/cpan/Config.in
create mode 100644 package/cpan/cpan.mk
create mode 100644 package/cpan/libcurses-perl/Config.in
create mode 100644 package/cpan/libcurses-perl/libcurses-perl.mk
create mode 100644 package/cpan/libmodule-build-perl/Config.in
create mode 100644 package/cpan/libmodule-build-perl/libmodule-build-perl.mk
create mode 100644 package/cpan/libmoose-perl/libmoose-perl.mk
create mode 100644 package/cpan/libnet-ssleay-perl/Config.in
create mode 100644 package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk
create mode 100644 package/cpan/libxml-libxml-perl/Config.in
create mode 100644 package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk
create mode 100644 package/cpan/libxml-parser-perl/Config.in
create mode 100644 package/cpan/libxml-parser-perl/libxml-parser-perl.mk
delete mode 100644 package/cpanminus/Config.in
delete mode 100644 package/cpanminus/cpanminus.mk
delete mode 100644 package/libxml-parser-perl/Config.in
delete mode 100644 package/libxml-parser-perl/libxml-parser-perl.mk
delete mode 100644 package/perl/perl-fix-Module-Build.patch
create mode 100644 package/pkg-perl.mk
create mode 100644 package/qemu/Config.in.host
create mode 100755 scancpan
--
1.7.9.5
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 01/12] perl: new infrastructure
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules Francois Perrad
` (10 subsequent siblings)
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/Makefile.in | 1 +
package/pkg-perl.mk | 220 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 221 insertions(+)
create mode 100644 package/pkg-perl.mk
diff --git a/package/Makefile.in b/package/Makefile.in
index 612f3c7..cd0437c 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -363,4 +363,5 @@ include package/pkg-utils.mk
include package/pkg-download.mk
include package/pkg-autotools.mk
include package/pkg-cmake.mk
+include package/pkg-perl.mk
include package/pkg-generic.mk
diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
new file mode 100644
index 0000000..893501c
--- /dev/null
+++ b/package/pkg-perl.mk
@@ -0,0 +1,220 @@
+################################################################################
+# Perl package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files for Perl packages.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this perl infrastructure requires
+# the .mk file to only specify metadata informations about the
+# package: name, version, download URL, etc.
+#
+# We still allow the package .mk file to override what the different
+# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
+# already defined, it is used as the list of commands to perform to
+# build the package, instead of the default perl behaviour. The
+# package can also define some post operation hooks.
+#
+################################################################################
+
+_PERL_ARCHNAME = $(ARCH)-linux
+
+_HOST_PERL_ARCHNAME = $(shell perl -MConfig -e "print Config->{archname}")
+_HOST_PERL_INSTALL_BASE = $$(HOST_DIR)/usr
+_HOST_PERL5LIB = $(_HOST_PERL_INSTALL_BASE)/lib/perl5/$(_HOST_PERL_ARCHNAME):$(_HOST_PERL_INSTALL_BASE)/lib/perl5
+
+################################################################################
+# inner-perl-package -- defines how the configuration, compilation and
+# installation of an autotools package should be done, implements a
+# few hooks to tune the build process for autotools specifities and
+# calls the generic package infrastructure to generate the necessary
+# make targets
+#
+# argument 1 is the lowercase package name
+# argument 2 is the uppercase package name, including an HOST_ prefix
+# for host packages
+# argument 3 is the uppercase package name, without the HOST_ prefix
+# for host packages
+# argument 4 is the package directory prefix
+# argument 5 is the type (target or host)
+################################################################################
+
+define inner-perl-package
+
+$(2)_CONF_OPT ?=
+$(2)_BUILD_OPT ?=
+$(2)_INSTALL_OPT ?=
+$(2)_INSTALL_TARGET_OPT ?=
+$(2)_CLEAN_OPT ?=
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file. And take care of the differences between host and target
+# packages.
+#
+ifndef $(2)_CONFIGURE_CMDS
+ifeq ($(5),target)
+
+# Configure package for target
+define $(2)_CONFIGURE_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build.PL \
+ --config ar="$(TARGET_AR)" \
+ --config full_ar="$(TARGET_AR)" \
+ --config cc="$(TARGET_CC)" \
+ --config ccflags="$(TARGET_CFLAGS)" \
+ --config ld="$(TARGET_CC)" \
+ --config lddlflags="-shared $(TARGET_LDFLAGS)" \
+ --config ldflags="$(TARGET_LDFLAGS)" \
+ --include_dirs $$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(_PERL_ARCHNAME)/CORE \
+ --destdir $$(TARGET_DIR) \
+ --installdirs vendor \
+ --install_path lib=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \
+ --install_path arch=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$(_PERL_ARCHNAME) \
+ --install_path bin=/usr/bin \
+ --install_path script=/usr/bin \
+ --install_path bindoc=/usr/share/man/man1 \
+ --install_path libdoc=/usr/share/man/man3 \
+ $$($(2)_CONF_OPT); \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ PERL_AUTOINSTALL=--skipdeps \
+ perl Makefile.PL \
+ AR="$(TARGET_AR)" \
+ FULL_AR="$(TARGET_AR)" \
+ CC="$(TARGET_CC)" \
+ CCFLAGS="$(TARGET_CFLAGS)" \
+ LD="$(TARGET_CC)" \
+ LDDLFLAGS="-shared $(TARGET_LDFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ DESTDIR=$$(TARGET_DIR) \
+ INSTALLDIRS=vendor \
+ INSTALLVENDORLIB=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \
+ INSTALLVENDORARCH=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$(_PERL_ARCHNAME) \
+ INSTALLVENDORBIN=/usr/bin \
+ INSTALLVENDORSCRIPT=/usr/bin \
+ INSTALLVENDORMAN1DIR=/usr/share/man/man1 \
+ INSTALLVENDORMAN3DIR=/usr/share/man/man3 \
+ $$($(2)_CONF_OPT); \
+ fi
+endef
+else
+
+# Configure package for host
+define $(2)_CONFIGURE_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build.PL \
+ --install_base $(_HOST_PERL_INSTALL_BASE) \
+ --installdirs vendor \
+ $$($(2)_CONF_OPT); \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ PERL_AUTOINSTALL=--skipdeps \
+ perl Makefile.PL \
+ INSTALL_BASE=$(_HOST_PERL_INSTALL_BASE) \
+ INSTALLDIRS=vendor \
+ $$($(2)_CONF_OPT); \
+ fi
+endef
+endif
+endif
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file. And take care of the differences between host and target
+# packages.
+#
+ifndef $(2)_BUILD_CMDS
+ifeq ($(5),target)
+
+# Build package for target
+define $(2)_BUILD_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build $$($(2)_BUILD_OPT) build; \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ $(MAKE1) \
+ PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(_PERL_ARCHNAME)/CORE \
+ $$($(2)_BUILD_OPT) pure_all; \
+ fi
+endef
+else
+
+# Build package for host
+define $(2)_BUILD_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build $$($(2)_BUILD_OPT) build; \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ $(MAKE1) $$($(2)_BUILD_OPT) pure_all; \
+ fi
+endef
+endif
+endif
+
+#
+# Host installation step. Only define it if not already defined by the
+# package .mk file.
+#
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build $$($(2)_INSTALL_TARGET_OPT) install; \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ $(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \
+ fi
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build $$($(2)_INSTALL_TARGET_OPT) install; \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ $(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \
+ fi
+endef
+endif
+
+#
+# Clean step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_CLEAN_CMDS
+define $(2)_CLEAN_CMDS
+ cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ perl Build $$($(2)_CLEAN_OPT) clean; \
+ else \
+ PERL5LIB=$(_HOST_PERL5LIB) \
+ $(MAKE1) $$($(2)_CLEAN_OPT) clean; \
+ fi
+endef
+endif
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4),$(5))
+
+endef
+
+################################################################################
+# perl-package -- the target generator macro for Perl packages
+################################################################################
+
+perl-package = $(call inner-perl-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
+host-perl-package = $(call inner-perl-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 01/12] perl: new infrastructure Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:23 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 03/12] cpanminus: remove it Francois Perrad
` (9 subsequent siblings)
11 siblings, 1 reply; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Config.in | 7 +
package/Config.in | 1 +
package/cpan/cpan.mk | 1 +
scancpan | 629 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 638 insertions(+)
create mode 100644 package/cpan/Config.in
create mode 100644 package/cpan/cpan.mk
create mode 100755 scancpan
diff --git a/Config.in b/Config.in
index d87e0f0..1b4bf99 100644
--- a/Config.in
+++ b/Config.in
@@ -207,6 +207,13 @@ config BR2_DEBIAN_MIRROR
endif
+config BR2_CPAN_MIRROR
+ string "CPAN mirror"
+ default "http://search.cpan.org/CPAN"
+ help
+ CPAN has multiple software mirrors scattered around the world.
+ The following allows you to select your preferred mirror.
+
endmenu
config BR2_JLEVEL
diff --git a/package/Config.in b/package/Config.in
index 311cc6c..3f7bb3e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -382,6 +382,7 @@ source "package/perl/Config.in"
if BR2_PACKAGE_PERL
menu "Perl libraries/modules"
source "package/cpanminus/Config.in"
+source "package/cpan/Config.in"
endmenu
endif
source "package/php/Config.in"
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
new file mode 100644
index 0000000..e69de29
diff --git a/package/cpan/cpan.mk b/package/cpan/cpan.mk
new file mode 100644
index 0000000..764a156
--- /dev/null
+++ b/package/cpan/cpan.mk
@@ -0,0 +1 @@
+include package/cpan/*/*.mk
diff --git a/scancpan b/scancpan
new file mode 100755
index 0000000..d8a68d6
--- /dev/null
+++ b/scancpan
@@ -0,0 +1,629 @@
+#!/usr/bin/env perl
+
+# This chunk of stuff was generated by App::FatPacker. To find the original
+# file's code, look for the end of this BEGIN block or the string 'FATPACK'
+BEGIN {
+my %fatpacked;
+
+$fatpacked{"MetaCPAN/API/Tiny.pm"} = <<'METACPAN_API_TINY';
+ package MetaCPAN::API::Tiny;
+ {
+ $MetaCPAN::API::Tiny::VERSION = '1.131730';
+ }
+ use strict;
+ use warnings;
+ # ABSTRACT: A Tiny API client for MetaCPAN
+
+ use Carp;
+ use JSON::PP 'encode_json', 'decode_json';
+ use HTTP::Tiny;
+
+
+ sub new {
+ my ($class, @args) = @_;
+
+ $#_ % 2 == 0
+ or croak 'Arguments must be provided as name/value pairs';
+
+ my %params = @args;
+
+ die 'ua_args must be an array reference'
+ if $params{ua_args} && ref($params{ua_args}) ne 'ARRAY';
+
+ my $self = +{
+ base_url => $params{base_url} || 'http://api.metacpan.org/v0',
+ ua => $params{ua} || HTTP::Tiny->new(
+ $params{ua_args}
+ ? @{$params{ua_args}}
+ : (agent => 'MetaCPAN::API::Tiny/'
+ . ($MetaCPAN::API::VERSION || 'xx'))),
+ };
+
+ return bless($self, $class);
+ }
+
+ sub _build_extra_params {
+ my $self = shift;
+
+ @_ % 2 == 0
+ or croak 'Incorrect number of params, must be key/value';
+
+ my %extra = @_;
+ my $ua = $self->{ua};
+
+ foreach my $key (keys %extra)
+ {
+ # The implementation in HTTP::Tiny uses + instead of %20, fix that
+ $extra{$key} = $ua->_uri_escape($extra{$key});
+ $extra{$key} =~ s/\+/%20/g;
+ }
+
+ my $params = join '&', map { "$_=" . $extra{$_} } sort keys %extra;
+
+ return $params;
+ }
+
+
+ # /source/{author}/{release}/{path}
+ sub source {
+ my $self = shift;
+ my %opts = @_ ? @_ : ();
+ my $url = '';
+ my $error = "Provide 'author' and 'release' and 'path'";
+
+ %opts or croak $error;
+
+ if (
+ defined ( my $author = $opts{'author'} ) &&
+ defined ( my $release = $opts{'release'} ) &&
+ defined ( my $path = $opts{'path'} )
+ ) {
+ $url = "source/$author/$release/$path";
+ } else {
+ croak $error;
+ }
+
+ $url = $self->{base_url} . "/$url";
+
+ my $result = $self->{ua}->get($url);
+ $result->{'success'}
+ or croak "Failed to fetch '$url': " . $result->{'reason'};
+
+ return $result->{'content'};
+ }
+
+
+ # /release/{distribution}
+ # /release/{author}/{release}
+ sub release {
+ my $self = shift;
+ my %opts = @_ ? @_ : ();
+ my $url = '';
+ my $error = "Either provide 'distribution', or 'author' and 'release', " .
+ "or 'search'";
+
+ %opts or croak $error;
+
+ my %extra_opts = ();
+
+ if ( defined ( my $dist = $opts{'distribution'} ) ) {
+ $url = "release/$dist";
+ } elsif (
+ defined ( my $author = $opts{'author'} ) &&
+ defined ( my $release = $opts{'release'} )
+ ) {
+ $url = "release/$author/$release";
+ } elsif ( defined ( my $search_opts = $opts{'search'} ) ) {
+ ref $search_opts && ref $search_opts eq 'HASH'
+ or croak $error;
+
+ %extra_opts = %{$search_opts};
+ $url = 'release/_search';
+ } else {
+ croak $error;
+ }
+
+ return $self->fetch( $url, %extra_opts );
+ }
+
+
+ # /pod/{module}
+ # /pod/{author}/{release}/{path}
+ sub pod {
+ my $self = shift;
+ my %opts = @_ ? @_ : ();
+ my $url = '';
+ my $error = "Either provide 'module' or 'author and 'release' and 'path'";
+
+ %opts or croak $error;
+
+ if ( defined ( my $module = $opts{'module'} ) ) {
+ $url = "pod/$module";
+ } elsif (
+ defined ( my $author = $opts{'author'} ) &&
+ defined ( my $release = $opts{'release'} ) &&
+ defined ( my $path = $opts{'path'} )
+ ) {
+ $url = "pod/$author/$release/$path";
+ } else {
+ croak $error;
+ }
+
+ # check content-type
+ my %extra = ();
+ if ( defined ( my $type = $opts{'content-type'} ) ) {
+ $type =~ m{^ text/ (?: html|plain|x-pod|x-markdown ) $}x
+ or croak 'Incorrect content-type provided';
+
+ $extra{headers}{'content-type'} = $type;
+ }
+
+ $url = $self->{base_url}. "/$url";
+
+ my $result = $self->{ua}->get( $url, \%extra );
+ $result->{'success'}
+ or croak "Failed to fetch '$url': " . $result->{'reason'};
+
+ return $result->{'content'};
+ }
+
+
+ # /module/{module}
+ sub module {
+ my $self = shift;
+ my $name = shift;
+
+ $name or croak 'Please provide a module name';
+
+ return $self->fetch("module/$name");
+ }
+
+
+ # file() is a synonym of module
+ sub file { goto &module }
+
+
+ # /author/{author}
+ sub author {
+ my $self = shift;
+ my ( $pause_id, $url, %extra_opts );
+
+ if ( @_ == 1 ) {
+ $url = 'author/' . shift;
+ } elsif ( @_ == 2 ) {
+ my %opts = @_;
+
+ if ( defined $opts{'pauseid'} ) {
+ $url = "author/" . $opts{'pauseid'};
+ } elsif ( defined $opts{'search'} ) {
+ my $search_opts = $opts{'search'};
+
+ ref $search_opts && ref $search_opts eq 'HASH'
+ or croak "'search' key must be hashref";
+
+ %extra_opts = %{$search_opts};
+ $url = 'author/_search';
+ } else {
+ croak 'Unknown option given';
+ }
+ } else {
+ croak 'Please provide an author PAUSEID or a "search"';
+ }
+
+ return $self->fetch( $url, %extra_opts );
+ }
+
+
+
+ sub fetch {
+ my $self = shift;
+ my $url = shift;
+ my $extra = $self->_build_extra_params(@_);
+ my $base = $self->{base_url};
+ my $req_url = $extra ? "$base/$url?$extra" : "$base/$url";
+
+ my $result = $self->{ua}->get($req_url);
+ return $self->_decode_result( $result, $req_url );
+ }
+
+
+ sub post {
+ my $self = shift;
+ my $url = shift;
+ my $query = shift;
+ my $base = $self->{base_url};
+
+ defined $url
+ or croak 'First argument of URL must be provided';
+
+ ref $query and ref $query eq 'HASH'
+ or croak 'Second argument of query hashref must be provided';
+
+ my $query_json = encode_json( $query );
+ my $result = $self->{ua}->request(
+ 'POST',
+ "$base/$url",
+ {
+ headers => { 'Content-Type' => 'application/json' },
+ content => $query_json,
+ }
+ );
+
+ return $self->_decode_result( $result, $url, $query_json );
+ }
+
+ sub _decode_result {
+ my $self = shift;
+ my ( $result, $url, $original ) = @_;
+ my $decoded_result;
+
+ ref $result and ref $result eq 'HASH'
+ or croak 'First argument must be hashref';
+
+ defined $url
+ or croak 'Second argument of a URL must be provided';
+
+ if ( defined ( my $success = $result->{'success'} ) ) {
+ my $reason = $result->{'reason'} || '';
+ $reason .= ( defined $original ? " (request: $original)" : '' );
+
+ $success or croak "Failed to fetch '$url': $reason";
+ } else {
+ croak 'Missing success in return value';
+ }
+
+ defined ( my $content = $result->{'content'} )
+ or croak 'Missing content in return value';
+
+ eval { $decoded_result = decode_json $content; 1 }
+ or do { croak "Couldn't decode '$content': $@" };
+
+ return $decoded_result;
+ }
+
+ 1;
+
+ __END__
+
+ =pod
+
+ =head1 NAME
+
+ MetaCPAN::API::Tiny - A Tiny API client for MetaCPAN
+
+ =head1 VERSION
+
+ version 1.131730
+
+ =head1 DESCRIPTION
+
+ This is the Tiny version of L<MetaCPAN::API>. It implements a compatible API
+ with a few notable exceptions:
+
+ =over 4
+
+ =item Attributes are direct hash access
+
+ The attributes defined using Mo(o|u)se are now accessed via the blessed hash
+ directly. There are no accessors defined to access this elements.
+
+ =item Exception handling
+
+ Instead of using Try::Tiny, raw evals are used. This could potentially cause
+ issues, so just be aware.
+
+ =item Testing
+
+ Test::Fatal was replaced with an eval implementation of exception().
+ Test::TinyMocker usage is retained, but may be absorbed since it is pure perl
+
+ =back
+
+ =head1 CLASS_METHODS
+
+ =head2 new
+
+ new is the constructor for MetaCPAN::API::Tiny. In the non-tiny version of this
+ module, this is provided via Any::Moose built from the attributes defined. In
+ the tiny version, we define our own constructor. It takes the same arguments
+ and provides similar checks to MetaCPAN::API with regards to arguments passed.
+
+ =head1 PUBLIC_METHODS
+
+ =head2 source
+
+ my $source = $mcpan->source(
+ author => 'DOY',
+ release => 'Moose-2.0201',
+ path => 'lib/Moose.pm',
+ );
+
+ Searches MetaCPAN for a module or a specific release and returns the plain source.
+
+ =head2 release
+
+ my $result = $mcpan->release( distribution => 'Moose' );
+
+ # or
+ my $result = $mcpan->release( author => 'DOY', release => 'Moose-2.0001' );
+
+ Searches MetaCPAN for a dist.
+
+ You can do complex searches using 'search' parameter:
+
+ # example lifted from MetaCPAN docs
+ my $result = $mcpan->release(
+ search => {
+ author => "OALDERS AND ",
+ filter => "status:latest",
+ fields => "name",
+ size => 1,
+ },
+ );
+
+ =head2 pod
+
+ my $result = $mcpan->pod( module => 'Moose' );
+
+ # or
+ my $result = $mcpan->pod(
+ author => 'DOY',
+ release => 'Moose-2.0201',
+ path => 'lib/Moose.pm',
+ );
+
+ Searches MetaCPAN for a module or a specific release and returns the POD.
+
+ =head2 module
+
+ my $result = $mcpan->module('MetaCPAN::API');
+
+ Searches MetaCPAN and returns a module's ".pm" file.
+
+ =head2 file
+
+ A synonym of L</module>
+
+ =head2 author
+
+ my $result1 = $mcpan->author('XSAWYERX');
+ my $result2 = $mcpan->author( pauseid => 'XSAWYERX' );
+
+ Searches MetaCPAN for a specific author.
+
+ You can do complex searches using 'search' parameter:
+
+ # example lifted from MetaCPAN docs
+ my $result = $mcpan->author(
+ search => {
+ q => 'profile.name:twitter',
+ size => 1,
+ },
+ );
+
+ =head2 fetch
+
+ my $result = $mcpan->fetch('/release/distribution/Moose');
+
+ # with parameters
+ my $more = $mcpan->fetch(
+ '/release/distribution/Moose',
+ param => 'value',
+ );
+
+ This is a helper method for API implementations. It fetches a path from MetaCPAN, decodes the JSON from the content variable and returns it.
+
+ You don't really need to use it, but you can in case you want to write your own extension implementation to MetaCPAN::API.
+
+ It accepts an additional hash as "GET" parameters.
+
+ =head2 post
+
+ # /release&content={"query":{"match_all":{}},"filter":{"prefix":{"archive":"Cache-Cache-1.06"}}}
+ my $result = $mcpan->post(
+ 'release',
+ {
+ query => { match_all => {} },
+ filter => { prefix => { archive => 'Cache-Cache-1.06' } },
+ },
+ );
+
+ The POST equivalent of the "fetch()" method. It gets the path and JSON request.
+
+ =head1 THANKS
+
+ Overall the tests and code were ripped directly from MetaCPAN::API and
+ tiny-fied. A big thanks to Sawyer X for writing the original module.
+
+ =head1 AUTHOR
+
+ Nicholas R. Perez <nperez@cpan.org>
+
+ =head1 COPYRIGHT AND LICENSE
+
+ This software is copyright (c) 2013 by Nicholas R. Perez <nperez@cpan.org>.
+
+ This is free software; you can redistribute it and/or modify it under
+ the same terms as the Perl 5 programming language system itself.
+
+ =cut
+METACPAN_API_TINY
+
+s/^ //mg for values %fatpacked;
+
+unshift @INC, sub {
+ if (my $fat = $fatpacked{$_[1]}) {
+ if ($] < 5.008) {
+ return sub {
+ return 0 unless length $fat;
+ $fat =~ s/^([^\n]*\n?)//;
+ $_ = $1;
+ return 1;
+ };
+ }
+ open my $fh, '<', \$fat
+ or die "FatPacker error loading $_[1] (could be a perl installation issue?)";
+ return $fh;
+ }
+ return
+};
+
+} # END OF FATPACK CODE
+
+
+use 5.010;
+use strict;
+use warnings;
+use Fatal qw(open close);
+
+use File::Basename;
+use Module::CoreList;
+use MetaCPAN::API::Tiny;
+
+if (scalar @ARGV != 1) {
+ say << 'USAGE';
+Usage: scancpan distname
+
+This script populates the directory package/cpan with all the Perl/CPAN
+distributions required by distname. These data are fetched from
+https://metacpan.org/.
+
+ ./scancpan Try-Tiny
+
+See the Buildroot documentation for details on the usage of the Perl
+infrastructure.
+USAGE
+ exit -1;
+}
+
+my %dist;
+my %deps_build;
+my %deps_runtime;
+my $mcpan = MetaCPAN::API::Tiny->new();
+
+sub fetch {
+ my $name = shift;
+ unless ($dist{$name}) {
+ say qq{fetch ${name}};
+ my $result = $mcpan->release( distribution => $name );
+ $dist{$name} = $result;
+ my @deps_build = ();
+ my @deps_runtime = ();
+ foreach my $dep (@{$result->{dependency}}) {
+ my $modname = ${$dep}{module};
+ next if $modname eq q{perl};
+ next if $modname =~ m|^Alien|;
+ next if $modname =~ m|^Win32|;
+ next if Module::CoreList::first_release( $modname );
+ next if ${$dep}{phase} eq q{develop};
+ next if ${$dep}{phase} eq q{test};
+ next if ${$dep}{relationship} ne q{requires};
+ my $distname = $mcpan->module( $modname )->{distribution};
+ if (${$dep}{phase} eq q{runtime}) {
+ push @deps_runtime, $distname;
+ }
+ else { # configure, build
+ push @deps_build, $distname;
+ }
+ fetch( $distname );
+ }
+ $deps_build{$name} = \@deps_build;
+ $deps_runtime{$name} = \@deps_runtime;
+ }
+ return;
+}
+
+fetch( @ARGV );
+say scalar keys %dist, q{ packages fetched.};
+
+sub debname {
+ my $name = shift;
+ if ($name =~ m|-perl$|) {
+ return $name;
+ }
+ else {
+ return q{lib} . lc $name . q{-perl};
+ }
+}
+
+sub brname {
+ my $name = shift;
+ $name =~ s|-|_|g;
+ return uc $name;
+}
+
+while (my ($distname, $dist) = each %dist) {
+ my $debname = debname( $distname );
+ my $dirname = q{package/cpan/} . $debname;
+ my $cfgname = $dirname . q{/Config.in};
+ my $mkname = $dirname . q{/} . $debname . q{.mk};
+ my $brname = brname( $debname );
+ mkdir $dirname unless -d $dirname;
+ unless (-f $cfgname) {
+ my $abstract = $dist->{abstract} || q{NO ABSTRACT};
+ say qq{write ${cfgname}};
+ open my $fh, q{>}, $cfgname;
+ say {$fh} qq{config BR2_PACKAGE_${brname}};
+ say {$fh} qq{\tbool "${debname}"};
+ foreach my $dep (@{$deps_runtime{$distname}}) {
+ my $brdep = brname( debname( $dep ) );
+ say {$fh} qq{\tselect BR2_PACKAGE_${brdep}};
+ }
+ say {$fh} qq{\thelp};
+ say {$fh} qq{\t ${abstract}};
+ say {$fh} qq{};
+ close $fh;
+ }
+ unless (-f $mkname) {
+ my $version = $dist->{version};
+ my $author = $dist->{author};
+ my $site = dirname( $dist->{download_url} );
+ my($scheme, $auth, $path) = $dist->{download_url} =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)|;
+ my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} );
+ my $dependencies = join q{ }, map( { q{host-} . debname( $_ ); } @{$deps_build{$distname}} ),
+ map( { debname( $_ ); } @{$deps_runtime{$distname}} );
+ my $host_dependencies = join q{ }, map { q{host-} . debname( $_ ); } @{$deps_build{$distname}},
+ @{$deps_runtime{$distname}};
+ my $license = join q{ }, @{$dist->{license}};
+ say qq{write ${mkname}};
+ open my $fh, q{>}, $mkname;
+ say {$fh} qq{################################################################################};
+ say {$fh} qq{#};
+ say {$fh} qq{# ${debname}};
+ say {$fh} qq{#};
+ say {$fh} qq{################################################################################};
+ say {$fh} qq{};
+ say {$fh} qq{${brname}_VERSION = ${version}};
+ say {$fh} qq{${brname}_AUTHOR = ${author}};
+ say {$fh} qq{${brname}_SOURCE = ${distname}-\$(${brname}_VERSION).${suffix}};
+ say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}};
+ say {$fh} qq{${brname}_DEPENDENCIES = perl ${dependencies}};
+ say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}};
+ say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown};
+ say {$fh} qq{};
+ say {$fh} qq{\$(eval \$(perl-package))};
+ say {$fh} qq{\$(eval \$(host-perl-package))};
+ close $fh;
+ }
+}
+
+my %pkg;
+my $cfgname = q{package/cpan/Config.in};
+say qq{read ${cfgname}};
+open my $fh, q{<}, $cfgname;
+while (<$fh>) {
+ chomp;
+ $pkg{$_} = 1;
+}
+close $fh;
+
+foreach my $distname (sort keys %dist) {
+ my $debname = debname( $distname );
+ $pkg{qq{source "package/cpan/${debname}/Config.in"}} = 1;
+}
+
+say qq{write ${cfgname}};
+open $fh, q{>}, $cfgname;
+say {$fh} join qq{\n}, sort keys %pkg;
+close $fh;
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 03/12] cpanminus: remove it
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 01/12] perl: new infrastructure Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 04/12] perl: remove useless patch Francois Perrad
` (8 subsequent siblings)
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/Config.in | 1 -
package/cpanminus/Config.in | 40 ----------------------------------
package/cpanminus/cpanminus.mk | 47 ----------------------------------------
3 files changed, 88 deletions(-)
delete mode 100644 package/cpanminus/Config.in
delete mode 100644 package/cpanminus/cpanminus.mk
diff --git a/package/Config.in b/package/Config.in
index 3f7bb3e..8ae83f9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -381,7 +381,6 @@ source "package/nodejs/Config.in"
source "package/perl/Config.in"
if BR2_PACKAGE_PERL
menu "Perl libraries/modules"
-source "package/cpanminus/Config.in"
source "package/cpan/Config.in"
endmenu
endif
diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
deleted file mode 100644
index b10d211..0000000
--- a/package/cpanminus/Config.in
+++ /dev/null
@@ -1,40 +0,0 @@
-config BR2_PACKAGE_CPANMINUS
- bool "cpanminus"
- # Requires host-qemu, which cannot work properly due to kernel
- # headers mismatch between the build environment and the
- # target.
- depends on BR2_BROKEN
- 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_MIRROR
- string "mirror"
- help
- Specifies the base URL for the CPAN mirror to use,
- such as http://cpan.cpantesters.org/.
-
-config BR2_PACKAGE_CPANMINUS_MODULES
- string "Perl modules from CPAN"
- default "Curses::UI"
- 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"
- default "ncurses"
- help
- Some XS modules require native libraries.
-
-endif
diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
deleted file mode 100644
index b315388..0000000
--- a/package/cpanminus/cpanminus.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-################################################################################
-#
-# cpanminus
-#
-################################################################################
-
-CPANMINUS_VERSION = 1.6109
-CPANMINUS_SOURCE = $(CPANMINUS_VERSION).tar.gz
-CPANMINUS_SITE = https://github.com/miyagawa/cpanminus/archive
-CPANMINUS_DEPENDENCIES = host-qemu perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES))
-
-CPANMINUS_RUN_PERL = $(QEMU_USER) $(STAGING_DIR)/usr/bin/perl
-CPANMINUS_ARCHNAME = $(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}")
-CPANMINUS_PERL_LIB = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)
-CPANMINUS_PERL_SITELIB = $(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)
-CPANMINUS_PERL_ARCHLIB = $(CPANMINUS_PERL_LIB)/$(CPANMINUS_ARCHNAME)
-CPANMINUS_PERL_SITEARCH = $(CPANMINUS_PERL_SITELIB)/$(CPANMINUS_ARCHNAME)
-CPANMINUS_PERL5LIB = $(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB)
-ifneq ($(BR2_PACKAGE_CPANMINUS_MIRROR),"")
- CPANMINUS_MIRROR = --mirror $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MIRROR)) --mirror-only
-endif
-CPANMINUS_MODULES = $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
-
-ifneq ($(CPANMINUS_MODULES),)
-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)" \
- RUN_PERL="$(@D)/run_perl" \
- $(CPANMINUS_RUN_PERL) $(@D)/cpanm \
- --perl=$(@D)/run_perl \
- --notest \
- --no-man-pages \
- $(CPANMINUS_MIRROR) \
- $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
- -find $(CPANMINUS_PERL_SITELIB) -type f -name *.bs -exec rm -f {} \;
-endef
-else
-define CPANMINUS_INSTALL_TARGET_CMDS
- @echo "No modules to install"
-endef
-endif
-
-$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 04/12] perl: remove useless patch
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (2 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 03/12] cpanminus: remove it Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host Francois Perrad
` (7 subsequent siblings)
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
after the removal of cpanminus
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/perl/perl-fix-Module-Build.patch | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 package/perl/perl-fix-Module-Build.patch
diff --git a/package/perl/perl-fix-Module-Build.patch b/package/perl/perl-fix-Module-Build.patch
deleted file mode 100644
index 9101c11..0000000
--- a/package/perl/perl-fix-Module-Build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-
-Index: b/cpan/Module-Build/lib/Module/Build/Base.pm
-===================================================================
---- a/cpan/Module-Build/lib/Module/Build/Base.pm
-+++ b/cpan/Module-Build/lib/Module/Build/Base.pm
-@@ -460,7 +460,7 @@
- my $proto = shift;
- my $c = ref($proto) ? $proto->{config} : 'Module::Build::Config';
-
-- my $perl = $^X;
-+ my $perl = $ENV{RUN_PERL} || $^X;
- my $perl_basename = File::Basename::basename($perl);
-
- my @potential_perls;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (3 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 04/12] perl: remove useless patch Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:25 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure Francois Perrad
` (6 subsequent siblings)
11 siblings, 1 reply; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
after the removal of cpanminus
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/Config.in.host | 1 +
package/qemu/Config.in.host | 10 ++++++++++
2 files changed, 11 insertions(+)
create mode 100644 package/qemu/Config.in.host
diff --git a/package/Config.in.host b/package/Config.in.host
index 5fd2570..d50adfb 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -10,6 +10,7 @@ source "package/lpc3250loader/Config.in.host"
source "package/mtools/Config.in.host"
source "package/omap-u-boot-utils/Config.in.host"
source "package/openocd/Config.in.host"
+source "package/qemu/Config.in.host"
source "package/sam-ba/Config.in.host"
source "package/sunxi-tools/Config.in.host"
source "package/uboot-tools/Config.in.host"
diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
new file mode 100644
index 0000000..cfab922
--- /dev/null
+++ b/package/qemu/Config.in.host
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_QEMU
+ bool "host qemu"
+ help
+ QEMU is a generic and open source machine emulator and virtualizer.
+
+ In user mode emulation, QEMU runs single cross-compiled programs.
+ Fast cross-compilation and cross-debugging are the main targets
+ for user-mode emulation.
+
+ http://qemu.org/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (4 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:28 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package Francois Perrad
` (5 subsequent siblings)
11 siblings, 1 reply; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
(used by host-intltool and metacity)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/Config.in | 1 -
package/Makefile.in | 8 ++---
package/cpan/Config.in | 1 +
package/cpan/libxml-parser-perl/Config.in | 9 +++++
.../cpan/libxml-parser-perl/libxml-parser-perl.mk | 19 +++++++++++
package/intltool/intltool.mk | 4 +--
package/libxml-parser-perl/Config.in | 11 ------
package/libxml-parser-perl/libxml-parser-perl.mk | 35 --------------------
package/metacity/metacity.mk | 3 ++
9 files changed, 36 insertions(+), 55 deletions(-)
create mode 100644 package/cpan/libxml-parser-perl/Config.in
create mode 100644 package/cpan/libxml-parser-perl/libxml-parser-perl.mk
delete mode 100644 package/libxml-parser-perl/Config.in
delete mode 100644 package/libxml-parser-perl/libxml-parser-perl.mk
diff --git a/package/Config.in b/package/Config.in
index 8ae83f9..3af2783 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -586,7 +586,6 @@ source "package/json-c/Config.in"
source "package/json-glib/Config.in"
source "package/libjson/Config.in"
source "package/libroxml/Config.in"
-source "package/libxml-parser-perl/Config.in"
source "package/libxml2/Config.in"
source "package/libxmlpp/Config.in"
source "package/libxslt/Config.in"
diff --git a/package/Makefile.in b/package/Makefile.in
index cd0437c..3a3d9f7 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -241,11 +241,9 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
LDFLAGS="$(TARGET_LDFLAGS)" \
FCFLAGS="$(TARGET_FCFLAGS)" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
- PERLLIB="$(HOST_DIR)/usr/lib/perl" \
STAGING_DIR="$(STAGING_DIR)"
-TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
- PERLLIB="$(HOST_DIR)/usr/lib/perl"
+TARGET_MAKE_ENV=PATH=$(TARGET_PATH)
HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
AR="$(HOSTAR)" \
@@ -265,15 +263,13 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
- PERLLIB="$(HOST_DIR)/usr/lib/perl" \
LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
HOST_MAKE_ENV=PATH=$(HOST_PATH) \
LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
- PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" \
- PERLLIB="$(HOST_DIR)/usr/lib/perl"
+ PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
################################################################################
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
index e69de29..bb98dc3 100644
--- a/package/cpan/Config.in
+++ b/package/cpan/Config.in
@@ -0,0 +1 @@
+source "package/cpan/libxml-parser-perl/Config.in"
diff --git a/package/cpan/libxml-parser-perl/Config.in b/package/cpan/libxml-parser-perl/Config.in
new file mode 100644
index 0000000..a09861a
--- /dev/null
+++ b/package/cpan/libxml-parser-perl/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBXML_PARSER_PERL
+ bool "libxml-parser-perl"
+ select BR2_PACKAGE_EXPAT
+ # Hide from configuration as we only support the host package
+ # for the moment
+ depends on BR2_HOST_ONLY
+ help
+ A perl module for parsing XML documents
+
diff --git a/package/cpan/libxml-parser-perl/libxml-parser-perl.mk b/package/cpan/libxml-parser-perl/libxml-parser-perl.mk
new file mode 100644
index 0000000..4d378ec
--- /dev/null
+++ b/package/cpan/libxml-parser-perl/libxml-parser-perl.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# libxml-parser-perl
+#
+################################################################################
+
+LIBXML_PARSER_PERL_VERSION = 2.41
+LIBXML_PARSER_PERL_AUTHOR = TODDR
+LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz
+LIBXML_PARSER_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR/
+#LIBXML_PARSER_PERL_DEPENDENCIES = perl libwww-perl expat
+HOST_LIBXML_PARSER_PERL_DEPENDENCIES = host-expat
+LIBXML_PARSER_PERL_LICENSE = perl_5
+
+HOST_LIBXML_PARSER_PERL_CONF_OPT += EXPATLIBPATH=$(HOST_DIR)/usr/lib
+HOST_LIBXML_PARSER_PERL_CONF_OPT += EXPATINCPATH=$(HOST_DIR)/usr/include
+
+#$(eval $(perl-package))
+$(eval $(host-perl-package))
diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk
index b2418fe..42e638e 100644
--- a/package/intltool/intltool.mk
+++ b/package/intltool/intltool.mk
@@ -10,8 +10,8 @@ INTLTOOL_LICENSE = GPLv2+
INTLTOOL_LICENSE_FILES = COPYING
HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl
-HOST_INTLTOOL_CONF_OPT = \
- PERLLIB=$(HOST_DIR)/usr/lib/perl
+HOST_INTLTOOL_CONF_ENV = \
+ PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(shell perl -MConfig -e "print Config->{archname}")
$(eval $(autotools-package))
$(eval $(host-autotools-package))
diff --git a/package/libxml-parser-perl/Config.in b/package/libxml-parser-perl/Config.in
deleted file mode 100644
index 2a81086..0000000
--- a/package/libxml-parser-perl/Config.in
+++ /dev/null
@@ -1,11 +0,0 @@
-config BR2_PACKAGE_LIBXML_PARSER_PERL
- bool "libxml-parser-perl"
- select BR2_PACKAGE_EXPAT
- # Hide from configuration as we only support the host package
- # for the moment
- depends on BR2_HOST_ONLY
- help
- The Perl XML::Parser module.
-
- http://www.cpan.org/modules/by-module/XML/
-
diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk
deleted file mode 100644
index 53f3bcf..0000000
--- a/package/libxml-parser-perl/libxml-parser-perl.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-################################################################################
-#
-# libxml-parser-perl
-#
-################################################################################
-
-LIBXML_PARSER_PERL_VERSION = 2.36
-LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz
-LIBXML_PARSER_PERL_SITE = http://www.cpan.org/modules/by-module/XML/
-
-LIBXML_PARSER_PERL_DEPENDENCIES = expat
-
-define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
- (cd $(@D) ; \
- $(HOST_CONFIGURE_OPTS) perl Makefile.PL \
- PREFIX=$(HOST_DIR)/usr \
- EXPATLIBPATH=$(HOST_DIR)/usr/lib \
- EXPATINCPATH=$(HOST_DIR)/usr/include \
- INSTALLDIRS=site \
- INSTALLSITELIB=$(HOST_DIR)/usr/lib/perl \
- INSTALLSITEARCH=$(HOST_DIR)/usr/lib/perl \
- USE_MM_LD_RUN_PATH=1 \
- )
-endef
-
-define HOST_LIBXML_PARSER_PERL_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-$(eval $(generic-package))
-$(eval $(host-generic-package))
diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk
index 9306b00..5680a4a 100644
--- a/package/metacity/metacity.mk
+++ b/package/metacity/metacity.mk
@@ -11,6 +11,9 @@ METACITY_VERSION = $(METACITY_VERSION_MAJOR).$(METACITY_VERSION_MINOR)
METACITY_SOURCE = metacity-$(METACITY_VERSION).tar.bz2
METACITY_SITE = http://ftp.gnome.org/pub/gnome/sources/metacity/$(METACITY_VERSION_MAJOR)
+METACITY_CONF_ENV = \
+ PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(shell perl -MConfig -e "print Config->{archname}")
+
METACITY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \
--x-libraries=$(STAGING_DIR)/usr/lib \
--disable-glibtest --disable-gconf \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (5 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:21 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl Francois Perrad
` (4 subsequent siblings)
11 siblings, 1 reply; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
the version coming with host-perl is too old
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpan/Config.in | 1 +
package/cpan/libmodule-build-perl/Config.in | 6 ++++++
.../libmodule-build-perl/libmodule-build-perl.mk | 16 ++++++++++++++++
scancpan | 3 +++
4 files changed, 26 insertions(+)
create mode 100644 package/cpan/libmodule-build-perl/Config.in
create mode 100644 package/cpan/libmodule-build-perl/libmodule-build-perl.mk
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
index bb98dc3..c821064 100644
--- a/package/cpan/Config.in
+++ b/package/cpan/Config.in
@@ -1 +1,2 @@
+source "package/cpan/libmodule-build-perl/Config.in"
source "package/cpan/libxml-parser-perl/Config.in"
diff --git a/package/cpan/libmodule-build-perl/Config.in b/package/cpan/libmodule-build-perl/Config.in
new file mode 100644
index 0000000..dc63312
--- /dev/null
+++ b/package/cpan/libmodule-build-perl/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBMODULE_BUILD_PERL
+ bool "libmodule-build-perl"
+ depends on BR2_HOST_ONLY
+ help
+ Build and install Perl modules
+
diff --git a/package/cpan/libmodule-build-perl/libmodule-build-perl.mk b/package/cpan/libmodule-build-perl/libmodule-build-perl.mk
new file mode 100644
index 0000000..a08385b
--- /dev/null
+++ b/package/cpan/libmodule-build-perl/libmodule-build-perl.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libmodule-build-perl
+#
+################################################################################
+
+LIBMODULE_BUILD_PERL_VERSION = 0.4200
+LIBMODULE_BUILD_PERL_AUTHOR = LEONT
+LIBMODULE_BUILD_PERL_SOURCE = Module-Build-$(LIBMODULE_BUILD_PERL_VERSION).tar.gz
+LIBMODULE_BUILD_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LE/LEONT/
+#LIBMODULE_BUILD_PERL_DEPENDENCIES = perl
+HOST_LIBMODULE_BUILD_PERL_DEPENDENCIES =
+LIBMODULE_BUILD_PERL_LICENSE = perl_5
+
+#$(eval $(perl-package))
+$(eval $(host-perl-package))
diff --git a/scancpan b/scancpan
index d8a68d6..e0ae7ba 100755
--- a/scancpan
+++ b/scancpan
@@ -509,8 +509,10 @@ sub fetch {
$dist{$name} = $result;
my @deps_build = ();
my @deps_runtime = ();
+ my $mb;
foreach my $dep (@{$result->{dependency}}) {
my $modname = ${$dep}{module};
+ $mb = 1 if $modname eq q{Module::Build};
next if $modname eq q{perl};
next if $modname =~ m|^Alien|;
next if $modname =~ m|^Win32|;
@@ -527,6 +529,7 @@ sub fetch {
}
fetch( $distname );
}
+ unshift @deps_build, q{Module-Build} if $mb;
$deps_build{$name} = \@deps_build;
$deps_runtime{$name} = \@deps_runtime;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (6 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:33 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 09/12] libcurses-perl: new package Francois Perrad
` (3 subsequent siblings)
11 siblings, 1 reply; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
docs/manual/adding-packages-perl.txt | 91 ++++++++++++++++++++++++++++++++++
docs/manual/adding-packages.txt | 2 +
2 files changed, 93 insertions(+)
create mode 100644 docs/manual/adding-packages-perl.txt
diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt
new file mode 100644
index 0000000..88be505
--- /dev/null
+++ b/docs/manual/adding-packages-perl.txt
@@ -0,0 +1,91 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+Infrastructure for Perl/CPAN packages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[[perl-package-tutorial]]
+
++perl-package+ tutorial
+^^^^^^^^^^^^^^^^^^^^^^^
+
+First, let's see how to NOT write a +.mk+ file for a Perl/CPAN package,
+with an example :
+
+------------------------
+01: ################################################################################
+02: #
+03: # libfoo-bar-perl
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_BAR_PERL_VERSION = 0.02
+08: LIBFOO_BAR_PERL_AUTHOR = MONGERS
+09: LIBFOO_BAR_PERL_SOURCE = Foo-$(LIBFOO_BAR_PERL_VERSION).tar.gz
+10: LIBFOO_BAR_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER/
+11: LIBFOO_BAR_PERL_DEPENDENCIES = perl libstrictures-perl
+12: HOST_LIBFOO_BAR_PERL_DEPENDENCIES = host-libstrictures-perl
+13: LIBFOO_BAR_PERL_LICENSE = perl_5
+14:
+15: $(eval $(perl-package))
+16: $(eval $(host-perl-package))
+------------------------
+
+In fact, this file and the Config.in are written by running
+the script +./scancpan Foo-Bar+ in the +TOPDIR+ directory.
+This script creates packages for all required Perl/CPAN dependencies.
+All theses generated files are stored in the +package/cpan+ directory.
+In very specific case, this Makefile must be modified, for example : for
+adding a C native dependency.
+
+The Perl/CPAN modules are fine-grained, the number of module grows quickly
+over 100. So, only modified files will be stored in the Buildroot repository,
+all others can be regenerated by +scancpan+.
+
+[[perl-package-reference]]
+
++perl-package+ reference
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+This infrastructure handles various Perl build systems :
++ExtUtils-MakeMaker+, +Module-Build+ and +Module-Build-Tiny+.
+
+The main macro of the Perl/CPAN package infrastructure is
++perl-package+. It is similar to the +generic-package+ macro. The ability to
+have target and host packages is also available, with the
++host-perl-package+ macro.
+
+Just like the generic infrastructure, the Perl/CPAN infrastructure
+works by defining a number of variables before calling the
++perl-package+ macro.
+
+First, all the package metadata information variables that exist in the
+generic infrastructure also exist in the Perl/CPAN infrastructure:
++LIBFOO_VERSION+, +LIBFOO_SOURCE+,
++LIBFOO_PATCH+, +LIBFOO_SITE+,
++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+,
++LIBFOO_INSTALL_TARGET+.
+
+A few additional variables, specific to the Perl/CPAN infrastructure,
+can also be defined. Many of them are only useful in very specific
+cases, typical packages will therefore only use a few of them.
+
+* +LIBFOO_CONF_OPT+, to specify additional configure
+ options to pass to the +perl Makefile.PL+ or +perl Build.PL+.
+ By default, empty.
+
+* +LIBFOO_BUILD_OPT+, to specify additional options to
+ pass to +make pure_all+ or +perl Build build+ in the build step.
+ By default, empty.
+
+* +LIBFOO_INSTALL_TARGET_OPT+, to specify additional options to
+ pass to +make pure_install+ or +perl Build install+ in the install step.
+ By default, empty.
+
+* +HOST_LIBFOO_INSTALL_OPT+, to specify additional options to
+ pass to +make pure_install+ or +perl Build install+ in the install step.
+ By default, empty.
+
+* +LIBFOO_CLEAN_OPT+, to specify additional options to
+ pass to +make clean+ or +perl Build clean+ in the clean step.
+ By default, empty.
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index ae76e74..d5c2268 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[]
include::adding-packages-cmake.txt[]
+include::adding-packages-perl.txt[]
+
include::adding-packages-hooks.txt[]
include::adding-packages-gettext.txt[]
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 09/12] libcurses-perl: new package
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (7 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 10/12] libnet-ssleay-perl: " Francois Perrad
` (2 subsequent siblings)
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
(depends on ncurses)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpan/Config.in | 1 +
package/cpan/libcurses-perl/Config.in | 6 ++++++
package/cpan/libcurses-perl/libcurses-perl.mk | 15 +++++++++++++++
3 files changed, 22 insertions(+)
create mode 100644 package/cpan/libcurses-perl/Config.in
create mode 100644 package/cpan/libcurses-perl/libcurses-perl.mk
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
index c821064..a4cd89d 100644
--- a/package/cpan/Config.in
+++ b/package/cpan/Config.in
@@ -1,2 +1,3 @@
+source "package/cpan/libcurses-perl/Config.in"
source "package/cpan/libmodule-build-perl/Config.in"
source "package/cpan/libxml-parser-perl/Config.in"
diff --git a/package/cpan/libcurses-perl/Config.in b/package/cpan/libcurses-perl/Config.in
new file mode 100644
index 0000000..fdca059
--- /dev/null
+++ b/package/cpan/libcurses-perl/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBCURSES_PERL
+ bool "libcurses-perl"
+ select BR2_PACKAGE_NCURSES
+ help
+ terminal screen handling and optimization
+
diff --git a/package/cpan/libcurses-perl/libcurses-perl.mk b/package/cpan/libcurses-perl/libcurses-perl.mk
new file mode 100644
index 0000000..81ba645
--- /dev/null
+++ b/package/cpan/libcurses-perl/libcurses-perl.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libcurses-perl
+#
+################################################################################
+
+LIBCURSES_PERL_VERSION = 1.28
+LIBCURSES_PERL_AUTHOR = GIRAFFED
+LIBCURSES_PERL_SOURCE = Curses-$(LIBCURSES_PERL_VERSION).tgz
+LIBCURSES_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GI/GIRAFFED/
+LIBCURSES_PERL_DEPENDENCIES = perl ncurses
+HOST_LIBCURSES_PERL_DEPENDENCIES = host-ncurses
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 10/12] libnet-ssleay-perl: new package
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (8 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 09/12] libcurses-perl: new package Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 11/12] libmoose-perl: " Francois Perrad
2013-11-20 17:02 ` [Buildroot] [pkg-perl infra 12/12] libxml-libxml-perl: " Francois Perrad
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
(depends on openssl)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpan/Config.in | 1 +
package/cpan/libnet-ssleay-perl/Config.in | 6 ++++++
.../cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk | 16 ++++++++++++++++
3 files changed, 23 insertions(+)
create mode 100644 package/cpan/libnet-ssleay-perl/Config.in
create mode 100644 package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
index a4cd89d..8ace4e3 100644
--- a/package/cpan/Config.in
+++ b/package/cpan/Config.in
@@ -1,3 +1,4 @@
source "package/cpan/libcurses-perl/Config.in"
source "package/cpan/libmodule-build-perl/Config.in"
+source "package/cpan/libnet-ssleay-perl/Config.in"
source "package/cpan/libxml-parser-perl/Config.in"
diff --git a/package/cpan/libnet-ssleay-perl/Config.in b/package/cpan/libnet-ssleay-perl/Config.in
new file mode 100644
index 0000000..19d21cf
--- /dev/null
+++ b/package/cpan/libnet-ssleay-perl/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBNET_SSLEAY_PERL
+ bool "libnet-ssleay-perl"
+ select BR2_PACKAGE_OPENSSL
+ help
+ Perl extension for using OpenSSL
+
diff --git a/package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk b/package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk
new file mode 100644
index 0000000..e067511
--- /dev/null
+++ b/package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libnet-ssleay-perl
+#
+################################################################################
+
+LIBNET_SSLEAY_PERL_VERSION = 1.53
+LIBNET_SSLEAY_PERL_AUTHOR = MIKEM
+LIBNET_SSLEAY_PERL_SOURCE = Net-SSLeay-$(LIBNET_SSLEAY_PERL_VERSION).tar.gz
+LIBNET_SSLEAY_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MI/MIKEM/
+LIBNET_SSLEAY_PERL_DEPENDENCIES = perl openssl
+HOST_LIBNET_SSLEAY_PERL_DEPENDENCIES = host-openssl
+LIBNET_SSLEAY_PERL_LICENSE = ssleay
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 11/12] libmoose-perl: new package
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (9 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 10/12] libnet-ssleay-perl: " Francois Perrad
@ 2013-11-20 17:01 ` Francois Perrad
2013-11-20 17:02 ` [Buildroot] [pkg-perl infra 12/12] libxml-libxml-perl: " Francois Perrad
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:01 UTC (permalink / raw)
To: buildroot
here, tips in LIBMOOSE_PERL_CONF_MM_OPT
Config.in is generated by scancpan
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpan/libmoose-perl/libmoose-perl.mk | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 package/cpan/libmoose-perl/libmoose-perl.mk
diff --git a/package/cpan/libmoose-perl/libmoose-perl.mk b/package/cpan/libmoose-perl/libmoose-perl.mk
new file mode 100644
index 0000000..31d7c8e
--- /dev/null
+++ b/package/cpan/libmoose-perl/libmoose-perl.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libmoose-perl
+#
+################################################################################
+
+LIBMOOSE_PERL_VERSION = 2.1005
+LIBMOOSE_PERL_AUTHOR = ETHER
+LIBMOOSE_PERL_SOURCE = Moose-$(LIBMOOSE_PERL_VERSION).tar.gz
+LIBMOOSE_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER/
+LIBMOOSE_PERL_DEPENDENCIES = perl host-libdist-checkconflicts-perl libpackage-deprecationmanager-perl libpackage-stash-xs-perl libsub-exporter-perl libparams-util-perl libtask-weaken-perl libmro-compat-perl liblist-moreutils-perl libclass-load-xs-perl libtry-tiny-perl libeval-closure-perl libclass-load-perl libpackage-stash-perl libdist-checkconflicts-perl libsub-name-perl libdata-optlist-perl libdevel-globaldestruction-perl
+HOST_LIBMOOSE_PERL_DEPENDENCIES = host-libdist-checkconflicts-perl host-libpackage-deprecationmanager-perl host-libpackage-stash-xs-perl host-libsub-exporter-perl host-libparams-util-perl host-libtask-weaken-perl host-libmro-compat-perl host-liblist-moreutils-perl host-libclass-load-xs-perl host-libtry-tiny-perl host-libeval-closure-perl host-libclass-load-perl host-libpackage-stash-perl host-libdist-checkconflicts-perl host-libsub-name-perl host-libdata-optlist-perl host-libdevel-globaldestruction-perl
+LIBMOOSE_PERL_LICENSE = perl_5
+
+LIBMOOSE_PERL_CONF_OPT = CCFLAGS="$(TARGET_CFLAGS) -I."
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 12/12] libxml-libxml-perl: new package
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
` (10 preceding siblings ...)
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 11/12] libmoose-perl: " Francois Perrad
@ 2013-11-20 17:02 ` Francois Perrad
11 siblings, 0 replies; 22+ messages in thread
From: Francois Perrad @ 2013-11-20 17:02 UTC (permalink / raw)
To: buildroot
(depends on libxml2 & zlib)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpan/Config.in | 1 +
package/cpan/libxml-libxml-perl/Config.in | 9 ++++++++
.../cpan/libxml-libxml-perl/libxml-libxml-perl.mk | 22 ++++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 package/cpan/libxml-libxml-perl/Config.in
create mode 100644 package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk
diff --git a/package/cpan/Config.in b/package/cpan/Config.in
index 8ace4e3..b4cda15 100644
--- a/package/cpan/Config.in
+++ b/package/cpan/Config.in
@@ -1,4 +1,5 @@
source "package/cpan/libcurses-perl/Config.in"
source "package/cpan/libmodule-build-perl/Config.in"
source "package/cpan/libnet-ssleay-perl/Config.in"
+source "package/cpan/libxml-libxml-perl/Config.in"
source "package/cpan/libxml-parser-perl/Config.in"
diff --git a/package/cpan/libxml-libxml-perl/Config.in b/package/cpan/libxml-libxml-perl/Config.in
new file mode 100644
index 0000000..19aa55c
--- /dev/null
+++ b/package/cpan/libxml-libxml-perl/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBXML_LIBXML_PERL
+ bool "libxml-libxml-perl"
+ select BR2_PACKAGE_LIBXML2
+ select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_LIBXML_SAX_PERL
+ select BR2_PACKAGE_LIBXML_NAMESPACESUPPORT_PERL
+ help
+ Interface to Gnome libxml2 xml parsing and DOM library
+
diff --git a/package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk b/package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk
new file mode 100644
index 0000000..5d7d0c2
--- /dev/null
+++ b/package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# libxml-libxml-perl
+#
+################################################################################
+
+LIBXML_LIBXML_PERL_VERSION = 2.0107
+LIBXML_LIBXML_PERL_AUTHOR = SHLOMIF
+LIBXML_LIBXML_PERL_SOURCE = XML-LibXML-$(LIBXML_LIBXML_PERL_VERSION).tar.gz
+LIBXML_LIBXML_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SH/SHLOMIF/
+LIBXML_LIBXML_PERL_DEPENDENCIES = perl zlib libxml2 libxml-sax-perl libxml-namespacesupport-perl
+HOST_LIBXML_LIBXML_PERL_DEPENDENCIES = host-libxml2 host-zlib host-libxml-sax-perl host-libxml-namespacesupport-perl
+LIBXML_LIBXML_PERL_LICENSE = perl_5
+
+LIBXML_LIBXML_PERL_CONF_OPT += LIBS=-L$(STAGING_DIR)/usr/lib
+LIBXML_LIBXML_PERL_CONF_OPT += INC=-I$(STAGING_DIR)/usr/include/libxml2
+
+HOST_LIBXML_LIBXML_PERL_CONF_OPT += LIBS=-L$(HOST_DIR)/usr/lib
+HOST_LIBXML_LIBXML_PERL_CONF_OPT += INC=-I$(HOST_DIR)/usr/include/libxml2
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package Francois Perrad
@ 2013-11-20 17:21 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-20 17:21 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Wed, 20 Nov 2013 18:01:55 +0100, Francois Perrad wrote:
> the version coming with host-perl is too old
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/cpan/Config.in | 1 +
> package/cpan/libmodule-build-perl/Config.in | 6 ++++++
> .../libmodule-build-perl/libmodule-build-perl.mk | 16 ++++++++++++++++
> scancpan | 3 +++
> 4 files changed, 26 insertions(+)
> create mode 100644 package/cpan/libmodule-build-perl/Config.in
> create mode 100644 package/cpan/libmodule-build-perl/libmodule-build-perl.mk
>
> diff --git a/package/cpan/Config.in b/package/cpan/Config.in
> index bb98dc3..c821064 100644
> --- a/package/cpan/Config.in
> +++ b/package/cpan/Config.in
> @@ -1 +1,2 @@
> +source "package/cpan/libmodule-build-perl/Config.in"
> source "package/cpan/libxml-parser-perl/Config.in"
> diff --git a/package/cpan/libmodule-build-perl/Config.in b/package/cpan/libmodule-build-perl/Config.in
> new file mode 100644
> index 0000000..dc63312
> --- /dev/null
> +++ b/package/cpan/libmodule-build-perl/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_LIBMODULE_BUILD_PERL
> + bool "libmodule-build-perl"
> + depends on BR2_HOST_ONLY
I think this BR2_HOST_ONLY thing is stupid. I know we have it in
Buildroot, but we should just kill it and remove the useless Config.in
files.
> + help
> + Build and install Perl modules
> +
> diff --git a/package/cpan/libmodule-build-perl/libmodule-build-perl.mk b/package/cpan/libmodule-build-perl/libmodule-build-perl.mk
> new file mode 100644
> index 0000000..a08385b
> --- /dev/null
> +++ b/package/cpan/libmodule-build-perl/libmodule-build-perl.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# libmodule-build-perl
> +#
> +################################################################################
> +
> +LIBMODULE_BUILD_PERL_VERSION = 0.4200
> +LIBMODULE_BUILD_PERL_AUTHOR = LEONT
> +LIBMODULE_BUILD_PERL_SOURCE = Module-Build-$(LIBMODULE_BUILD_PERL_VERSION).tar.gz
> +LIBMODULE_BUILD_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LE/LEONT/
> +#LIBMODULE_BUILD_PERL_DEPENDENCIES = perl
> +HOST_LIBMODULE_BUILD_PERL_DEPENDENCIES =
Is this needed? Maybe to remove host-perl as an automatic dependency?
In any case, having a comment on top of this line would be good.
> +LIBMODULE_BUILD_PERL_LICENSE = perl_5
> +
> +#$(eval $(perl-package))
Remove commented lines.
> +$(eval $(host-perl-package))
> diff --git a/scancpan b/scancpan
> index d8a68d6..e0ae7ba 100755
> --- a/scancpan
> +++ b/scancpan
> @@ -509,8 +509,10 @@ sub fetch {
> $dist{$name} = $result;
> my @deps_build = ();
> my @deps_runtime = ();
> + my $mb;
> foreach my $dep (@{$result->{dependency}}) {
> my $modname = ${$dep}{module};
> + $mb = 1 if $modname eq q{Module::Build};
> next if $modname eq q{perl};
> next if $modname =~ m|^Alien|;
> next if $modname =~ m|^Win32|;
> @@ -527,6 +529,7 @@ sub fetch {
> }
> fetch( $distname );
> }
> + unshift @deps_build, q{Module-Build} if $mb;
> $deps_build{$name} = \@deps_build;
> $deps_runtime{$name} = \@deps_runtime;
> }
I believe this chunk should be part of the patch adding scancpan.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules Francois Perrad
@ 2013-11-20 17:23 ` Thomas Petazzoni
2013-11-20 21:03 ` François Perrad
0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-20 17:23 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Wed, 20 Nov 2013 18:01:50 +0100, Francois Perrad wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> Config.in | 7 +
> package/Config.in | 1 +
> package/cpan/cpan.mk | 1 +
> scancpan | 629 ++++++++++++++++++++++++++++++++++++++++++++++++++
We quite certainly want this script somewhere under support/scripts/,
in a separate patch from the one adding the BR2_CPAN_MIRROR option and
the package/cpan/ directory. And also, the script needs a comment at
the beginning that explains what it is, what it does, how to use it,
and what is the license of the script (because I see it reuses some
existing code, so we have to figure out if the license of this code is
compatible with the Buildroot license).
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host Francois Perrad
@ 2013-11-20 17:25 ` Thomas Petazzoni
2013-11-20 21:09 ` François Perrad
0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-20 17:25 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Wed, 20 Nov 2013 18:01:53 +0100, Francois Perrad wrote:
> after the removal of cpanminus
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/Config.in.host | 1 +
> package/qemu/Config.in.host | 10 ++++++++++
> 2 files changed, 11 insertions(+)
> create mode 100644 package/qemu/Config.in.host
Adding Yann in Cc on this one. Until now, host-qemu was only used by
cpanminus, so if cpanminus is removed, I don't see the point of keeping
host-qemu. But I know Yann was interested in it, so it would be good to
understand what's the plan and needs around host-qemu after cpanminus
removal.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure Francois Perrad
@ 2013-11-20 17:28 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-20 17:28 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Wed, 20 Nov 2013 18:01:54 +0100, Francois Perrad wrote:
> (used by host-intltool and metacity)
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/Config.in | 1 -
> package/Makefile.in | 8 ++---
> package/cpan/Config.in | 1 +
> package/cpan/libxml-parser-perl/Config.in | 9 +++++
> .../cpan/libxml-parser-perl/libxml-parser-perl.mk | 19 +++++++++++
> package/intltool/intltool.mk | 4 +--
> package/libxml-parser-perl/Config.in | 11 ------
> package/libxml-parser-perl/libxml-parser-perl.mk | 35 --------------------
> package/metacity/metacity.mk | 3 ++
> 9 files changed, 36 insertions(+), 55 deletions(-)
> create mode 100644 package/cpan/libxml-parser-perl/Config.in
> create mode 100644 package/cpan/libxml-parser-perl/libxml-parser-perl.mk
> delete mode 100644 package/libxml-parser-perl/Config.in
> delete mode 100644 package/libxml-parser-perl/libxml-parser-perl.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 8ae83f9..3af2783 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -586,7 +586,6 @@ source "package/json-c/Config.in"
> source "package/json-glib/Config.in"
> source "package/libjson/Config.in"
> source "package/libroxml/Config.in"
> -source "package/libxml-parser-perl/Config.in"
> source "package/libxml2/Config.in"
> source "package/libxmlpp/Config.in"
> source "package/libxslt/Config.in"
> diff --git a/package/Makefile.in b/package/Makefile.in
> index cd0437c..3a3d9f7 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -241,11 +241,9 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
> LDFLAGS="$(TARGET_LDFLAGS)" \
> FCFLAGS="$(TARGET_FCFLAGS)" \
> PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
> - PERLLIB="$(HOST_DIR)/usr/lib/perl" \
> STAGING_DIR="$(STAGING_DIR)"
>
> -TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
> - PERLLIB="$(HOST_DIR)/usr/lib/perl"
> +TARGET_MAKE_ENV=PATH=$(TARGET_PATH)
>
> HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
> AR="$(HOSTAR)" \
> @@ -265,15 +263,13 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
> PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
> PKG_CONFIG_SYSROOT_DIR="/" \
> PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
> - PERLLIB="$(HOST_DIR)/usr/lib/perl" \
> LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
>
> HOST_MAKE_ENV=PATH=$(HOST_PATH) \
> LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
> PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
> PKG_CONFIG_SYSROOT_DIR="/" \
> - PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" \
> - PERLLIB="$(HOST_DIR)/usr/lib/perl"
> + PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
These changes to package/Makefile.in have absolutely nothing to do with
the libxml-parser-perl package. They should be part of a different
commit, and come with a proper justification.
>
>
> ################################################################################
> diff --git a/package/cpan/Config.in b/package/cpan/Config.in
> index e69de29..bb98dc3 100644
> --- a/package/cpan/Config.in
> +++ b/package/cpan/Config.in
> @@ -0,0 +1 @@
> +source "package/cpan/libxml-parser-perl/Config.in"
> diff --git a/package/cpan/libxml-parser-perl/Config.in b/package/cpan/libxml-parser-perl/Config.in
> new file mode 100644
> index 0000000..a09861a
> --- /dev/null
> +++ b/package/cpan/libxml-parser-perl/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_LIBXML_PARSER_PERL
> + bool "libxml-parser-perl"
> + select BR2_PACKAGE_EXPAT
> + # Hide from configuration as we only support the host package
> + # for the moment
> + depends on BR2_HOST_ONLY
As I said in the comment to PATCH 07/12, we probably just want to get
rid of the Config.in.
Also, can you enable rename detection when generating your patches (git
format-patch -M), so that we can more easily review patches that are
moving code around?
> + help
> + A perl module for parsing XML documents
> +
> diff --git a/package/cpan/libxml-parser-perl/libxml-parser-perl.mk b/package/cpan/libxml-parser-perl/libxml-parser-perl.mk
> new file mode 100644
> index 0000000..4d378ec
> --- /dev/null
> +++ b/package/cpan/libxml-parser-perl/libxml-parser-perl.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# libxml-parser-perl
> +#
> +################################################################################
> +
> +LIBXML_PARSER_PERL_VERSION = 2.41
> +LIBXML_PARSER_PERL_AUTHOR = TODDR
> +LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz
> +LIBXML_PARSER_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR/
> +#LIBXML_PARSER_PERL_DEPENDENCIES = perl libwww-perl expat
We don't need commented code.
> +HOST_LIBXML_PARSER_PERL_DEPENDENCIES = host-expat
> +LIBXML_PARSER_PERL_LICENSE = perl_5
> +
> +HOST_LIBXML_PARSER_PERL_CONF_OPT += EXPATLIBPATH=$(HOST_DIR)/usr/lib
> +HOST_LIBXML_PARSER_PERL_CONF_OPT += EXPATINCPATH=$(HOST_DIR)/usr/include
> +
> +#$(eval $(perl-package))
Ditto.
> +$(eval $(host-perl-package))
> diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk
> index b2418fe..42e638e 100644
> --- a/package/intltool/intltool.mk
> +++ b/package/intltool/intltool.mk
> @@ -10,8 +10,8 @@ INTLTOOL_LICENSE = GPLv2+
> INTLTOOL_LICENSE_FILES = COPYING
>
> HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl
> -HOST_INTLTOOL_CONF_OPT = \
> - PERLLIB=$(HOST_DIR)/usr/lib/perl
> +HOST_INTLTOOL_CONF_ENV = \
> + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(shell perl -MConfig -e "print Config->{archname}")
Also not really related to libxml-parser-perl directly.
>
> $(eval $(autotools-package))
> $(eval $(host-autotools-package))
> diff --git a/package/libxml-parser-perl/Config.in b/package/libxml-parser-perl/Config.in
> deleted file mode 100644
> index 2a81086..0000000
> --- a/package/libxml-parser-perl/Config.in
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -config BR2_PACKAGE_LIBXML_PARSER_PERL
> - bool "libxml-parser-perl"
> - select BR2_PACKAGE_EXPAT
> - # Hide from configuration as we only support the host package
> - # for the moment
> - depends on BR2_HOST_ONLY
> - help
> - The Perl XML::Parser module.
> -
> - http://www.cpan.org/modules/by-module/XML/
> -
> diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk
> deleted file mode 100644
> index 53f3bcf..0000000
> --- a/package/libxml-parser-perl/libxml-parser-perl.mk
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -################################################################################
> -#
> -# libxml-parser-perl
> -#
> -################################################################################
> -
> -LIBXML_PARSER_PERL_VERSION = 2.36
> -LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz
> -LIBXML_PARSER_PERL_SITE = http://www.cpan.org/modules/by-module/XML/
> -
> -LIBXML_PARSER_PERL_DEPENDENCIES = expat
> -
> -define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
> - (cd $(@D) ; \
> - $(HOST_CONFIGURE_OPTS) perl Makefile.PL \
> - PREFIX=$(HOST_DIR)/usr \
> - EXPATLIBPATH=$(HOST_DIR)/usr/lib \
> - EXPATINCPATH=$(HOST_DIR)/usr/include \
> - INSTALLDIRS=site \
> - INSTALLSITELIB=$(HOST_DIR)/usr/lib/perl \
> - INSTALLSITEARCH=$(HOST_DIR)/usr/lib/perl \
> - USE_MM_LD_RUN_PATH=1 \
> - )
> -endef
> -
> -define HOST_LIBXML_PARSER_PERL_BUILD_CMDS
> - $(HOST_MAKE_ENV) $(MAKE) -C $(@D)
> -endef
> -
> -define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS
> - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
> -endef
> -
> -$(eval $(generic-package))
> -$(eval $(host-generic-package))
> diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk
> index 9306b00..5680a4a 100644
> --- a/package/metacity/metacity.mk
> +++ b/package/metacity/metacity.mk
> @@ -11,6 +11,9 @@ METACITY_VERSION = $(METACITY_VERSION_MAJOR).$(METACITY_VERSION_MINOR)
> METACITY_SOURCE = metacity-$(METACITY_VERSION).tar.bz2
> METACITY_SITE = http://ftp.gnome.org/pub/gnome/sources/metacity/$(METACITY_VERSION_MAJOR)
>
> +METACITY_CONF_ENV = \
> + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(shell perl -MConfig -e "print Config->{archname}")
Hum, the same thing here. Maybe we need to factorize this in
package/Makefile.in, instead of removing all PERLLIB definitions from
package/Makefile.in ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl Francois Perrad
@ 2013-11-20 17:33 ` Thomas Petazzoni
2013-11-21 8:47 ` François Perrad
0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-20 17:33 UTC (permalink / raw)
To: buildroot
Dear Francois Perrad,
On Wed, 20 Nov 2013 18:01:56 +0100, Francois Perrad wrote:
> +In fact, this file and the Config.in are written by running
> +the script +./scancpan Foo-Bar+ in the +TOPDIR+ directory.
> +This script creates packages for all required Perl/CPAN dependencies.
> +All theses generated files are stored in the +package/cpan+ directory.
> +In very specific case, this Makefile must be modified, for example : for
> +adding a C native dependency.
> +
> +The Perl/CPAN modules are fine-grained, the number of module grows quickly
> +over 100. So, only modified files will be stored in the Buildroot repository,
> +all others can be regenerated by +scancpan+.
I think this principle is quite problematic. If one looks at the
"libmoose-perl: new package", it has a huge number of dependencies, and
the vast majority of them are not available in Buildroot. One need to
run the scancpan script to get all the packages generated.
I unfortunately don't really have a good proposal to offer. Isn't it
better to simply integrate all those Perl modules as normal Buildroot
packages, and have the proper tools/scripts to update those Perl module
packages from CPAN ? So it would be a bit like your scancpan script,
except that packages are committed in the Buildroot Git repository, and
with scancpan you can update those packages from CPAN and send patches
to Buildroot to push those updates.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules
2013-11-20 17:23 ` Thomas Petazzoni
@ 2013-11-20 21:03 ` François Perrad
0 siblings, 0 replies; 22+ messages in thread
From: François Perrad @ 2013-11-20 21:03 UTC (permalink / raw)
To: buildroot
2013/11/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Wed, 20 Nov 2013 18:01:50 +0100, Francois Perrad wrote:
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>> Config.in | 7 +
>> package/Config.in | 1 +
>> package/cpan/cpan.mk | 1 +
>> scancpan | 629 ++++++++++++++++++++++++++++++++++++++++++++++++++
>
> We quite certainly want this script somewhere under support/scripts/,
> in a separate patch from the one adding the BR2_CPAN_MIRROR option and
> the package/cpan/ directory. And also, the script needs a comment at
> the beginning that explains what it is, what it does, how to use it,
> and what is the license of the script (because I see it reuses some
> existing code, so we have to figure out if the license of this code is
> compatible with the Buildroot license).
>
This script was "fatpacked", so the beginning is a bundle of dependencies.
The initial part that I wrote, is at the end and contains an Usage description.
Fran?ois
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host
2013-11-20 17:25 ` Thomas Petazzoni
@ 2013-11-20 21:09 ` François Perrad
0 siblings, 0 replies; 22+ messages in thread
From: François Perrad @ 2013-11-20 21:09 UTC (permalink / raw)
To: buildroot
2013/11/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Wed, 20 Nov 2013 18:01:53 +0100, Francois Perrad wrote:
>> after the removal of cpanminus
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>> package/Config.in.host | 1 +
>> package/qemu/Config.in.host | 10 ++++++++++
>> 2 files changed, 11 insertions(+)
>> create mode 100644 package/qemu/Config.in.host
>
> Adding Yann in Cc on this one. Until now, host-qemu was only used by
> cpanminus, so if cpanminus is removed, I don't see the point of keeping
> host-qemu. But I know Yann was interested in it, so it would be good to
> understand what's the plan and needs around host-qemu after cpanminus
> removal.
>
Now, host-qemu-user is required by no package.
But it remains a useful tool for a developer which could run it manually.
Fran?ois
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl
2013-11-20 17:33 ` Thomas Petazzoni
@ 2013-11-21 8:47 ` François Perrad
2013-11-21 9:17 ` Thomas Petazzoni
0 siblings, 1 reply; 22+ messages in thread
From: François Perrad @ 2013-11-21 8:47 UTC (permalink / raw)
To: buildroot
2013/11/20 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Wed, 20 Nov 2013 18:01:56 +0100, Francois Perrad wrote:
>
>> +In fact, this file and the Config.in are written by running
>> +the script +./scancpan Foo-Bar+ in the +TOPDIR+ directory.
>> +This script creates packages for all required Perl/CPAN dependencies.
>> +All theses generated files are stored in the +package/cpan+ directory.
>> +In very specific case, this Makefile must be modified, for example : for
>> +adding a C native dependency.
>> +
>> +The Perl/CPAN modules are fine-grained, the number of module grows quickly
>> +over 100. So, only modified files will be stored in the Buildroot repository,
>> +all others can be regenerated by +scancpan+.
>
> I think this principle is quite problematic. If one looks at the
> "libmoose-perl: new package", it has a huge number of dependencies, and
> the vast majority of them are not available in Buildroot. One need to
> run the scancpan script to get all the packages generated.
>
> I unfortunately don't really have a good proposal to offer. Isn't it
> better to simply integrate all those Perl modules as normal Buildroot
> packages, and have the proper tools/scripts to update those Perl module
> packages from CPAN ? So it would be a bit like your scancpan script,
> except that packages are committed in the Buildroot Git repository, and
> with scancpan you can update those packages from CPAN and send patches
> to Buildroot to push those updates.
>
A BR user (a single developer or an organization) needs its own
repository for config, specific packages and final application.
At this time, I think that packages generated by `scancpan` must be
saved in an user repo and not in the BR repo.
But we really need feeback from users.
Fran?ois
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl
2013-11-21 8:47 ` François Perrad
@ 2013-11-21 9:17 ` Thomas Petazzoni
0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2013-11-21 9:17 UTC (permalink / raw)
To: buildroot
Dear Fran?ois Perrad,
On Thu, 21 Nov 2013 09:47:06 +0100, Fran?ois Perrad wrote:
> > I think this principle is quite problematic. If one looks at the
> > "libmoose-perl: new package", it has a huge number of dependencies, and
> > the vast majority of them are not available in Buildroot. One need to
> > run the scancpan script to get all the packages generated.
> >
> > I unfortunately don't really have a good proposal to offer. Isn't it
> > better to simply integrate all those Perl modules as normal Buildroot
> > packages, and have the proper tools/scripts to update those Perl module
> > packages from CPAN ? So it would be a bit like your scancpan script,
> > except that packages are committed in the Buildroot Git repository, and
> > with scancpan you can update those packages from CPAN and send patches
> > to Buildroot to push those updates.
>
> A BR user (a single developer or an organization) needs its own
> repository for config, specific packages and final application.
> At this time, I think that packages generated by `scancpan` must be
> saved in an user repo and not in the BR repo.
That would be ok if that would work for *all* packages. But apparently
for some packages, you anyway need them in the BR repository because
the scancpan cannot generate the package .mk completely (if I
understand correctly, when the package has dependencies on C/native
libraries). And I'd find it really strange/weird to have packages in
Buildroot that declare some dependencies that are not available in
Buildroot.
Having hundreds of Perl packages does not really scare me much actually,
for several reasons:
(1) It seems like with a tool similar to scancpan, one can easily
maintain/updated these packages.
(2) You're active on maintaining the Perl stuff.
(3) With the perl infrastructure you've done, each .mk file is really
small and straightforward.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2013-11-21 9:17 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 17:01 [Buildroot] [pkg-perl infra 00/12] a package infrastructure for Perl/CPAN modules Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 01/12] perl: new infrastructure Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 02/12] cpan: a home for Perl modules Francois Perrad
2013-11-20 17:23 ` Thomas Petazzoni
2013-11-20 21:03 ` François Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 03/12] cpanminus: remove it Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 04/12] perl: remove useless patch Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 05/12] qemu: add a Config.in.host Francois Perrad
2013-11-20 17:25 ` Thomas Petazzoni
2013-11-20 21:09 ` François Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 06/12] libxml-parser-perl: move and refactor with perl infrastructure Francois Perrad
2013-11-20 17:28 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 07/12] host-libmodule-build-perl: new package Francois Perrad
2013-11-20 17:21 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 08/12] manual: adding packages perl Francois Perrad
2013-11-20 17:33 ` Thomas Petazzoni
2013-11-21 8:47 ` François Perrad
2013-11-21 9:17 ` Thomas Petazzoni
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 09/12] libcurses-perl: new package Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 10/12] libnet-ssleay-perl: " Francois Perrad
2013-11-20 17:01 ` [Buildroot] [pkg-perl infra 11/12] libmoose-perl: " Francois Perrad
2013-11-20 17:02 ` [Buildroot] [pkg-perl infra 12/12] libxml-libxml-perl: " Francois Perrad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox