Subject: Program prefixes in pkgsrc
To: None <>
From: Julien Letessier <>
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
   - '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. use absolute paths for 
the basic tools (mkdir, cd, grep, etc.)

Here's my simplest solution: (thanks, Manuel)

in (?):

in the concerned packages' Makefiles:
CONFIGURE_ARGS+=        --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, could be extended with

.if defined(PROGRAM_PREFIX)
.  if defined(GNU_CONFIGURE)
CONFIGURE_ARGS+=        --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.

Julien T. Letessier
Sun Labs Europe, Meylan, France