1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/usr/bin/perl -w
use strict;
print STDERR " $0 ", join(' ', @ARGV), "\n";
my $to_untag = '';
while (<>) {
s,(\$\{_IMPORT_PREFIX}/lib)(?!/$ENV{DEB_HOST_MULTIARCH}),$1/$ENV{DEB_HOST_MULTIARCH},g;
s,/$ENV{DEB_HOST_MULTIARCH}/,/\${DEB_HOST_MULTIARCH}/,g;
s,\.so\.1\.3\.\d*,\.so,g;
s,([^a-z]fltk\w*(?<!_SHARED))(\W),${1}_STATIC$2,g;
s,(libfltk\w*)_SHARED,$1,g;
if (/^#/) {
$to_untag =~ s/_SHARED//g;
print $to_untag;
if (/"(fltk.*)_SHARED"/) {
$to_untag = ("# Create imported target $1\n" .
"add_library($1 SHARED IMPORTED)\n\n$_");
} else {
$to_untag = '';
}
} elsif ($to_untag) {
next if /IMPORTED_LINK_INTERFACE_LIBRARIES_NONE/;
$to_untag .= $_;
}
print;
}
|