Subject: Re: fontconfig and font paths again (PR #22927)
To: None <tech-pkg@netbsd.org>
From: Ron Roskens <roskens@elfin.net>
List: tech-pkg
Date: 11/26/2003 16:33:29
* Jeremy C. Reed <reed@reedmedia.net> [2003-11-26 11:26:00 -0800]:

> Gavan F. told me that my fix for my PR #22927 is wrong for systems that
> have fonts in X11BASE when X11PREFIX is different (like xpkgwedge under
> NetBSD).
> 
> Sorry for breaking this for xpkgwedge users.
> 
> I didn't notice because on my system with X11PREFIX same as LOCALBASE, I
> also had my XFree86 (and its fonts) installed there too.
> 
> Is it okay if I just use X11BASE instead of X11PREFIX?
> 
> -CONFIGURE_ARGS+=	--with-add-fonts=${X11PREFIX}/lib/X11/fonts/TTF,${X11PREFIX}/lib/X11/fonts/Type1
> +CONFIGURE_ARGS+=	--with-add-fonts=${X11BASE}/lib/X11/fonts/TTF,${X11BASE}/lib/X11/fonts/Type1
> 
> Or should I have it check something like the following?
> 
> .if (${LOCALBASE} == ${X11PREFIX}) && (${X11BASE} != ${LOCALBASE})
> CONFIGURE_ARGS+= --with-add-fonts=${X11BASE}/lib/X11/fonts/TTF,${X11BASE}/lib/X11/fonts/Type1
> .else
> CONFIGURE_ARGS+= --with-add-fonts=${X11PREFIX}/lib/X11/fonts/TTF,${X11PREFIX}/lib/X11/fonts/Type1
> .endif

I think both sets of directories should be added. If you have xpkgwedge then
every thing goes under ${LOCALBASE} but you don't want to lose all the fonts
inside ${X11BASE}.

I was toying with the following:

.if !empty(X11BASE:M${X11PREFIX})
CONFIGURE_ARGS+=       --with-add-fonts=${X11PREFIX}/lib/X11/fonts/TTF,${X11PREFIX}/lib/X11/fonts/Type1,${LOCALBASE}/share/fonts
.else
CONFIGURE_ARGS+=       --with-add-fonts=${X11BASE}/lib/X11/fonts,${X11BASE}/lib/X11/fonts/TTF,${X11BASE}/lib/X11/fonts/Type1,${X11PREFIX}/lib/X11/fonts/TTF,${X11PREFIX}/lib/X11/fonts/Type1,${LOCALBASE}/share/fonts
.endif

Ron