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