Subject: How to best integrate libnbcompat? (pkgsrc/news/suck)
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 05/21/2004 23:51:07
As some of you might already now, my OS, IRIX 5.3, is quite limitied in
some of its features.
It is lacking, among others, an snprintf function.
Luckily, libnbcompat provides that function.
My question is now how to best integrate that lib for packages that
assume the presence of snprintf (and similar functions).

One simple such example is pkgsrc/news/suck, which needs snprintf when
linking suck.
I have added to the Makefile the following lines:

.if ${OPSYS} == "IRIX" && ${OS_VERSION} < 6
.include "../../pkgtools/libnbcompat/"
CONFIGURE_ARGS+=        LIBS=-lnbcompat

and it seems to do the trick for me in that particular situation at

- is this syntactically correct, particularly the version number check?

- should I add -L${LOCALBASE}/lib, or does buildlink automatically take
care of the lib being found?

- is it a good idea to make use of LIBS=? After all, this can only be
done once in the Makefile

- now libnbcompat is added for all link procedures. This is not really
what I would prefer. Is there a better way to have it added only for
linking suck, where it is needed? Would patching be a better

Any comments from those familiar with pkgsrc would be very welcome, in
particular since this is a quite general problem that one way or another
applies to several packages.

Georg Schwarz     +49 177 8811442