summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2020-08-07 17:30:00 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-08-14 14:24:52 +0200
commitf99958dd69d6b8305f61c46413e4d25aee4e4d94 (patch)
treefbe919c097d4d07d0ab02e0f8c9a915467d38724 /patches
parent88c597d88cbeef16aa8d075e1b9696b0d08ee491 (diff)
downloadptxdist-f99958dd69d6b8305f61c46413e4d25aee4e4d94.tar.gz
ptxdist-f99958dd69d6b8305f61c46413e4d25aee4e4d94.tar.xz
gpsd: version bump 3.20 -> 3.21
License checksum changed as '(c)' was removed from text, no changes otherwise. Also remove vanished options and modify systemd service files to expect gpsd socket in /run. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Message-Id: <20200807153000.GA2625913@lenoch> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/gpsd-3.20/0001-SConstruct-replace-custom-CheckSizeOf-with-standard-.patch74
-rw-r--r--patches/gpsd-3.20/0002-SConstruct-Always-install-xpgs-xgpsspeed-programs-ma.patch148
-rw-r--r--patches/gpsd-3.20/0003-SConstruct-Always-install-xgps-.-Only-test-if-deps-f.patch108
-rw-r--r--patches/gpsd-3.20/0004-SConstruct-Skip-sizeof-time_t-test-when-cross-compil.patch39
-rw-r--r--patches/gpsd-3.20/0005-Fix-merging-and-using-of-python-flags.patch45
-rw-r--r--patches/gpsd-3.20/0006-SConstruct-Remove-redundant-CheckHeaderDefines.patch52
-rw-r--r--patches/gpsd-3.20/0007-SConstruct-remove-redundant-CheckCompilerDefines.patch67
-rw-r--r--patches/gpsd-3.20/0008-SConstruct-GetPythonValue-and-CheckPKG-were-using-wr.patch44
-rw-r--r--patches/gpsd-3.20/0009-SConstruct-Fix-GetPythonValue-for-python-3.patch57
-rw-r--r--patches/gpsd-3.20/0010-SConstruct-move-more-checks-into-GetPythonValue.patch98
-rw-r--r--patches/gpsd-3.20/0011-SConstruct-Check-target-python-version-not-scons-pyt.patch32
-rw-r--r--patches/gpsd-3.20/0012-SConstruct-Simplify-GetPythonValue-.-It-now-caches-p.patch174
-rw-r--r--patches/gpsd-3.20/0013-SConstruct-fix-polystr-for-python2.patch34
-rw-r--r--patches/gpsd-3.20/0100-SConstruct-Use-target_python-when-constructing-exten.patch36
-rw-r--r--patches/gpsd-3.20/0102-SConstruct-HACK-use-target-INCLUDEPY.patch25
-rw-r--r--patches/gpsd-3.20/series20
-rw-r--r--patches/gpsd-3.21/0001-Search-for-ncursesw-pkgconfig.patch (renamed from patches/gpsd-3.20/0101-SConstruct-Search-for-ncursesw-pkgconfig.patch)6
-rw-r--r--patches/gpsd-3.21/0002-SConstruct-Use-target-option-to-decide-whenewer-to-r.patch21
-rw-r--r--patches/gpsd-3.21/series5
19 files changed, 29 insertions, 1056 deletions
diff --git a/patches/gpsd-3.20/0001-SConstruct-replace-custom-CheckSizeOf-with-standard-.patch b/patches/gpsd-3.20/0001-SConstruct-replace-custom-CheckSizeOf-with-standard-.patch
deleted file mode 100644
index 0d5771bbe..000000000
--- a/patches/gpsd-3.20/0001-SConstruct-replace-custom-CheckSizeOf-with-standard-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Fri, 3 Jan 2020 16:15:53 -0800
-Subject: [PATCH] SConstruct: replace custom CheckSizeOf() with standard
- CheckTypeSize()
-
----
- SConstruct | 40 ++--------------------------------------
- 1 file changed, 2 insertions(+), 38 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 33e0ff32665c..bd008207011d 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -597,42 +597,6 @@ def CheckHeaderDefines(context, file, define):
- return ret
-
-
--def CheckSizeOf(context, type):
-- """Check sizeof 'type'"""
-- context.Message('Checking size of ' + type + '... ')
--
-- program = """
--#include <stdlib.h>
--#include <stdio.h>
--
--/*
-- * The CheckSizeOf function does not have a way for the caller to
-- * specify header files to be included to provide the type being
-- * checked. As a workaround until that is remedied, include the
-- * header required for time_t, which is the sole current use of this
-- * function.
-- */
--#include <time.h>
--
--int main() {
-- printf("%d", (int)sizeof(""" + type + """));
-- return 0;
--}
--"""
--
-- # compile it
-- ret = context.TryCompile(program, '.c')
-- if 0 == ret:
-- announce('ERROR: TryCompile failed\n')
-- # fall back to sizeof(time_t) is 8
-- return '8'
--
-- # run it
-- ret = context.TryRun(program, '.c')
-- context.Result(ret[0])
-- return ret[1]
--
--
- def CheckCompilerDefines(context, define):
- context.Message('Checking if compiler supplies %s... ' % (define,))
- ret = context.TryLink("""
-@@ -708,7 +672,6 @@ config = Configure(env, custom_tests={
- 'CheckCompilerOption': CheckCompilerOption,
- 'CheckHeaderDefines': CheckHeaderDefines,
- 'CheckPKG': CheckPKG,
-- 'CheckSizeOf': CheckSizeOf,
- 'CheckXsltproc': CheckXsltproc,
- 'GetPythonValue': GetPythonValue,
- })
-@@ -1043,7 +1006,8 @@ else:
- confdefs.append("/* #undef HAVE_%s_H */\n"
- % hdr.replace("/", "_").upper())
-
-- sizeof_time_t = config.CheckSizeOf("time_t")
-+ sizeof_time_t = config.CheckTypeSize('time_t',
-+ includes='#include <time.h>\n')
- confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t)
- announce("sizeof(time_t) is %s" % sizeof_time_t)
- if 4 >= int(sizeof_time_t):
diff --git a/patches/gpsd-3.20/0002-SConstruct-Always-install-xpgs-xgpsspeed-programs-ma.patch b/patches/gpsd-3.20/0002-SConstruct-Always-install-xpgs-xgpsspeed-programs-ma.patch
deleted file mode 100644
index 5800867b8..000000000
--- a/patches/gpsd-3.20/0002-SConstruct-Always-install-xpgs-xgpsspeed-programs-ma.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Mon, 6 Jan 2020 12:29:10 -0800
-Subject: [PATCH] SConstruct: Always install xpgs/xgpsspeed programs, man
- pages.
-
-Now the xgps/xgpsspeed dependencies are tested at build time but not
-mandatory. The dependencies need to be installed for the programs to
-run.
----
- SConstruct | 75 ++++++++++++++++++++++++++------------------------------------
- 1 file changed, 31 insertions(+), 44 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index bd008207011d..cfd1c4164337 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1179,15 +1179,13 @@ def polystr(o):
-
-
- if helping:
--
- # If helping just get usable config info from the local Python
- target_python_path = ''
- py_config_text = str(eval(PYTHON_CONFIG_CALL))
- python_libdir = str(eval(PYTHON_LIBDIR_CALL))
-
--else:
--
-- if config.env['python'] and config.env['target_python']:
-+elif config.env['python']:
-+ if config.env['target_python']:
- try:
- config.CheckProg
- except AttributeError: # Older scons versions don't have CheckProg
-@@ -1197,6 +1195,7 @@ else:
- if not target_python_path:
- announce("Target Python doesn't exist - disabling Python.")
- config.env['python'] = False
-+
- if config.env['python']:
- # Maximize consistency by using the reported sys.executable
- target_python_path = config.GetPythonValue('exe path',
-@@ -1235,41 +1234,36 @@ else:
- imp.find_module('serial')
- announce("Python module serial (pyserial) found.")
- except ImportError:
-- # no pycairo, don't build xgps, xgpsspeed
-+ # no pyserial, used by ubxtool and zerk
- announce("WARNING: Python module serial (pyserial) not found.")
-- config.env['xgps'] = False
-
-- if config.env['xgps']:
-- # check for pycairo
-- try:
-- imp.find_module('cairo')
-- announce("Python module cairo (pycairo) found.")
-- except ImportError:
-- # no pycairo, don't build xgps, xgpsspeed
-- announce("WARNING: Python module cairo (pycairo) not found.")
-- config.env['xgps'] = False
--
-- # check for pygobject
-- try:
-- imp.find_module('gi')
-- announce("Python module gi (pygobject) found.")
-- except ImportError:
-- # no pygobject, don't build xgps, xgpsspeed
-- announce("WARNING: Python module gi (pygobject) not found.")
-- config.env['xgps'] = False
-+ # check for pycairo
-+ try:
-+ imp.find_module('cairo')
-+ announce("Python module cairo (pycairo) found.")
-+ except ImportError:
-+ # no pycairo, used by xgps, xgpsspeed
-+ announce("WARNING: Python module cairo (pycairo) not found.")
-
-- if not config.CheckPKG('gtk+-3.0'):
-- config.env['xgps'] = False
-+ # check for pygobject
-+ try:
-+ imp.find_module('gi')
-+ announce("Python module gi (pygobject) found.")
-+ except ImportError:
-+ # no pycairo, used by xgps, xgpsspeed
-+ announce("WARNING: Python module gi (pygobject) not found.")
-
-+ # gtk+ needed by pygobject
-+ config.CheckPKG('gtk+-3.0')
-
--if config.env['python']: # May have been turned off by error
-- config.env['PYTHON'] = polystr(target_python_path)
-- # For regress-driver
-- config.env['ENV']['PYTHON'] = polystr(target_python_path)
-- py_config_vars = ast.literal_eval(py_config_text.decode())
-- py_config_vars = [[] if x is None else x for x in py_config_vars]
-- python_config = dict(zip(PYTHON_CONFIG_NAMES, py_config_vars))
-- announce(python_config)
-+ config.env['PYTHON'] = polystr(target_python_path)
-+ # For regress-driver
-+ config.env['ENV']['PYTHON'] = polystr(target_python_path)
-+ py_config_vars = ast.literal_eval(py_config_text.decode())
-+ py_config_vars = [[] if x is None else x for x in py_config_vars]
-+ python_config = dict(zip(PYTHON_CONFIG_NAMES, py_config_vars))
-+ # debug
-+ # announce(python_config)
-
-
- env = config.Finish()
-@@ -1664,15 +1658,13 @@ else:
- "man/gpsfake.1": "man/gpsfake.xml",
- "man/gpsprof.1": "man/gpsprof.xml",
- "man/ubxtool.1": "man/ubxtool.xml",
-+ "man/xgps.1": "man/gps.xml",
-+ "man/xgpsspeed.1": "man/gps.xml",
- "man/zerk.1": "man/zerk.xml",
- }
-
- if env['xgps']:
- python_progs.extend(["xgps", "xgpsspeed"])
-- python_manpages.update({
-- "man/xgps.1": "man/gps.xml",
-- "man/xgpsspeed.1": "man/gps.xml",
-- })
- else:
- announce("WARNING: xgps and xgpsspeed will not be installed")
-
-@@ -1961,11 +1953,6 @@ if tiocmiwait:
- })
-
- all_manpages = list(base_manpages.keys())
--other_manpages = [
-- "man/gegps.1",
-- "man/xgps.1",
-- "man/xgpsspeed.1",
-- ]
-
- if python_manpages:
- all_manpages += list(python_manpages.keys())
-@@ -2701,7 +2688,7 @@ Utility('udev-test', '', ['$SRCDIR/gpsd -N -n -F /var/run/gpsd.sock -D 5', ])
- # Dummy target for cleaning misc files
- clean_misc = env.Alias('clean-misc')
- # Since manpage targets are disabled in clean mode, we cover them here
--env.Clean(clean_misc, all_manpages + other_manpages)
-+env.Clean(clean_misc, all_manpages)
- # Clean compiled Python
- env.Clean(clean_misc,
- glob.glob('*.pyc') + glob.glob('gps/*.pyc') +
diff --git a/patches/gpsd-3.20/0003-SConstruct-Always-install-xgps-.-Only-test-if-deps-f.patch b/patches/gpsd-3.20/0003-SConstruct-Always-install-xgps-.-Only-test-if-deps-f.patch
deleted file mode 100644
index a05f411be..000000000
--- a/patches/gpsd-3.20/0003-SConstruct-Always-install-xgps-.-Only-test-if-deps-f.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Mon, 6 Jan 2020 14:30:58 -0800
-Subject: [PATCH] SConstruct: Always install xgps*. Only test if deps found.
-
-Now no build time deps for xgps*. Just runtime deps.
----
- SConstruct | 35 +++++++++++++++++++++++++----------
- 1 file changed, 25 insertions(+), 10 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index cfd1c4164337..7b4a63f817f9 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1178,11 +1178,15 @@ def polystr(o):
- raise ValueError
-
-
-+# flag that we have xgps* dependencies, so xgps* should run OK
-+config.env['xgps_deps'] = False
-+
- if helping:
- # If helping just get usable config info from the local Python
- target_python_path = ''
- py_config_text = str(eval(PYTHON_CONFIG_CALL))
- python_libdir = str(eval(PYTHON_LIBDIR_CALL))
-+ config.env['xgps_deps'] = False
-
- elif config.env['python']:
- if config.env['target_python']:
-@@ -1237,12 +1241,14 @@ elif config.env['python']:
- # no pyserial, used by ubxtool and zerk
- announce("WARNING: Python module serial (pyserial) not found.")
-
-+ config.env['xgps_deps'] = True
- # check for pycairo
- try:
- imp.find_module('cairo')
- announce("Python module cairo (pycairo) found.")
- except ImportError:
- # no pycairo, used by xgps, xgpsspeed
-+ config.env['xgps_deps'] = False
- announce("WARNING: Python module cairo (pycairo) not found.")
-
- # check for pygobject
-@@ -1251,10 +1257,17 @@ elif config.env['python']:
- announce("Python module gi (pygobject) found.")
- except ImportError:
- # no pycairo, used by xgps, xgpsspeed
-+ config.env['xgps_deps'] = False
- announce("WARNING: Python module gi (pygobject) not found.")
-
- # gtk+ needed by pygobject
-- config.CheckPKG('gtk+-3.0')
-+ if not config.CheckPKG('gtk+-3.0'):
-+ config.env['xgps_deps'] = False
-+ announce("WARNING: gtk+-3.0 nnot found.")
-+
-+ if not env['xgps']:
-+ # xgps* turned off by option
-+ config.env['xgps_deps'] = False
-
- config.env['PYTHON'] = polystr(target_python_path)
- # For regress-driver
-@@ -1634,7 +1647,14 @@ if not env['python']:
- python_targets = []
- else:
- # installed python programs
-- python_progs = ["gegps", "gpscat", "gpsfake", "gpsprof", "ubxtool", "zerk"]
-+ python_progs = ["gegps",
-+ "gpscat",
-+ "gpsfake",
-+ "gpsprof",
-+ "ubxtool",
-+ "xgps",
-+ "xgpsspeed",
-+ "zerk"]
- python_deps = {'gpscat': 'packet'}
-
- # python misc helpers and stuff
-@@ -1663,11 +1683,6 @@ else:
- "man/zerk.1": "man/zerk.xml",
- }
-
-- if env['xgps']:
-- python_progs.extend(["xgps", "xgpsspeed"])
-- else:
-- announce("WARNING: xgps and xgpsspeed will not be installed")
--
- # Glob() has to be run after all buildable objects defined
- python_modules = Glob('gps/*.py', strings=True)
-
-@@ -2410,13 +2425,13 @@ method_regress = UtilityWithHerald(
- '$SRCDIR/tests/test_packet -c >/dev/null', ])
-
- # Test the xgps/xgpsspeed dependencies
--if not env['python'] or not env['xgps']:
-- test_xgps_deps = None
--else:
-+if env['xgps_deps']:
- test_xgps_deps = UtilityWithHerald(
- 'Testing xgps/xgpsspeed dependencies (since xgps=yes)...',
- 'test-xgps-deps', [], [
- '$PYTHON $SRCDIR/test_xgps_deps.py'])
-+else:
-+ test_xgps_deps = None
-
- # Run a valgrind audit on the daemon - not in normal tests
- valgrind_audit = Utility('valgrind-audit', [
diff --git a/patches/gpsd-3.20/0004-SConstruct-Skip-sizeof-time_t-test-when-cross-compil.patch b/patches/gpsd-3.20/0004-SConstruct-Skip-sizeof-time_t-test-when-cross-compil.patch
deleted file mode 100644
index 9f9c0cd69..000000000
--- a/patches/gpsd-3.20/0004-SConstruct-Skip-sizeof-time_t-test-when-cross-compil.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: Jeffery To <jeffery.to@gmail.com>
-Date: Fri, 17 Jan 2020 06:09:33 +0800
-Subject: [PATCH] SConstruct: Skip sizeof(time_t) test when cross-compiling
-
-Fixes #48.
----
- SConstruct | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 7b4a63f817f9..bf682a03e087 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1006,12 +1006,20 @@ else:
- confdefs.append("/* #undef HAVE_%s_H */\n"
- % hdr.replace("/", "_").upper())
-
-- sizeof_time_t = config.CheckTypeSize('time_t',
-- includes='#include <time.h>\n')
-+ if not env['target']:
-+ sizeof_time_t = config.CheckTypeSize('time_t',
-+ includes='#include <time.h>\n')
-+ if 0 < sizeof_time_t:
-+ announce("sizeof(time_t) is %s" % sizeof_time_t)
-+ if 4 >= sizeof_time_t:
-+ announce("WARNING: time_t is too small. It will fail in 2038")
-+ else:
-+ announce("WARNING: could not get sizeof(time_t)")
-+ sizeof_time_t = 8
-+ else:
-+ announce("Not checking sizeof(time_t) when cross-compiling")
-+ sizeof_time_t = 8
- confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t)
-- announce("sizeof(time_t) is %s" % sizeof_time_t)
-- if 4 >= int(sizeof_time_t):
-- announce("WARNING: time_t is too small. It will fail in 2038")
-
- # check function after libraries, because some function require libraries
- # for example clock_gettime() require librt on Linux glibc < 2.17
diff --git a/patches/gpsd-3.20/0005-Fix-merging-and-using-of-python-flags.patch b/patches/gpsd-3.20/0005-Fix-merging-and-using-of-python-flags.patch
deleted file mode 100644
index e4139f66c..000000000
--- a/patches/gpsd-3.20/0005-Fix-merging-and-using-of-python-flags.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Bernd Zeimetz <bernd@bzed.de>
-Date: Sat, 17 Aug 2019 01:27:08 +0200
-Subject: [PATCH] Fix merging and using of python *flags.
-
-As follow-up for d0e0864c2802860ff561fe0b39939b63d38b8c70,
-also fix the handling of python build flags.
----
- SConstruct | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index bf682a03e087..d71dfab48db3 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1169,7 +1169,7 @@ else:
-
- PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()'
-
--PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS',
-+PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'CFLAGS',
- 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS']
- PYTHON_CONFIG_QUOTED = ["'%s'" % s for s in PYTHON_CONFIG_NAMES]
- PYTHON_CONFIG_CALL = ('sysconfig.get_config_vars(%s)'
-@@ -1753,14 +1753,17 @@ else:
- ldshared = ldshared.replace('-fPIE', '')
- ldshared = ldshared.replace('-pie', '')
- python_env.Replace(SHLINKFLAGS=[],
-- LDFLAGS=python_config['LDFLAGS'],
-+ LDFLAGS=[],
- LINK=ldshared,
- SHLIBPREFIX="",
- SHLIBSUFFIX=python_config['SO'],
- CPPPATH=[python_config['INCLUDEPY']],
-- CPPFLAGS=python_config['OPT'],
-- CFLAGS=python_config['BASECFLAGS'],
-- CXXFLAGS=python_config['BASECFLAGS'])
-+ CPPFLAGS=[],
-+ CFLAGS=[],
-+ CXXFLAGS=[])
-+
-+ for flag in ['CFLAGS','LDFLAGS','OPT']:
-+ python_env.MergeFlags(Split(python_config[flag]))
-
- python_objects = {}
- python_compiled_libs = {}
diff --git a/patches/gpsd-3.20/0006-SConstruct-Remove-redundant-CheckHeaderDefines.patch b/patches/gpsd-3.20/0006-SConstruct-Remove-redundant-CheckHeaderDefines.patch
deleted file mode 100644
index a1519a723..000000000
--- a/patches/gpsd-3.20/0006-SConstruct-Remove-redundant-CheckHeaderDefines.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 14:56:58 -0800
-Subject: [PATCH] SConstruct: Remove redundant CheckHeaderDefines()
-
----
- SConstruct | 19 +------------------
- 1 file changed, 1 insertion(+), 18 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index d71dfab48db3..1a0463f67a41 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -581,22 +581,6 @@ def CheckCompilerOption(context, option):
- return ret
-
-
--def CheckHeaderDefines(context, file, define):
-- context.Message('Checking if %s supplies %s... ' % (file, define))
-- ret = context.TryLink("""
-- #include <%s>
-- #ifndef %s
-- #error %s is not defined
-- #endif
-- int main(int argc, char **argv) {
-- (void) argc; (void) argv;
-- return 0;
-- }
-- """ % (file, define, define), '.c')
-- context.Result(ret)
-- return ret
--
--
- def CheckCompilerDefines(context, define):
- context.Message('Checking if compiler supplies %s... ' % (define,))
- ret = context.TryLink("""
-@@ -670,7 +654,6 @@ config = Configure(env, custom_tests={
- 'CheckC11': CheckC11,
- 'CheckCompilerDefines': CheckCompilerDefines,
- 'CheckCompilerOption': CheckCompilerOption,
-- 'CheckHeaderDefines': CheckHeaderDefines,
- 'CheckPKG': CheckPKG,
- 'CheckXsltproc': CheckXsltproc,
- 'GetPythonValue': GetPythonValue,
-@@ -1046,7 +1029,7 @@ else:
- if config.env["magic_hat"]:
- announce("Forcing magic_hat=no since RFC2783 API is unavailable")
- config.env["magic_hat"] = False
-- tiocmiwait = config.CheckHeaderDefines("sys/ioctl.h", "TIOCMIWAIT")
-+ tiocmiwait = config.CheckDeclaration("TIOCMIWAIT", "#include <sys/ioctl.h>")
- if not tiocmiwait and not kpps:
- announce("Neither TIOCMIWAIT nor RFC2783 API is available)")
- if config.env["timeservice"]:
diff --git a/patches/gpsd-3.20/0007-SConstruct-remove-redundant-CheckCompilerDefines.patch b/patches/gpsd-3.20/0007-SConstruct-remove-redundant-CheckCompilerDefines.patch
deleted file mode 100644
index c99949f6a..000000000
--- a/patches/gpsd-3.20/0007-SConstruct-remove-redundant-CheckCompilerDefines.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 15:25:10 -0800
-Subject: [PATCH] SConstruct: remove redundant CheckCompilerDefines()
-
-Built in CheckDeclaration() works fine.
----
- SConstruct | 25 ++++---------------------
- 1 file changed, 4 insertions(+), 21 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 1a0463f67a41..ea87d9204e60 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -581,23 +581,7 @@ def CheckCompilerOption(context, option):
- return ret
-
-
--def CheckCompilerDefines(context, define):
-- context.Message('Checking if compiler supplies %s... ' % (define,))
-- ret = context.TryLink("""
-- #ifndef %s
-- #error %s is not defined
-- #endif
-- int main(int argc, char **argv) {
-- (void) argc; (void) argv;
-- return 0;
-- }
-- """ % (define, define), '.c')
-- context.Result(ret)
-- return ret
--
- # Check if this compiler is C11 or better
--
--
- def CheckC11(context):
- context.Message('Checking if compiler is C11... ')
- ret = context.TryLink("""
-@@ -652,7 +636,6 @@ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
- # CheckXsltproc works, but result is incorrectly saved as "no"
- config = Configure(env, custom_tests={
- 'CheckC11': CheckC11,
-- 'CheckCompilerDefines': CheckCompilerDefines,
- 'CheckCompilerOption': CheckCompilerOption,
- 'CheckPKG': CheckPKG,
- 'CheckXsltproc': CheckXsltproc,
-@@ -926,7 +909,7 @@ else:
- # check for C11 or better, and __STDC__NO_ATOMICS__ is not defined
- # before looking for stdatomic.h
- if ((config.CheckC11() and
-- not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and
-+ not config.CheckDeclaration("__STDC_NO_ATOMICS__") and
- config.CheckHeader("stdatomic.h"))):
- confdefs.append("#define HAVE_STDATOMIC_H 1\n")
- else:
-@@ -940,9 +923,9 @@ else:
-
- # endian.h is required for rtcm104v2 unless the compiler defines
- # __ORDER_BIG_ENDIAN__, __ORDER_LITTLE_ENDIAN__ and __BYTE_ORDER__
-- if config.CheckCompilerDefines("__ORDER_BIG_ENDIAN__") \
-- and config.CheckCompilerDefines("__ORDER_LITTLE_ENDIAN__") \
-- and config.CheckCompilerDefines("__BYTE_ORDER__"):
-+ if ((config.CheckDeclaration("__ORDER_BIG_ENDIAN__") and
-+ config.CheckDeclaration("__ORDER_LITTLE_ENDIAN__") and
-+ config.CheckDeclaration("__BYTE_ORDER__"))):
- confdefs.append("#define HAVE_BUILTIN_ENDIANNESS 1\n")
- confdefs.append("/* #undef HAVE_ENDIAN_H */\n")
- confdefs.append("/* #undef HAVE_SYS_ENDIAN_H */\n")
diff --git a/patches/gpsd-3.20/0008-SConstruct-GetPythonValue-and-CheckPKG-were-using-wr.patch b/patches/gpsd-3.20/0008-SConstruct-GetPythonValue-and-CheckPKG-were-using-wr.patch
deleted file mode 100644
index 4db5abd2c..000000000
--- a/patches/gpsd-3.20/0008-SConstruct-GetPythonValue-and-CheckPKG-were-using-wr.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 15:46:03 -0800
-Subject: [PATCH] SConstruct: GetPythonValue() and CheckPKG were using wrong
- env.
-
----
- SConstruct | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index ea87d9204e60..fc5ab39bfad6 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -524,7 +524,7 @@ values can be listed with 'scons -h'.
- def CheckPKG(context, name):
- context.Message('Checking pkg-config for %s... ' % name)
- ret = context.TryAction('%s --exists \'%s\''
-- % (env['PKG_CONFIG'], name))[0]
-+ % (context.env['PKG_CONFIG'], name))[0]
- context.Result(ret)
- return ret
-
-@@ -599,8 +599,11 @@ def CheckC11(context):
-
- def GetPythonValue(context, name, imp, expr, brief=False):
- context.Message('Obtaining Python %s... ' % name)
-+
-+ # what is this about?
- context.sconf.cached = 0 # Avoid bogus "(cached)"
-- if not env['target_python']:
-+
-+ if not context.env['target_python']:
- status, value = 0, str(eval(expr))
- else:
- command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)]
-@@ -615,7 +618,7 @@ def GetPythonValue(context, name, imp, expr, brief=False):
- announce('Python command "%s" failed - disabling Python.\n'
- 'Python components will NOT be installed' %
- command[2])
-- env['python'] = False
-+ context.env['python'] = False
- context.Result('failed' if status else 'ok' if brief else value)
- return value
-
diff --git a/patches/gpsd-3.20/0009-SConstruct-Fix-GetPythonValue-for-python-3.patch b/patches/gpsd-3.20/0009-SConstruct-Fix-GetPythonValue-for-python-3.patch
deleted file mode 100644
index 88c8cfbaa..000000000
--- a/patches/gpsd-3.20/0009-SConstruct-Fix-GetPythonValue-for-python-3.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 17:25:16 -0800
-Subject: [PATCH] SConstruct: Fix GetPythonValue() for python 3.
-
----
- SConstruct | 19 +++++++++++++------
- 1 file changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index fc5ab39bfad6..a5c41e8f4803 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -604,7 +604,8 @@ def GetPythonValue(context, name, imp, expr, brief=False):
- context.sconf.cached = 0 # Avoid bogus "(cached)"
-
- if not context.env['target_python']:
-- status, value = 0, str(eval(expr))
-+ status = 0
-+ value = str(eval(expr))
- else:
- command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)]
- try:
-@@ -619,7 +620,14 @@ def GetPythonValue(context, name, imp, expr, brief=False):
- 'Python components will NOT be installed' %
- command[2])
- context.env['python'] = False
-- context.Result('failed' if status else 'ok' if brief else value)
-+ if 0 != status:
-+ result = 'failed'
-+ elif brief:
-+ result = 'ok'
-+ else:
-+ # context.Result() confused by bytes
-+ result = polystr(value)
-+ context.Result(result)
- return value
-
-
-@@ -1181,15 +1189,14 @@ elif config.env['python']:
- # Maximize consistency by using the reported sys.executable
- target_python_path = config.GetPythonValue('exe path',
- 'import sys',
-- 'sys.executable',
-- brief=cleaning)
-+ 'sys.executable')
-+ # python module directory
- if config.env['python_libdir']:
- python_libdir = config.env['python_libdir']
- else:
- python_libdir = config.GetPythonValue('lib dir',
- PYTHON_SYSCONFIG_IMPORT,
-- PYTHON_LIBDIR_CALL,
-- brief=cleaning)
-+ PYTHON_LIBDIR_CALL)
- # follow FHS, put in /usr/local/libXX, not /usr/libXX
- # may be lib, lib32 or lib64
- python_libdir = polystr(python_libdir)
diff --git a/patches/gpsd-3.20/0010-SConstruct-move-more-checks-into-GetPythonValue.patch b/patches/gpsd-3.20/0010-SConstruct-move-more-checks-into-GetPythonValue.patch
deleted file mode 100644
index a68169431..000000000
--- a/patches/gpsd-3.20/0010-SConstruct-move-more-checks-into-GetPythonValue.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 18:04:15 -0800
-Subject: [PATCH] SConstruct: move more checks into GetPythonValue()
-
-So the target python is used, not the python used to run scons.
----
- SConstruct | 36 ++++++++++++++++--------------------
- 1 file changed, 16 insertions(+), 20 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index a5c41e8f4803..9f88fa347b9a 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -33,7 +33,6 @@ from __future__ import print_function
- import ast
- import functools
- import glob
--import imp # for imp.find_module('gps'), imp deprecated in 3.4
- import operator
- import os
- import pickle
-@@ -598,12 +597,14 @@ def CheckC11(context):
-
-
- def GetPythonValue(context, name, imp, expr, brief=False):
-- context.Message('Obtaining Python %s... ' % name)
-+ """Get a value from the target python, not the running one."""
-+ context.Message('Checking Python %s... ' % name)
-
- # what is this about?
- context.sconf.cached = 0 # Avoid bogus "(cached)"
-
- if not context.env['target_python']:
-+ # FIXME: this ignores imp
- status = 0
- value = str(eval(expr))
- else:
-@@ -616,10 +617,8 @@ def GetPythonValue(context, name, imp, expr, brief=False):
- value = value.strip()
- else:
- value = ''
-- announce('Python command "%s" failed - disabling Python.\n'
-- 'Python components will NOT be installed' %
-- command[2])
-- context.env['python'] = False
-+ # do not disable python because this failed
-+ # maybe testing for newer python feature
- if 0 != status:
- result = 'failed'
- elif brief:
-@@ -1023,7 +1022,8 @@ else:
- if config.env["magic_hat"]:
- announce("Forcing magic_hat=no since RFC2783 API is unavailable")
- config.env["magic_hat"] = False
-- tiocmiwait = config.CheckDeclaration("TIOCMIWAIT", "#include <sys/ioctl.h>")
-+ tiocmiwait = config.CheckDeclaration("TIOCMIWAIT",
-+ "#include <sys/ioctl.h>")
- if not tiocmiwait and not kpps:
- announce("Neither TIOCMIWAIT nor RFC2783 API is available)")
- if config.env["timeservice"]:
-@@ -1218,28 +1218,24 @@ elif config.env['python']:
- config.env['aiogps'] = True
-
- # check for pyserial
-- try:
-- imp.find_module('serial')
-- announce("Python module serial (pyserial) found.")
-- except ImportError:
-+ if not config.GetPythonValue('module serial (pyserial)',
-+ 'import serial', '"found"'):
- # no pyserial, used by ubxtool and zerk
-- announce("WARNING: Python module serial (pyserial) not found.")
-+ announce("WARNING: ubxtool and zerk are missing optional "
-+ "runtime module serial")
-
- config.env['xgps_deps'] = True
-+
- # check for pycairo
-- try:
-- imp.find_module('cairo')
-- announce("Python module cairo (pycairo) found.")
-- except ImportError:
-+ if not config.GetPythonValue('module cairo (pycairo)',
-+ 'import cairo', '"found"'):
- # no pycairo, used by xgps, xgpsspeed
- config.env['xgps_deps'] = False
- announce("WARNING: Python module cairo (pycairo) not found.")
-
- # check for pygobject
-- try:
-- imp.find_module('gi')
-- announce("Python module gi (pygobject) found.")
-- except ImportError:
-+ if not config.GetPythonValue('module gi (pygobject)',
-+ 'import gi', '"found"'):
- # no pycairo, used by xgps, xgpsspeed
- config.env['xgps_deps'] = False
- announce("WARNING: Python module gi (pygobject) not found.")
diff --git a/patches/gpsd-3.20/0011-SConstruct-Check-target-python-version-not-scons-pyt.patch b/patches/gpsd-3.20/0011-SConstruct-Check-target-python-version-not-scons-pyt.patch
deleted file mode 100644
index 19d3e3b23..000000000
--- a/patches/gpsd-3.20/0011-SConstruct-Check-target-python-version-not-scons-pyt.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Wed, 8 Jan 2020 18:38:11 -0800
-Subject: [PATCH] SConstruct: Check target python version, not scons python
- version.
-
----
- SConstruct | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 9f88fa347b9a..a02a2a897d32 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1209,11 +1209,14 @@ elif config.env['python']:
- brief=True)
-
- # aiogps is only available on Python >= 3.6
-- # FIXME check target_python, not current python
-- if sys.version_info < (3, 6):
-+ sysver = config.GetPythonValue('version',
-+ 'import sys',
-+ '"%d.%d" % sys.version_info[0:2]')
-+ if 3 > int(sysver[0]) or 6 > int(sysver[2]):
- config.env['aiogps'] = False
-- announce("WARNING: Python too old: "
-- "gps/aiogps.py will not be installed\n")
-+ announce("WARNING: Python%s too old (need 3.6): "
-+ "gps/aiogps.py will not be installed\n" %
-+ (sysver), end=True)
- else:
- config.env['aiogps'] = True
-
diff --git a/patches/gpsd-3.20/0012-SConstruct-Simplify-GetPythonValue-.-It-now-caches-p.patch b/patches/gpsd-3.20/0012-SConstruct-Simplify-GetPythonValue-.-It-now-caches-p.patch
deleted file mode 100644
index e833a1f08..000000000
--- a/patches/gpsd-3.20/0012-SConstruct-Simplify-GetPythonValue-.-It-now-caches-p.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Fri, 10 Jan 2020 16:24:58 -0800
-Subject: [PATCH] SConstruct: Simplify GetPythonValue(). It now caches
- properly.
-
----
- SConstruct | 93 ++++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 48 insertions(+), 45 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index a02a2a897d32..f45efe4e19f0 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -22,12 +22,12 @@
- # * Out-of-directory builds: see http://www.scons.org/wiki/UsingBuildDir
- # * Coveraging mode: gcc "-coverage" flag requires a hack
- # for building the python bindings
--# * Python 3 compatibility in this recipe
--
--# Since SCons 3.0.0 forces print_function on us, it needs to be unconditional.
--# This is recognized to be a bug in SCons, but we need to live with it for now,
--# and we'll need this for eventual Python 3 compatibility, anyway.
--# Python requires this to precede any non-comment code.
-+#
-+# This file is Copyright (c) 2010-2020 by the GPSD project
-+# SPDX-License-Identifier: BSD-2-clause
-+#
-+# This code runs compatibly under Python 2 and 3.x for x >= 2.
-+# Preserve this property!
- from __future__ import print_function
-
- import ast
-@@ -600,33 +600,29 @@ def GetPythonValue(context, name, imp, expr, brief=False):
- """Get a value from the target python, not the running one."""
- context.Message('Checking Python %s... ' % name)
-
-- # what is this about?
-- context.sconf.cached = 0 # Avoid bogus "(cached)"
--
- if not context.env['target_python']:
- # FIXME: this ignores imp
-- status = 0
-+ status = 1
- value = str(eval(expr))
- else:
-- command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)]
-- try:
-- status, value = _getstatusoutput(command, shell=False)
-- except OSError:
-- status = -1
-- if status == 0:
-- value = value.strip()
-- else:
-- value = ''
-- # do not disable python because this failed
-- # maybe testing for newer python feature
-- if 0 != status:
-- result = 'failed'
-- elif brief:
-- result = 'ok'
-- else:
-- # context.Result() confused by bytes
-- result = polystr(value)
-- context.Result(result)
-+ command = (context.env['target_python'] + " $SOURCE > $TARGET")
-+ text = "%s; print(%s)" % (imp, expr)
-+
-+ # TryAction returns (1, outputStr), or (0, '') on fail
-+ (status, value) = context.TryAction(command, text, '.py')
-+
-+ # do not disable python because this failed
-+ # maybe testing for newer python feature
-+
-+ if 1 == status:
-+ # we could convert to str(), but caching turns it into bytes anyway
-+ value = value.strip()
-+ if brief is True:
-+ context.did_show_result = 1
-+ print("ok")
-+
-+ context.Result(value)
-+ # return value
- return value
-
-
-@@ -1174,10 +1170,13 @@ if helping:
- config.env['xgps_deps'] = False
-
- elif config.env['python']:
-+ target_python_path = None
- if config.env['target_python']:
- try:
- config.CheckProg
-- except AttributeError: # Older scons versions don't have CheckProg
-+ except AttributeError:
-+ # scons versions before Sep 2015 (2.4.0) don't have CheckProg
-+ # gpsd only asks for 2.3.0 or higher
- target_python_path = config.env['target_python']
- else:
- target_python_path = config.CheckProg(config.env['target_python'])
-@@ -1186,10 +1185,13 @@ elif config.env['python']:
- config.env['python'] = False
-
- if config.env['python']:
-- # Maximize consistency by using the reported sys.executable
-- target_python_path = config.GetPythonValue('exe path',
-- 'import sys',
-- 'sys.executable')
-+ if not target_python_path:
-+ # Avoid double testing for target_python_path
-+ # Maximize consistency by using the reported sys.executable
-+ target_python_path = config.GetPythonValue('exe path',
-+ 'import sys',
-+ 'sys.executable')
-+ target_python_path = polystr(target_python_path)
- # python module directory
- if config.env['python_libdir']:
- python_libdir = config.env['python_libdir']
-@@ -1207,11 +1209,18 @@ elif config.env['python']:
- PYTHON_SYSCONFIG_IMPORT,
- PYTHON_CONFIG_CALL,
- brief=True)
-+ py_config_text = polystr(py_config_text)
-+ py_config_vars = ast.literal_eval(py_config_text)
-+ py_config_vars = [[] if x is None else x for x in py_config_vars]
-+ python_config = dict(zip(PYTHON_CONFIG_NAMES, py_config_vars))
-+ # debug
-+ # announce(python_config)
-
- # aiogps is only available on Python >= 3.6
- sysver = config.GetPythonValue('version',
- 'import sys',
- '"%d.%d" % sys.version_info[0:2]')
-+
- if 3 > int(sysver[0]) or 6 > int(sysver[2]):
- config.env['aiogps'] = False
- announce("WARNING: Python%s too old (need 3.6): "
-@@ -1252,14 +1261,8 @@ elif config.env['python']:
- # xgps* turned off by option
- config.env['xgps_deps'] = False
-
-- config.env['PYTHON'] = polystr(target_python_path)
-- # For regress-driver
-- config.env['ENV']['PYTHON'] = polystr(target_python_path)
-- py_config_vars = ast.literal_eval(py_config_text.decode())
-- py_config_vars = [[] if x is None else x for x in py_config_vars]
-- python_config = dict(zip(PYTHON_CONFIG_NAMES, py_config_vars))
-- # debug
-- # announce(python_config)
-+ config.env['PYTHON'] = target_python_path
-+ config.env['ENV']['PYTHON'] = target_python_path
-
-
- env = config.Finish()
-@@ -1859,7 +1862,7 @@ else:
-
-
- # Instantiate some file templates. We'd like to use the Substfile builtin
--# but it doesn't seem to work in scons 1.20
-+# Substfile in scons 1.3.0+, since 2010
- def substituter(target, source, env):
- substmap = (
- ('@ANNOUNCE@', annmail),
-@@ -2371,8 +2374,8 @@ else:
- ' $SRCDIR/test/clientlib/*.log', ])
- # Unit-test the bitfield extractor
- misc_regress = Utility('misc-regress', [], [
-- '{} $SRCDIR/test_clienthelpers.py'.format(target_python_path.decode()),
-- '{} $SRCDIR/test_misc.py'.format(target_python_path.decode())
-+ '{} $SRCDIR/test_clienthelpers.py'.format(target_python_path),
-+ '{} $SRCDIR/test_misc.py'.format(target_python_path)
- ])
-
-
diff --git a/patches/gpsd-3.20/0013-SConstruct-fix-polystr-for-python2.patch b/patches/gpsd-3.20/0013-SConstruct-fix-polystr-for-python2.patch
deleted file mode 100644
index 0223a2735..000000000
--- a/patches/gpsd-3.20/0013-SConstruct-fix-polystr-for-python2.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: "Gary E. Miller" <gem@rellim.com>
-Date: Fri, 10 Jan 2020 18:43:17 -0800
-Subject: [PATCH] SConstruct: fix polystr() for python2
-
----
- SConstruct | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index f45efe4e19f0..a4f8cdc763cd 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1152,11 +1152,16 @@ PYTHON_CONFIG_CALL = ('sysconfig.get_config_vars(%s)'
- # ugly hack from http://www.catb.org/esr/faqs/practical-python-porting/
- # handle python2/3 strings
- def polystr(o):
-- if isinstance(o, str):
-- return o
-- if isinstance(o, bytes):
-- return str(o, encoding='latin-1')
-- raise ValueError
-+ if bytes is str: # Python 2
-+ return str(o)
-+ else: # python 3.
-+ if isinstance(o, str):
-+ return o
-+ if isinstance(o, bytes) or isinstance(o, bytearray):
-+ return str(o, encoding='latin1')
-+ if isinstance(o, int):
-+ return str(o)
-+ raise ValueError
-
-
- # flag that we have xgps* dependencies, so xgps* should run OK
diff --git a/patches/gpsd-3.20/0100-SConstruct-Use-target_python-when-constructing-exten.patch b/patches/gpsd-3.20/0100-SConstruct-Use-target_python-when-constructing-exten.patch
deleted file mode 100644
index e01d92353..000000000
--- a/patches/gpsd-3.20/0100-SConstruct-Use-target_python-when-constructing-exten.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Ladislav Michl <ladis@linux-mips.org>
-Date: Sun, 2 Feb 2020 00:42:42 +0100
-Subject: [PATCH] SConstruct: Use target_python when constructing extension
- name
-
----
- SConstruct | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index a4f8cdc763cd..cd30bb86f4ac 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1234,6 +1234,12 @@ elif config.env['python']:
- else:
- config.env['aiogps'] = True
-
-+ # get version part of python extension name
-+ ext_python_ver = config.GetPythonValue('ext version string',
-+ 'import sys',
-+ '"_".join(map(str, '
-+ 'sys.version_info))')
-+
- # check for pyserial
- if not config.GetPythonValue('module serial (pyserial)',
- 'import serial', '"found"'):
-@@ -1756,8 +1762,7 @@ else:
- python_objects[ext].append(
- python_env.NoCache(
- python_env.SharedObject(
-- src.split(".")[0] + '-py_' +
-- '_'.join(['%s' % (x) for x in sys.version_info]) +
-+ src.split(".")[0] + '-py_' + ext_python_ver +
- python_config['SO'], src
- )
- )
diff --git a/patches/gpsd-3.20/0102-SConstruct-HACK-use-target-INCLUDEPY.patch b/patches/gpsd-3.20/0102-SConstruct-HACK-use-target-INCLUDEPY.patch
deleted file mode 100644
index c597c8393..000000000
--- a/patches/gpsd-3.20/0102-SConstruct-HACK-use-target-INCLUDEPY.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Ladislav Michl <ladis@linux-mips.org>
-Date: Fri, 7 Feb 2020 10:53:19 +0100
-Subject: [PATCH] SConstruct: HACK: use target INCLUDEPY
-
-Once PTXdist's cross-python starts returning proper INCLUDEPY
-path, this hack will wanish.
-
-Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
----
- SConstruct | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/SConstruct b/SConstruct
-index 841eb06b7793..3d885a17a5b9 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -1748,7 +1748,7 @@ else:
- LINK=ldshared,
- SHLIBPREFIX="",
- SHLIBSUFFIX=python_config['SO'],
-- CPPPATH=[python_config['INCLUDEPY']],
-+ CPPPATH=[os.getenv('SYSROOT') + python_config['INCLUDEPY']],
- CPPFLAGS=[],
- CFLAGS=[],
- CXXFLAGS=[])
diff --git a/patches/gpsd-3.20/series b/patches/gpsd-3.20/series
deleted file mode 100644
index cf6301f6d..000000000
--- a/patches/gpsd-3.20/series
+++ /dev/null
@@ -1,20 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-SConstruct-replace-custom-CheckSizeOf-with-standard-.patch
-0002-SConstruct-Always-install-xpgs-xgpsspeed-programs-ma.patch
-0003-SConstruct-Always-install-xgps-.-Only-test-if-deps-f.patch
-0004-SConstruct-Skip-sizeof-time_t-test-when-cross-compil.patch
-0005-Fix-merging-and-using-of-python-flags.patch
-0006-SConstruct-Remove-redundant-CheckHeaderDefines.patch
-0007-SConstruct-remove-redundant-CheckCompilerDefines.patch
-0008-SConstruct-GetPythonValue-and-CheckPKG-were-using-wr.patch
-0009-SConstruct-Fix-GetPythonValue-for-python-3.patch
-0010-SConstruct-move-more-checks-into-GetPythonValue.patch
-0011-SConstruct-Check-target-python-version-not-scons-pyt.patch
-0012-SConstruct-Simplify-GetPythonValue-.-It-now-caches-p.patch
-0013-SConstruct-fix-polystr-for-python2.patch
-#tag:ptx --start-number 100
-0100-SConstruct-Use-target_python-when-constructing-exten.patch
-0101-SConstruct-Search-for-ncursesw-pkgconfig.patch
-0102-SConstruct-HACK-use-target-INCLUDEPY.patch
-# 0b0660f42833b6e75cc0bdf50a2eec25 - git-ptx-patches magic
diff --git a/patches/gpsd-3.20/0101-SConstruct-Search-for-ncursesw-pkgconfig.patch b/patches/gpsd-3.21/0001-Search-for-ncursesw-pkgconfig.patch
index ac233ca96..c7b874c83 100644
--- a/patches/gpsd-3.20/0101-SConstruct-Search-for-ncursesw-pkgconfig.patch
+++ b/patches/gpsd-3.21/0001-Search-for-ncursesw-pkgconfig.patch
@@ -1,6 +1,6 @@
From: Ladislav Michl <ladis@linux-mips.org>
Date: Fri, 25 Oct 2019 14:18:30 +0200
-Subject: [PATCH] SConstruct: Search for ncursesw pkgconfig
+Subject: [PATCH] Search for ncursesw pkgconfig
PTXDist can be configured to build wide char version of ncurses
which SConstruct is unaware of.
@@ -11,10 +11,10 @@ Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
1 file changed, 2 insertions(+)
diff --git a/SConstruct b/SConstruct
-index cd30bb86f4ac..841eb06b7793 100644
+index e15d63f6ede0..71643c428f26 100644
--- a/SConstruct
+++ b/SConstruct
-@@ -807,6 +807,8 @@ else:
+@@ -1067,6 +1067,8 @@ else:
ncurseslibs = pkg_config('ncurses', rpath_hack=True)
if config.CheckPKG('tinfo'):
ncurseslibs += pkg_config('tinfo', rpath_hack=True)
diff --git a/patches/gpsd-3.21/0002-SConstruct-Use-target-option-to-decide-whenewer-to-r.patch b/patches/gpsd-3.21/0002-SConstruct-Use-target-option-to-decide-whenewer-to-r.patch
new file mode 100644
index 000000000..72f7d3a31
--- /dev/null
+++ b/patches/gpsd-3.21/0002-SConstruct-Use-target-option-to-decide-whenewer-to-r.patch
@@ -0,0 +1,21 @@
+From: Ladislav Michl <ladis@linux-mips.org>
+Date: Sun, 2 Feb 2020 09:45:04 +0100
+Subject: [PATCH] SConstruct: Use 'target' option to decide whenewer to restart systemd
+
+---
+ SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConstruct b/SConstruct
+index 71643c428f26..434141f3e46b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -2853,7 +2853,7 @@ udev_install = Utility('udev-install', 'install', [
+
+ if env['systemd']:
+ env.Requires(udev_install, systemd_install)
+- if not env["sysroot"]:
++ if not env['target']:
+ systemctl_daemon_reload = Utility('systemctl-daemon-reload', '',
+ ['systemctl daemon-reload || true'])
+ env.AlwaysBuild(systemctl_daemon_reload)
diff --git a/patches/gpsd-3.21/series b/patches/gpsd-3.21/series
new file mode 100644
index 000000000..33da89cc5
--- /dev/null
+++ b/patches/gpsd-3.21/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Search-for-ncursesw-pkgconfig.patch
+0002-SConstruct-Use-target-option-to-decide-whenewer-to-r.patch
+# 207be982e9eb34d250a9e62946dcd881 - git-ptx-patches magic