Subject: Re: pkg/19687: wm/fluxbox use (depend) Xft2 if Xft2 is installed
To: Julio Merino <jmmv@menta.net>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 01/05/2003 14:12:52
Julio Merino <jmmv@menta.net> wrote:

>> >Description:
>>        wm/fluxbox use (depend) Xft2 if Xft2 is installed.
>> >How-To-Repeat:
>>        install fonts/Xft2, then build wm/fluxbox.
>> >Fix:
>>        Add `.include "../../fonts/Xft2/buildlink2.mk"' to Makefile if
>>        Xft2 is installed. (it should be more smart ;)

> This is wrong. If the program can use Xft2, the maintainer has to decide
> if he wants fluxbox to depend on Xft2 or not. But it must not be automatic.

I'm not so sure.  Why not check if Xft2 is installed, and if so, add the
buildlink (thus depend on it) and otherwise disable Xft2 support?

.include "../../mk/bsd.prefs.mk"

XFT2!=  eval ${PKG_INFO} -e \"Xft2\" || ${ECHO} "NO"
.if ${XFT2} != "NO"
.include "../../fonts/Xft2/buildlink2.mk"
.else
CONFIGURE_ARGS+=        --disable-xft
.endif


Or maybe we need a variable USE_XFT2_WHEN_POSSIBLE (of course with a
shorter name) so that any package that can work with and without Xft2
can only use it if desired.

-Jan

-- 
Of course it runs NetBSD!		http://www.netbsd.org