diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-04-24 17:50:24 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-04-30 08:25:13 +0200 |
commit | 82c5c27596d90f65a3e9b11dda8efed6342d971b (patch) | |
tree | 2278c96d3613b848340230020325e7d68a2a77ae /meta-oe/recipes-navigation | |
parent | 3c2d95022b62adf82216f05ef5749d4aaf22bddf (diff) | |
download | meta-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')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch | 39 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb | 126 |
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 0000000000..c2d191c850 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd/0003-Revert-The-strptime-prototype-is-not-provided-unless.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From c6bb11767172407bfaaebd962b4d12cd8e8a1fb0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 24 Apr 2012 14:57:04 +0200 | ||
4 | Subject: [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 | |||
21 | diff --git a/gpsutils.c b/gpsutils.c | ||
22 | index 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 | -- | ||
38 | 1.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 0000000000..bd65eae843 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb | |||
@@ -0,0 +1,126 @@ | |||
1 | DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices" | ||
2 | SECTION = "console/network" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" | ||
5 | DEPENDS = "dbus dbus-glib ncurses python libusb1" | ||
6 | PROVIDES = "virtual/gpsd" | ||
7 | |||
8 | DEFAULT_PREFERENCE = "-1" | ||
9 | SRC_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 | " | ||
18 | SRC_URI[md5sum] = "e96881798a0ab67aa3cd5f3249f0e536" | ||
19 | SRC_URI[sha256sum] = "5ebb0b00c49421eb8fbead81342e5ce63e82065e5ff27da586f10e342b999171" | ||
20 | |||
21 | inherit scons update-rc.d python-dir systemd | ||
22 | |||
23 | INITSCRIPT_NAME = "gpsd" | ||
24 | INITSCRIPT_PARAMS = "defaults 35" | ||
25 | |||
26 | SYSTEMD_PACKAGES = "${PN}-systemd" | ||
27 | SYSTEMD_SERVICE = "${PN}.socket" | ||
28 | |||
29 | export STAGING_INCDIR | ||
30 | export STAGING_LIBDIR | ||
31 | |||
32 | EXTRA_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 | |||
42 | do_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 | |||
51 | do_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 | |||
65 | do_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 | |||
87 | pkg_postinst_${PN}-conf() { | ||
88 | update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 | ||
89 | } | ||
90 | |||
91 | pkg_postrm_${PN}-conf() { | ||
92 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default | ||
93 | } | ||
94 | |||
95 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | ||
96 | |||
97 | FILES_gpsd-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc" | ||
98 | |||
99 | FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" | ||
100 | |||
101 | RDEPENDS_${PN} = "gpsd-gpsctl" | ||
102 | RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" | ||
103 | |||
104 | DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" | ||
105 | FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" | ||
106 | RDEPENDS_gpsd-udev += "udev gpsd-conf" | ||
107 | |||
108 | DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" | ||
109 | FILES_libgpsd = "${libdir}/libgpsd.so.*" | ||
110 | |||
111 | DESCRIPTION_libgps = "C service library used for communicating with gpsd" | ||
112 | FILES_libgps = "${libdir}/libgps.so.*" | ||
113 | |||
114 | DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts" | ||
115 | FILES_gpsd-conf = "${sysconfdir}" | ||
116 | |||
117 | DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes" | ||
118 | FILES_gpsd-gpsctl = "${bindir}/gpsctl" | ||
119 | |||
120 | DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS" | ||
121 | FILES_gps-utils = "${bindir}/*" | ||
122 | RDEPENDS_gps-utils = "python-pygps" | ||
123 | |||
124 | DESCRIPTION_python-pygps = "Python bindings to gpsd" | ||
125 | FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
126 | RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" | ||