--- /dev/null
+From 7427bb23092b3e395d14e42cd3b64691082fe826 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 24 Apr 2012 10:58:26 +0200
+Subject: [PATCH 1/4] SConstruct: respect sysroot setting when prepending
+ LIBPATH/RPATH
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ SConstruct | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 22bc9f4..21b2205 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -269,9 +269,14 @@ def installdir(dir, add_destdir=True):
+ return wrapped
+
+ # Honor the specified installation prefix in link paths.
+-env.Prepend(LIBPATH=[installdir('libdir')])
+-if env["shared"]:
+- env.Prepend(RPATH=[installdir('libdir')])
++if env['sysroot']:
++ env.Prepend(LIBPATH=[os.path.normpath("%s/%s/%s" % (env['sysroot'], env['prefix'], env['libdir']))])
++ if env["shared"]:
++ env.Prepend(RPATH=[os.path.normpath("%s/%s/%s" % (env['sysroot'], env['prefix'], env['libdir']))])
++else:
++ env.Prepend(LIBPATH=[installdir('libdir')])
++ if env["shared"]:
++ env.Prepend(RPATH=[installdir('libdir')])
+
+ # Give deheader a way to set compiler flags
+ if 'MORECFLAGS' in os.environ:
+--
+1.7.8.5
+
--- /dev/null
+From 5266eb72cbc8193faa2345b8774b0f159e61c067 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 2/4] SConstruct: respect sysroot also in SPLINTOPTS
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ SConstruct | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 21b2205..0cf5799 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1224,7 +1224,10 @@ def Utility(target, source, action):
+
+ # Report splint warnings
+ # Note: test_bits.c is unsplintable because of the PRI64 macros.
+-env['SPLINTOPTS'] = "-I/usr/include/libusb-1.0 +quiet"
++if env['sysroot']:
++ env['SPLINTOPTS'] = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot']
++else:
++ env['SPLINTOPTS'] = "-I/usr/include/libusb-1.0 +quiet"
+
+ def Splint(target,sources, description, params):
+ return Utility(target,sources+generated_sources,[
+--
+1.7.8.5
+
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0001-SConstruct-fix-DSO-build-for-ntpshm-garmin_monitor.patch \
+ file://0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch \
+ file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
file://gpsd-default \
file://gpsd \
file://gpsd.socket \
export STAGING_LIBDIR
EXTRA_OESCONS = " \
+ sysroot=${STAGING_DIR_TARGET} \
libQgpsmm='false' \
debug='true' \
strip='false' \
systemd='true' \
"
+# this cannot be used, because then chrpath is not found and only static lib is built
+# target=${HOST_SYS}
do_compile_prepend() {
- export LIBPATH="${STAGING_LIBDIR}"
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
+
export BUILD_SYS="${BUILD_SYS}"
export HOST_SYS="${HOST_SYS}"
}