Subject: freetype2
To: None <>
From: James K. Lowden <>
List: tech-pkg
Date: 03/05/2003 23:47:36

I think freetype2 is just broken.  I can't build current Dia sources
against it, and it reports incorrectly its installation location.  I'm
willing to fix things but I'm not sure where to aim.  

Dia expects to #include <freetype2/freetype.h>.  Our tree doesn't look
like that, though:

$ pkg_info -L freetype2 |grep freetype.h

Then, the Dia configure script uses freetype-config to determine the
location of the freetype2 files.  But, pkgsrc freetype2 puts its
freetype-config in /usr/pkg/bin, whereas something else put its
freetype-config in /usr/X11R6/bin.  Being earlier in the path, the latter
is invoked, confusing Dia's configure horribly.  "Something else" turns
out to be NetBSD:

$ tar tzf xcomp.tgz |grep freetype-config

which, unfortunately, when invoked with --cflags (and should return the
include directory), returns nonsense, a nonexistent directory:

$ ls /usr/X11R6/include/freetype2
ls: /usr/X11R6/include/freetype2: No such file or directory

Blech.  This is in 1.6, perhaps -current is better off.  

Advice, please.  What is the Right Thing?  Should pkgsrc/freetype2 entwine
itself in /usr/X11R6?  Should it ax that tree and symlink to /usr/pkgsrc? 
How to get Dia (or anything else for that matter) to read the right one? 
And what about the tree structure itself, which is Just Wrong as far as
Dia is concerned?  

I can work around this with some hacks to /usr/local, but I'd rather
submit a patch with a less ameturish approach.  And I wouldn't mind a
working system.  :-)

BTW, nothing special about Dia. I think most GTK2 apps will want a
standard freetype2 tree, and expect a reasonable result from whatever
freetype-config is yielded up by $PATH.  

Thank you.