[go: up one dir, main page]

File: fix-fltk-targets

package info (click to toggle)
fltk1.3 1.3.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,224 kB
  • sloc: cpp: 105,017; ansic: 91,383; sh: 6,825; makefile: 1,948; perl: 24; xml: 7
file content (28 lines) | stat: -rwxr-xr-x 719 bytes parent folder | download | duplicates (2)
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;
}