diff mbox

[1/2] pkg-perl: refactor perl infrastructure

Message ID 1441222304-6207-1-git-send-email-francois.perrad@gadz.org
State Superseded
Headers show

Commit Message

Francois Perrad Sept. 2, 2015, 7:31 p.m. UTC
the perl dependency of cpan module is no longer generated by scancpan,
but added at the infrastructure level

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/pkg-perl.mk      | 8 ++++++++
 support/scripts/scancpan | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

Comments

Vicente Olivert Riera Sept. 7, 2015, 12:37 p.m. UTC | #1
Dear Francois Perrad

since you already sent a v2 of this series, could you please mark this
one as superseded in patchwork?

http://patchwork.ozlabs.org/patch/513641/
http://patchwork.ozlabs.org/patch/513642/

Thanks,

Vincent.

On 09/02/2015 08:31 PM, Francois Perrad wrote:
> the perl dependency of cpan module is no longer generated by scancpan,
> but added at the infrastructure level
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/pkg-perl.mk      | 8 ++++++++
>  support/scripts/scancpan | 2 +-
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
> index 6577588..a06c068 100644
> --- a/package/pkg-perl.mk
> +++ b/package/pkg-perl.mk
> @@ -39,7 +39,15 @@ PERL_RUN = PERL5LIB= $(HOST_DIR)/usr/bin/perl
>  
>  define inner-perl-package
>  
> +# Target packages need both the perl interpreter on the target (for
> +# runtime) and the perl interpreter on the host (for
> +# compilation). However, host packages only need the perl
> +# interpreter on the host.
> +ifeq ($(4),target)
> +$(2)_DEPENDENCIES += host-perl perl
> +else
>  $(2)_DEPENDENCIES += host-perl
> +endif
>  
>  #
>  # Configure step. Only define it if not already defined by the package
> diff --git a/support/scripts/scancpan b/support/scripts/scancpan
> index c7180c8..947d248 100755
> --- a/support/scripts/scancpan
> +++ b/support/scripts/scancpan
> @@ -655,7 +655,7 @@ while (my ($distname, $dist) = each %dist) {
>          # the auth part is not used, because we use $(BR2_CPAN_MIRROR)
>          my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} );
>          $directories =~ s|/$||;
> -        my $dependencies = join q{ }, qw( = perl ),
> +        my $dependencies = join q{ }, qw( = ),
>                                        map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ),
>                                        map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} );
>          my $host_dependencies = join q{ }, qw( = ),
>
diff mbox

Patch

diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
index 6577588..a06c068 100644
--- a/package/pkg-perl.mk
+++ b/package/pkg-perl.mk
@@ -39,7 +39,15 @@  PERL_RUN = PERL5LIB= $(HOST_DIR)/usr/bin/perl
 
 define inner-perl-package
 
+# Target packages need both the perl interpreter on the target (for
+# runtime) and the perl interpreter on the host (for
+# compilation). However, host packages only need the perl
+# interpreter on the host.
+ifeq ($(4),target)
+$(2)_DEPENDENCIES += host-perl perl
+else
 $(2)_DEPENDENCIES += host-perl
+endif
 
 #
 # Configure step. Only define it if not already defined by the package
diff --git a/support/scripts/scancpan b/support/scripts/scancpan
index c7180c8..947d248 100755
--- a/support/scripts/scancpan
+++ b/support/scripts/scancpan
@@ -655,7 +655,7 @@  while (my ($distname, $dist) = each %dist) {
         # the auth part is not used, because we use $(BR2_CPAN_MIRROR)
         my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} );
         $directories =~ s|/$||;
-        my $dependencies = join q{ }, qw( = perl ),
+        my $dependencies = join q{ }, qw( = ),
                                       map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ),
                                       map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} );
         my $host_dependencies = join q{ }, qw( = ),