~ubuntu-branches/ubuntu/natty/perl-tk/natty

« back to all changes in this revision

Viewing changes to Tk/MMutil.pm

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-03-14 13:54:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314135444-prc09u2or4dbr3to
Tags: 1:800.025-2
Add xlibs-dev to Build-Depends:,
Closes: #237942

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 1995-1999 Nick Ing-Simmons. All rights reserved.
 
1
# Copyright (c) 1995-2003 Nick Ing-Simmons. All rights reserved.
2
2
# This program is free software; you can redistribute it and/or
3
3
# modify it under the same terms as Perl itself.
4
4
package Tk::MMutil;
9
9
use File::Basename;
10
10
 
11
11
use vars qw($VERSION);
12
 
$VERSION = '3.052'; # $Id: //depot/Tk8/Tk/MMutil.pm#52 $
 
12
$VERSION = '3.056'; # $Id: //depot/Tk8/Tk/MMutil.pm#56 $
13
13
 
14
14
use Tk::MakeDepend;
15
15
 
272
272
   $self->{'LDFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
273
273
   $self->{'LDDLFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
274
274
  }
 
275
 elsif ($^O eq 'darwin' )
 
276
  {
 
277
   $self->{'LDDLFLAGS'} =~ s/-flat_namespace//;
 
278
   $self->{'LDDLFLAGS'} =~ s/-undefined\s+suppress//;
 
279
   if ( -e "$Config{'archlib'}/CORE/$Config{'libperl'}" ) {
 
280
    $self->{'LDDLFLAGS'} .= " -L\${PERL_ARCHLIB}/CORE -lperl ";
 
281
   }
 
282
   elsif ( -e "/System/Library/Perl/darwin/CORE/libperl.dylib" ) {
 
283
    $self->{'LDDLFLAGS'} .= " -L/System/Library/Perl/darwin/CORE -lperl ";
 
284
   }
 
285
   else {
 
286
    warn "Can't find libperl.dylib";
 
287
   }
 
288
   $self->{'LDFLAGS'} =~ s/-flat_namespace//;
 
289
   $self->{'LDFLAGS'} =~ s/-undefined\s+suppress//;
 
290
  }
275
291
 elsif ($^O =~ /(openbsd)/i)
276
292
  {
277
293
   # -Bforcearchive is bad news for Tk - we don't want all of libpTk.a in all .so-s.
332
348
 local $_ = $self->MM::manifypods;
333
349
 if ($] >= 5.00565)
334
350
  {
335
 
   s/(POD2MAN_EXE.*pod2man)/$1 --center "perl\/Tk Documentation" --release "Tk\$(VERSION)"/;
 
351
   s/(POD2MAN_EXE.*pod2man.*)/$1 --center "perl\/Tk Documentation" --release "Tk\$(VERSION)"/;
336
352
  }
337
353
 elsif ($] >= 5.003)
338
354
  {
339
 
   s/(POD2MAN_EXE.*pod2man)/$1 -center "perl\/Tk Documentation" -release "Tk\$(VERSION)"/;
 
355
   s/(POD2MAN_EXE.*pod2man.*)/$1 -center "perl\/Tk Documentation" -release "Tk\$(VERSION)"/;
340
356
  }
341
357
 else
342
358
  {
343
 
   s/(POD2MAN_EXE.*pod2man)/$1 -center \\"perl\/Tk Documentation\\" -release \\"Tk\$(VERSION)\\"/;
 
359
   s/(POD2MAN_EXE.*pod2man.*)/$1 -center \\"perl\/Tk Documentation\\" -release \\"Tk\$(VERSION)\\"/;
344
360
  }
345
361
 s/\bpod::/Tk::/mg;
346
362
 s/\bpTk:://mg;
519
535
     push(@opt,'LD' => 'gcc -shared');
520
536
     if ($win_arch eq 'MSWin32')
521
537
      {
522
 
       my $extra = "-lcomdlg32 -lgdi32";
 
538
       my $extra = "-L/lib/w32api -lcomdlg32 -lgdi32";
523
539
       my $libs = $att{'LIBS'}->[0];
524
540
       $att{'LIBS'}->[0] = "$extra $libs";
525
 
       $att{'DEFINE'} .= ' -D__WIN32__';
 
541
       $att{'DEFINE'} .= ' -D__WIN32__ -D_WIN32';
526
542
       $att{'DEFINE'} .= ' -DWIN32' if($att{'NAME'} eq 'Tk::pTk');
527
543
      }
528
544
     elsif ($win_arch eq 'x')