b0a9a349c0
Various bugfixes including fix building with perl 5.10.
82 lines
2.1 KiB
Text
82 lines
2.1 KiB
Text
$NetBSD: patch-ad,v 1.3 2008/10/22 10:35:30 markd Exp $
|
|
|
|
--- PNG/Makefile.PL.orig 2007-05-06 06:38:35.000000000 +1200
|
|
+++ PNG/Makefile.PL
|
|
@@ -1,7 +1,6 @@
|
|
use strict;
|
|
use Tk::MMutil;
|
|
use Tk::Config ();
|
|
-use Tk::MMtry;
|
|
use File::Copy;
|
|
|
|
my $l = $Config::Config{'lib_ext'};
|
|
@@ -14,68 +13,15 @@ foreach my $file (qw(zlib/Makefile.PL li
|
|
unlink($file);
|
|
}
|
|
|
|
-if ($Tk::MMtry::VERSION ge '4.007' &&
|
|
- try_run("config/has_png.c",['-I/usr/local/include'],['-lpng -lz -lm']))
|
|
- {
|
|
Tk::MMutil::TkExtMakefile(
|
|
NAME => 'Tk::PNG',
|
|
VERSION_FROM => 'PNG.pm',
|
|
XS_VERSION => $Tk::Config::VERSION,
|
|
dist => { COMPRESS => 'gzip -f9', SUFFIX => '.gz' },
|
|
OBJECT => '$(O_FILES)',
|
|
- INC => '-I/usr/local/include',
|
|
+ INC => '-I%%LOCALBASE%%/include',
|
|
LIBS => ['-lpng -lz -lm'],
|
|
);
|
|
- }
|
|
-else
|
|
- {
|
|
- my $ok = 1;
|
|
- foreach my $file ("libpng/Makefile.PL","zlib/Makefile.PL")
|
|
- {
|
|
- next unless -f $file;
|
|
- chmod(0666,$file);
|
|
- unlink($file);
|
|
- }
|
|
- unless (copy("Makefile.libpng.maybe","libpng/Makefile.PL"))
|
|
- {
|
|
- warn "Cannot copy Makefile.libpng.maybe => libpng/Makefile.PL ($!)";
|
|
- $ok = 0;
|
|
- }
|
|
- unless (copy("Makefile.zlib.maybe","zlib/Makefile.PL"))
|
|
- {
|
|
- warn "Cannot copy Makefile.zlib.maybe => zlib/Makefile.PL ($!)";
|
|
- $ok = 0;
|
|
- }
|
|
- if ($ok)
|
|
- {
|
|
- warn "Building libpng$l\n";
|
|
- my $extlib = "libpng/libpng$l";
|
|
- if ($cc eq 'cl')
|
|
- {
|
|
- $extlib .= " zlib/zlib$l";
|
|
- $zlib = "zlib$l";
|
|
- }
|
|
- else
|
|
- {
|
|
- $extlib .= " zlib/libz$l";
|
|
- }
|
|
- Tk::MMutil::TkExtMakefile(
|
|
- NAME => 'Tk::PNG',
|
|
- VERSION_FROM => 'PNG.pm',
|
|
- XS_VERSION => $Tk::Config::VERSION,
|
|
- dist => { COMPRESS => 'gzip -f9', SUFFIX => '.gz' },
|
|
- OBJECT => '$(O_FILES)',
|
|
- INC => '-Ilibpng -Izlib',
|
|
- MYEXTLIB => $extlib,
|
|
- LIBS => ['-lm'],
|
|
- );
|
|
- }
|
|
- else
|
|
- {
|
|
- warn "Cannot build libpng$l\n";
|
|
- ExtUtils::MakeMaker::WriteEmptyMakefile();
|
|
- }
|
|
- }
|
|
|
|
sub MY::test_via_harness
|
|
{
|