summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/fix_4_os2.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-05-12 16:54:37 +0000
committerNorbert Preining <preining@logic.at>2010-05-12 16:54:37 +0000
commit661c41a09e39a182865e0b51e34cc995a0dc96e8 (patch)
tree2f79bb1406e22fdcb2587be8ffda6c0c609d7932 /Master/tlpkg/tlperl/lib/fix_4_os2.pl
parentb645030efc22e13c2498a1522083634ab91b2de1 (diff)
move tlperl.straw to tlperl
git-svn-id: svn://tug.org/texlive/trunk@18210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/fix_4_os2.pl')
-rwxr-xr-xMaster/tlpkg/tlperl/lib/fix_4_os2.pl61
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/fix_4_os2.pl b/Master/tlpkg/tlperl/lib/fix_4_os2.pl
new file mode 100755
index 00000000000..4932fdf17c3
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/fix_4_os2.pl
@@ -0,0 +1,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;