diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-04-24 09:01:27 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-04-29 23:29:33 +0200 |
commit | 1c4eff918d6268cf211e77b8b0a22603f9d6c4f3 (patch) | |
tree | e746d3dcbccdbec95d2a400374e84477bf72b6c4 /meta-oe/recipes-navigation | |
parent | cf4979889002b5ee146c185d499cd25e68be91a8 (diff) | |
download | meta-openembedded-1c4eff918d6268cf211e77b8b0a22603f9d6c4f3.tar.gz |
gpsd: pass sysroot param to scons and fix SConstruct to respect that
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation')
3 files changed, 71 insertions, 1 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch new file mode 100644 index 000000000..6b720a523 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 7427bb23092b3e395d14e42cd3b64691082fe826 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 24 Apr 2012 10:58:26 +0200 | ||
4 | Subject: [PATCH 1/4] SConstruct: respect sysroot setting when prepending | ||
5 | LIBPATH/RPATH | ||
6 | |||
7 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
8 | --- | ||
9 | SConstruct | 11 ++++++++--- | ||
10 | 1 files changed, 8 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/SConstruct b/SConstruct | ||
13 | index 22bc9f4..21b2205 100644 | ||
14 | --- a/SConstruct | ||
15 | +++ b/SConstruct | ||
16 | @@ -269,9 +269,14 @@ def installdir(dir, add_destdir=True): | ||
17 | return wrapped | ||
18 | |||
19 | # Honor the specified installation prefix in link paths. | ||
20 | -env.Prepend(LIBPATH=[installdir('libdir')]) | ||
21 | -if env["shared"]: | ||
22 | - env.Prepend(RPATH=[installdir('libdir')]) | ||
23 | +if env['sysroot']: | ||
24 | + env.Prepend(LIBPATH=[os.path.normpath("%s/%s/%s" % (env['sysroot'], env['prefix'], env['libdir']))]) | ||
25 | + if env["shared"]: | ||
26 | + env.Prepend(RPATH=[os.path.normpath("%s/%s/%s" % (env['sysroot'], env['prefix'], env['libdir']))]) | ||
27 | +else: | ||
28 | + env.Prepend(LIBPATH=[installdir('libdir')]) | ||
29 | + if env["shared"]: | ||
30 | + env.Prepend(RPATH=[installdir('libdir')]) | ||
31 | |||
32 | # Give deheader a way to set compiler flags | ||
33 | if 'MORECFLAGS' in os.environ: | ||
34 | -- | ||
35 | 1.7.8.5 | ||
36 | |||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch new file mode 100644 index 000000000..55ef7042d --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd/0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 5266eb72cbc8193faa2345b8774b0f159e61c067 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 24 Apr 2012 11:52:35 +0200 | ||
4 | Subject: [PATCH 2/4] SConstruct: respect sysroot also in SPLINTOPTS | ||
5 | |||
6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
7 | --- | ||
8 | SConstruct | 5 ++++- | ||
9 | 1 files changed, 4 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/SConstruct b/SConstruct | ||
12 | index 21b2205..0cf5799 100644 | ||
13 | --- a/SConstruct | ||
14 | +++ b/SConstruct | ||
15 | @@ -1224,7 +1224,10 @@ def Utility(target, source, action): | ||
16 | |||
17 | # Report splint warnings | ||
18 | # Note: test_bits.c is unsplintable because of the PRI64 macros. | ||
19 | -env['SPLINTOPTS'] = "-I/usr/include/libusb-1.0 +quiet" | ||
20 | +if env['sysroot']: | ||
21 | + env['SPLINTOPTS'] = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot'] | ||
22 | +else: | ||
23 | + env['SPLINTOPTS'] = "-I/usr/include/libusb-1.0 +quiet" | ||
24 | |||
25 | def Splint(target,sources, description, params): | ||
26 | return Utility(target,sources+generated_sources,[ | ||
27 | -- | ||
28 | 1.7.8.5 | ||
29 | |||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb index bb7936844..7502f9aa0 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb | |||
@@ -7,6 +7,8 @@ PROVIDES = "virtual/gpsd" | |||
7 | 7 | ||
8 | SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \ | 8 | SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \ |
9 | file://0001-SConstruct-fix-DSO-build-for-ntpshm-garmin_monitor.patch \ | 9 | file://0001-SConstruct-fix-DSO-build-for-ntpshm-garmin_monitor.patch \ |
10 | file://0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch \ | ||
11 | file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \ | ||
10 | file://gpsd-default \ | 12 | file://gpsd-default \ |
11 | file://gpsd \ | 13 | file://gpsd \ |
12 | file://gpsd.socket \ | 14 | file://gpsd.socket \ |
@@ -28,16 +30,19 @@ export STAGING_INCDIR | |||
28 | export STAGING_LIBDIR | 30 | export STAGING_LIBDIR |
29 | 31 | ||
30 | EXTRA_OESCONS = " \ | 32 | EXTRA_OESCONS = " \ |
33 | sysroot=${STAGING_DIR_TARGET} \ | ||
31 | libQgpsmm='false' \ | 34 | libQgpsmm='false' \ |
32 | debug='true' \ | 35 | debug='true' \ |
33 | strip='false' \ | 36 | strip='false' \ |
34 | systemd='true' \ | 37 | systemd='true' \ |
35 | " | 38 | " |
39 | # this cannot be used, because then chrpath is not found and only static lib is built | ||
40 | # target=${HOST_SYS} | ||
36 | 41 | ||
37 | do_compile_prepend() { | 42 | do_compile_prepend() { |
38 | export LIBPATH="${STAGING_LIBDIR}" | ||
39 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | 43 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" |
40 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | 44 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" |
45 | |||
41 | export BUILD_SYS="${BUILD_SYS}" | 46 | export BUILD_SYS="${BUILD_SYS}" |
42 | export HOST_SYS="${HOST_SYS}" | 47 | export HOST_SYS="${HOST_SYS}" |
43 | } | 48 | } |