$NetBSD: patch-configure,v 1.3 2016/09/30 11:54:00 wiz Exp $

Handle TEXMFLOCAL having multiple elements.

--- configure.orig	2011-11-16 21:40:11.000000000 +0000
+++ configure
@@ -3773,7 +3773,7 @@ fi
 
 
 if test "x$kpsewhich" = "xtrue"; then
-  latexdir=`kpsewhich -expand-var='$TEXMFLOCAL'/tex/latex`
+  latexdir=`kpsewhich -expand-var='$TEXMFLOCAL' | sed -e 's/:.*//' -e 's:$:/tex/latex:'`
 else
   latexdir=$prefix/share/texmf/tex/latex
   as_ac_File=`$as_echo "ac_cv_file_$latexdir/base/latex.ltx" | $as_tr_sh`
@@ -3872,7 +3872,7 @@ fi
 
 
 if test "x$kpsewhich" = "xtrue"; then
-  contextdir=`kpsewhich -expand-var='$TEXMFLOCAL'/tex/context/third`
+  contextdir=`kpsewhich -expand-var='$TEXMFLOCAL' | sed -e 's/:.*//' -e 's:$:/tex/context/third:'`
 else
   contextdir=$prefix/share/texmf/tex/context/third
 fi
