pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47484: [PATCH] print/ja-a2ps -> Can't locate flush.pl



>Number:         47484
>Category:       pkg
>Synopsis:       [PATCH] print/ja-a2ps -> Can't locate flush.pl 
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 22 01:55:00 +0000 2013
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.0.1
>Organization:
KINU Corporation
>Environment:
        
        
System: NetBSD modena 6.0.1 NetBSD 6.0.1 (GENERIC) amd64
Architecture: x86_64
Machine: amd64
>Description:
(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.

>How-To-Repeat:
        (cd /usr/pkgsrc/print/ja-a2ps; make package-install)
        a2ps-j hoge.txt > hoge.ps
>Fix:
Index: print/ja-a2ps/Makefile
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/print/ja-a2ps/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- print/ja-a2ps/Makefile      8 Oct 2012 13:45:40 -0000       1.13
+++ print/ja-a2ps/Makefile      22 Jan 2013 01:39:20 -0000
@@ -2,10 +2,11 @@
 
 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@localhost
 HOMEPAGE=      http://www.srekcah.org/~utashiro/perl/scripts/a2ps_pl/
Index: print/ja-a2ps/distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/print/ja-a2ps/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- print/ja-a2ps/distinfo      24 Feb 2005 12:51:43 -0000      1.4
+++ print/ja-a2ps/distinfo      22 Jan 2013 01:39:20 -0000
@@ -3,4 +3,5 @@
 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
Index: print/ja-a2ps/patches/patch-aa
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/print/ja-a2ps/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- print/ja-a2ps/patches/patch-aa      13 Jan 2003 13:00:05 -0000      1.2
+++ print/ja-a2ps/patches/patch-aa      22 Jan 2013 01:39:20 -0000
@@ -1,5 +1,10 @@
 $NetBSD: patch-aa,v 1.2 2003/01/13 13:00:05 wiz 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
 @@ -496,8 +496,6 @@
--- /dev/null   2013-01-22 10:38:06.000000000 +0900
+++ print/ja-a2ps/patches/patch-ab      2013-01-22 10:33:00.000000000 +0900
@@ -0,0 +1,73 @@
+$NetBSD$
+
+(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;

>Unformatted:
                print/ja-a2ps says Can't locate flush.pl with perl-5.16.2
        
        


Home | Main Index | Thread Index | Old Index