From a29905c42b2af258cede2c647dc3309c8eb6a379 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 17 Jan 2020 04:42:46 +0800 Subject: [PATCH] gpsd: Update to 3.20, add/refresh patches New patches (both for SConstruct): * Do not import from distutils. Since Python support/modules are not built, there is no need to import from distutils. (Importing from distutils may prevent the package from being built on systems without a full distutils module, e.g. Debian with python3-minimal.) I have added back the import in places where it may be helpful to have, if scons is run manually. Fixes #10993. * Do not check the size of time_t. The way this is done is to compile and run a test program; this fails when cross-compiling[1]. This doesn't appear to affect any functionality (other than missing a compile-time warning that things will fail in 2038 if time_t is too small). [1]: https://gitlab.com/gpsd/gpsd/issues/48 Signed-off-by: Jeffery To --- utils/gpsd/Makefile | 8 +++--- .../patches/0001-no-distutils-import.patch | 26 +++++++++++++++++++ .../patches/0002-ncurses6_detection.patch | 8 +++--- .../patches/0003-no-sizeof_time_t-check.patch | 15 +++++++++++ 4 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 utils/gpsd/patches/0001-no-distutils-import.patch create mode 100644 utils/gpsd/patches/0003-no-sizeof_time_t-check.patch diff --git a/utils/gpsd/Makefile b/utils/gpsd/Makefile index a6756659d..086b1fcdf 100644 --- a/utils/gpsd/Makefile +++ b/utils/gpsd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gpsd -PKG_VERSION:=3.19 -PKG_RELEASE:=2 +PKG_VERSION:=3.20 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_HASH:=27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39 +PKG_HASH:=3998a5cbb728e97f896f46c3c83301b1e6c5d859393e58c2fad8c5426774d571 PKG_MAINTAINER:=Pushpal Sidhu PKG_LICENSE:=BSD-3-Clause diff --git a/utils/gpsd/patches/0001-no-distutils-import.patch b/utils/gpsd/patches/0001-no-distutils-import.patch new file mode 100644 index 000000000..c9f7b38f6 --- /dev/null +++ b/utils/gpsd/patches/0001-no-distutils-import.patch @@ -0,0 +1,26 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -42,7 +42,6 @@ import re + import subprocess + import sys + import time +-from distutils import sysconfig + import SCons + + +@@ -669,6 +668,7 @@ def GetPythonValue(context, name, imp, e + context.Message('Obtaining Python %s... ' % name) + context.sconf.cached = 0 # Avoid bogus "(cached)" + if not env['target_python']: ++ from distutils import sysconfig + status, value = 0, str(eval(expr)) + else: + command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)] +@@ -1218,6 +1218,7 @@ if helping: + + # If helping just get usable config info from the local Python + target_python_path = '' ++ from distutils import sysconfig + py_config_text = str(eval(PYTHON_CONFIG_CALL)) + python_libdir = str(eval(PYTHON_LIBDIR_CALL)) + diff --git a/utils/gpsd/patches/0002-ncurses6_detection.patch b/utils/gpsd/patches/0002-ncurses6_detection.patch index a62710c1e..a4c0192d5 100644 --- a/utils/gpsd/patches/0002-ncurses6_detection.patch +++ b/utils/gpsd/patches/0002-ncurses6_detection.patch @@ -1,8 +1,6 @@ -Index: gpsd-3.16/SConstruct -=================================================================== ---- gpsd-3.16.orig/SConstruct -+++ gpsd-3.16/SConstruct -@@ -672,6 +672,10 @@ else: +--- a/SConstruct ++++ b/SConstruct +@@ -874,6 +874,10 @@ else: ncurseslibs += pkg_config('tinfo', rpath_hack=True) # It's not yet known whether rpath_hack is appropriate for # ncurses5-config. diff --git a/utils/gpsd/patches/0003-no-sizeof_time_t-check.patch b/utils/gpsd/patches/0003-no-sizeof_time_t-check.patch new file mode 100644 index 000000000..fcc65d061 --- /dev/null +++ b/utils/gpsd/patches/0003-no-sizeof_time_t-check.patch @@ -0,0 +1,15 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -1047,12 +1047,6 @@ else: + confdefs.append("/* #undef HAVE_%s_H */\n" + % hdr.replace("/", "_").upper()) + +- sizeof_time_t = config.CheckSizeOf("time_t") +- 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 + for f in ("cfmakeraw", "clock_gettime", "daemon", "fcntl", "fork",