From d5cdb540f2a5c51426aa8d6ad4ad66752f489924 Mon Sep 17 00:00:00 2001 From: mef Date: Tue, 22 Jan 2013 10:18:41 +0000 Subject: Changes to fix Can't locate flush.pl in @INC ( .... based on PR pkg/47484 with patches/patch-ab, and some more as (3) and (4): (1) Add patch-ab to eliminate old-fashioned flush.pl which causes error as: Can't locate flush.pl in @INC ( .... (2) patch-ab also includes: - Eliminate old-fashioned call of ctime.pl - Eliminate non-supported '$#' - Rename 'sub date' to be more specific name 'sub a2ps_date' This patch is derived from http://trac.macports.com/changeset/86539 (3) Add comment on patch-aa from cvs log. (4) Add LICENSE=mit. --- print/ja-a2ps/Makefile | 5 +-- print/ja-a2ps/distinfo | 5 +-- print/ja-a2ps/patches/patch-aa | 7 +++- print/ja-a2ps/patches/patch-ab | 73 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 print/ja-a2ps/patches/patch-ab (limited to 'print/ja-a2ps') diff --git a/print/ja-a2ps/Makefile b/print/ja-a2ps/Makefile index 5ede62845b9..012e0d0ee8f 100644 --- a/print/ja-a2ps/Makefile +++ b/print/ja-a2ps/Makefile @@ -1,11 +1,12 @@ -# $NetBSD: Makefile,v 1.13 2012/10/08 13:45:40 asau Exp $ +# $NetBSD: Makefile,v 1.14 2013/01/22 10:18:41 mef Exp $ DISTNAME= a2ps.pl-1.45 PKGNAME= ja-a2ps-1.45 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= japanese print MASTER_SITES= ftp://ftp.sra.co.jp/pub/lang/perl/sra-scripts/ EXTRACT_SUFX= # None +LICENSE= mit MAINTAINER= tech-pkg-ja@jp.NetBSD.org HOMEPAGE= http://www.srekcah.org/~utashiro/perl/scripts/a2ps_pl/ diff --git a/print/ja-a2ps/distinfo b/print/ja-a2ps/distinfo index c017de6502e..2739c5f7e73 100644 --- a/print/ja-a2ps/distinfo +++ b/print/ja-a2ps/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.4 2005/02/24 12:51:43 agc Exp $ +$NetBSD: distinfo,v 1.5 2013/01/22 10:18:41 mef Exp $ SHA1 (a2ps.pl-1.45) = 1a938099322767bced3eae525426b80164584d8c RMD160 (a2ps.pl-1.45) = 2599f86d4433afd3d0ed3490539d87995ce51dab Size (a2ps.pl-1.45) = 27952 bytes -SHA1 (patch-aa) = 5ddff79884bbfad848f0a90080a18ccad755051e +SHA1 (patch-aa) = 9d9310409aa4ba4f433e880dd940fc760cfae1b6 +SHA1 (patch-ab) = 9a534d00d22391e68c3773bb32143e930168278a diff --git a/print/ja-a2ps/patches/patch-aa b/print/ja-a2ps/patches/patch-aa index 0feb5786399..bcaa01e6e8e 100644 --- a/print/ja-a2ps/patches/patch-aa +++ b/print/ja-a2ps/patches/patch-aa @@ -1,4 +1,9 @@ -$NetBSD: patch-aa,v 1.2 2003/01/13 13:00:05 wiz Exp $ +$NetBSD: patch-aa,v 1.3 2013/01/22 10:18:42 mef Exp $ + +date: 2002/09/30 02:40:52; author: kei; state: Exp; +To remove the feature for the original LaserWriter +which causes an annoyance in modrern PS printer, GhostScript, etc. See +pkg/12904. --- a2ps.pl-1.45.orig Fri Mar 15 22:22:10 2002 +++ a2ps.pl-1.45 Fri Mar 15 22:24:14 2002 diff --git a/print/ja-a2ps/patches/patch-ab b/print/ja-a2ps/patches/patch-ab new file mode 100644 index 00000000000..20e5bf4e66a --- /dev/null +++ b/print/ja-a2ps/patches/patch-ab @@ -0,0 +1,73 @@ +$NetBSD: patch-ab,v 1.1 2013/01/22 10:18:42 mef Exp $ + +(1) Eliminate old-fashioned call for flush.pl and ctime.pl +(2) Eliminate non-supported '$#' +(3) Rename date to be more specific name a2ps_date +This patch is derived from + http://trac.macports.com/changeset/86539 + +--- a2ps.pl-1.45~ 2013-01-22 09:52:48.000000000 +0900 ++++ a2ps.pl-1.45 2013-01-22 10:00:30.000000000 +0900 +@@ -192,7 +192,8 @@ + + if ($debug == 2) { + require('dumpvar.pl'); +- local($#) = '%.6g'; ++## Perl 5.10.1 says $# is no longer supported ++## local($#) = '%.6g'; + &dumpvar('main', + 'width', 'height', 'lmargin', 'smargin', 'font_size', + 'sheet_height', 'sheet_width', 'char_width', 'skip_column', +@@ -208,8 +209,14 @@ + $file = shift; + if ($file && !-r $file) { warn "$file: $!\n"; next; } + if ($jisconvert) { +- require 'flush.pl'; +- &flush(STDOUT); ++ # flush.pl obsolete (originally in Perl 4) ++ # replaced with equivalent code of &flush(STDOUT) ++ local($old_stdout) = select(STDOUT); ++ $| = 1; ++ print ""; ++ $| = 0; ++ select($old_stdout); ++ # end of equivalent code + open(F, "-|") || &jis($file); + } else { + $file = '-' if $file eq ''; +@@ -476,10 +483,13 @@ + } + + sub print_header { +- require('ctime.pl'); + return if $header_is_printed++; + +- chop(local($date) = &ctime(time)); ++ # ctime.pl obsolete (originally in Perl 4) ++ # ctime.pl behaves differently when TZ is not set, ++ # but the behavior will not affect the PostScript file details ++ local($date) = scalar localtime; ++ + local($orientation) = $portrait ? "Portrait" : "Landscape"; + + print <<"---"; +@@ -523,7 +533,8 @@ + printf("/lines %d def\n", $linesperpage); + printf("/columns %d def\n", $columnsperline); + $sublabel = $default_sublabel unless defined $sublabel; +- print "/date (", &date($sublabel, time), ") def\n"; ++ # function name changed to a2ps_date to avoid confusion ++ print "/date (", &a2ps_date($sublabel, time), ") def\n"; + if ($ascii_mag) { + printf("/doasciimag true def /asciimagsize %f def\n", $ascii_mag); + } else { +@@ -546,7 +557,8 @@ + print "%%EndProlog\n\n"; + } + +-sub date { ++# function name changed to a2ps_date to avoid confusion ++ sub a2ps_date { + local($_, $time) = @_; + local($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime($time); + $year += 1900; -- cgit v1.2.3