Subject: Re: use of bsd.lib.mk in pkgsrc
To: Alistair Crooks <agc@wasabisystems.com>
From: None <mcmahill@mtl.mit.edu>
List: tech-pkg
Date: 05/21/2002 22:42:40
On Mon, 20 May 2002, Alistair Crooks wrote:

> On Sun, May 19, 2002 at 02:09:44PM -0400, mcmahill@mtl.mit.edu wrote:
> > 
> > a number of pkgs currently use bsd.lib.mk in pkgsrc for building
> > libraries.  While this is nice, its resulting in broken PLISTs and in some
> > cases, broken packages.  The basic reason is that the set of libraries
> > produced varies by MACHINE_ARCH.  For example, on mipsel (pmax),
> > everything is PIC so there isn't a seperate libfoo_pic.a created.  Thus a
> > PLIST generated on i386 may list libfoo_pic.a and the PLIST will be wrong
> > on pmax.  Also, I've come across some pkgs which rather than using the
> > install target from bsd.lib.mk, they explicitly add the install commands.
> > Now, they end up trying to install a libfoo_pic.a which doesn't exist and
> > the install fails.
> > 
> > Since there are around 15 pkgs that get patched to use bsd.lib.mk (and an
> > unknown number which might already use it), I wonder if we need a slightly
> > more unified way of handling this.  Maybe a BSD_LIBS variable which would
> > expand into the PLIST?  Or maybe some flags in the PLIST which would get
> > turned into @comments on arch's which don't install the particular flavor
> > of lib?  Something like:
> > 
> > ${ARCH_INSTALLS_PIC}lib/libfoo_pic.a
> > ${ARCH_INSTALLS_P}lib/libfoo_p.a
> > ${ARCH_INSTALLS_SHARED}lib/libfoo.so
> > ${ARCH_INSTALLS_SHARED}lib/libfoo.so.0
> > ${ARCH_INSTALLS_SHARED}lib/libfoo.so.0.1
> 
> You could also modify the PLIST-modifying code in bsd.pkg.mk, but I agree that
> it would be nice to solve this generically.
> 

the thing that worries me about modifying the PLIST code is that we need
to maybe have a BSD_LIB_LIBS=libfoo libbar setting in the Makefile to
identifies libraries which got built via bsd.lib.mk since a non-bsd.lib.mk
build system might not install the same set.  Comments on an approach
where a BSD_LIB_LIBS variable works with the PLIST modifying code to deal
appropriately?


Actually, this does make me want staged installs with dynamic plist's...


-dan