Index: head/japanese/a2ps/Makefile =================================================================== --- head/japanese/a2ps/Makefile (revision 483501) +++ head/japanese/a2ps/Makefile (revision 483502) @@ -1,37 +1,41 @@ # Created by: SAITO Itsuro # $FreeBSD$ PORTNAME= a2ps PORTVERSION= 1.45 PORTREVISION= 5 CATEGORIES= japanese print MASTER_SITES= ftp://ftp.sra.co.jp/pub/lang/perl/sra-scripts/ \ LOCAL/tota/a2ps DISTNAME= ${PORTNAME}.pl-${PORTVERSION} EXTRACT_SUFX= # empty MAINTAINER= hrs@FreeBSD.org COMMENT= Text file to postscript converter (with Japanese support) -LICENSE= BSD +LICENSE= A2PSJ +LICENSE_NAME= License of a2ps-j +LICENSE_FILE= ${FILESDIR}/LICENSE +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept RUN_DEPENDS= paperconf:print/libpaper USES= perl5 shebangfix USE_PERL5= run + SHEBANG_FILES= ${WRKSRC}/a2ps-j -perl_OLD_CMD= /usr/local/bin/perl PLIST_FILES= bin/a2ps-j EXTRACT_CMD= ${INSTALL_SCRIPT} EXTRACT_BEFORE_ARGS= # empty EXTRACT_AFTER_ARGS= a2ps-j NO_WRKSUBDIR= yes NO_BUILD= yes +NO_ARCH= yes post-patch: ${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/a2ps-j do-install: ${INSTALL_SCRIPT} ${WRKSRC}/a2ps-j ${STAGEDIR}${PREFIX}/bin .include Index: head/japanese/a2ps/files/LICENSE =================================================================== --- head/japanese/a2ps/files/LICENSE (nonexistent) +++ head/japanese/a2ps/files/LICENSE (revision 483502) @@ -0,0 +1,19 @@ +(Following sentences are from a2ps.pl-1.45.) + +Copyright (c) 2001 Kazumasa Utashiro +Copyright (c) 1990-1999 Kazumasa Utashiro +Internet Initiative Japan Inc. +3-13 Kanda Nishiki-cho, Chiyoda-ku, Tokyo 101-0054, Japan + +This program is perl version of Miguel Santana's a2ps. Postscript +kanji enhancement was done by Naoki Kanazawa . +Converted to perl and enhanced by Kazumasa Utashiro. B4 support +and punchmark was contributed by Masami Ueno +. + +Use and redistribution for ANY PURPOSE, with or without +modification, is granted as long as all copyright notices are +retained. Although, it is strongly recommended to make it +obviously distinguishable from the original one when distributing +modified version. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS +IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED. Property changes on: head/japanese/a2ps/files/LICENSE ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/a2ps/files/patch-a2ps-j =================================================================== --- head/japanese/a2ps/files/patch-a2ps-j (revision 483501) +++ head/japanese/a2ps/files/patch-a2ps-j (revision 483502) @@ -1,90 +1,90 @@ ---- a2ps-j.orig 2013-10-22 21:19:43.000000000 +0900 -+++ a2ps-j 2013-10-22 21:20:30.000000000 +0900 +--- a2ps-j.orig 2017-09-23 14:04:32 UTC ++++ a2ps-j @@ -51,14 +51,23 @@ @mon{@mon} = ($[ .. $#mon); @day{@day} = ($[ .. $#day); +my $LIBPAPER = 1; +if ($LIBPAPER) { + $default_paper = `%%LOCALBASE%%/bin/paperconf -n`; + chomp($default_paper); +} +@param_letter = ( 8.50, 11.06, 0.65, 1.2, 6.85, 9.5, 0.29, 0.22, 0.12, 'letter'); @param_us = ( 8.50, 11.06, 0.65, 1.2, 6.85, 9.5, 0.29, 0.22, 0.12, 'letter'); @param_a4 = ( 8.27, 11.64, 1.20, 1.2, 6.60, 9.8, 0.29, 0.22, 0.05, 'a4'); @param_b4 = (10.15, 14.31, 1.40, 1.2, 8.50, 9.5, 0.29, 0.22, 0.08, 'b4'); sub paper { local(*param) = 'param_' . $_[0]; - die "Unknown paper type: $_[0]\n" unless defined @param; + if (@param) { ($width, $height, $lmargin, $smargin, $fontsize_l, $fontsize_p, $portrait_header, $landscape_header, $paper_adjust, $paper_tray) = @param; + } else { + die "Unknown paper type: $_[0]\n"; + } } &paper($default_paper); -@@ -192,7 +201,8 @@ +@@ -192,7 +201,8 @@ if ($linesperpage <= 0 || $columnsperlin 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 +218,14 @@ +@@ -208,8 +218,14 @@ while (@ARGV) { $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 +492,13 @@ +@@ -476,10 +492,13 @@ sub _euc2jis { } 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 <<"---"; -@@ -525,7 +544,8 @@ +@@ -525,7 +544,8 @@ sub print_header { 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 { -@@ -548,7 +568,8 @@ +@@ -548,7 +568,8 @@ sub print_header { 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;