Subject: devel/libiberty or how to add extra libraries?
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 10/23/2005 14:31:21
The is a devel/libiberty/ which has:

# currently requires GCC for "-include"
.if empty(PKGSRC_COMPILER:Mgcc)
PKG_FAIL_REASON+=       "libiberty compatibility build requires gcc

.include "../../devel/libiberty/"

CPPFLAGS+=              -include libiberty.h
LIBS+=                  -liberty

it is used for expample with archivers/rzip/Makefile.
Now IRIX 5 does not come with asprintf either, so it also needs
libiberty there, just like Interix.
However, I do not want to be restricted to use gcc just because auf the
-include syntax.
What would be a better solution?
For rzip the following code in devel/libiberty/ works:

.include "../../devel/libiberty/"
.if !empty(PKGSRC_COMPILER:Mgcc)
CPPFLAGS+=              -include libiberty.h
LIBS+=                  -liberty

at least for rzip on IRIX 5.3 it seems to do nicely without the header
file. This would make things at least a tiny bit more compatible.

More generally, in the inclusion of a respective on a per
OS basis a viable way to deal with non-existing but required functions?
I am thinking of snprintf and vsnprintf where libnbcompat provides the
alternatives. These functions are needed by many packages but are
unavailable on IRIX 5.3. So far I am adding these manually, but this is
of course no long-term solution.

Georg Schwarz  +49 178 8545053