$NetBSD: patch-texk_web2c_configure,v 1.1 2018/05/05 12:22:47 minskim Exp $

--- texk/web2c/configure.orig	2017-03-18 22:50:15.000000000 +0000
+++ texk/web2c/configure
@@ -1786,7 +1786,7 @@ Optional Packages:
   --with-system-libpng    use installed libpng headers and library (requires
                           pkg-config)
   --with-system-freetype2 use installed freetype2 headers and library
-                          (requires freetype-config)
+                          (requires pkg-config)
   --with-system-pixman    use installed pixman headers and library (requires
                           pkg-config)
   --with-system-cairo     use installed cairo headers and library (requires
@@ -23968,9 +23968,9 @@ esac
 else
   FT2_CONFIG="$ac_cv_prog_FT2_CONFIG"
 fi
-if $FT2_CONFIG --ftversion >/dev/null 2>&1; then
-  FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags`
-  FREETYPE2_LIBS=`$FT2_CONFIG --libs`
+if $PKG_CONFIG --version >/dev/null 2>&1; then
+  FREETYPE2_INCLUDES=`$PKG_CONFIG --cflags freetype2`
+  FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
 elif test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then
   as_fn_error $? "did not find freetype-config required for system freetype2 library" "$LINENO" 5
 fi
