Subject: Xft2, freetype2, and USE_GNU_TOOLS+=awk problem
To: None <>
From: Hiramatsu Yoshifumi <>
List: tech-pkg
Date: 10/11/2004 07:55:31

When I executed make in fonts/Xft2, this message was displayed many times.

make: "../../mk/wrapper/../../mk/buildlink3/../../mk/buildlink3/../../graphics/freetype2/../../mk/wrapper/../../mk/buildlink3/../../mk/buildlink3/../../graphics/freetype2/" line 23: warning: Couldn't read shell's output for "/usr/orinoco/bin/gawk '/#define[     ]*FREETYPE_MAJOR/ { print $3 }' /usr/X11R6/include/freetype2/freetype/freetype.h"

This message was caused by

1. Xft2 set "USE_GNU_TOOLS+= awk" in its Makefile.
2. ${AWK} became ${LOCALBASE}/gawk in
3. buildlink framework executed

  ${AWK} '/\#define[      ]*FREETYPE_MAJOR/ { print $$3 }' ${_FREETYPE2_FREETYPE_H}

  in freetype2/
4. Because NetBSD-current's awk and gawk behave differently(gawk-3.1.4 bug ?),
   ${AWK} doesn't return any string.

In addition, "USE_GNU_TOOLS+= awk" is required for fonts/Xft2 because of
Solaris's awk is not good enough, so it's not neccessary on NetBSD.

How can I fix this?

// Hiramatsu Yoshifumi