From owner-svn-ports-all@FreeBSD.ORG Wed May 1 06:19:26 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B1B508AC; Wed, 1 May 2013 06:19:26 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A426D1D22; Wed, 1 May 2013 06:19:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r416JQjO000126; Wed, 1 May 2013 06:19:26 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r416JQid000124; Wed, 1 May 2013 06:19:26 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201305010619.r416JQid000124@svn.freebsd.org> From: Hiroki Sato Date: Wed, 1 May 2013 06:19:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r316989 - in head/japanese/a2ps: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2013 06:19:26 -0000 Author: hrs Date: Wed May 1 06:19:25 2013 New Revision: 316989 URL: http://svnweb.freebsd.org/changeset/ports/316989 Log: - Add paperconf(1) support for the default paper size configuration. - Fix pathname of perl(1). - Trim old-style header. - Add LICENSE. Added: head/japanese/a2ps/files/patch-a2ps-j - copied, changed from r316307, head/japanese/a2ps/files/patch-aa Deleted: head/japanese/a2ps/files/patch-aa Modified: head/japanese/a2ps/Makefile Modified: head/japanese/a2ps/Makefile ============================================================================== --- head/japanese/a2ps/Makefile Wed May 1 04:46:29 2013 (r316988) +++ head/japanese/a2ps/Makefile Wed May 1 06:19:25 2013 (r316989) @@ -1,29 +1,35 @@ -# New ports collection makefile for: a2ps-j -# Date created: 16 Nov 1996 -# Whom: SAITO Itsuro -# +# Created by: SAITO Itsuro # $FreeBSD$ -# PORTNAME= a2ps PORTVERSION= 1.45 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= japanese print MASTER_SITES= ftp://ftp.sra.co.jp/pub/lang/perl/sra-scripts/ \ ${MASTER_SITE_LOCAL:S|%SUBDIR%|tota/a2ps|} DISTNAME= ${PORTNAME}.pl-${PORTVERSION} EXTRACT_SUFX= # empty -MAINTAINER= ports@FreeBSD.org +MAINTAINER= hrs@FreeBSD.org COMMENT= Text file to postscript converter (with Japanese support) +LICENSE= BSD + +RUN_DEPENDS= paperconf:${PORTSDIR}/print/libpaper + PLIST_FILES= bin/a2ps-j -EXTRACT_CMD= ${CP} +EXTRACT_CMD= ${INSTALL_SCRIPT} EXTRACT_BEFORE_ARGS= # empty EXTRACT_AFTER_ARGS= a2ps-j NO_WRKSUBDIR= yes NO_BUILD= yes +post-patch: + ${REINPLACE_CMD} \ + -e 's,%%PERL%%,${PERL},' \ + -e 's,%%LOCALBASE%%,${LOCALBASE},' \ + ${WRKDIR}/a2ps-j + do-install: ${INSTALL_SCRIPT} ${WRKDIR}/a2ps-j ${PREFIX}/bin Copied and modified: head/japanese/a2ps/files/patch-a2ps-j (from r316307, head/japanese/a2ps/files/patch-aa) ============================================================================== --- head/japanese/a2ps/files/patch-aa Tue Apr 23 05:11:57 2013 (r316307, copy source) +++ head/japanese/a2ps/files/patch-a2ps-j Wed May 1 06:19:25 2013 (r316989) @@ -1,12 +1,23 @@ ---- a2ps-j.orig 2011-09-19 17:05:32.000000000 +0900 -+++ a2ps-j 2012-08-07 08:58:02.000000000 -0400 +--- a2ps-j.orig 2013-05-01 15:12:22.000000000 +0900 ++++ a2ps-j 2013-05-01 15:12:32.000000000 +0900 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl -+#!/usr/bin/perl ++#!%%PERL%% ;# ;# a2ps: ascii to ps ;# -@@ -56,9 +56,12 @@ +@@ -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]; @@ -20,7 +31,7 @@ } &paper($default_paper); -@@ -192,7 +195,8 @@ +@@ -192,7 +201,8 @@ if ($debug == 2) { require('dumpvar.pl'); @@ -30,7 +41,7 @@ &dumpvar('main', 'width', 'height', 'lmargin', 'smargin', 'font_size', 'sheet_height', 'sheet_width', 'char_width', 'skip_column', -@@ -208,8 +212,14 @@ +@@ -208,8 +218,14 @@ $file = shift; if ($file && !-r $file) { warn "$file: $!\n"; next; } if ($jisconvert) { @@ -47,7 +58,7 @@ open(F, "-|") || &jis($file); } else { $file = '-' if $file eq ''; -@@ -476,10 +486,13 @@ +@@ -476,10 +492,13 @@ } sub print_header { @@ -63,7 +74,7 @@ local($orientation) = $portrait ? "Portrait" : "Landscape"; print <<"---"; -@@ -525,7 +538,8 @@ +@@ -525,7 +544,8 @@ printf("/lines %d def\n", $linesperpage); printf("/columns %d def\n", $columnsperline); $sublabel = $default_sublabel unless defined $sublabel; @@ -73,7 +84,7 @@ if ($ascii_mag) { printf("/doasciimag true def /asciimagsize %f def\n", $ascii_mag); } else { -@@ -548,7 +562,8 @@ +@@ -548,7 +568,8 @@ print "%%EndProlog\n\n"; }