Subject: CVS commit: pkgsrc/mk/buildlink3
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 09/08/2003 09:18:17
Module Name:	pkgsrc
Committed By:	jlam
Date:		Mon Sep  8 09:18:17 UTC 2003

Modified Files:
	pkgsrc/mk/buildlink3: bsd.buildlink3.mk

Log Message:
Instead of canonicalizing all ${DEPOTBASE}/* into ${LOCALBASE}, don't
do it for rpath specifications, e.g. -Wl,-R/dir, -Wl,-rpath,/dir, etc.
This lets the depot directory for a package, in addition to the usual
/usr/pkg/lib, to be added to the rpath of a program or shared library
of an "overwrite" package.  Now, if the package instance in the
default view is forcibly removed, then shared library references will
still resolve to the existing shared libraries in the depot directory.

In the following example, I've built jpeg as a pkgviews package, and
tiff as an "overwrite" package:

% ldd /usr/pkg/lib/libtiff.so
/usr/pkg/lib/libtiff.so:
         -ljpeg.62 => /usr/pkg/lib/libjpeg.so.62
         -lz.0 => /usr/lib/libz.so.0
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0
% pkg_delete -f jpeg-6b
pkg_delete: package `jpeg-6b' is required by other packages:
        tiff-3.5.7nb1
% ldd /usr/pkg/lib/libtiff.so
/usr/pkg/lib/libtiff.so:
         -ljpeg.62 => /usr/pkg/packages/jpeg-6b/lib/libjpeg.so.62
         -lz.0 => /usr/lib/libz.so.0
         -lm.0 => /usr/lib/libm387.so.0
         -lm.0 => /usr/lib/libm.so.0

The benefit here is that if the jpeg package is updated and also has
a bump in the major number of the shared lib, e.g. libjpeg.so.63.0,
then you can remove the old jpeg instance from the default view and
add the new jpeg package into the default view, and
/usr/pkg/lib/libtiff.so will _still_ resolve its libjpeg.so.62
reference.

Welcome to the power of Package Views!


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 pkgsrc/mk/buildlink3/bsd.buildlink3.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.