From nobody@FreeBSD.org  Tue Oct 22 11:54:03 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 9FA21DE0
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Oct 2013 11:54:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 8D3ED2486
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Oct 2013 11:54:03 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9MBs3LJ059712
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Oct 2013 11:54:03 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9MBs3Eh059708;
	Tue, 22 Oct 2013 11:54:03 GMT
	(envelope-from nobody)
Message-Id: <201310221154.r9MBs3Eh059708@oldred.freebsd.org>
Date: Tue, 22 Oct 2013 11:54:03 GMT
From: Kenji Rikitake <kenji@k2r.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: japanese/a2ps-j fails to include Perl path at shebang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183200
>Category:       ports
>Synopsis:       japanese/a2ps-j fails to include Perl path at shebang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hrs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 22 12:00:00 UTC 2013
>Closed-Date:    Tue Oct 22 12:29:01 UTC 2013
>Last-Modified:  Tue Oct 22 12:30:00 UTC 2013
>Originator:     Kenji Rikitake
>Release:        9.2-STABLE
>Organization:
>Environment:
FreeBSD minimax.priv.k2r.org 9.2-STABLE FreeBSD 9.2-STABLE #13 r255959: Tue Oct  1 13:18:35 JST 2013     root@minimax.priv.k2r.org:/usr/obj/usr/src/sys/K2RKERNEL  amd64
>Description:
The first line of installed /usr/local/bin/a2ps-j does not contain the path to Perl binary.

NOTE: I have been using Port lang/perl5.18 and in /etc/make.conf I specify "DEFAULT_VERSIONS=     perl5=5.18".

The following shows the result of the post-patch command of:
/usr/bin/sed -i.bak  -e 's,%%PERL%%,,'  -e 's,%%LOCALBASE%%,/usr/local,'  /usr/ports/japanese/a2ps/work/a2ps-j

(NOTE: the %%PERL%% string is substituted by an empty string

*** a2ps-j.bak  Tue Oct 22 20:43:13 2013
--- a2ps-j      Tue Oct 22 20:43:13 2013
***************
*** 1,2 ****
! #!%%PERL%%
  ;#
--- 1,2 ----
! #!
  ;#
***************
*** 55,57 ****
  if ($LIBPAPER) {
!       $default_paper = `%%LOCALBASE%%/bin/paperconf -n`;
        chomp($default_paper);
--- 55,57 ----
  if ($LIBPAPER) {
!       $default_paper = `/usr/local/bin/paperconf -n`;
        chomp($default_paper);
>How-To-Repeat:
cd /usr/ports/japanese/a2ps
make && make install
>Fix:
Defining "USES= perl5" in the Makefile solved the problem. A patch given.

Patch attached with submission follows:

Apply at 
/usr/ports/japanese/a2ps

--- Makefile.FCS	2013-09-21 03:47:54.000000000 +0900
+++ Makefile	2013-10-22 20:50:04.000000000 +0900
@@ -13,6 +13,7 @@
 MAINTAINER=	hrs@FreeBSD.org
 COMMENT=	Text file to postscript converter (with Japanese support)
 
+USES=		perl5
 LICENSE=	BSD
 
 RUN_DEPENDS=	paperconf:${PORTSDIR}/print/libpaper


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hrs 
State-Changed-When: Tue Oct 22 12:28:28 UTC 2013 
State-Changed-Why:  
Should be fixed in r331259.  Thank you for your report. 


Responsible-Changed-From-To: freebsd-ports-bugs->hrs 
Responsible-Changed-By: hrs 
Responsible-Changed-When: Tue Oct 22 12:28:28 UTC 2013 
Responsible-Changed-Why:  
Should be fixed in r331259.  Thank you for your report. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183200 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183200: commit references a PR
Date: Tue, 22 Oct 2013 12:28:26 +0000 (UTC)

 Author: hrs
 Date: Tue Oct 22 12:28:18 2013
 New Revision: 331259
 URL: http://svnweb.freebsd.org/changeset/ports/331259
 
 Log:
   - Use shebangfix.
   - Fix a missing USES=perl5.  ${PERL} was empty.
   - Add STAGEDIR support.
   
   PR:	ports/183200
 
 Modified:
   head/japanese/a2ps/Makefile
   head/japanese/a2ps/files/patch-a2ps-j
 
 Modified: head/japanese/a2ps/Makefile
 ==============================================================================
 --- head/japanese/a2ps/Makefile	Tue Oct 22 12:14:10 2013	(r331258)
 +++ head/japanese/a2ps/Makefile	Tue Oct 22 12:28:18 2013	(r331259)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	a2ps
  PORTVERSION=	1.45
 -PORTREVISION=	3
 +PORTREVISION=	4
  CATEGORIES=	japanese print
  MASTER_SITES=	ftp://ftp.sra.co.jp/pub/lang/perl/sra-scripts/ \
  		${MASTER_SITE_LOCAL:S|%SUBDIR%|tota/a2ps|}
 @@ -17,6 +17,10 @@ LICENSE=	BSD
  
  RUN_DEPENDS=	paperconf:${PORTSDIR}/print/libpaper
  
 +USES=		perl5 shebangfix
 +USE_PERL5=	run
 +SHEBANG_FILES=	${WRKDIR}/a2ps-j
 +perl_OLD_CMD=	/usr/local/bin/perl
  PLIST_FILES=	bin/a2ps-j
  EXTRACT_CMD=	${INSTALL_SCRIPT}
  EXTRACT_BEFORE_ARGS=	# empty
 @@ -24,14 +28,10 @@ EXTRACT_AFTER_ARGS=	a2ps-j
  NO_WRKSUBDIR=	yes
  NO_BUILD=	yes
  
 -NO_STAGE=	yes
  post-patch:
 -	${REINPLACE_CMD} \
 -		-e 's,%%PERL%%,${PERL},' \
 -		-e 's,%%LOCALBASE%%,${LOCALBASE},' \
 -		${WRKDIR}/a2ps-j
 +	${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKDIR}/a2ps-j
  
  do-install:
 -	${INSTALL_SCRIPT} ${WRKDIR}/a2ps-j ${PREFIX}/bin
 +	${INSTALL_SCRIPT} ${WRKDIR}/a2ps-j ${STAGEDIR}${PREFIX}/bin
  
  .include <bsd.port.mk>
 
 Modified: head/japanese/a2ps/files/patch-a2ps-j
 ==============================================================================
 --- head/japanese/a2ps/files/patch-a2ps-j	Tue Oct 22 12:14:10 2013	(r331258)
 +++ head/japanese/a2ps/files/patch-a2ps-j	Tue Oct 22 12:28:18 2013	(r331259)
 @@ -1,11 +1,5 @@
 ---- 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
 -+#!%%PERL%%
 - ;#
 - ;# a2ps: ascii to ps
 - ;#
 +--- a2ps-j.orig	2013-10-22 21:19:43.000000000 +0900
 ++++ a2ps-j	2013-10-22 21:20:30.000000000 +0900
  @@ -51,14 +51,23 @@
   @mon{@mon} = ($[ .. $#mon);
   @day{@day} = ($[ .. $#day);
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
