Subject: Program prefixes in pkgsrc
To: None <tech-pkg@netbsd.org>
From: Julien Letessier <julien.letessier@sun.com>
List: tech-pkg
Date: 08/27/2002 14:05:16
Hi all,
I've submitted the following ideas already, but didn't get any
feedback--probably because my previous post wasn't clear/detailed enough.
Please feel free to give your opinion about this!
Most of the GNU programs in pkgsrc that either exist in base NetBSD or
have a BSD equivalent are prefixed with a 'g'.
The problems is that on Solaris, either the tools don't exist in the
base distribution, or their base-system counterpart lacks user-desired
functionnality. Examples:
- 'locate' doesn't exist in SunOS, so why should users have to type
'glocate'?
- 'ls' is fairly basic (in SunOS) e.g. it doesn't have all of the
nifty features of 'gls' (sysutils/fileutils).
Users of pkgsrc on Solaris would prefer to have the choice of getting
rid of the 'g' program prefix, though it doesn't have to be a default.
Note that there's no risk to break builds by doing this, since the
OS-specific makefile stubs (e.g. defs.SunOS.mk) use absolute paths for
the basic tools (mkdir, cd, grep, etc.)
Here's my simplest solution: (thanks, Manuel)
in bsd.defaults.mk (?):
GNU_PROGRAM_PREFIX?= g
in the concerned packages' Makefiles:
PROGRAM_PREFIX= ${GNU_PROGRAM_PREFIX}
CONFIGURE_ARGS+= --program-prefix=${PROGRAM_PREFIX}
PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
This is already used by some packages (e.g. devel/patch) to some extent;
sometimes the prefix is hard-coded (with --program-prefix=g, and in the
PLIST); sometimes a PROGRAM_PREFIX variable is used. The idea here is
only to make out something uniform for packages whose programs use a prefix.
An additional idea could be to centralize part of this stuff:
for instance, bsd.something.mk could be extended with
.if defined(PROGRAM_PREFIX)
. if defined(GNU_CONFIGURE)
CONFIGURE_ARGS+= --program-prefix=${PROGRAM_PREFIX}
. endif
PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
.endif
Anyways, if this meets any success, I can submit
- the list of concerned (GNU) packages
- and/or patches for concerned Makefiles and PLISTs
as a PR or directly to the involved people.
Cheers,
--
Julien T. Letessier
Sun Labs Europe, Meylan, France
julien.letessier@sun.com