summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2013-06-23 14:58:27 +0000
committerwiz <wiz@pkgsrc.org>2013-06-23 14:58:27 +0000
commit21739b24b1a8ad0917068223111eee22f35eca5f (patch)
tree6b61c27ea7ef91d19d13173a744318c4bd939753 /graphics
parent1bda34129a963f8dff3a3b1af7aac1442f6e934a (diff)
downloadpkgsrc-21739b24b1a8ad0917068223111eee22f35eca5f.tar.gz
Fix mgpembed.pl.
Patch from Marc Espie <espie@nerim.net> on tech-pkg. Bump PKGREVISION.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/magicpoint/Makefile4
-rw-r--r--graphics/magicpoint/distinfo3
-rw-r--r--graphics/magicpoint/patches/patch-mgpembed.pl.in74
3 files changed, 78 insertions, 3 deletions
diff --git a/graphics/magicpoint/Makefile b/graphics/magicpoint/Makefile
index c74790c7abe..13e5b9e112d 100644
--- a/graphics/magicpoint/Makefile
+++ b/graphics/magicpoint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.86 2013/06/06 12:54:33 wiz Exp $
+# $NetBSD: Makefile,v 1.87 2013/06/23 14:58:27 wiz Exp $
DISTNAME= magicpoint-1.13a
-PKGREVISION= 17
+PKGREVISION= 18
CATEGORIES= x11 graphics
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/
diff --git a/graphics/magicpoint/distinfo b/graphics/magicpoint/distinfo
index 9764d665801..228dae47449 100644
--- a/graphics/magicpoint/distinfo
+++ b/graphics/magicpoint/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2011/02/25 17:02:53 wiz Exp $
+$NetBSD: distinfo,v 1.19 2013/06/23 14:58:27 wiz Exp $
SHA1 (magicpoint-1.13a.tar.gz) = 2bc662ad0a482d42578766258a143b06a4718ae3
RMD160 (magicpoint-1.13a.tar.gz) = 067d7dee3b90ec354975d9ad4ea0c0df48cca191
@@ -31,3 +31,4 @@ SHA1 (patch-ba) = 938e5714ddfcb8ca64d1cc6f756eeb69e592905d
SHA1 (patch-bb) = 3a6c328adcb49aef0d4792ceff08407fcbc80c16
SHA1 (patch-image_imlib__loader.c) = 99aa122d4d4f474c448fa2767bee3496ca97110a
SHA1 (patch-image_xloadimage.h) = 05a1caeedca9c33beecffb8f078270d88fc7184c
+SHA1 (patch-mgpembed.pl.in) = e3c9da5e10bc812b9a77a3ca9b8918595708e8c7
diff --git a/graphics/magicpoint/patches/patch-mgpembed.pl.in b/graphics/magicpoint/patches/patch-mgpembed.pl.in
new file mode 100644
index 00000000000..1a09536a959
--- /dev/null
+++ b/graphics/magicpoint/patches/patch-mgpembed.pl.in
@@ -0,0 +1,74 @@
+$NetBSD: patch-mgpembed.pl.in,v 1.1 2013/06/23 14:58:27 wiz Exp $
+
+Adapt usage for perl-5.18.
+From Marc Espie <espie@nerim.net>.
+
+--- mgpembed.pl.in.orig 2002-07-28 11:52:19.000000000 +0000
++++ mgpembed.pl.in
+@@ -16,15 +16,16 @@ if (! -x $gzip || ! -x $uuencode) {
+ die "external program not found. manual configuration required.\n"
+ }
+
+-require 'getopts.pl';
++use Getopt::Std;
++use subs (qw(usage readfile));
+
+ # specify suffixes we should gzip files before uuencoding
+ @gzipsuffix = (".ps", ".xbm");
+
+-do Getopts('o:');
++getopts('o:');
+
+ if ($#ARGV != 0) {
+- do usage();
++ usage();
+ # NOTREACHED
+ }
+
+@@ -37,14 +38,14 @@ if (defined($opt_o)) {
+ die "$outfname already exists\n" if -f $outfname;
+ die "$outfname is specified for both input/output\n"
+ if ($outfname eq $infname);
+- open(OUT, "> $outfname") || die "Can not open $outfname: $!";
++ open(OUT, ">", $outfname) || die "Can not open $outfname: $!";
+ } else {
+ open(OUT, ">& STDOUT");
+ }
+
+ # read the file, process %include directives
+
+-do readfile($infname, 'INPUT000');
++readfile($infname, 'INPUT000');
+
+ # append embedded files using %embed/%endembed directives
+
+@@ -76,10 +77,10 @@ foreach $efile (keys %files) {
+ close(OUT);
+
+ sub readfile {
+- local($filename, $input) = @_;
+- local($fname, $fname0);
++ my($filename, $input) = @_;
++ my($fname, $fname0);
+ $input++;
+- open($input, $filename) || die "Can not open $filename: $!\n";
++ open($input, '<', $filename) || die "Can not open $filename: $!\n";
+ while (<$input>) {
+ if (/^%%/) {
+ print OUT;
+@@ -116,7 +117,7 @@ sub readfile {
+ $incfname = $1;
+ }
+ print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE $incfname\n";
+- do readfile($incfname, $input);
++ readfile($incfname, $input);
+ print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE-END $incfname\n";
+ } else {
+ print OUT;
+@@ -128,5 +129,5 @@ sub readfile {
+
+ sub usage {
+ print STDERR "usage: mgpembed [-o outfile ] mgpfile\n";
+- exit -1;
++ exit 1;
+ }