Subject: pkg/18886: add customizable GNU prefix to pkgsrc
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 11/01/2002 17:53:44
>Number:         18886
>Category:       pkg
>Synopsis:       diffs for customizable GNU prefix for pkgsrc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 01 17:54:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Some packages have hard-coded "g" prefix. This is often not needed.
It would be nice to have this customizable.
>How-To-Repeat:
Install any of these packages via pkgsrc:
archivers/gsharutils
archivers/gtar-base
devel/gindent
devel/gmake
devel/m4
devel/patch
sysutils/fileutils
sysutils/findutils
sysutils/sh-utils
textproc/grep
textproc/gsed
textproc/textutils

>Fix:
Please fix the above files so they don't automatically use "g" prefix. 
(By the way, this wasn't my idea. But I couldn't find email
for Julien Letessier who proposed this a couple months ago.)

Some diffs follow. Purposely named "GNU_PROGRAM_PREFIX", because
I could imagine that it should be specific, so someone
didn't blindly assume for everything needing prefix like editors/nvi-m17n.

--- mk/bsd.pkg.mk.orig	Thu Oct 24 03:14:51 2002
+++ mk/bsd.pkg.mk	Fri Nov  1 16:36:44 2002
@@ -505,6 +505,13 @@
 DLIST=			${WRKDIR}/.DLIST
 DDIR=			${WRKDIR}/.DDIR
 
+# for setting prefix like gls or gtouch
+.if defined(GNU_PROGRAM_PREFIX)
+.  if defined(GNU_CONFIGURE)
+CONFIGURE_ARGS+=	--program-prefix=${GNU_PROGRAM_PREFIX}
+.  endif
+PLIST_SUBST+=		GNU_PROGRAM_PREFIX=${GNU_PROGRAM_PREFIX}
+.endif
 
 # Set PLIST_SUBST to substitute "${variable}" to "value" in PLIST
 PLIST_SUBST+=	OPSYS=${OPSYS}						\
--- mk/bsd.pkg.defaults.mk.orig	Fri Nov  1 16:32:28 2002
+++ mk/bsd.pkg.defaults.mk	Fri Nov  1 17:25:48 2002
@@ -389,6 +389,11 @@
 # Possible: Any local directory
 # Default: none
 
+GNU_PROGRAM_PREFIX?=g
+# This is the prefix to add for program prefix, like gls or gnutouch.
+# Possible, g, gnu, nothing, etc.
+# Default: g
+
 #
 #	Definitions used only in the packages collection
 #

--- archivers/gtar-base/Makefile.orig	Fri Nov  1 16:47:17 2002
+++ archivers/gtar-base/Makefile	Fri Nov  1 17:31:53 2002
@@ -14,7 +14,7 @@
 
 USE_BUILDLINK2=		YES
 GNU_CONFIGURE=		YES
-CONFIGURE_ARGS+=	--program-prefix=g --with-catgets
+CONFIGURE_ARGS+=	--with-catgets
 CONFIGURE_ENV+=		PKGLOCALEDIR=${PKGLOCALEDIR}
 
 .include "../../mk/bsd.prefs.mk"
@@ -30,6 +30,7 @@
 	@${ECHO} '' >>${WRKSRC}/po/fr.po
 
 post-install:
-	${INSTALL_DATA} ${FILESDIR}/gtar.1 ${PREFIX}/man/man1/gtar.1
+	${INSTALL_DATA} ${FILESDIR}/gtar.1 \
+                        ${PREFIX}/man/man1/${GNU_PROGRAM_PREFIX}tar.1
 
 .include "../../mk/bsd.pkg.mk"
--- archivers/gtar-base/PLIST.orig	Fri Nov  1 16:49:06 2002
+++ archivers/gtar-base/PLIST	Fri Nov  1 16:48:31 2002
@@ -1,6 +1,6 @@
 @comment $NetBSD: PLIST,v 1.2 2002/08/25 21:49:06 jlam Exp $
-bin/gtar
-man/man1/gtar.1
+bin/${GNU_PROGRAM_PREFIX}tar
+man/man1/${GNU_PROGRAM_PREFIX}tar.1
 ${PKGLOCALEDIR}/locale/de/LC_MESSAGES/tar.mo
 ${PKGLOCALEDIR}/locale/fr/LC_MESSAGES/tar.mo
 ${PKGLOCALEDIR}/locale/it/LC_MESSAGES/tar.mo
--- archivers/gtar-base/PLIST.Darwin.orig	Fri Nov  1 17:38:00 2002
+++ archivers/gtar-base/PLIST.Darwin	Fri Nov  1 17:35:48 2002
@@ -1,3 +1,3 @@
 @comment $NetBSD: PLIST.Darwin,v 1.1 2001/12/27 21:50:57 agc Exp $
-bin/gtar
-man/man1/gtar.1
+bin/${GNU_PROGRAM_PREFIX}tar
+man/man1/${GNU_PROGRAM_PREFIX}tar.1
--- archivers/gtar-base/PLIST.NetBSD.orig	Fri Nov  1 17:38:31 2002
+++ archivers/gtar-base/PLIST.NetBSD	Fri Nov  1 17:36:14 2002
@@ -1,6 +1,6 @@
 @comment $NetBSD: PLIST.NetBSD,v 1.2 2002/08/25 21:49:07 jlam Exp $
-bin/gtar
-man/man1/gtar.1
+bin/${GNU_PROGRAM_PREFIX}tar
+man/man1/${GNU_PROGRAM_PREFIX}tar.1
 ${PKGLOCALEDIR}/locale/de/LC_MESSAGES/tar.cat
 ${PKGLOCALEDIR}/locale/fr/LC_MESSAGES/tar.cat
 ${PKGLOCALEDIR}/locale/it/LC_MESSAGES/tar.cat

>Release-Note:
>Audit-Trail:
>Unformatted: