diff options
Diffstat (limited to 'x11/p5-Tk/patches/patch-ad')
-rw-r--r-- | x11/p5-Tk/patches/patch-ad | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/x11/p5-Tk/patches/patch-ad b/x11/p5-Tk/patches/patch-ad new file mode 100644 index 00000000000..d31a863b0f0 --- /dev/null +++ b/x11/p5-Tk/patches/patch-ad @@ -0,0 +1,81 @@ +$NetBSD: patch-ad,v 1.1 2004/12/25 14:00:10 wiz Exp $ + +--- PNG/Makefile.PL.orig 2004-12-25 04:02:48.000000000 +0100 ++++ 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,14 @@ 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', + 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("libpng/Makefile.maybe","libpng/Makefile.PL")) +- { +- warn "Cannot copy libpng/Makefile.maybe => libpng/Makefile.PL ($!)"; +- $ok = 0; +- } +- unless (copy("zlib/Makefile.maybe","zlib/Makefile.PL")) +- { +- warn "Cannot copy zlib/Makefile.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(); +- } +- } + + package MY; + |