10 open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control";
11 my @lines = <$control_fh>;
15 my $in_build_depends_block;
16 for my $line ( @lines ) {
18 if ( $line =~ m
|Build
-Depends
:| ) {
19 $in_build_depends_block = 1;
20 $line =~ s
|Build
-Depends
:||;
22 next unless $in_build_depends_block;
23 if ( $line =~ m
|^\s
*$| ) {
26 for my $dep ( split ',', $line ) {
28 push @build_depends, $dep unless ( map { ( $dep =~ m
|$_| ) ?
1 : () } @exclusions);
31 print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n";