summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/gpsd
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-04-24 17:50:24 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-04-30 08:25:13 +0200
commit82c5c27596d90f65a3e9b11dda8efed6342d971b (patch)
tree2278c96d3613b848340230020325e7d68a2a77ae /meta-oe/recipes-navigation/gpsd
parent3c2d95022b62adf82216f05ef5749d4aaf22bddf (diff)
downloadmeta-openembedded-82c5c27596d90f65a3e9b11dda8efed6342d971b.tar.gz
gpsd: add recipe for 3.5 with negative D_P for testing
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch39
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb126
2 files changed, 165 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch
new file mode 100644
index 000000000..c2d191c85
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch
@@ -0,0 +1,39 @@
1From c6bb11767172407bfaaebd962b4d12cd8e8a1fb0 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Tue, 24 Apr 2012 14:57:04 +0200
4Subject: [PATCH 3/4] Revert "The strptime prototype is not provided unless
5 explicitly requested."
6
7* This reverts commit 615d3eb14ea4833ce38ea89ec385308f4f679b33.
8* with _XOPEN_SOURCE defined, we don't have
9 CLOCK_REALTIME and timespec defined and build fails:
10 | arm-oe-linux-gnueabi-gcc -march=armv4t -mthumb -mthumb-interwork -mtune=arm920t --sysroot=/OE/shr-core/tmp-eglibc/sysroots/om-gta02 -o gpsutils.os -c -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/OE/shr-core/tmp-eglibc/sysroots/om-gta02 -O2 -fPIC gpsutils.c
11 | gpsutils.c: In function 'timestamp':
12 | gpsutils.c:299:22: error: storage size of 'ts' isn't known
13 | gpsutils.c:300:34: error: 'CLOCK_REALTIME' undeclared (first use in this function)
14 | gpsutils.c:300:34: note: each undeclared identifier is reported only once for each function it appears in
15 | gpsutils.c: In function 'unix_to_iso8601':
16 | gpsutils.c:385:11: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
17---
18 gpsutils.c | 5 -----
19 1 files changed, 0 insertions(+), 5 deletions(-)
20
21diff --git a/gpsutils.c b/gpsutils.c
22index 60c4ae9..a1530ec 100644
23--- a/gpsutils.c
24+++ b/gpsutils.c
25@@ -3,11 +3,6 @@
26 * This file is Copyright (c) 2010 by the GPSD project
27 * BSD terms apply: see the file COPYING in the distribution root for details.
28 */
29-
30-/* The strptime prototype is not provided unless explicitly requested.
31- * So add the define that POSIX says to to avoid: */
32-#define _XOPEN_SOURCE
33-
34 #include <stdio.h>
35 #include <time.h>
36 #include <sys/time.h>
37--
381.7.8.5
39
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb
new file mode 100644
index 000000000..bd65eae84
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb
@@ -0,0 +1,126 @@
1DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
2SECTION = "console/network"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
5DEPENDS = "dbus dbus-glib ncurses python libusb1"
6PROVIDES = "virtual/gpsd"
7
8DEFAULT_PREFERENCE = "-1"
9SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
10 file://0001-SConstruct-respect-sysroot-setting-when-prepending-L.patch \
11 file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
12 file://0003-Revert-The-strptime-prototype-is-not-provided-unless.patch \
13 file://0004-SConstruct-remove-rpath.patch \
14 file://gpsd-default \
15 file://gpsd \
16 file://60-gpsd.rules \
17"
18SRC_URI[md5sum] = "e96881798a0ab67aa3cd5f3249f0e536"
19SRC_URI[sha256sum] = "5ebb0b00c49421eb8fbead81342e5ce63e82065e5ff27da586f10e342b999171"
20
21inherit scons update-rc.d python-dir systemd
22
23INITSCRIPT_NAME = "gpsd"
24INITSCRIPT_PARAMS = "defaults 35"
25
26SYSTEMD_PACKAGES = "${PN}-systemd"
27SYSTEMD_SERVICE = "${PN}.socket"
28
29export STAGING_INCDIR
30export STAGING_LIBDIR
31
32EXTRA_OESCONS = " \
33 sysroot=${STAGING_DIR_TARGET} \
34 libQgpsmm='false' \
35 debug='true' \
36 strip='false' \
37 systemd='true' \
38"
39# this cannot be used, because then chrpath is not found and only static lib is built
40# target=${HOST_SYS}
41
42do_compile_prepend() {
43 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
44 export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
45 export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
46
47 export BUILD_SYS="${BUILD_SYS}"
48 export HOST_SYS="${HOST_SYS}"
49}
50
51do_install() {
52 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
53 export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
54 export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
55
56 export BUILD_SYS="${BUILD_SYS}"
57 export HOST_SYS="${HOST_SYS}"
58
59 export DESTDIR="${D}"
60 # prefix is used for RPATH and DESTDIR/prefix for instalation
61 ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \
62 bbfatal "scons install execution failed."
63}
64
65do_install_append() {
66 install -d ${D}/${sysconfdir}/init.d
67 install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
68 install -d ${D}/${sysconfdir}/default
69 install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default
70
71 #support for udev
72 install -d ${D}/${sysconfdir}/udev/rules.d
73 install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d
74 install -d ${D}${base_libdir}/udev/
75 install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
76
77 #support for python
78 install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
79 install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
80
81 #support for systemd
82 install -d ${D}${systemd_unitdir}/system/
83 install -m 0644 ${S}/systemd/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
84 install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
85}
86
87pkg_postinst_${PN}-conf() {
88 update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
89}
90
91pkg_postrm_${PN}-conf() {
92 update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
93}
94
95PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
96
97FILES_gpsd-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc"
98
99FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
100
101RDEPENDS_${PN} = "gpsd-gpsctl"
102RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev"
103
104DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging"
105FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
106RDEPENDS_gpsd-udev += "udev gpsd-conf"
107
108DESCRIPTION_libgpsd = "C service library used for communicating with gpsd"
109FILES_libgpsd = "${libdir}/libgpsd.so.*"
110
111DESCRIPTION_libgps = "C service library used for communicating with gpsd"
112FILES_libgps = "${libdir}/libgps.so.*"
113
114DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts"
115FILES_gpsd-conf = "${sysconfdir}"
116
117DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes"
118FILES_gpsd-gpsctl = "${bindir}/gpsctl"
119
120DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS"
121FILES_gps-utils = "${bindir}/*"
122RDEPENDS_gps-utils = "python-pygps"
123
124DESCRIPTION_python-pygps = "Python bindings to gpsd"
125FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
126RDEPENDS_python-pygps = "python-core python-curses gpsd python-json"