Subject: Re: proposal of how to deal with missing header files supplied by nbcompat
To: Georg Schwarz <>
From: Dieter Baron <>
List: tech-pkg
Date: 12/02/2005 15:27:53
On Thu, Dec 01, 2005 at 08:21:06PM +0100, Georg Schwarz wrote:
> >   The buildlink framework makes sure that ${LOCALBASE}/include and
> > ${LOCALBASE}/lib are not searched during package build.  Instead, the
> > files the package needs is linked into ${WRKDIR}/.buildlink/include
> > and ${WRKDIR}/.buildlink/lib, which avoids that the package picks up
> > other installed files it has optional support for.
> I know, and in order to avoid having to implement another additional
> mechanism my probosal was just to add links in ${LOCALBASE}/include and
> list them in libnbcompat's PLIST so that if libnbcompat/ was
> included these files or symlinks would automatically be copies to
> ${WRKDIR}/.buildlink/include where the build process would find them.
> The advantage would be that no extra code would have been needed
> except for some code run when installing libnbcompat.

  The mechanism to link files during buildlink, also under different
namess, already exists.  No extra code is needed.

  The big disadvantage of your proposal is that it pollutes
${LOCALBASE}/include with system header files.  This can be
problematic when compiling applications outside pkgsrc.

> > 
> >   This mechanism is generic enough to allow us to link only those
> > files from ${LOCALBASE}/include/nbcompat needed by the package but not
> > provided by the system into ${WRKDIR}/.buildlink/include, so they will
> > be found by the compiler.  (The other files will not be found, since
> > ${LOCALBASE}/include/nbcompat is not searched.)
> nor is, and that is more important here, ${WRKDIR}/.buildlink/include/nbcompat.

  I never mentioned ${WRKDIR}/.buildlink/include/nbcompat, because I
do not propose to link anything there.  I said
${WRKDIR}/.buildlink/include, and that is searched during package

> so you would suggest to symlink the requested header files found in
> ${WRKDIR}/.buildlink/include/nbcompat to ${WRKDIR}/.buildlink/include
> on compile time of a package?

  I suggested linking the needed header files from
${LOCALBASE}/include/nbcompat to ${WRKDIR}/.buildlink/include, whether
they are linked into ${WRKDIR}/.buildlink/include/nbcompat does't

> The open issue to me here is how to ensure that this happens only after
> ${WRKDIR}/.buildlink/include has been created and still could be triggered
> simply by including ../../mk/

  Like I said (repeatedly), buildlink already handles that.  This is
nothing new, it is already done by various packages.