$NetBSD: patch-SConscript,v 1.5 2022/01/02 11:59:06 ryoon Exp $

gpspipe requires libgpsd for serial.c cfmakeraw() compat.
\todo Fix upstream?

Support Python 3.10 or later.

--- SConscript.orig	2021-09-21 21:53:44.000000000 +0000
+++ SConscript
@@ -1516,15 +1516,13 @@ if not cleaning and not helping and conf
         # announce(python_config)
 
         # aiogps is only available on Python >= 3.6
-        sysver = config.GetPythonValue('target version',
-                                       'import sys',
-                                       '"%d.%d" % sys.version_info[0:2]')
+        sysver = sys.version_info
 
-        if 3 > int(sysver[0]) or 6 > int(sysver[2]):
+        if 3 > sysver[0] or 6 > sysver[1]:
             config.env['aiogps'] = False
             announce("WARNING: Python%s too old (need 3.6): "
                      "gps/aiogps.py will not be installed" %
-                     (sysver), end=True)
+                     (str(sysver[0]) + "." + str(sysver[1])), end=True)
         else:
             config.env['aiogps'] = True
 
@@ -1930,7 +1928,7 @@ gpsmon = env.Program('gpsmon/gpsmon', gp
                      LIBS=[libgpsd_static, libgps_static],
                      parse_flags=gpsdflags + gpsflags + ncurseslibs)
 gpspipe = env.Program('clients/gpspipe', ['clients/gpspipe.c'],
-                      LIBS=[libgps_static],
+                      LIBS=[libgpsd_static, libgps_static],
                       parse_flags=gpsflags)
 gpsrinex = env.Program('clients/gpsrinex', ['clients/gpsrinex.c'],
                        LIBS=[libgps_static],
