diff options
| -rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch | 108 | ||||
| -rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch | 79 | ||||
| -rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch | 36 | ||||
| -rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb (renamed from meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb) | 21 |
4 files changed, 9 insertions, 235 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch deleted file mode 100644 index b021d0b727..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch +++ /dev/null | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | Subject: [PATCH] Revert "SConstruct: Add test for sizeof(time_t), result in | ||
| 2 | SIZEOF_TIME_T." | ||
| 3 | |||
| 4 | This reverts commit b32ff1a86c44fa738dabaf63de1b5462e0071ad3. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [cross-compile specific] | ||
| 7 | |||
| 8 | --- | ||
| 9 | SConstruct | 54 ++++-------------------------------------- | ||
| 10 | android/gpsd_config.in | 1 - | ||
| 11 | 2 files changed, 5 insertions(+), 50 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/SConstruct b/SConstruct | ||
| 14 | index 33e0ff326..e3c62fa3c 100644 | ||
| 15 | --- a/SConstruct | ||
| 16 | +++ b/SConstruct | ||
| 17 | @@ -597,42 +597,6 @@ def CheckHeaderDefines(context, file, define): | ||
| 18 | return ret | ||
| 19 | |||
| 20 | |||
| 21 | -def CheckSizeOf(context, type): | ||
| 22 | - """Check sizeof 'type'""" | ||
| 23 | - context.Message('Checking size of ' + type + '... ') | ||
| 24 | - | ||
| 25 | - program = """ | ||
| 26 | -#include <stdlib.h> | ||
| 27 | -#include <stdio.h> | ||
| 28 | - | ||
| 29 | -/* | ||
| 30 | - * The CheckSizeOf function does not have a way for the caller to | ||
| 31 | - * specify header files to be included to provide the type being | ||
| 32 | - * checked. As a workaround until that is remedied, include the | ||
| 33 | - * header required for time_t, which is the sole current use of this | ||
| 34 | - * function. | ||
| 35 | - */ | ||
| 36 | -#include <time.h> | ||
| 37 | - | ||
| 38 | -int main() { | ||
| 39 | - printf("%d", (int)sizeof(""" + type + """)); | ||
| 40 | - return 0; | ||
| 41 | -} | ||
| 42 | -""" | ||
| 43 | - | ||
| 44 | - # compile it | ||
| 45 | - ret = context.TryCompile(program, '.c') | ||
| 46 | - if 0 == ret: | ||
| 47 | - announce('ERROR: TryCompile failed\n') | ||
| 48 | - # fall back to sizeof(time_t) is 8 | ||
| 49 | - return '8' | ||
| 50 | - | ||
| 51 | - # run it | ||
| 52 | - ret = context.TryRun(program, '.c') | ||
| 53 | - context.Result(ret[0]) | ||
| 54 | - return ret[1] | ||
| 55 | - | ||
| 56 | - | ||
| 57 | def CheckCompilerDefines(context, define): | ||
| 58 | context.Message('Checking if compiler supplies %s... ' % (define,)) | ||
| 59 | ret = context.TryLink(""" | ||
| 60 | @@ -703,15 +667,13 @@ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)]) | ||
| 61 | |||
| 62 | # CheckXsltproc works, but result is incorrectly saved as "no" | ||
| 63 | config = Configure(env, custom_tests={ | ||
| 64 | - 'CheckC11': CheckC11, | ||
| 65 | - 'CheckCompilerDefines': CheckCompilerDefines, | ||
| 66 | - 'CheckCompilerOption': CheckCompilerOption, | ||
| 67 | - 'CheckHeaderDefines': CheckHeaderDefines, | ||
| 68 | 'CheckPKG': CheckPKG, | ||
| 69 | - 'CheckSizeOf': CheckSizeOf, | ||
| 70 | 'CheckXsltproc': CheckXsltproc, | ||
| 71 | - 'GetPythonValue': GetPythonValue, | ||
| 72 | - }) | ||
| 73 | + 'CheckCompilerOption': CheckCompilerOption, | ||
| 74 | + 'CheckCompilerDefines': CheckCompilerDefines, | ||
| 75 | + 'CheckC11': CheckC11, | ||
| 76 | + 'CheckHeaderDefines': CheckHeaderDefines, | ||
| 77 | + 'GetPythonValue': GetPythonValue}) | ||
| 78 | |||
| 79 | # Use print, rather than announce, so we see it in -s mode. | ||
| 80 | print("This system is: %s" % sys.platform) | ||
| 81 | @@ -1043,12 +1005,6 @@ else: | ||
| 82 | confdefs.append("/* #undef HAVE_%s_H */\n" | ||
| 83 | % hdr.replace("/", "_").upper()) | ||
| 84 | |||
| 85 | - sizeof_time_t = config.CheckSizeOf("time_t") | ||
| 86 | - confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t) | ||
| 87 | - announce("sizeof(time_t) is %s" % sizeof_time_t) | ||
| 88 | - if 4 >= int(sizeof_time_t): | ||
| 89 | - announce("WARNING: time_t is too small. It will fail in 2038") | ||
| 90 | - | ||
| 91 | # check function after libraries, because some function require libraries | ||
| 92 | # for example clock_gettime() require librt on Linux glibc < 2.17 | ||
| 93 | for f in ("cfmakeraw", "clock_gettime", "daemon", "fcntl", "fork", | ||
| 94 | diff --git a/android/gpsd_config.in b/android/gpsd_config.in | ||
| 95 | index 758251986..d240f6d34 100644 | ||
| 96 | --- a/android/gpsd_config.in | ||
| 97 | +++ b/android/gpsd_config.in | ||
| 98 | @@ -19,7 +19,6 @@ | ||
| 99 | #define HAVE_ARPA_INET_H 1 | ||
| 100 | #define HAVE_SYSLOG_H 1 | ||
| 101 | #define HAVE_DAEMON 1 | ||
| 102 | -#define SIZEOF_TIME_T 8 | ||
| 103 | #define HAVE_CLOCK_GETTIME 1 | ||
| 104 | #define HAVE_STRPTIME 1 | ||
| 105 | #define HAVE_GMTIME_R 1 | ||
| 106 | -- | ||
| 107 | 2.26.2 | ||
| 108 | |||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch deleted file mode 100644 index 23ae5e509d..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | From 5464d9e1bfd1a1c54338ec7c4148cad1b222ef93 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Tue, 24 Apr 2012 18:45:14 +0200 | ||
| 4 | Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot | ||
| 5 | from python_lib_dir | ||
| 6 | |||
| 7 | * without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix | ||
| 8 | and with PYTHONPATH from OE it's pointing to native python dir | ||
| 9 | |||
| 10 | $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/ | ||
| 11 | $ python | ||
| 12 | Python 2.7.2 (default, Apr 18 2012, 09:19:59) | ||
| 13 | [GCC 4.6.2] on linux2 | ||
| 14 | Type "help", "copyright", "credits" or "license" for more information. | ||
| 15 | >>> from distutils import sysconfig | ||
| 16 | >>> sysconfig.get_config_vars('INCLUDEPY') | ||
| 17 | ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] | ||
| 18 | >>> | ||
| 19 | $ unset PYTHONPATH | ||
| 20 | $ python | ||
| 21 | Python 2.7.2 (default, Apr 18 2012, 09:19:59) | ||
| 22 | [GCC 4.6.2] on linux2 | ||
| 23 | Type "help", "copyright", "credits" or "license" for more information. | ||
| 24 | >>> from distutils import sysconfig | ||
| 25 | >>> sysconfig.get_config_vars('INCLUDEPY') | ||
| 26 | ['/python2.7'] | ||
| 27 | >>> import sysconfig | ||
| 28 | >>> sysconfig.get_config_vars('INCLUDEPY') | ||
| 29 | ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] | ||
| 30 | * python_lib_dir = python_lib_dir.replace(env['sysroot'], '') | ||
| 31 | returns path to target sysroot | ||
| 32 | |||
| 33 | Upstream-Status: Inappropriate [embedded specific] | ||
| 34 | |||
| 35 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 36 | Signed-off-by: Peter A. Bigot <pab@pabigot.com> | ||
| 37 | |||
| 38 | --- | ||
| 39 | SConstruct | 8 +++++--- | ||
| 40 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
| 41 | |||
| 42 | diff --git a/SConstruct b/SConstruct | ||
| 43 | index b8f3fb1..883e06d 100644 | ||
| 44 | --- a/SConstruct | ||
| 45 | +++ b/SConstruct | ||
| 46 | @@ -980,7 +980,7 @@ else: | ||
| 47 | |||
| 48 | # Set up configuration for target Python | ||
| 49 | |||
| 50 | -PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()' | ||
| 51 | +PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib(plat_specific=1)' | ||
| 52 | |||
| 53 | PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS', | ||
| 54 | 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS'] | ||
| 55 | @@ -1506,7 +1506,7 @@ else: | ||
| 56 | LINK=ldshared, | ||
| 57 | SHLIBPREFIX="", | ||
| 58 | SHLIBSUFFIX=python_config['SO'], | ||
| 59 | - CPPPATH=[python_config['INCLUDEPY']], | ||
| 60 | + CPPPATH=[os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))] if env['sysroot'] else [python_config['INCLUDEPY']], | ||
| 61 | CPPFLAGS=python_config['OPT'], | ||
| 62 | CFLAGS=python_config['BASECFLAGS'], | ||
| 63 | CXXFLAGS=python_config['BASECFLAGS']) | ||
| 64 | @@ -1808,12 +1808,14 @@ if ((not env['debug'] and not env['profiling'] and not env['nostrip'] and | ||
| 65 | env.AddPostAction(binaryinstall, '$STRIP $TARGET') | ||
| 66 | |||
| 67 | if env['python']: | ||
| 68 | - python_module_dir = str(python_libdir) + os.sep + 'gps' | ||
| 69 | + python_module_dir = python_libdir.replace(env['sysroot'], '') + os.sep + 'gps' | ||
| 70 | python_extensions_install = python_env.Install(DESTDIR + python_module_dir, | ||
| 71 | python_built_extensions) | ||
| 72 | if ((not env['debug'] and not env['profiling'] and | ||
| 73 | not env['nostrip'] and not sys.platform.startswith('darwin'))): | ||
| 74 | python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET') | ||
| 75 | + env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \ | ||
| 76 | + % (python_libdir, )) | ||
| 77 | |||
| 78 | python_modules_install = python_env.Install(DESTDIR + python_module_dir, | ||
| 79 | python_modules) | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch deleted file mode 100644 index 659865efe1..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | From c9cec2a888d4fea8534be78a0f46d920155ceae6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Fertser <fercerpav@gmail.com> | ||
| 3 | Date: Wed, 4 Nov 2020 12:40:50 -0800 | ||
| 4 | Subject: [PATCH] gpsd/dbusexport.c: Fix broken d-bus message time. | ||
| 5 | |||
| 6 | Change-Id: I4b9990ce4517a8feb29fc9e090c62f5a0c56ddd5 | ||
| 7 | --- | ||
| 8 | dbusexport.c | 4 +++- | ||
| 9 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/dbusexport.c b/dbusexport.c | ||
| 12 | index 40b35739e..5d08a8702 100644 | ||
| 13 | --- a/dbusexport.c | ||
| 14 | +++ b/dbusexport.c | ||
| 15 | @@ -38,6 +38,7 @@ void send_dbus_fix(struct gps_device_t *channel) | ||
| 16 | /*DBusMessageIter iter; */ | ||
| 17 | dbus_uint32_t serial; /* collected, but not used */ | ||
| 18 | char *gpsd_devname; | ||
| 19 | + double dtime; // time as a double, loss of precision! | ||
| 20 | |||
| 21 | /* if the connection is non existent, return without doing anything */ | ||
| 22 | if (connection == NULL) | ||
| 23 | @@ -51,8 +52,9 @@ void send_dbus_fix(struct gps_device_t *channel) | ||
| 24 | /* the dbus/locationd doc fails to specify altitude as WGS84 or MSL. | ||
| 25 | * assume altMSL */ | ||
| 26 | message = dbus_message_new_signal("/org/gpsd", "org.gpsd", "fix"); | ||
| 27 | + dtime = TSTONS(&gpsfix->time); | ||
| 28 | dbus_message_append_args(message, | ||
| 29 | - DBUS_TYPE_DOUBLE, &(gpsfix->time), | ||
| 30 | + DBUS_TYPE_DOUBLE, &dtime, | ||
| 31 | DBUS_TYPE_INT32, &(gpsfix->mode), | ||
| 32 | DBUS_TYPE_DOUBLE, &(gpsfix->ept), | ||
| 33 | DBUS_TYPE_DOUBLE, &(gpsfix->latitude), | ||
| 34 | -- | ||
| 35 | 2.20.1 | ||
| 36 | |||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb index 7f8382ed37..1d031ee952 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | |||
| @@ -1,18 +1,15 @@ | |||
| 1 | SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" | 1 | SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" |
| 2 | SECTION = "console/network" | 2 | SECTION = "console/network" |
| 3 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" |
| 5 | DEPENDS = "dbus ncurses python3 pps-tools" | 5 | DEPENDS = "dbus ncurses python3 pps-tools" |
| 6 | PROVIDES = "virtual/gpsd" | 6 | PROVIDES = "virtual/gpsd" |
| 7 | 7 | ||
| 8 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | 8 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ |
| 9 | file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ | ||
| 10 | file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \ | ||
| 11 | file://0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch \ | ||
| 12 | file://gpsd.init \ | 9 | file://gpsd.init \ |
| 13 | " | 10 | " |
| 14 | SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05" | 11 | SRC_URI[md5sum] = "b4f96cb01cbc06542b1cb66b3296078d" |
| 15 | SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50" | 12 | SRC_URI[sha256sum] = "522c2362a7eb2d7ac37eaa1504f12aded1c373479a87ba06cc6795974b567bbc" |
| 16 | 13 | ||
| 17 | inherit scons update-rc.d python3-dir python3native systemd update-alternatives | 14 | inherit scons update-rc.d python3-dir python3native systemd update-alternatives |
| 18 | 15 | ||
| @@ -74,7 +71,7 @@ do_install:append() { | |||
| 74 | 71 | ||
| 75 | #support for udev | 72 | #support for udev |
| 76 | install -d ${D}/${sysconfdir}/udev/rules.d | 73 | install -d ${D}/${sysconfdir}/udev/rules.d |
| 77 | install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/ | 74 | install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/ |
| 78 | install -d ${D}${base_libdir}/udev/ | 75 | install -d ${D}${base_libdir}/udev/ |
| 79 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | 76 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ |
| 80 | 77 | ||
| @@ -84,11 +81,11 @@ do_install:append() { | |||
| 84 | 81 | ||
| 85 | #support for systemd | 82 | #support for systemd |
| 86 | install -d ${D}${systemd_unitdir}/system/ | 83 | install -d ${D}${systemd_unitdir}/system/ |
| 87 | install -m 0644 ${S}/systemd/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service | 84 | install -m 0644 ${S}/systemd/${BPN}.service.in ${D}${systemd_unitdir}/system/${BPN}.service |
| 88 | sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}.service | 85 | sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service |
| 89 | install -m 0644 ${S}/systemd/${BPN}ctl@.service ${D}${systemd_unitdir}/system/${BPN}ctl@.service | 86 | install -m 0644 ${S}/systemd/${BPN}ctl@.service.in ${D}${systemd_unitdir}/system/${BPN}ctl@.service |
| 90 | sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service | 87 | sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service |
| 91 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket | 88 | install -m 0644 ${S}/systemd/${BPN}.socket.in ${D}${systemd_unitdir}/system/${BPN}.socket |
| 92 | } | 89 | } |
| 93 | 90 | ||
| 94 | PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | 91 | PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" |
