aboutsummaryrefslogtreecommitdiff
path: root/utils/scancpan
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2018-10-10 08:46:13 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-10 09:06:04 +0200
commit37e85660b525a63018fec1442b0a5cc263809e4c (patch)
tree149c63c4f95331d835070ec16467cbceb3b6fa6c /utils/scancpan
parentb4fd962c46ee5c56ce79ca91eb818674aa5ac064 (diff)
downloadbuildroot-37e85660b525a63018fec1442b0a5cc263809e4c.tar.gz
buildroot-37e85660b525a63018fec1442b0a5cc263809e4c.tar.bz2
scancpan: split multiple dependencies on multiple lines
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils/scancpan')
-rwxr-xr-xutils/scancpan12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/scancpan b/utils/scancpan
index 64599f4305..632e7aa95c 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -717,10 +717,14 @@ 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{ }, map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ),
- map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} );
- my $host_dependencies = join q{ }, map { q{host-} . fsname( $_ ); } sort( @{$deps_build{$distname}},
- @{$deps_runtime{$distname}} );
+ my @dependencies = ( map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ),
+ map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} ) );
+ my $dependencies = join qq{ \\\n\t}, @dependencies;
+ $dependencies = qq{\\\n\t} . $dependencies if scalar @dependencies > 1;
+ my @host_dependencies = map { q{host-} . fsname( $_ ); } sort( @{$deps_build{$distname}},
+ @{$deps_runtime{$distname}} );
+ my $host_dependencies = join qq{ \\\n\t}, @host_dependencies;
+ $host_dependencies = qq{\\\n\t} . $host_dependencies if scalar @host_dependencies > 1;
my $license = brlicense( ref $dist->{license} eq 'ARRAY'
? join q{ or }, @{$dist->{license}}
: $dist->{license} );