Subject: Re: Packages that use X, but not IMAKE, fail to find all libs
To: Todd Vierling <tv@pobox.com>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 11/14/1998 02:11:30
On Fri, 13 Nov 1998, Todd Vierling wrote:

> On Fri, 13 Nov 1998, Frederick Bruckman wrote:
> 
> : Arguably, there are logical flaws in the configure scripts,
> 
> : What's the right way to fix this? In the Makefile for just the
> : programs that need it, or some kind of test in bsd.pkg.mk?
> 
> In the Makefile of the pkg(s) that need it.  It's not good to insert lots of
> "extra" stuff into CFLAGS and LDFLAGS by default.

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.

Disclaimer: On mac68k, at least, Mosaic is still riotously unstable.
It paniced once already while I was navigating the file save dialog,
but I couldn't reproduce that.

--- /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} --with-pngdir=${LOCALBASE}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/Mosaic ${PREFIX}/bin
 	${LN} -sf Mosaic ${PREFIX}/bin/mosaic
 	${INSTALL_DATA} ${WRKSRC}/app-defaults.color ${PREFIX}/lib/X11/app-defaults/Mosaic
 
 .include "../../mk/bsd.pkg.mk"
+CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
+		CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include"