Subject: Re: CVS commit: pkgsrc/devel/ncurses
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Johnny Lam <jlam@jgrind.org>
List: pkgsrc-changes
Date: 01/31/2002 06:47:40
On Thu, Jan 31, 2002 at 01:08:32PM +0100, Matthias Drochner wrote:
> 
> jlam@jgrind.org said:
> > > Modified Files:
> > > 	pkgsrc/devel/ncurses: buildlink.mk
> > > 
> > > Log Message:
> > > add runtime search path to LDFLAGS
> > 
> > This change should be unnecessary as those flags are added
> > automatically by bsd.pkg.mk.  What problem were you trying to resolve
> > that prompted this change? 
> 
> I couldn't reconstruct which pkg it was exactly, but there was
> one which needed such a change to build.
> How is the addition os the rpath LDFLAG supposed to work? What
> I have seen in bsd.pkg.mk depends on a _USE_RPATH variable, where
> it is not obvious for me who is supposed to set it.

LDFLAGS pick up rpath settings in bsd.pkg.mk and from x11.buildlink.mk.
_All_ non-X11 packages automatically have -Wl,-R${LOCALBASE}/lib added
to LDFLAGS, and all X11 packages automatically have -Wl,-R${X11BASE}/lib
added to LDFLAGS.  You can see this for any package by doing
"make show-var VARNAME=LDFLAGS".

> There are other pkg buildlink files which would need a similar
> change: I've just tried to build something using Qt, ie it
> includes qt2-libs/buildlink.mk. The rpath to the X11 libs
> doesn't get set automatically, so the compiled programs fail
> if the X11 dependency is not added explicitely.

These problems almost always occur because a configure script explicitly
sets LDFLAGS and ignores what is passed in from the environment.  They
should be fixed on a per-package basis.

I'm going to back out this change, because it is redundant to the mechanism
that already exists in bsd.pkg.mk.

	Cheers,

	-- Johnny Lam <jlam@jgrind.org>