Subject: nbcompat, packages, and compat
To: None <tech-pkg@NetBSD.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: tech-pkg
Date: 12/01/2005 10:58:03
There have been a couple of threads related to 'libnbcompat' built
during the bootstrap phase.  I've had a few questions related to that
stewing in my mind for a while as well.

Is libnbcompat built solely for use by the bootstrap package tools, or
is it appropriate for regular packages to link against it to pick up
capabilities not provided by the host system's libraries?

Can libnbcompat be modularized so that it only provides those facilities
not available natively on a host system?  There was particular discussion
of the regex functionality.  libnbcompat implements the POSIX functions
but some systems (MacOS X in particular) already provide the POSIX regex
functions (and their prototypes in appropriate headers).

Related, but converse to this, some packages expect to use the legacy
re_comp()/re_exec() regex parsing functions which some systems provide
in "libcompat".  MacOS X, however does not provide libcompat.  Since
NetBSD provides libcompat and implements the legacy functions in terms
of the POSIX functions, I built a local "libcompat.a" by grabbing
"src/lib/libcompat/4.3/regex.c" and src/include/re_comp.h" compiling and
archiving locally on MacOS X.  Perhaps a "libcompat" package with
certain legacy functions such as these can be created for use in pkgsrc?

Thanks.

-- 
John D. Baker, KN5UKS                    NetBSD     Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com                 OpenBSD            FreeBSD
BSD -- It just sits there and _works_!
GPG fingerprint:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645