tech-pkg: GNU program prefixes

Subject: GNU program prefixes
To: None <tech-pkg@netbsd.org>
From: Julien Letessier <julien.letessier@sun.com>
List: tech-pkg
Date: 08/13/2002 09:29:21
Hi list,
In pkgsrc, quite a few GNU programs have something similar in their 
Makefiles:
PROGRAM_PREFIX=g
PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
On Solaris, we'd prefer to have to use, for instance, 'locate' instead 
of 'glocate', because we don't have a 'locate' utility on vanilla 
Solaris... the same goes for many other base tools.
So here's a suggestion:
 * add a variable IS_GNU_PACKAGE= # defined
 in the concerned packages' Makefiles
 * use a site-wide
 GNU_PROGRAM_PREFIX?=g
 (in bsd.prefs.mk ?), along with something like
 .if defined(IS_GNU_PACKAGE)
 PROGRAM_PREFIX?= ${GNU_PROGRAM_PREFIX}
 PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
 .endif
 (I don't exactly know where, probably in bsd.prefs.mk as well)
This change should be transparent for users, and the additional feature 
would be to be able to say
 GNU_PROGRAM_PREFIX= # nothing
in /etc/mk.conf (or even in defs.SunOS.mk), and then type 'ls' instead 
of 'gls' to have a *real* 'ls'...
I'll PR this if it meets any success.
Cheers,
-- 
Julien T. Letessier
Sun Labs Europe, Meylan, France
julien.letessier@sun.com

AltStyle によって変換されたページ (->オリジナル) /