$NetBSD: patch-source4_heimdal__build_wscript__configure,v 1.1 2019/03/20 19:09:10 adam Exp $

krb5_config might contain undecodable characters; skip such lines.

--- source4/heimdal_build/wscript_configure.orig	2019-03-20 08:29:05.000000000 +0000
+++ source4/heimdal_build/wscript_configure
@@ -171,9 +171,13 @@ if not krb5_config:
     krb5_config = conf.find_program("krb5-config", var="HEIMDAL_KRB5_CONFIG")
 if krb5_config:
     # Not ideal, but seems like the best way to get at these paths:
-    f = open(krb5_config[0], 'r')
+    f = open(krb5_config[0], 'rb')
     try:
-        for l in f:
+        for lb in f:
+            try:
+                l = lb.decode()
+            except UnicodeDecodeError:
+                continue
             if l.startswith("libdir="):
                 heimdal_libdirs.append(l.strip()[len("libdir="):])
             elif l.startswith("includedir="):
