a package infrastructure for Perl/CPAN modules
v3 cover a package infrastructure for Perl/CPAN modules
delta V2 vs V3 :
- [03/12] scancpan:
add options (including a update/force mode)
refactor with Pod::Usage
- [12/12] libxml-libxml-perl:
includes all its CPAN dependencies
Francois Perrad (12):
perl: new infrastructure
cpan: a home for Perl modules
scancpan: a new script
cpanminus: remove it
perl: remove useless patch
qemu: add a Config.in.host
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
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 | 11 +- package/cpan/Config.in | 6 + package/cpan/cpan.mk | 1 + package/cpan/libcurses-perl/Config.in | 6 + package/cpan/libcurses-perl/libcurses-perl.mk | 15 + .../libmodule-build-perl/libmodule-build-perl.mk | 13 + 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 + .../cpan/libxml-namespacesupport-perl/Config.in | 5 + .../libxml-namespacesupport-perl.mk | 16 + .../cpan/libxml-parser-perl/libxml-parser-perl.mk | 17 + package/cpan/libxml-sax-base-perl/Config.in | 5 + .../libxml-sax-base-perl/libxml-sax-base-perl.mk | 16 + package/cpan/libxml-sax-perl/Config.in | 7 + package/cpan/libxml-sax-perl/libxml-sax-perl.mk | 15 + 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/perl/perl-fix-Module-Build.patch | 16 - package/pkg-perl.mk | 220 ++++++ package/qemu/Config.in.host | 10 + support/scripts/scancpan | 700 ++++++++++++++++++++ 31 files changed, 1216 insertions(+), 157 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/libmodule-build-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-namespacesupport-perl/Config.in create mode 100644 package/cpan/libxml-namespacesupport-perl/libxml-namespacesupport-perl.mk create mode 100644 package/cpan/libxml-parser-perl/libxml-parser-perl.mk create mode 100644 package/cpan/libxml-sax-base-perl/Config.in create mode 100644 package/cpan/libxml-sax-base-perl/libxml-sax-base-perl.mk create mode 100644 package/cpan/libxml-sax-perl/Config.in create mode 100644 package/cpan/libxml-sax-perl/libxml-sax-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 support/scripts/scancpan
Signature · 1 line
1.7.9.5
PATCH v3 1/12 perl: new infrastructure
--- package/Makefile.in | 11 ++- package/intltool/intltool.mk | 4 +- package/pkg-perl.mk | 220 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 6 deletions(-) create mode 100644 package/pkg-perl.mk
package/Makefile.in +7 -4
@@ -206,6 +206,8 @@ HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH) HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \ sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p') +HOST_PERL_ARCHNAME = $(shell perl -MConfig -e "print Config->{archname}") + TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \
@@ -241,11 +243,11 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ LDFLAGS="$(TARGET_LDFLAGS)" \ FCFLAGS="$(TARGET_FCFLAGS)" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ - PERLLIB="$(HOST_DIR)/usr/lib/perl" \ + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 \ STAGING_DIR="$(STAGING_DIR)" TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \ - PERLLIB="$(HOST_DIR)/usr/lib/perl" + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \ AR="$(HOSTAR)" \
@@ -265,7 +267,7 @@ 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" \ + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 \ LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" HOST_MAKE_ENV=PATH=$(HOST_PATH) \
@@ -273,7 +275,7 @@ HOST_MAKE_ENV=PATH=$(HOST_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" + PERL5LIB=$(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 ################################################################################
@@ -363,4 +365,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
package/intltool/intltool.mk +2 -2
@@ -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/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 $(eval $(autotools-package)) $(eval $(host-autotools-package))
package/pkg-perl.mk new file +220 -0
220 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 2/12 cpan: a home for Perl modules
In reply to Francois Perrad--- Config.in | 7 +++++++ package/Config.in | 1 + package/cpan/cpan.mk | 1 + 3 files changed, 9 insertions(+) create mode 100644 package/cpan/Config.in create mode 100644 package/cpan/cpan.mk
Config.in +7 -0
@@ -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
package/Config.in +1 -0
@@ -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"
package/cpan/Config.in new file +0 -0
package/cpan/cpan.mk new file +1 -0
@@ -0,0 +1 @@ +include package/cpan/*/*.mk
Signature · 1 line
1.7.9.5
PATCH v3 2/12 cpan: a home for Perl modules
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 15 lines
Signed-off-by Francois Perrad <[email protected]>--- Config.in | 7 +++++++ package/Config.in | 1 + package/cpan/cpan.mk | 1 + 3 files changed, 9 insertions(+) create mode 100644 package/cpan/Config.in create mode 100644 package/cpan/cpan.mkConfig.in +0
-0
Config.in config BR2_DEBIAN_MIRROR · line 215
Quoted 9 lines
Config.in +6
-0@@ -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.
"following" ? I know you duplicated the other entries, but it does not really make sense. What about:
CPAN has multiple software mirrors scattered around the world. This option allows you to select a mirror.
The list of mirrors is available at:
http://search.cpan.org/mirror
package/cpan/cpan.mk line 1
Quoted 7 lines
package/cpan/cpan.mk new file +1
-0@@ -0,0 +1 @@ +include package/cpan/*/*.mk
This breaks since there is no cpan package yet.
Just introiduce this one change when you add the first CPAN package.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 3/12 scancpan: a new script
In reply to Francois Perradwhich populates the directory package/cpan
--- support/scripts/scancpan | 700 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 700 insertions(+) create mode 100755 support/scripts/scancpan
support/scripts/scancpan new file +700 -0
@@ -0,0 +1,700 @@ +#!/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 <[email protected]> + + =head1 COPYRIGHT AND LICENSE + + This software is copyright (c) 2013 by Nicholas R. Perez <[email protected]>. + + 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 Getopt::Long; +use Pod::Usage; +use File::Basename; +use Module::CoreList; +use MetaCPAN::API::Tiny; + +my ($help, $man, $quiet, $force, $recommend); +GetOptions( 'help|?' => \$help, + 'man' => \$man, + 'quiet|q' => \$quiet, + 'force|f' => \$force, + 'recommend' => \$recommend +) or pod2usage(-exitval => 1); +pod2usage(-exitval => 0) if $help; +pod2usage(-exitval => 0, -verbose => 2) if $man; +pod2usage(-exitval => 1) if scalar @ARGV == 0; + +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}} unless $quiet; + my $result = $mcpan->release( distribution => $name ); + $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|; + next if Module::CoreList::first_release( $modname ); + next if ${$dep}{phase} eq q{develop}; + next if ${$dep}{phase} eq q{test}; + next if !$recommend && ${$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 ); + } + unshift @deps_build, q{Module-Build} if $mb; + $deps_build{$name} = \@deps_build; + $deps_runtime{$name} = \@deps_runtime; + } + return; +} + +foreach my $distname (@ARGV) { + fetch( $distname ); +} +say scalar keys %dist, q{ packages fetched.} unless $quiet; + +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; + if ($force || !-f $cfgname) { + my $abstract = $dist->{abstract} || q{NO ABSTRACT}; + say qq{write ${cfgname}} unless $quiet; + 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; + } + if ($force || !-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}} unless $quiet; + 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}} unless $quiet; +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}} unless $quiet; +open $fh, q{>}, $cfgname; +say {$fh} join qq{\n}, sort keys %pkg; +close $fh; + +__END__ + +=head1 NAME + +support/scripts/scancpan Try-Tiny Moo + +=head1 SYNOPSIS + +supports/scripts/scancpan [options] [distname ...] + + Options: + -help + -man + -quiet + -force + -recommend + +=head1 OPTIONS + +=over 8 + +=item B<-help> + +Print a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=item B<-quiet> + +Executes without output + +=item B<-force> + +Forces the overwritting of existing files. + +=item B<-recommend> + +Adds I<recommended> dependencies. + +=back + +=head1 DESCRIPTION + +This script populates the directory package/cpan with all the Perl/CPAN +distributions required by all distname. These data are fetched from +https://metacpan.org/. + +See the Buildroot documentation for details on the usage of the Perl +infrastructure. + +=head1 LICENSE + +This script is a part of Buildroot. + +This script requires the module C<MetaCPAN::API::Tiny> (version 1.131730) +which was included at the beginning of this file by the tool C<fatpack>. + +See L<http://search.cpan.org/~nperez/MetaCPAN-API-Tiny-1.131730/>. + +See L<http://search.cpan.org/search?query=App-FatPacker&mode=dist>. + +These both libraries are free software and may be distributed under the same +terms as perl itself. + +And perl may be distributed under the terms of Artistic v1 or GPL v1 license. + +=cut
Signature · 1 line
1.7.9.5
PATCH v3 3/12 scancpan: a new script
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 1 line
which populates the directory package/cpan
I think this would deserve a bit more explanations, here and in the cover letter.
For example, it is not obvious what this script does, and what it is for, and what the expected result is.
Note that I am reviewing the patches in sequence, so this may become obvious in the following patches, but still, I think we do want the explanations explicitly with this patch, so we do not need to infer it from the following changes...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 4/12 cpanminus: remove it
In reply to Francois Perrad--- 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
package/Config.in +0 -1
@@ -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
package/cpanminus/Config.in deleted +0 -40
@@ -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
package/cpanminus/cpanminus.mk deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 5/12 perl: remove useless patch
In reply to Francois Perradafter the removal of cpanminus
--- package/perl/perl-fix-Module-Build.patch | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 package/perl/perl-fix-Module-Build.patch
package/perl/perl-fix-Module-Build.patch deleted +0 -16
@@ -1,16 +0,0 @@ - -Signed-off-by: Francois Perrad <[email protected]> - -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;
Signature · 1 line
1.7.9.5
PATCH v3 6/12 qemu: add a Config.in.host
In reply to Francois Perradafter the removal of cpanminus
--- package/Config.in.host | 1 + package/qemu/Config.in.host | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 package/qemu/Config.in.host
package/Config.in.host +1 -0
@@ -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"
package/qemu/Config.in.host new file +10 -0
@@ -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/
Signature · 1 line
1.7.9.5
PATCH v3 7/12 host-libxml-parser-perl: move and refactor with perl infrastructure
In reply to Francois Perrad--- package/Config.in | 1 - .../cpan/libxml-parser-perl/libxml-parser-perl.mk | 17 ++++++++++ package/libxml-parser-perl/Config.in | 11 ------ package/libxml-parser-perl/libxml-parser-perl.mk | 35 -------------------- 4 files changed, 17 insertions(+), 47 deletions(-) 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
package/Config.in +0 -1
@@ -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"
package/cpan/libxml-parser-perl/libxml-parser-perl.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# 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/ +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 $(host-perl-package))
package/libxml-parser-perl/Config.in deleted +0 -11
@@ -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/ -
package/libxml-parser-perl/libxml-parser-perl.mk deleted +0 -35
@@ -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))
Signature · 1 line
1.7.9.5
PATCH v3 8/12 host-libmodule-build-perl: new package
In reply to Francois Perradthe version coming with host-perl is too old
--- .../libmodule-build-perl/libmodule-build-perl.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/cpan/libmodule-build-perl/libmodule-build-perl.mk
package/cpan/libmodule-build-perl/libmodule-build-perl.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# 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/ +HOST_LIBMODULE_BUILD_PERL_DEPENDENCIES = + +$(eval $(host-perl-package))
Signature · 1 line
1.7.9.5
PATCH v3 8/12 host-libmodule-build-perl: new package
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 15 lines
the version coming with host-perl is too old
Signed-off-by Francois Perrad <[email protected]>--- .../libmodule-build-perl/libmodule-build-perl.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/cpan/libmodule-build-perl/libmodule-build-perl.mkpackage/cpan/libmodule-build-perl/libmodule-build-perl.mk new file +1
-0@@ -0,0 +1,13 @@ +################################################################################
package/cpan/libmodule-build-perl/libmodule-build-perl.mk line 11
Quoted 10 lines
package/cpan/libmodule-build-perl/libmodule-build-perl.mk new file +10
-0+# +# 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/ +HOST_LIBMODULE_BUILD_PERL_DEPENDENCIES =
Missing _LINCENSE and _LICENSE_FILES.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 9/12 manual: adding packages perl
In reply to Francois Perrad--- 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
docs/manual/adding-packages-perl.txt new file +91 -0
@@ -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 +supports/scripts/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.
docs/manual/adding-packages.txt +2 -0
@@ -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[]
Signature · 1 line
1.7.9.5
PATCH v3 9/12 manual: adding packages perl
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 9 lines
docs/manual/adding-packages-perl.txt new file +3
-0@@ -0,0 +1,91 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: +
docs/manual/adding-packages-perl.txt line 13
Quoted 10 lines
docs/manual/adding-packages-perl.txt new file +10
-0+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 :
I don't really like the way you introduce this by stating "how NOT to [...]".
I would prefer that you straight from the start state that they are generated files, and still describe all the entries later. Maybe something like:
---8<---
The +.mk+ files for perl packages are generated files, by running the script +support/scripts/scancpan+ fron Buildroot's top directory:
---
support/scripts/scancpan foo-bar
---
In most cases, this script will generate a correct +.mk+ file, but in some cases (eg. when adding a native C dependency), manual editing might be needed.
Here is how a +.mk+ for a perl package might look like:
---8<---
... and then continue with the standard layout below:
docs/manual/adding-packages-perl.txt line 23
Quoted 9 lines
docs/manual/adding-packages-perl.txt new file +9
-0+------------------------ +01: ################################################################################ +02: # +03: # libfoo-bar-perl +04: # +05: ################################################################################ +06: +07: LIBFOO_BAR_PERL_VERSION = 0.02 +08: LIBFOO_BAR_PERL_AUTHOR = MONGERS
There is no reason to include/introduce _AUTHORS, since;
- your perl-infra does even use it
- no other pkg-infra does it
- the legal-info does not use it
docs/manual/adding-packages-perl.txt line 31
Quoted 8 lines
docs/manual/adding-packages-perl.txt new file +8
-0+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))
How does the scancpan script decide to emit target and/or host variants?
docs/manual/adding-packages-perl.txt line 39
Quoted 8 lines
docs/manual/adding-packages-perl.txt new file +8
-0+------------------------ + +In fact, this file and the Config.in are written by running +the script +supports/scripts/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.
This hunk should be included in the general description, above.
docs/manual/adding-packages-perl.txt line 43
Quoted 3 lines
docs/manual/adding-packages-perl.txt new file +3
-0+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+.
After discussing this at the Developpers' Day, we come to the conclusion that, since it is needed to manually tweak some of the +.mk+ files, we do prefer that all be committed in the tree, even if they are 100% automatically generated.
docs/manual/adding-packages-perl.txt line 51
Quoted 7 lines
docs/manual/adding-packages-perl.txt new file +7
-0+[[perl-package-reference]] + ++perl-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^ + +This infrastructure handles various Perl build systems : ++ExtUtils-MakeMaker+, +Module-Build+ and +Module-Build-Tiny+.
From wht I could see in patch 1, you only added two buildsystems:
Build.PL and Makefile.PL, while the sentence above implies there are three. Did I miss anything?
docs/manual/adding-packages-perl.txt line 53
Quoted 1 line
docs/manual/adding-packages-perl.txt new file +1
-0+The main macro of the Perl/CPAN package infrastructure is
Since you here mix perl and cpan, I wonder if the best name for this infra is perl or cpan.
For example, the luarocks infra we recently added is called 'luarocks', as per the repository of lua paclage, not 'lua' as per the language name.
So maybe we should call this perl infdra cpan instead. Any comment against that?
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 9/12 manual: adding packages perl
Quoted 34 lines · Yann E. MORIN
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 9 lines
docs/manual/adding-packages-perl.txt new file +3
-0@@ -0,0 +1,91 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: +docs/manual/adding-packages-perl.txt line 13
Quoted 10 lines
docs/manual/adding-packages-perl.txt new file +10
-0+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 :I don't really like the way you introduce this by stating "how NOT to [...]".
I would prefer that you straight from the start state that they are generated files, and still describe all the entries later. Maybe something like:
---8<---
The +.mk+ files for perl packages are generated files, by running the script +support/scripts/scancpan+ fron Buildroot's top directory:
Quoted 7 lines
---
support/scripts/scancpan foo-bar
---In most cases, this script will generate a correct +.mk+ file, but in some cases (eg. when adding a native C dependency), manual editing might be needed.
Actually, in most cases manual editing is needed to add _LICENSE_FILES.
[snip]
Quoted 11 lines
docs/manual/adding-packages-perl.txt line 53
Quoted 1 line
docs/manual/adding-packages-perl.txt new file +1
-0+The main macro of the Perl/CPAN package infrastructure isSince you here mix perl and cpan, I wonder if the best name for this infra is perl or cpan.
For example, the luarocks infra we recently added is called 'luarocks', as per the repository of lua paclage, not 'lua' as per the language name.
So maybe we should call this perl infdra cpan instead. Any comment against that?
Sounds like a good idea to me. Then you also see the relation betweenpackage/pkg-cpan.mk and package/cpan (like for cmake).
Regards,
Arnout
Quoted 4 lines
Regards,
Yann E. MORIN.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 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
PATCH v3 10/12 libcurses-perl: new package
In reply to Francois Perrad(depends on ncurses)
--- 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
package/cpan/Config.in +1 -0
@@ -0,0 +1 @@ +source "package/cpan/libcurses-perl/Config.in"
package/cpan/libcurses-perl/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBCURSES_PERL + bool "libcurses-perl" + select BR2_PACKAGE_NCURSES + help + terminal screen handling and optimization +
package/cpan/libcurses-perl/libcurses-perl.mk new file +15 -0
@@ -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))
Signature · 1 line
1.7.9.5
PATCH v3 10/12 libcurses-perl: new package
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 1 line
(depends on ncurses)
Not needed in the commit message.
[--SNIP--]
Quoted 8 lines
package/cpan/libcurses-perl/libcurses-perl.mk new file +2
-0@@ -0,0 +1,15 @@ +################################################################################ +#
package/cpan/libcurses-perl/libcurses-perl.mk line 12
Quoted 10 lines
package/cpan/libcurses-perl/libcurses-perl.mk new file +10
-0+# 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
Missing _LICENSE and _LICENSE_FILES.
package/cpan/libcurses-perl/libcurses-perl.mk line 15
Quoted 2 lines
package/cpan/libcurses-perl/libcurses-perl.mk new file +2
-0+$(eval $(perl-package)) +$(eval $(host-perl-package))
Do we need the host variant?
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 11/12 libnet-ssleay-perl: new package
In reply to Francois Perrad(depends on openssl)
--- 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
package/cpan/Config.in +1 -0
@@ -1 +1,2 @@ source "package/cpan/libcurses-perl/Config.in" +source "package/cpan/libnet-ssleay-perl/Config.in"
package/cpan/libnet-ssleay-perl/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBNET_SSLEAY_PERL + bool "libnet-ssleay-perl" + select BR2_PACKAGE_OPENSSL + help + Perl extension for using OpenSSL +
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk new file +16 -0
@@ -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))
Signature · 1 line
1.7.9.5
PATCH v3 11/12 libnet-ssleay-perl: new package
Fran?ois, All,
On 2013-11-23 10:25 +0100, Francois Perrad spake thusly:
Quoted 1 line
(depends on openssl)
Not needed in the commit log.
Quoted 9 lines
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk new file +3
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# libnet-ssleay-perl
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk line 13
Quoted 10 lines
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk new file +10
-0+# +################################################################################ + +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
Missing _LICENSE_FILES.
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk line 16
Quoted 2 lines
package/cpan/libnet-ssleay-perl/libnet-ssleay-perl.mk new file +2
-0+$(eval $(perl-package)) +$(eval $(host-perl-package))
Do we need the host variant?
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 12/12 libxml-libxml-perl: new package
In reply to Francois Perradand its CPAN dependencies
(depends on libxml2 & zlib)
--- package/cpan/Config.in | 4 ++++ package/cpan/libxml-libxml-perl/Config.in | 9 ++++++++ .../cpan/libxml-libxml-perl/libxml-libxml-perl.mk | 22 ++++++++++++++++++++ .../cpan/libxml-namespacesupport-perl/Config.in | 5 +++++ .../libxml-namespacesupport-perl.mk | 16 ++++++++++++++ package/cpan/libxml-sax-base-perl/Config.in | 5 +++++ .../libxml-sax-base-perl/libxml-sax-base-perl.mk | 16 ++++++++++++++ package/cpan/libxml-sax-perl/Config.in | 7 +++++++ package/cpan/libxml-sax-perl/libxml-sax-perl.mk | 15 +++++++++++++ 9 files changed, 99 insertions(+) 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-namespacesupport-perl/Config.in create mode 100644 package/cpan/libxml-namespacesupport-perl/libxml-namespacesupport-perl.mk create mode 100644 package/cpan/libxml-sax-base-perl/Config.in create mode 100644 package/cpan/libxml-sax-base-perl/libxml-sax-base-perl.mk create mode 100644 package/cpan/libxml-sax-perl/Config.in create mode 100644 package/cpan/libxml-sax-perl/libxml-sax-perl.mk
package/cpan/Config.in +4 -0
@@ -1,2 +1,6 @@ source "package/cpan/libcurses-perl/Config.in" source "package/cpan/libnet-ssleay-perl/Config.in" +source "package/cpan/libxml-libxml-perl/Config.in" +source "package/cpan/libxml-namespacesupport-perl/Config.in" +source "package/cpan/libxml-sax-base-perl/Config.in" +source "package/cpan/libxml-sax-perl/Config.in"
package/cpan/libxml-libxml-perl/Config.in new file +9 -0
@@ -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 +
package/cpan/libxml-libxml-perl/libxml-libxml-perl.mk new file +22 -0
@@ -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))
package/cpan/libxml-namespacesupport-perl/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_LIBXML_NAMESPACESUPPORT_PERL + bool "libxml-namespacesupport-perl" + help + a simple generic namespace support class +
package/cpan/libxml-namespacesupport-perl/libxml-namespacesupport-perl.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# libxml-namespacesupport-perl +# +################################################################################ + +LIBXML_NAMESPACESUPPORT_PERL_VERSION = 1.11 +LIBXML_NAMESPACESUPPORT_PERL_AUTHOR = PERIGRIN +LIBXML_NAMESPACESUPPORT_PERL_SOURCE = XML-NamespaceSupport-$(LIBXML_NAMESPACESUPPORT_PERL_VERSION).tar.gz +LIBXML_NAMESPACESUPPORT_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PE/PERIGRIN/ +LIBXML_NAMESPACESUPPORT_PERL_DEPENDENCIES = perl +HOST_LIBXML_NAMESPACESUPPORT_PERL_DEPENDENCIES = +LIBXML_NAMESPACESUPPORT_PERL_LICENSE = perl_5 + +$(eval $(perl-package)) +$(eval $(host-perl-package))
package/cpan/libxml-sax-base-perl/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_LIBXML_SAX_BASE_PERL + bool "libxml-sax-base-perl" + help + Base class for SAX Drivers and Filters +
package/cpan/libxml-sax-base-perl/libxml-sax-base-perl.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# libxml-sax-base-perl +# +################################################################################ + +LIBXML_SAX_BASE_PERL_VERSION = 1.08 +LIBXML_SAX_BASE_PERL_AUTHOR = GRANTM +LIBXML_SAX_BASE_PERL_SOURCE = XML-SAX-Base-$(LIBXML_SAX_BASE_PERL_VERSION).tar.gz +LIBXML_SAX_BASE_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GR/GRANTM/ +LIBXML_SAX_BASE_PERL_DEPENDENCIES = perl +HOST_LIBXML_SAX_BASE_PERL_DEPENDENCIES = +LIBXML_SAX_BASE_PERL_LICENSE = perl_5 + +$(eval $(perl-package)) +$(eval $(host-perl-package))
package/cpan/libxml-sax-perl/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBXML_SAX_PERL + bool "libxml-sax-perl" + select BR2_PACKAGE_LIBXML_NAMESPACESUPPORT_PERL + select BR2_PACKAGE_LIBXML_SAX_BASE_PERL + help + Simple API for XML +
package/cpan/libxml-sax-perl/libxml-sax-perl.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# libxml-sax-perl +# +################################################################################ + +LIBXML_SAX_PERL_VERSION = 0.99 +LIBXML_SAX_PERL_AUTHOR = GRANTM +LIBXML_SAX_PERL_SOURCE = XML-SAX-$(LIBXML_SAX_PERL_VERSION).tar.gz +LIBXML_SAX_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GR/GRANTM/ +LIBXML_SAX_PERL_DEPENDENCIES = perl libxml-namespacesupport-perl libxml-sax-base-perl +HOST_LIBXML_SAX_PERL_DEPENDENCIES = host-libxml-namespacesupport-perl host-libxml-sax-base-perl + +$(eval $(perl-package)) +$(eval $(host-perl-package))
Signature · 1 line
1.7.9.5
v3 cover a package infrastructure for Perl/CPAN modules
In reply to Francois PerradHi Francois,
Now that we have some dedicated time at the BR developer days we are
finally getting around to reviewing your perl infrastructure update. I'm going to write down some overall remarks, while Yann will be posting more detailed feedback on the individual patches.
First of all, it took a bit of effort to rebase on current master; if
you continue with this series, you can start with pulling it from git at gitorious.org:buildroot/buildroot.git branch perl-fixup
Quoted 11 lines · Francois Perrad
delta V2 vs V3 :
- [03/12] scancpan:
add options (including a update/force mode)
refactor withPod::Usage- [12/12] libxml-libxml-perl:
includes all its CPAN dependenciesFrancois Perrad (12):
perl: new infrastructure
For this one, there are some issues with the details but the basic
concept of adding a perl-package macro looks good.
It would be good to add a dependency mechanism like for python: add perl
to the dependencies automatically, and remove it from the host dependencies. That way you can also remove the explicit setting of host dependencies because it will always be the same as target dependencies (except for the manually edited packages but that's fine).
Quoted 2 lines
cpan: a home for Perl modules
scancpan: a new script
This script looks really good as a way to semi-automatically keep our
perl packages up-to-date. However, we think that the packages should really be committed buildroot and not be generated by the user. Even if we add a few hundred perl packages, that's not a big deal: we do that for xorg as well.
For the naming of the packages, we prefer "perl-<pkgname>" rather than
the Debian naming "lib<pkgname>-perl".
Given that you're using $debname, I wonder: is this script in any way
taken over from a Debian script? If so, you should credit the original authors (even if it is just "inspired on ... by ...").
Ideally, this scancpan support should save into BR2_EXTERNAL if that is
defined. How that can be done in practice may be tricky, however... Perhaps the updating of the cpan/Config.in should _not_ be automated. Or else the cpan directory can be given as an argument.
When running the script, I've encountered an issue: on line 589:
$dist->{license} seems to be a single string, not an array.
Also the example you give in the documentation could be something more
relevant - for example, the packages that we carry in buildroot.
The perl_5 license should be added to our list of license (in a separate
patch).
Maybe the generated files should be marked with an "Automatically
generated by" header - even though that violates our normal coding style.
I think the _AUTHOR variable is redundant.
The _LICENSE_FILES variable is not set by the script - most likely
because it is not always in the same file. This can be solved by manually editing the packages which do have a license file. Yet another reason for including the packages in buildroot instead of letting the user generate them.
Quoted 3 lines
cpanminus: remove it
perl: remove useless patch
qemu: add a Config.in.host
This one can probably be done independently of the rest (but then remove
the "after ..." comment).
Quoted 1 line
host-libxml-parser-perl: move and refactor with perl infrastructure
Why did you convert this into a host-only package?
I think this one and the following ones should go to the beginning of
the series - before the cpan stuff which is more controversial.
Quoted 3 lines
host-libmodule-build-perl: new package
manual: adding packages perl
libcurses-perl: new package
make[2]: *** No rule to make target $(STAGING_DIR)/usr/lib/perl5/5.18.2/x86_64-linux/CORE/patchlevel-debian.h', needed by Curses.o'. Stop.
(this is with a x86_64 target, and obviously on a debian host).
Quoted 1 line
libnet-ssleay-perl: new package
This one interactively asks me:
Do you want to run external tests?
Is there any way to avoid that, i.e. preseeding the answer to "no"
(actually we don't want to run tests at all).
It also fails because of the -debian thing.
Quoted 1 line
libxml-libxml-perl: new package
libxml-sax-perl also asks me something interactively.
libxml-libxml-perl fails to build with:
make[2]: *** No rule to make target `pure_all'. Stop.
I'm sorry that we're giving you so much work :-)
Regards,
Arnout
Quoted 59 lines
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 | 11 +- package/cpan/Config.in | 6 + package/cpan/cpan.mk | 1 + package/cpan/libcurses-perl/Config.in | 6 + package/cpan/libcurses-perl/libcurses-perl.mk | 15 + .../libmodule-build-perl/libmodule-build-perl.mk | 13 + 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 + .../cpan/libxml-namespacesupport-perl/Config.in | 5 + .../libxml-namespacesupport-perl.mk | 16 + .../cpan/libxml-parser-perl/libxml-parser-perl.mk | 17 + package/cpan/libxml-sax-base-perl/Config.in | 5 + .../libxml-sax-base-perl/libxml-sax-base-perl.mk | 16 + package/cpan/libxml-sax-perl/Config.in | 7 + package/cpan/libxml-sax-perl/libxml-sax-perl.mk | 15 + 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/perl/perl-fix-Module-Build.patch | 16 - package/pkg-perl.mk | 220 ++++++ package/qemu/Config.in.host | 10 + support/scripts/scancpan | 700 ++++++++++++++++++++ 31 files changed, 1216 insertions(+), 157 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/libmodule-build-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-namespacesupport-perl/Config.in create mode 100644 package/cpan/libxml-namespacesupport-perl/libxml-namespacesupport-perl.mk create mode 100644 package/cpan/libxml-parser-perl/libxml-parser-perl.mk create mode 100644 package/cpan/libxml-sax-base-perl/Config.in create mode 100644 package/cpan/libxml-sax-base-perl/libxml-sax-base-perl.mk create mode 100644 package/cpan/libxml-sax-perl/Config.in create mode 100644 package/cpan/libxml-sax-perl/libxml-sax-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 support/scripts/scancpan
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 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
v3 cover a package infrastructure for Perl/CPAN modules
Quoted 4 lines · Arnout Vandecappelle
libxml-libxml-perl fails to build with:
make[2]: *** No rule to make target `pure_all'. Stop.
Looks like the error actually was:
Checking for ability to link against libxml2...libxml2, zlib, and/or the Math library (-lm) have not been found.
Try setting LIBS and INC values on the command line
So another problem is that configure failures are not detected. If you
can find a solution for that, that would be great.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 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
v3 cover a package infrastructure for Perl/CPAN modules
In reply to Arnout VandecappelleQuoted 3 lines · Arnout Vandecappelle
First of all, it took a bit of effort to rebase on current master; if
you continue with this series, you can start with pulling it from git at gitorious.org:buildroot/buildroot.git branch perl-fixup
It looks like I screwed up the rebase a bit, and the BR2_CPAN_MIRROR
moved from patch 2/12 to patch 7/12. Can you fix that when you repost?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 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