Subject: Mosaic package
To: None <tech-pkg@netbsd.org>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 11/15/1998 10:57:11
On Sat, 14 Nov 1998, Tim Rightnour wrote:

> 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.)

OK, I think I follow you now. I still don't quite understand why -L${X11BASE}/lib 
isn't pulled in automatically, especially  when USE_X11 and USE_MOTIF are both set.
Given that it isn't, this works for Mosaic.

--- /usr/pkgsrc/www/Mosaic/Makefile.orig	Fri Nov 13 06:35:56 1998
+++ /usr/pkgsrc/www/Mosaic/Makefile	Sun Nov 15 10:01:24 1998
@@ -19,11 +19,12 @@
 
 USE_X11=	yes
 USE_MOTIF=	yes
 
+LDFLAGS+=	-L${X11BASE}/lib
+
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
-		CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"
+CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"
 CONFIGURE_ARGS=	--with-zdir=/usr --with-jpegdir=${LOCALBASE} --with-pngdir=${LOCALBASE}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/Mosaic ${PREFIX}/bin