Subject: Re: Packages that use X, but not IMAKE, fail to find all libs
To: Frederick Bruckman <fb@enteract.com>
From: Tim Rightnour <root@garbled.net>
List: tech-pkg
Date: 11/14/1998 08:53:55
On 14-Nov-98 Frederick Bruckman spoke unto us all:
#  On Fri, 13 Nov 1998, Todd Vierling wrote:
#  Interestingly, CONFIGURE_ENV is already set in the Makefile, but the
#  LDFLAGS definition there is overwritten by bsd.pkg.mk. Assuming
#  everyone else is happy with that, all that's required for Mosaic to
#  build, is to postpone the CONFIGURE_ENV definition until after the
#  include.

This needs to be done differently.. you are breaking elf like this.
 
#  --- /usr/pkgsrc/www/Mosaic/Makefile.orig     Fri Nov 13 06:35:56 1998
#  +++ /usr/pkgsrc/www/Mosaic/Makefile  Sat Nov 14 01:28:25 1998
#  @@ -19,15 +19,15 @@
#   
#   USE_X11=    yes
#   USE_MOTIF=  yes
#   
#   GNU_CONFIGURE=      yes
#  -CONFIGURE_ENV=      LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
#  -            CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"
#   CONFIGURE_ARGS=     --with-zdir=/usr --with-jpegdir=${LOCALBASE}
change to:
   LDFLAGS+= -L${LOCALBASE}/lib
   CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"

Never set CONFIGURE_ENV with an = sign unless you know what you are doing. 
When doing so, you risk breaking elf platform builds.  When using
gnu-configure, you can set LDFLAGS, and have it automaticly passed down to the
CONFIGURE_ENV, as is documented in packages(7)

Your fix would have lost the -Wl targets on elf, causing the generated binaries
to be completely useless.  (I didn't add -L${X11BASE}/lib because I believe it
is allready pulled in by bsd.pkg.mk with a X11 package.)

---
Tim Rightnour  -  root@garbled.net
Free Multi-Platform Operating System: http://www.netbsd.org
NetBSD Mailing lists on the web: http://mail-index.netbsd.org/mlist