File: fix_4_os2.pl

package info (click to toggle)
perl-tk 1:804.033-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 34,724 kB
  • ctags: 37,174
  • sloc: ansic: 349,541; perl: 52,192; sh: 17,904; makefile: 5,732; asm: 3,565; ada: 1,681; pascal: 1,089; cpp: 1,006; yacc: 883; cs: 879
file content (61 lines) | stat: -rw-r--r-- 1,395 bytes parent folder | download | duplicates (7)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
sub OS2_massage {		# Need to put before BEGIN
  if (@ARGV) {
    die <<EOD;

Please start me as one of
	perl $0 x
	perl $0 open32
	perl $0 pm
EOD
  }
  if (not defined $win_arch) {
      $win_arch = 'pm';
      print STDERR <<EOP;

No Window architecture specified, building for PM.

Please start me as one of
	perl $0 x
	perl $0 open32
	perl $0 pm
if you want to specify architecture explicitely.

EOP
  }
  if ($win_arch ne 'x' and not -r 'pTk/mTk/open32/tkWinOS2.c' ) {
    print <<EOD;

Cannot find pTk/mTk/open32/tkWinOS2.c, trying to find Tk-OS2src nearby...

EOD
    my @zips = <../Tk-OS2src-*/perltk_os2_common.zip>;

    die <<EOD unless @zips;

Cannot find ../Tk-OS2src-*/perltk_os2_common.zip, did you read README.os2?

EOD
    print 'Extracting OS/2-related files...\nunzip', $zips[-1], "\n";
    system 'unzip', $zips[-1] and die "Unzip: $!";
    print "Extracted...\n";
  }
  if ($win_arch eq 'pm' and not -r 'pTk/mTk/os2/tkOS2Int.h') {
    print <<EOD unless @zips;

Cannot find pTk/mTk/os2/tkOS2Int.h, trying to find Tk-OS2src nearby...

EOD
    my @zips = <../Tk-OS2src-*/perltk_os2_pm.zip>;

    die <<EOD unless @zips;

Cannot find ../Tk-OS2src-*/perltk_os2_pm.zip, did you read README.os2?

EOD
    print 'Extracting OS/2-related files...\nunzip', $zips[-1], "\n";
    system 'unzip', $zips[-1] and die "Unzip: $!";
  }
  $test_perl = 'perl__.exe' if $win_arch ne 'x';
}

1;