Bug 183200 - japanese/a2ps-j fails to include Perl path at shebang
Summary: japanese/a2ps-j fails to include Perl path at shebang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-22 13:00 UTC by Kenji Rikitake
Modified: 2013-10-22 13:30 UTC (History)
0 users

See Also:


Attachments
file.txt (335 bytes, text/plain)
2013-10-22 13:00 UTC, Kenji Rikitake
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenji Rikitake 2013-10-22 13:00:00 UTC
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);

Fix: Defining "USES= perl5" in the Makefile solved the problem. A patch given.

Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/japanese/a2ps
make && make install
Comment 1 dfilter service freebsd_committer freebsd_triage 2013-10-22 13:28:26 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"
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2013-10-22 13:28:28 UTC
State Changed
From-To: open->closed

Should be fixed in r331259.  Thank you for your report. 


Comment 3 Hiroki Sato freebsd_committer freebsd_triage 2013-10-22 13:28:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hrs

Should be fixed in r331259.  Thank you for your report.