diff options
author | John Klug <john.klug@multitech.com> | 2016-12-20 18:13:03 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2016-12-20 18:13:03 -0600 |
commit | 179371d9381f86c0d68e0c981ef3fc5dce830aaa (patch) | |
tree | 5d54534e5854eae13a8c461dd29b877980aec816 | |
parent | 0f102a28f8323576eadfc20f95050f826197f665 (diff) | |
parent | b2440edd24018fab7cff1e75ba66f1491d7dad60 (diff) | |
download | meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.gz meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.bz2 meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.zip |
Merge gpsd changes to mlinux gitlab master
36 files changed, 1701 insertions, 2 deletions
diff --git a/classes/mlinux-mirrors.bbclass b/classes/mlinux-mirrors.bbclass index 17bd692..7f80d46 100644 --- a/classes/mlinux-mirrors.bbclass +++ b/classes/mlinux-mirrors.bbclass @@ -13,3 +13,5 @@ MIRRORS_append () { ftp://.*/.* http://multitech.net/mlinux/sources/ https?$://.*/.* http://multitech.net/mlinux/sources/ } + +SAVANNAH_GNU_MIRROR = "http://download-mirror.savannah.gnu.org/releases" diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 7ba57e7..9a8011d 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -74,3 +74,5 @@ require java.inc PREFERRED_VERSION_nodejs ?= "0.10.44" PREFERRED_VERSION_nodejs-native ?= "0.10.44" + +PREFERRED_VERSION_gpsd ?= "3.16" diff --git a/recipes-core/busybox/busybox-1.22.1/defconfig b/recipes-core/busybox/busybox-1.22.1/defconfig index 0387a9d..aa1e514 100644 --- a/recipes-core/busybox/busybox-1.22.1/defconfig +++ b/recipes-core/busybox/busybox-1.22.1/defconfig @@ -570,8 +570,8 @@ CONFIG_HEXDUMP=y CONFIG_HWCLOCK=y CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -# CONFIG_IPCRM is not set -# CONFIG_IPCS is not set +CONFIG_IPCRM=y +CONFIG_IPCS=y CONFIG_LOSETUP=y # CONFIG_LSPCI is not set # CONFIG_LSUSB is not set diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch new file mode 100644 index 0000000..82ac5aa --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch @@ -0,0 +1,25 @@ +From c30716be9e615513fe66993fd3cdc818c3d70410 Mon Sep 17 00:00:00 2001 +From: "Gary E. Miller" <gem@rellim.com> +Date: Sun, 15 Mar 2015 11:51:45 -0700 +Subject: [PATCH 1/3] Check for __STDC_NO_ATOMICS__ before using stdatomic.h + +--- + SConstruct | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index adf473d..566c14a 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -633,7 +633,7 @@ else: + announce("You do not have kernel CANbus available.") + env["nmea2000"] = False + +- if config.CheckHeader("stdatomic.h"): ++ if not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and config.CheckHeader("stdatomic.h"): + confdefs.append("#define HAVE_STDATOMIC_H 1\n") + else: + confdefs.append("/* #undef HAVE_STDATOMIC_H */\n") +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-Include-stdatomic.h-only-in-C-mode.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-Include-stdatomic.h-only-in-C-mode.patch new file mode 100644 index 0000000..bc9167e --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-Include-stdatomic.h-only-in-C-mode.patch @@ -0,0 +1,43 @@ +From 79f6d9133378325d70a92e66f7352c1becefbb88 Mon Sep 17 00:00:00 2001 +From: Gleb Smirnoff <glebius@FreeBSD.org> +Date: Sat, 16 May 2015 02:47:28 +0300 +Subject: [PATCH] Include <stdatomic.h> only in C mode. + +Upstream-Status: Backport from 3.15 + +Without this build with gcc-5.2 fails with: +| arm-oe-linux-gnueabi-g++ -march=armv4t -mthumb -mthumb-interwork -mtune=arm920t --sysroot=/OE/build/shr-core/tmp-glibc/sysroots/om-gta02 -o clock_gettime-qt.os -c -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/OE/build/shr-core/tmp-glibc/sysroots/om-gta02 -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wpointer-arith -Wreturn-type -pthread -Wmissing-declarations -g -O0 -pthread -fPIC -DUSE_QT -DQT_SHARED -I/OE/build/shr-core/tmp-glibc/sysroots/om-gta02/usr/include/dbus-1.0 -I/OE/build/shr-core/tmp-glibc/sysroots/om-gta02/usr/lib/dbus-1.0/include -I/OE/build/shr-core/tmp-glibc/sysroots/om-gta02/usr/include/qt4/QtNetwork -I/OE/build/shr-core/tmp-glibc/sysroots/om-gta02/usr/include/qt4 -I/OE/build/shr-core/tmp-glibc/sysroots/om-gta02/usr/include/qt4/QtCore clock_gettime.c +| In file included from compiler.h:50:0, +| from clock_gettime.c:10: +| /OE/build/shr-core/tmp-glibc/sysroots/x86_64-linux/usr/lib/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/5.2.0/include/stdatomic.h:40:9: error: '_Atomic' does not name a type +| typedef _Atomic _Bool atomic_bool; +| ^ +.... + +More info: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 + +Signed-off-by: Gary E. Miller <gem@rellim.com> +--- + compiler.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/compiler.h b/compiler.h +index 837c935..03430c0 100644 +--- a/compiler.h ++++ b/compiler.h +@@ -66,9 +66,9 @@ + } while (0) + + #ifdef HAVE_STDATOMIC_H +-#ifndef __COVERITY__ /* Coverity is confused by a GNU typedef */ ++#if !defined(__COVERITY__) && !defined(__cplusplus) + #include <stdatomic.h> +-#endif /* __COVERITY__ */ ++#endif /* __COVERITY__ || __cplusplus */ + #endif /* HAVE_STDATOMIC_H */ + + #ifdef HAVE_OSATOMIC_H +-- +2.5.1 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch new file mode 100644 index 0000000..2ea3226 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch @@ -0,0 +1,75 @@ +From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 18:45:14 +0200 +Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot + from python_lib_dir + +* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix + and with PYTHONPATH from OE it's pointing to native python dir + + $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/ + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] + >>> + $ unset PYTHONPATH + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/python2.7'] + >>> import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] +* python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + returns path to target sysroot + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/SConstruct b/SConstruct +index 6c93311..cde8b3d 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1148,6 +1148,12 @@ else: + basecflags += ' -coverage' + ldflags += ' -coverage' + ldshared += ' -coverage' ++ ++ if env['sysroot']: ++ print "Prefixing includepy '%s' with sysroot prefix" % includepy ++ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy)) ++ print "'%s'" % includepy ++ + # in case CC/CXX was set to the scan-build wrapper, + # ensure that we build the python modules with scan-build, too + if env['CC'] is None or env['CC'].find('scan-build') < 0: +@@ -1408,11 +1414,14 @@ if not env['python']: + python_install = [] + else: + python_lib_dir = env['python_libdir'] ++ python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + python_module_dir = python_lib_dir + os.sep + 'gps' + python_extensions_install = python_env.Install( DESTDIR + python_module_dir, + python_built_extensions) + if not env['debug'] and not env['profiling'] and not env['nostrip'] and not sys.platform.startswith('darwin'): + python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET') ++ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (python_lib_dir, )) + + python_modules_install = python_env.Install( DESTDIR + python_module_dir, + python_modules) +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch new file mode 100644 index 0000000..c4134f4 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch @@ -0,0 +1,33 @@ +From 3c5fb3a8691ac711ea93edf8e0b42bffc62b197e Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 11:52:35 +0200 +Subject: [PATCH 1/4] SConstruct: respect sysroot also in SPLINTOPTS + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index 14e2f59..f0cafa8 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1414,7 +1414,10 @@ def Utility(target, source, action): + # Report splint warnings + # Note: test_bits.c is unsplintable because of the PRI64 macros. + # If you get preprocessor or fatal errors, add +showscan. +-splintopts = "-I/usr/include/libusb-1.0 +quiet" ++if not env['sysroot']: ++ splintopts = "-I/usr/include/libusb-1.0 +quiet" ++else: ++ splintopts = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot'] + # splint does not know about multi-arch, work around that + ma_status, ma = _getstatusoutput('dpkg-architecture -qDEB_HOST_MULTIARCH') + if ma_status == 0: +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-include-sys-ttydefaults.h.patch new file mode 100644 index 0000000..b27c671 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-include-sys-ttydefaults.h.patch @@ -0,0 +1,34 @@ +From 543f79222520cc6ab65d20f9fa356dac5c848e3b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 17 Aug 2016 02:16:12 +0000 +Subject: [PATCH] include sys/ttydefaults.h + +This is needed for CTRL definition, as exposed by musl on glibc +this include file gets pulled indirectly. + +/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL' +clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) +scons: *** [gpsmon] Error 1 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + gpsmon.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gpsmon.c b/gpsmon.c +index bee05b8..daed818 100644 +--- a/gpsmon.c ++++ b/gpsmon.c +@@ -20,6 +20,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/select.h> ++#include <sys/ttydefaults.h> + #include <fcntl.h> + #ifndef S_SPLINT_S + #include <unistd.h> +-- +1.8.3.1 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch b/recipes-navigation/gpsd/gpsd-3.14/0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch new file mode 100644 index 0000000..7a06795 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch @@ -0,0 +1,35 @@ +From 6ff099b1ba8de74df9ddeb61e3825264b96ef692 Mon Sep 17 00:00:00 2001 +From: Moritz Fischer <moritz.fischer@ettus.com> +Date: Tue, 22 Dec 2015 19:38:31 -0800 +Subject: [PATCH] libgpsd-core: Fix issue with ACTIVATE hook not being called. + +In the current system session->mode seemed to ignore the +O_OPTIMIZE flag, leading to the ACTIVATE hook being ignored. + +Another way to fix this would be to keep the session->mode +condition pull up the check for O_CONTINUE. + +Upstream-Status: Backported +This patch is in upstream git + +Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> +--- + libgpsd_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgpsd_core.c b/libgpsd_core.c +index 31fec2a..a84e85f 100644 +--- a/libgpsd_core.c ++++ b/libgpsd_core.c +@@ -543,7 +543,7 @@ int gpsd_open(struct gps_device_t *session) + int gpsd_activate(struct gps_device_t *session, const int mode) + /* acquire a connection to the GPS device */ + { +- if (session->mode == O_OPTIMIZE) ++ if (mode == O_OPTIMIZE) + gpsd_run_device_hook(&session->context->errout, + session->gpsdata.dev.path, "ACTIVATE"); + session->gpsdata.gps_fd = gpsd_open(session); +-- +2.4.3 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch b/recipes-navigation/gpsd/gpsd-3.14/0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch new file mode 100644 index 0000000..22ee1bd --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch @@ -0,0 +1,57 @@ +From 99444b3d2c4a4f7fd7128e60461005780d0c5c83 Mon Sep 17 00:00:00 2001 +From: "Gary E. Miller" <gem@rellim.com> +Date: Sun, 15 Mar 2015 12:05:15 -0700 +Subject: [PATCH 2/3] Add a test for C11 and check we have C11 before using + stdatomic.h + +--- + SConstruct | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index 566c14a..faa8651 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -473,6 +473,20 @@ def CheckCompilerDefines(context, define): + 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(""" ++ #if (__STDC_VERSION__ < 201112L) ++ #error Not C11 ++ #endif ++ int main(int argc, char **argv) { ++ return 0; ++ } ++ """,'.c') ++ context.Result(ret) ++ return ret ++ + def GetLoadPath(context): + context.Message("Getting system load path ...") + +@@ -491,6 +505,7 @@ else: + 'CheckXsltproc' : CheckXsltproc, + 'CheckCompilerOption' : CheckCompilerOption, + 'CheckCompilerDefines' : CheckCompilerDefines, ++ 'CheckC11' : CheckC11, + 'CheckHeaderDefines' : CheckHeaderDefines}) + + +@@ -633,7 +648,9 @@ else: + announce("You do not have kernel CANbus available.") + env["nmea2000"] = False + +- if not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and config.CheckHeader("stdatomic.h"): ++ # check for C11 or better, and __STDC__NO_ATOMICS__ is no defined ++ # before looking for stdatomic.h ++ if not config.CheckC11() and not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and config.CheckHeader("stdatomic.h"): + confdefs.append("#define HAVE_STDATOMIC_H 1\n") + else: + confdefs.append("/* #undef HAVE_STDATOMIC_H */\n") +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0002-SConstruct-remove-rpath.patch b/recipes-navigation/gpsd/gpsd-3.14/0002-SConstruct-remove-rpath.patch new file mode 100644 index 0000000..083a662 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0002-SConstruct-remove-rpath.patch @@ -0,0 +1,45 @@ +From d090638ff983e509162d5e3b62aa4918de4aa5fa Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 16:24:35 +0200 +Subject: [PATCH 2/4] SConstruct: remove rpath + +* even with correct prefix (without DESTDIR) included it's redundant + WARNING: QA Issue: libgps: + /work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + contains probably-redundant RPATH /usr/lib +* and with prefix from scons.bbclass it's invalid + WARNING: QA Issue: package libgps contains bad RPATH + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib + in file + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + +Upstream-Status: Inapppropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index f0cafa8..ff46713 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1340,8 +1340,11 @@ if qt_env: + binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib)) + + if env["shared"] and env["chrpath"]: +- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ +- % (installdir('libdir', False), )) ++ if not env['sysroot']: ++ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (installdir('libdir', False), )) ++ else: ++ env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"') + + if not env['debug'] and not env['profiling'] and env['strip']: + env.AddPostAction(binaryinstall, '$STRIP $TARGET') +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch b/recipes-navigation/gpsd/gpsd-3.14/0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch new file mode 100644 index 0000000..8bb0928 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch @@ -0,0 +1,26 @@ +From 674c50ee54fd7cd304e8b3c4b33d3ff1272ed191 Mon Sep 17 00:00:00 2001 +From: "Gary E. Miller" <gem@rellim.com> +Date: Sun, 15 Mar 2015 12:17:51 -0700 +Subject: [PATCH 3/3] Whoops, check for C11, not for not C11 in stdatomic.h + test. + +--- + SConstruct | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SConstruct b/SConstruct +index faa8651..f4ea145 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -650,7 +650,7 @@ else: + + # check for C11 or better, and __STDC__NO_ATOMICS__ is no defined + # before looking for stdatomic.h +- if not config.CheckC11() and not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and config.CheckHeader("stdatomic.h"): ++ if config.CheckC11() and not config.CheckCompilerDefines("__STDC_NO_ATOMICS__") and config.CheckHeader("stdatomic.h"): + confdefs.append("#define HAVE_STDATOMIC_H 1\n") + else: + confdefs.append("/* #undef HAVE_STDATOMIC_H */\n") +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.14/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/recipes-navigation/gpsd/gpsd-3.14/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch new file mode 100644 index 0000000..8527f0d --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.14/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch @@ -0,0 +1,52 @@ +From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Sun, 29 Apr 2012 00:05:59 +0200 +Subject: [PATCH 4/4] SConstruct: disable html and man docs building because + xmlto-native from OE is broken + +It will try to load dtd and fail: +| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1 +| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3) +| xmlto: Fix document syntax or use --skip-validation option +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +| ^ +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate +| mv: cannot stat `gpsctl.1': No such file or directory +| scons: *** [gpsctl.1] Error 1 +| scons: building terminated because of errors. + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 0e518e7..c01a71b 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size); + + manbuilder = mangenerator = htmlbuilder = None + if env['manbuild']: +- if config.CheckXsltproc(): ++ if False and config.CheckXsltproc(): + mangenerator = 'xsltproc' + build = "xsltproc --nonet %s $SOURCE >$TARGET" + htmlbuilder = build % docbook_html_uri + manbuilder = build % docbook_man_uri +- elif WhereIs("xmlto"): ++ elif False and WhereIs("xmlto"): + mangenerator = 'xmlto' + xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`" + htmlbuilder = xmlto % "html-nochunks" +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch new file mode 100644 index 0000000..2ea3226 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.old.patch @@ -0,0 +1,75 @@ +From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 18:45:14 +0200 +Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot + from python_lib_dir + +* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix + and with PYTHONPATH from OE it's pointing to native python dir + + $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/ + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] + >>> + $ unset PYTHONPATH + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/python2.7'] + >>> import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] +* python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + returns path to target sysroot + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/SConstruct b/SConstruct +index 6c93311..cde8b3d 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1148,6 +1148,12 @@ else: + basecflags += ' -coverage' + ldflags += ' -coverage' + ldshared += ' -coverage' ++ ++ if env['sysroot']: ++ print "Prefixing includepy '%s' with sysroot prefix" % includepy ++ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy)) ++ print "'%s'" % includepy ++ + # in case CC/CXX was set to the scan-build wrapper, + # ensure that we build the python modules with scan-build, too + if env['CC'] is None or env['CC'].find('scan-build') < 0: +@@ -1408,11 +1414,14 @@ if not env['python']: + python_install = [] + else: + python_lib_dir = env['python_libdir'] ++ python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + python_module_dir = python_lib_dir + os.sep + 'gps' + python_extensions_install = python_env.Install( DESTDIR + python_module_dir, + python_built_extensions) + if not env['debug'] and not env['profiling'] and not env['nostrip'] and not sys.platform.startswith('darwin'): + python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET') ++ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (python_lib_dir, )) + + python_modules_install = python_env.Install( DESTDIR + python_module_dir, + python_modules) +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch new file mode 100644 index 0000000..d1eb2ad --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch @@ -0,0 +1,13 @@ +--- /home/jklug/3.17/old/SConstruct 2016-12-19 14:53:02.406689189 -0600 ++++ ./SConstruct 2016-12-19 17:27:27.594669617 -0600 +@@ -1341,6 +1341,10 @@ + python_config['BASECFLAGS'] += ' -coverage' + python_config['LDFLAGS'] += ' -coverage' + python_config['LDSHARED'] += ' -coverage' ++ if env['sysroot']: ++ print "Prefixing includepy '%s' with sysroot prefix" % python_config['INCLUDEPY'] ++ python_config['INCLUDEPY'] = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY'])) ++ print "Python Include: '%s'" % python_config['INCLUDEPY'] + # in case CC/CXX was set to the scan-build wrapper, + # ensure that we build the python modules with scan-build, too + if env['CC'] is None or env['CC'].find('scan-build') < 0: diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch new file mode 100644 index 0000000..b27c671 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0001-include-sys-ttydefaults.h.patch @@ -0,0 +1,34 @@ +From 543f79222520cc6ab65d20f9fa356dac5c848e3b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 17 Aug 2016 02:16:12 +0000 +Subject: [PATCH] include sys/ttydefaults.h + +This is needed for CTRL definition, as exposed by musl on glibc +this include file gets pulled indirectly. + +/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL' +clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) +scons: *** [gpsmon] Error 1 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + gpsmon.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gpsmon.c b/gpsmon.c +index bee05b8..daed818 100644 +--- a/gpsmon.c ++++ b/gpsmon.c +@@ -20,6 +20,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/select.h> ++#include <sys/ttydefaults.h> + #include <fcntl.h> + #ifndef S_SPLINT_S + #include <unistd.h> +-- +1.8.3.1 + diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch new file mode 100644 index 0000000..083a662 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0002-SConstruct-remove-rpath.patch @@ -0,0 +1,45 @@ +From d090638ff983e509162d5e3b62aa4918de4aa5fa Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 16:24:35 +0200 +Subject: [PATCH 2/4] SConstruct: remove rpath + +* even with correct prefix (without DESTDIR) included it's redundant + WARNING: QA Issue: libgps: + /work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + contains probably-redundant RPATH /usr/lib +* and with prefix from scons.bbclass it's invalid + WARNING: QA Issue: package libgps contains bad RPATH + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib + in file + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + +Upstream-Status: Inapppropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index f0cafa8..ff46713 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1340,8 +1340,11 @@ if qt_env: + binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib)) + + if env["shared"] and env["chrpath"]: +- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ +- % (installdir('libdir', False), )) ++ if not env['sysroot']: ++ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (installdir('libdir', False), )) ++ else: ++ env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"') + + if not env['debug'] and not env['profiling'] and env['strip']: + env.AddPostAction(binaryinstall, '$STRIP $TARGET') +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch new file mode 100644 index 0000000..8527f0d --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16.20161219/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch @@ -0,0 +1,52 @@ +From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Sun, 29 Apr 2012 00:05:59 +0200 +Subject: [PATCH 4/4] SConstruct: disable html and man docs building because + xmlto-native from OE is broken + +It will try to load dtd and fail: +| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1 +| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3) +| xmlto: Fix document syntax or use --skip-validation option +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +| ^ +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate +| mv: cannot stat `gpsctl.1': No such file or directory +| scons: *** [gpsctl.1] Error 1 +| scons: building terminated because of errors. + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 0e518e7..c01a71b 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size); + + manbuilder = mangenerator = htmlbuilder = None + if env['manbuild']: +- if config.CheckXsltproc(): ++ if False and config.CheckXsltproc(): + mangenerator = 'xsltproc' + build = "xsltproc --nonet %s $SOURCE >$TARGET" + htmlbuilder = build % docbook_html_uri + manbuilder = build % docbook_man_uri +- elif WhereIs("xmlto"): ++ elif False and WhereIs("xmlto"): + mangenerator = 'xmlto' + xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`" + htmlbuilder = xmlto % "html-nochunks" +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch new file mode 100644 index 0000000..2ea3226 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch @@ -0,0 +1,75 @@ +From 1e2cea8945bc2183fbe1a012dcd633a352125952 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 18:45:14 +0200 +Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot + from python_lib_dir + +* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix + and with PYTHONPATH from OE it's pointing to native python dir + + $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/ + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] + >>> + $ unset PYTHONPATH + $ python + Python 2.7.2 (default, Apr 18 2012, 09:19:59) + [GCC 4.6.2] on linux2 + Type "help", "copyright", "credits" or "license" for more information. + >>> from distutils import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/python2.7'] + >>> import sysconfig + >>> sysconfig.get_config_vars('INCLUDEPY') + ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] +* python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + returns path to target sysroot + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/SConstruct b/SConstruct +index 6c93311..cde8b3d 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1148,6 +1148,12 @@ else: + basecflags += ' -coverage' + ldflags += ' -coverage' + ldshared += ' -coverage' ++ ++ if env['sysroot']: ++ print "Prefixing includepy '%s' with sysroot prefix" % includepy ++ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy)) ++ print "'%s'" % includepy ++ + # in case CC/CXX was set to the scan-build wrapper, + # ensure that we build the python modules with scan-build, too + if env['CC'] is None or env['CC'].find('scan-build') < 0: +@@ -1408,11 +1414,14 @@ if not env['python']: + python_install = [] + else: + python_lib_dir = env['python_libdir'] ++ python_lib_dir = python_lib_dir.replace(env['sysroot'], '') + python_module_dir = python_lib_dir + os.sep + 'gps' + python_extensions_install = python_env.Install( DESTDIR + python_module_dir, + python_built_extensions) + if not env['debug'] and not env['profiling'] and not env['nostrip'] and not sys.platform.startswith('darwin'): + python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET') ++ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (python_lib_dir, )) + + python_modules_install = python_env.Install( DESTDIR + python_module_dir, + python_modules) +-- +2.1.0 + diff --git a/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch b/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch new file mode 100644 index 0000000..b27c671 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16/0001-include-sys-ttydefaults.h.patch @@ -0,0 +1,34 @@ +From 543f79222520cc6ab65d20f9fa356dac5c848e3b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 17 Aug 2016 02:16:12 +0000 +Subject: [PATCH] include sys/ttydefaults.h + +This is needed for CTRL definition, as exposed by musl on glibc +this include file gets pulled indirectly. + +/usr/src/debug/gpsd/3.14-r0/gpsd-3.14/gpsmon.c:605: undefined reference to `CTRL' +clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) +scons: *** [gpsmon] Error 1 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + gpsmon.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gpsmon.c b/gpsmon.c +index bee05b8..daed818 100644 +--- a/gpsmon.c ++++ b/gpsmon.c +@@ -20,6 +20,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/select.h> ++#include <sys/ttydefaults.h> + #include <fcntl.h> + #ifndef S_SPLINT_S + #include <unistd.h> +-- +1.8.3.1 + diff --git a/recipes-navigation/gpsd/gpsd-3.16/0002-SConstruct-remove-rpath.patch b/recipes-navigation/gpsd/gpsd-3.16/0002-SConstruct-remove-rpath.patch new file mode 100644 index 0000000..083a662 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16/0002-SConstruct-remove-rpath.patch @@ -0,0 +1,45 @@ +From d090638ff983e509162d5e3b62aa4918de4aa5fa Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Tue, 24 Apr 2012 16:24:35 +0200 +Subject: [PATCH 2/4] SConstruct: remove rpath + +* even with correct prefix (without DESTDIR) included it's redundant + WARNING: QA Issue: libgps: + /work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + contains probably-redundant RPATH /usr/lib +* and with prefix from scons.bbclass it's invalid + WARNING: QA Issue: package libgps contains bad RPATH + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib + in file + /OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0 + +Upstream-Status: Inapppropriate [embedded specific] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index f0cafa8..ff46713 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1340,8 +1340,11 @@ if qt_env: + binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib)) + + if env["shared"] and env["chrpath"]: +- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ +- % (installdir('libdir', False), )) ++ if not env['sysroot']: ++ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ ++ % (installdir('libdir', False), )) ++ else: ++ env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"') + + if not env['debug'] and not env['profiling'] and env['strip']: + env.AddPostAction(binaryinstall, '$STRIP $TARGET') +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch b/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch new file mode 100644 index 0000000..8527f0d --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.16/0004-SConstruct-disable-html-and-man-docs-building-becaus.patch @@ -0,0 +1,52 @@ +From 697e2e9ff97487266d817cdd41bacc83f681e3d7 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Sun, 29 Apr 2012 00:05:59 +0200 +Subject: [PATCH 4/4] SConstruct: disable html and man docs building because + xmlto-native from OE is broken + +It will try to load dtd and fail: +| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1 +| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3) +| xmlto: Fix document syntax or use --skip-validation option +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +| ^ +| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd +| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" +| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate +| mv: cannot stat `gpsctl.1': No such file or directory +| scons: *** [gpsctl.1] Error 1 +| scons: building terminated because of errors. + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +Signed-off-by: Peter A. Bigot <pab@pabigot.com> +--- + SConstruct | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 0e518e7..c01a71b 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size); + + manbuilder = mangenerator = htmlbuilder = None + if env['manbuild']: +- if config.CheckXsltproc(): ++ if False and config.CheckXsltproc(): + mangenerator = 'xsltproc' + build = "xsltproc --nonet %s $SOURCE >$TARGET" + htmlbuilder = build % docbook_html_uri + manbuilder = build % docbook_man_uri +- elif WhereIs("xmlto"): ++ elif False and WhereIs("xmlto"): + mangenerator = 'xmlto' + xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`" + htmlbuilder = xmlto % "html-nochunks" +-- +1.8.5.5 + diff --git a/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bb b/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bb new file mode 100644 index 0000000..d2058ba --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bb @@ -0,0 +1,7 @@ +SUMMARY = "Machine specific gpsd config" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD;md5=3775480a712fc46a69647678acb234cb" + +# empty by default +# BSP layers can add stuff like meta-openmoko example: +# diff --git a/recipes-navigation/gpsd/gpsd/60-gpsd.rules b/recipes-navigation/gpsd/gpsd/60-gpsd.rules new file mode 100644 index 0000000..61143b8 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/60-gpsd.rules @@ -0,0 +1,47 @@ +# udev rules for gpsd +# $Id$ +# +# GPSes don't have their own USB device class. They're serial-over-USB +# devices, so what you see is actually the ID of the serial-over-USB chip. +# Fortunately, just two of these account for over 80% of consumer-grade +# GPS sensors. The gpsd.hotplug.wrapper script will tell a running gpsd +# that it should look at the device that just went active, because it +# might be a GPS. +# +# The following setup works on Debian - something similar will apply on +# other distributions: +# +# /etc/udev/gpsd.rules +# /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules +# /lib/udev/gpsd.hotplug.wrapper +# /lib/udev/gpsd.hotplug +# +# Setting the link in /etc/udev/rules.d activates the rule and determines +# when to run it on boot (similar to init.d processing). + +SUBSYSTEM!="tty", GOTO="gpsd_rules_end" + +# Prolific Technology, Inc. PL2303 Serial Port +ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# ATEN International Co., Ltd UC-232A Serial Port [pl2303] +ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# FTDI 8U232AM +ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Cypress M8/CY7C64013 (DeLorme uses these) +ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) +ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) +ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) +ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# u-blox AG, u-blox 5 (tested with Navilock NL-402U) +ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# FTDI FT232 +ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# u-blox 4 +ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" + +ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper" + +LABEL="gpsd_rules_end" diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd new file mode 100755 index 0000000..c08be9b --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -0,0 +1,136 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: gpsd +# Required-Start: $remote_fs $network +# Should-Start: bluetooth dbus udev +# Required-Stop: $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: GPS (Global Positioning System) daemon start/stop script +# Description: Start/Stop script for the gpsd service daemon, +# which is able to monitor one or more GPS devices +# connected to a host computer, making all data on +# the location and movements of the sensors available +# to be queried on TCP port 2947. +### END INIT INFO + +# Author: Bernd Zeimetz <bzed@debian.org> +# +# Please remove the "Author" lines above and replace them +# with your own name if you copy and modify this script. + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="GPS (Global Positioning System) daemon" +NAME=gpsd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration, if present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then + GPSD_SOCKET=/var/run/gpsd.sock +fi + +if [ -n "$GPSD_SOCKET" ]; then + GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" +fi + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ + -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ + || return 1 + /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + /usr/sbin/start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + /usr/sbin/start-stop-daemon -N -20 --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + echo "Starting $DESC" "$NAME" + do_start + exit $? + ;; + stop) + echo "Stopping $DESC" "$NAME" + do_stop + exit $? + ;; + status) + ;; + reload|force-reload) + echo "Reloading $DESC" "$NAME" + do_reload + exit $? + ;; + restart) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + echo "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + exit $? + ;; + *) + # Failed to stop + exit 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default new file mode 100644 index 0000000..0aa95d4 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -0,0 +1,7 @@ +# If you must specify a non-NMEA driver, uncomment and modify the next line +GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_OPTIONS="-n -D 1" + +# Conduit 0.1 GPS devices +GPS_DEVICES="/dev/ttyXRUSB2 /dev/pps0" + diff --git a/recipes-navigation/gpsd/gpsd/gpsd.service b/recipes-navigation/gpsd/gpsd/gpsd.service new file mode 100644 index 0000000..7131a58 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/gpsd.service @@ -0,0 +1,10 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon +Requires=gpsd.socket + +[Service] +EnvironmentFile=/etc/default/gpsd +ExecStart=/usr/sbin/gpsd -N $GPS_DEVICES + +[Install] +Also=gpsd.socket diff --git a/recipes-navigation/gpsd/gpsd_3.14.bb b/recipes-navigation/gpsd/gpsd_3.14.bb new file mode 100644 index 0000000..7988a11 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd_3.14.bb @@ -0,0 +1,146 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" +PROVIDES = "virtual/gpsd" + +EXTRANATIVEPATH += "chrpath-native" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://0001-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \ + file://0002-SConstruct-remove-rpath.patch \ + file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ + file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ + file://0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch \ + file://0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch \ + file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch \ + file://0001-Include-stdatomic.h-only-in-C-mode.patch \ + file://0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch \ + file://0001-include-sys-ttydefaults.h.patch \ + file://gpsd-default \ + file://gpsd \ + file://60-gpsd.rules \ + file://gpsd.service \ +" +SRC_URI[md5sum] = "bc7467009b99e07ba461377b5da6c039" +SRC_URI[sha256sum] = "504fc812f3c1525a1a48e04bf4d77f9a8066c201448d98089df89d58ef53a8cb" + +inherit scons update-rc.d python-dir pythonnative systemd + +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +# Necessary for python +export BUILD_SYS +export HOST_SYS + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" +PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" +PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + chrpath='yes' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for instalation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ + bbfatal "scons install execution failed." +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service + install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket +} + +pkg_postinst_${PN}-conf() { + update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 +} + +pkg_postrm_${PN}-conf() { + update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default +} + +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" + +FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ + ${libdir}/libQgpsmm.prl" + +FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" + +RDEPENDS_${PN} = "gpsd-gpsctl" +RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS_gpsd-udev += "udev gpsd-conf" + +SUMMARY_libgpsd = "C service library used for communicating with gpsd" +FILES_libgpsd = "${libdir}/libgpsd.so.*" + +SUMMARY_libgps = "C service library used for communicating with gpsd" +FILES_libgps = "${libdir}/libgps.so.*" + +SUMMARY_gpsd-conf = "gpsd configuration files and init scripts" +FILES_gpsd-conf = "${sysconfdir}" +CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES_gpsd-gpsctl = "${bindir}/gpsctl" + +SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES_gps-utils = "${bindir}/*" +RDEPENDS_gps-utils = "python-pygps" + +SUMMARY_python-pygps = "Python bindings to gpsd" +FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${PN}.socket" diff --git a/recipes-navigation/gpsd/gpsd_3.16.20161219.bb b/recipes-navigation/gpsd/gpsd_3.16.20161219.bb new file mode 100644 index 0000000..e2ac693 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd_3.16.20161219.bb @@ -0,0 +1,158 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://../git/COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" +PROVIDES = "virtual/gpsd" + +EXTRANATIVEPATH += "chrpath-native" + +# Do we still need this? +# file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch +# file://0001-include-sys-ttydefaults.h.patch +# file://0002-SConstruct-remove-rpath.patch + +# git://git.savannah.nongnu.org/gpsd.git +SRC_URI = "git://git.savannah.nongnu.org/gpsd.git;branch=master;protocol=git \ + file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ + file://gpsd-default \ + file://gpsd \ + file://60-gpsd.rules \ + file://gpsd.service \ +" +S = "${WORKDIR}/git" + +SRCREV = "fde48f5538520bd98da42b4b9f60b5074c61bc2d" +# Fixed +# file://0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch +# file://0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch +# file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch +# file://0001-Include-stdatomic.h-only-in-C-mode.patch +# file://0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch + +SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" +SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" + + +inherit scons update-rc.d python-dir pythonnative systemd + +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +# Necessary for python +export BUILD_SYS +export HOST_SYS + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" +PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" +PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + chrpath='yes' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + ublox='yes' \ + pps='yes' \ + gpsd_group='gps' \ + ntpshm='yes' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for instalation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ + bbfatal "scons install execution failed." +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service + install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket +} + +pkg_postinst_${PN}-conf() { + update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 +} + +pkg_postrm_${PN}-conf() { + update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default +} + +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" + +FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ + ${libdir}/libQgpsmm.prl" + +FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" + +RDEPENDS_${PN} = "gpsd-gpsctl" +RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS_gpsd-udev += "udev gpsd-conf" + +SUMMARY_libgpsd = "C service library used for communicating with gpsd" +FILES_libgpsd = "${libdir}/libgpsd.so.*" + +SUMMARY_libgps = "C service library used for communicating with gpsd" +FILES_libgps = "${libdir}/libgps.so.*" + +SUMMARY_gpsd-conf = "gpsd configuration files and init scripts" +FILES_gpsd-conf = "${sysconfdir}" +CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES_gpsd-gpsctl = "${bindir}/gpsctl" + +SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES_gps-utils = "${bindir}/*" +RDEPENDS_gps-utils = "python-pygps" + +SUMMARY_python-pygps = "Python bindings to gpsd" +FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${PN}.socket" diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb new file mode 100644 index 0000000..19603b9 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -0,0 +1,152 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" +PROVIDES = "virtual/gpsd" + +EXTRANATIVEPATH += "chrpath-native" + +# file://0002-SConstruct-remove-rpath.patch +SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ + file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ + file://0001-include-sys-ttydefaults.h.patch \ + file://gpsd-default \ + file://gpsd \ + file://60-gpsd.rules \ + file://gpsd.service \ +" +# Fixed +# file://0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch +# file://0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch +# file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch +# file://0001-Include-stdatomic.h-only-in-C-mode.patch +# file://0001-libgpsd-core-Fix-issue-with-ACTIVATE-hook-not-being-.patch + +SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" +SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" + + +inherit scons update-rc.d python-dir pythonnative systemd + +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +# Necessary for python +export BUILD_SYS +export HOST_SYS + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" +PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" +PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + chrpath='yes' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + ublox='yes' \ + pps='yes' \ + gpsd_group='gps' \ + ntpshm='yes' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for instalation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ + bbfatal "scons install execution failed." +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service + install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket +} + +pkg_postinst_${PN}-conf() { + update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 +} + +pkg_postrm_${PN}-conf() { + update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default +} + +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" + +FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ + ${libdir}/libQgpsmm.prl" + +FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" + +RDEPENDS_${PN} = "gpsd-gpsctl" +RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS_gpsd-udev += "udev gpsd-conf" + +SUMMARY_libgpsd = "C service library used for communicating with gpsd" +FILES_libgpsd = "${libdir}/libgpsd.so.*" + +SUMMARY_libgps = "C service library used for communicating with gpsd" +FILES_libgps = "${libdir}/libgps.so.*" + +SUMMARY_gpsd-conf = "gpsd configuration files and init scripts" +FILES_gpsd-conf = "${sysconfdir}" +CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES_gpsd-gpsctl = "${bindir}/gpsctl" + +SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES_gps-utils = "${bindir}/*" +RDEPENDS_gps-utils = "python-pygps" + +SUMMARY_python-pygps = "Python bindings to gpsd" +FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${PN}.socket" diff --git a/recipes-navigation/gpsd/gpsdupdater/bin/bldgpsd.sh b/recipes-navigation/gpsd/gpsdupdater/bin/bldgpsd.sh new file mode 100755 index 0000000..aeedf67 --- /dev/null +++ b/recipes-navigation/gpsd/gpsdupdater/bin/bldgpsd.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# This program creates an installer bash script. +# To install you execute: +# bash gpsdipk.sh +# Files needed +# ~/lib/opkginstall.sh +# ~/lib/bashinstaller.sh +# +function usage +{ + echo 'bldgpsd [mlinuxdir]' 2>&1 + exit +} +function cleanup +{ + if [[ $tmpdir =~ ^/var/tmp/gpsdbld ]] ; then + rm -rf $tmpdir + fi +} +if (($# != 1)) ; then + usage +fi +trap cleanup exit +mlpath="$1" + + +fullpath=$(readlink ${mlpath}) +tmpdirtemplate=/var/tmp/gpsdbld.XXXXX +tmpdir=$(mktemp -d $tmpdirtemplate) +FLIST=\ +" +libpanelw5_*_arm926ejste.ipk +python-curses_*_arm926ejste.ipk +python-json_*_arm926ejste.ipk +libgps22_0*_arm926ejste.ipk +gpsd_*_arm926ejste.ipk +gpsd-conf_*_arm926ejste.ipk +gpsd-gpsctl_*_arm926ejste.ipk +gpsd-udev_*_arm926ejste.ipk +gps-utils_*_arm926ejste.ipk +python-pygps_*_arm926ejste.ipk +ntp_*_arm926ejste.ipk +ntp-utils_*_arm926ejste.ipk +ntp-tickadj_*_arm926ejste.ipk +busybox_*_arm926ejste.ipk +" +armpath=${mlpath}/build/tmp/deploy/ipk/arm926ejste +if ! [[ -d $armpath ]] ; then + echo $armpath does not exist. No files to save + exit 1 +fi +mkdir ${tmpdir}/packages +cp ~/lib/bashinstaller.sh $tmpdir/packages/gpsdipk.sh + +echo directory is $armpath +echo list is $FLIST +chmod +x ~/lib/bashinstaller.sh +(cd $armpath; cp ~/lib/opkginstall.sh . ; echo opkginstall.sh $FLIST | tr ' ' '\n' | cpio -ov -Hcrc >>${tmpdir}/packages/gpsdipk.sh ; rm opkginstall.sh) +mv ${tmpdir}/packages/gpsdipk.sh /var/tmp +echo installer is /var/tmp/gpsdipk.sh + diff --git a/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh b/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh new file mode 100755 index 0000000..8b04288 --- /dev/null +++ b/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh @@ -0,0 +1,22 @@ +#!/bin/bash +echo "" +echo "Self Extracting Installer" +echo "" + +export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX` + +ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0` + +tail -n+$ARCHIVE $0 | (cd $TMPDIR; pwd; ls; cpio -ivdum) + +CDIR=`pwd` +cd $TMPDIR +./opkginstall.sh + +cd $CDIR + +#rm -rf $TMPDIR + +exit 0 + +__ARCHIVE_BELOW__ diff --git a/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh b/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh new file mode 100755 index 0000000..d1c17ba --- /dev/null +++ b/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh @@ -0,0 +1,15 @@ +#!/bin/bash +list="" +for f in *.ipk ; do + if [[ $f =~ ^busybox ]] ; then + continue + fi + [[ $f =~ ([^_]*) ]] && true + list+="${BASH_REMATCH[1]} " +done +list=$(echo $list | xargs) +echo $list +set -x +opkg --force-depends --force-remove --force-removal-of-dependent-packages remove $list +opkg install *.ipk +set +x diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch new file mode 100644 index 0000000..0700553 --- /dev/null +++ b/recipes-support/ntp/files/ntp.conf.patch @@ -0,0 +1,51 @@ +diff -u old/ntp.conf new/ntp.conf +--- old/ntp.conf 2016-12-20 15:41:04.992738081 -0600 ++++ new/ntp.conf 2016-12-20 16:07:40.632709506 -0600 +@@ -1,7 +1,19 @@ +-# This is the most basic ntp configuration file + # The driftfile must remain in a place specific to this + # machine - it records the machine specific clock error + driftfile /etc/ntp.drift ++ ++# The following code is for evaluating the timeserver. ++# Remove the # to activate the statistics ++# statistics loopstats ++# statistics peerstats ++# statsdir /var/log/ntpstats ++# filegen peerstats file peerstats type day link enable ++# filegen loopstats file loopstats type day link enable ++ ++# This is the US timeserver pool. You should use a pool ++# close to your location. ++#pool us.pool.ntp.org iburst ++ + # This should be a server that is close (in IP terms) + # to the machine. Add other servers as required. + # Unless you un-comment the line below ntpd will sync +@@ -9,8 +21,26 @@ + # + # server time.server.example.com + # ++ ++logfile /var/log/ntp.log ++ ++restrict default kod nomodify notrap nopeer noquery ++restrict -6 default kod nomodify notrap nopeer noquery ++restrict 127.0.0.1 mask 255.255.255.0 ++restrict -6 ::1 ++ ++# GPS Serial data reference (NTP0) ++server 127.127.28.0 ++fudge 127.127.28.0 time1 0.080 refid GPS ++ ++# GPS PPS reference (NTP2) ++server 127.127.28.2 prefer ++fudge 127.127.28.2 time1 0.000 refid PPS ++ + # Using local hardware clock as fallback + # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself ++# The stratum should be a high value so this does not get chosen ++# except in dire circumstances. + server 127.127.1.0 + fudge 127.127.1.0 stratum 14 + # Defining a default security setting diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch new file mode 100644 index 0000000..fc388f8 --- /dev/null +++ b/recipes-support/ntp/files/ntpd-init.patch @@ -0,0 +1,11 @@ +--- old/ntpd 2016-12-19 18:11:58.022663976 -0600 ++++ new/ntpd 2016-12-19 18:12:56.618663852 -0600 +@@ -23,7 +23,7 @@ + # this. If ntpd seems to disappear after a while assume TICKADJ + # above is set to a totally incorrect value. + echo -n "Starting ntpd: " +- start-stop-daemon --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@" ++ start-stop-daemon -N -20 --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@" + echo "done" + } + stopdaemon(){ diff --git a/recipes-support/ntp/ntp_4.2.6p5.bbappend b/recipes-support/ntp/ntp_4.2.6p5.bbappend new file mode 100644 index 0000000..9c6419e --- /dev/null +++ b/recipes-support/ntp/ntp_4.2.6p5.bbappend @@ -0,0 +1,22 @@ +PR .= ".mlinux1" + +SRC_URI += " file://ntpd-init.patch;patchdir=.. \ + file://ntp.conf.patch;patchdir=.. \ + " +FILESEXTRAPATHS_prepend := "${THISDIR}/files" + +python do_patch_prepend () { + import os +} +pkg_postinst_${PN} () { + touch /etc/ntp.drift + chown ntp:ntp /etc/ntp.drift + chmod 664 /etc/ntp.drift + if ! [[ -d /var/log/ntpstats ]] ; then + mkdir -p /var/log/ntpstats + fi + + chown ntp:ntp /var/log/ntpstats + chmod 775 /var/log/ntpstats +} + |