diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-07-30 23:50:12 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-07-31 00:14:55 +0200 |
| commit | 2fba7222716ba4e9782ebc6e5077f99669bf69b3 (patch) | |
| tree | 98e219ede466bc142955b090e5744724823d9bee /meta-oe/recipes-navigation/omgps | |
| parent | 15b9efea5d229a3a2b108b9eac253417f09687ff (diff) | |
| download | meta-openembedded-2fba7222716ba4e9782ebc6e5077f99669bf69b3.tar.gz | |
mcnavi, monav, omgps, orrery: import from meta-smartphone
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation/omgps')
5 files changed, 173 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/omgps/omgps/fix.capability.patch b/meta-oe/recipes-navigation/omgps/omgps/fix.capability.patch new file mode 100644 index 0000000000..56ec3a4453 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/fix.capability.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | we need to include config.h first to know if HAVE_SYS_CAPABILITY_H is enabled or no, otherwise | ||
| 2 | sys/capability.h is not included and later used | ||
| 3 | | src/network.c: In function 'can_ping': | ||
| 4 | | src/network.c:198:2: error: 'cap_flag_value_t' undeclared (first use in this function) | ||
| 5 | | src/network.c:198:2: note: each undeclared identifier is reported only once for each function it appears in | ||
| 6 | | src/network.c:198:19: error: expected ';' before 'cap' | ||
| 7 | | src/network.c:199:2: error: 'cap_t' undeclared (first use in this function) | ||
| 8 | | src/network.c:199:8: error: expected ';' before 'caps' | ||
| 9 | | src/network.c:200:6: error: 'caps' undeclared (first use in this function) | ||
| 10 | | cc1: warnings being treated as errors | ||
| 11 | | src/network.c:203:2: error: implicit declaration of function 'cap_get_flag' | ||
| 12 | | src/network.c:203:21: error: 'CAP_SYS_NICE' undeclared (first use in this function) | ||
| 13 | | src/network.c:203:35: error: 'CAP_EFFECTIVE' undeclared (first use in this function) | ||
| 14 | | src/network.c:203:51: error: 'cap' undeclared (first use in this function) | ||
| 15 | | src/network.c:204:17: error: 'CAP_CLEAR' undeclared (first use in this function) | ||
| 16 | | src/network.c:210:1: error: control reaches end of non-void function | ||
| 17 | | make[1]: *** [omgps-network.o] Error 1 | ||
| 18 | |||
| 19 | and -lcap is needed for 2 functions later (should be added only for HAVE_SYS_CAPABILITY_H enabled, but I don't care enough) | ||
| 20 | | omgps-network.o: In function `can_ping': | ||
| 21 | | /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:199: undefined reference to `cap_get_proc' | ||
| 22 | | /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:203: undefined reference to `cap_get_flag' | ||
| 23 | | collect2: ld returned 1 exit status | ||
| 24 | |||
| 25 | --- omgps.orig/src/network.c 2009-10-28 18:51:16.000000000 +0100 | ||
| 26 | +++ omgps/src/network.c 2011-05-09 09:59:11.637676772 +0200 | ||
| 27 | @@ -19,16 +19,16 @@ | ||
| 28 | #include <assert.h> | ||
| 29 | #include <glib.h> | ||
| 30 | |||
| 31 | -#if (HAVE_SYS_CAPABILITY_H) | ||
| 32 | -#undef _POSIX_SOURCE | ||
| 33 | -#include <sys/capability.h> | ||
| 34 | -#endif | ||
| 35 | - | ||
| 36 | #include "config.h" | ||
| 37 | #include "util.h" | ||
| 38 | #include "network.h" | ||
| 39 | #include "customized.h" | ||
| 40 | |||
| 41 | +#if (HAVE_SYS_CAPABILITY_H) | ||
| 42 | +#undef _POSIX_SOURCE | ||
| 43 | +#include <sys/capability.h> | ||
| 44 | +#endif | ||
| 45 | + | ||
| 46 | /** | ||
| 47 | * Ping: reference <Unix network programming>, volume 1, third edition. | ||
| 48 | */ | ||
| 49 | --- omgps.orig/Makefile.am 2009-10-28 18:51:17.000000000 +0100 | ||
| 50 | +++ omgps/Makefile.am 2011-05-09 10:04:58.578676679 +0200 | ||
| 51 | @@ -33,7 +33,7 @@ | ||
| 52 | |||
| 53 | omgps_CFLAGS = $(common_CFLAGS) -O2 | ||
| 54 | omgps_LDFLAGS = | ||
| 55 | -omgps_LDADD = @DEPENDENCIES_LIBS@ -lpython$(PY_VERSION) | ||
| 56 | +omgps_LDADD = @DEPENDENCIES_LIBS@ -lcap -lpython$(PY_VERSION) | ||
| 57 | |||
| 58 | omgps_SOURCES = \ | ||
| 59 | src/ctx_agps_online.c \ | ||
diff --git a/meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch b/meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch new file mode 100644 index 0000000000..3eae960424 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | diff -uNr omgps.orig/src/include/map_repo.h omgps/src/include/map_repo.h | ||
| 2 | --- omgps.orig/src/include/map_repo.h 2009-07-20 19:54:08.000000000 +0200 | ||
| 3 | +++ omgps/src/include/map_repo.h 2010-01-17 14:55:24.000000000 +0100 | ||
| 4 | @@ -3,6 +3,9 @@ | ||
| 5 | |||
| 6 | #include <glib.h> | ||
| 7 | #include <gdk/gdk.h> | ||
| 8 | +// workaround Python.h unconditionally (re)defines _XOPEN_SOURCE and _POSIX_C_SOURCE | ||
| 9 | +#undef _XOPEN_SOURCE | ||
| 10 | +#undef _POSIX_C_SOURCE | ||
| 11 | #include <Python.h> | ||
| 12 | |||
| 13 | #define MAP_MAX_BG_COLORS 5 | ||
| 14 | diff -uNr omgps.orig/src/include/py_ext.h omgps/src/include/py_ext.h | ||
| 15 | --- omgps.orig/src/include/py_ext.h 2009-07-20 19:54:08.000000000 +0200 | ||
| 16 | +++ omgps/src/include/py_ext.h 2010-01-17 14:55:57.000000000 +0100 | ||
| 17 | @@ -4,8 +4,8 @@ | ||
| 18 | void py_ext_init(); | ||
| 19 | void py_ext_cleanup(); | ||
| 20 | |||
| 21 | -void inline py_ext_trylock(); | ||
| 22 | -void inline py_ext_lock(); | ||
| 23 | -void inline py_ext_unlock(); | ||
| 24 | +void py_ext_trylock(); | ||
| 25 | +void py_ext_lock(); | ||
| 26 | +void py_ext_unlock(); | ||
| 27 | |||
| 28 | #endif /* PY_EXT_H_ */ | ||
| 29 | diff -uNr omgps.orig/src/include/uart.h omgps/src/include/uart.h | ||
| 30 | --- omgps.orig/src/include/uart.h 2009-07-20 19:54:08.000000000 +0200 | ||
| 31 | +++ omgps/src/include/uart.h 2010-01-17 14:33:00.000000000 +0100 | ||
| 32 | @@ -12,9 +12,9 @@ | ||
| 33 | extern void uart_cleanup(); | ||
| 34 | extern void uart_close(); | ||
| 35 | |||
| 36 | -extern inline int read_with_timeout(U1 *buf, int len); | ||
| 37 | -extern inline int write_with_timeout(U1 *buf, int len); | ||
| 38 | -extern inline gboolean read_fixed_len(U1 *buf, int expected_len); | ||
| 39 | +extern int read_with_timeout(U1 *buf, int len); | ||
| 40 | +extern int write_with_timeout(U1 *buf, int len); | ||
| 41 | +extern gboolean read_fixed_len(U1 *buf, int expected_len); | ||
| 42 | |||
| 43 | extern int sysfs_get_gps_device_power(); | ||
| 44 | extern gboolean gps_device_power_on(); | ||
| 45 | diff -uNr omgps.orig/src/py_ext.c omgps/src/py_ext.c | ||
| 46 | --- omgps.orig/src/py_ext.c 2009-07-20 19:54:08.000000000 +0200 | ||
| 47 | +++ omgps/src/py_ext.c 2010-01-17 14:56:46.000000000 +0100 | ||
| 48 | @@ -26,17 +26,17 @@ | ||
| 49 | Py_Finalize(); | ||
| 50 | } | ||
| 51 | |||
| 52 | -void inline py_ext_trylock() | ||
| 53 | +void py_ext_trylock() | ||
| 54 | { | ||
| 55 | TRYLOCK_MUTEX(&lock); | ||
| 56 | } | ||
| 57 | |||
| 58 | -void inline py_ext_lock() | ||
| 59 | +void py_ext_lock() | ||
| 60 | { | ||
| 61 | LOCK_MUTEX(&lock); | ||
| 62 | } | ||
| 63 | |||
| 64 | -void inline py_ext_unlock() | ||
| 65 | +void py_ext_unlock() | ||
| 66 | { | ||
| 67 | UNLOCK_MUTEX(&lock); | ||
| 68 | } | ||
diff --git a/meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch b/meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch new file mode 100644 index 0000000000..d18a2fdb40 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | diff -uNr omgps.orig//src/uart.c omgps/src/uart.c | ||
| 2 | --- omgps.orig//src/uart.c 2010-08-22 23:34:09.000000000 +0200 | ||
| 3 | +++ omgps/src/uart.c 2010-08-22 23:33:54.000000000 +0200 | ||
| 4 | @@ -30,6 +30,7 @@ | ||
| 5 | * NOTE: these file paths are subject to change according to kernel and distribution. | ||
| 6 | */ | ||
| 7 | static const char *sysfs_gps_power[] = { | ||
| 8 | + "/sys/bus/platform/devices/gta02-pm-gps.0/power_on", | ||
| 9 | "/sys/bus/platform/devices/neo1973-pm-gps.0/power_on", | ||
| 10 | "/sys/bus/platform/devices/neo1973-pm-gps.0/pwron" | ||
| 11 | }; | ||
diff --git a/meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch b/meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch new file mode 100644 index 0000000000..73d6dbab61 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | --- a/src/settings.c 2011-12-12 13:21:30.573400795 +0100 | ||
| 2 | +++ b/src/settings.c 2011-12-12 14:11:05.269606119 +0100 | ||
| 3 | @@ -278,6 +278,9 @@ | ||
| 4 | } | ||
| 5 | |||
| 6 | ret = check_settings(errbuf, ERRBUF_LEN); | ||
| 7 | + if (ret == FALSE) { | ||
| 8 | + snprintf(errbuf, ERRBUF_LEN, "Something wrong while loading settings file"); | ||
| 9 | + } | ||
| 10 | |||
| 11 | if (fd > 0) | ||
| 12 | close(fd); | ||
diff --git a/meta-oe/recipes-navigation/omgps/omgps_svn.bb b/meta-oe/recipes-navigation/omgps/omgps_svn.bb new file mode 100644 index 0000000000..59fd9b0ad9 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps_svn.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | DESCRIPTION = "GPS application for openmoko freerunner" | ||
| 2 | HOMEPAGE = "http://omgps.googlecode.com" | ||
| 3 | SECTION = "openmoko/applications" | ||
| 4 | LICENSE = "GPLv2" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 6 | DEPENDS = "gtk+ python-pygobject dbus-glib" | ||
| 7 | SRCREV = "109" | ||
| 8 | PV = "0.1+svnr${SRCPV}" | ||
| 9 | S = "${WORKDIR}/${PN}" | ||
| 10 | |||
| 11 | do_configure_prepend() { | ||
| 12 | sed -i "s#PY_VERSION = 2.6#PY_VERSION = ${PYTHON_BASEVERSION}#g" ${S}/Makefile.am | ||
| 13 | sed -i "s#PY_INC_DIR = \$(OPIEDIR)#PY_INC_DIR = ${STAGING_DIR_HOST}#g" ${S}/Makefile.am | ||
| 14 | } | ||
| 15 | |||
| 16 | SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;protocol=http \ | ||
| 17 | file://gcc-4.4.patch \ | ||
| 18 | file://sysfs.node.2.6.32.patch \ | ||
| 19 | file://fix.capability.patch \ | ||
| 20 | file://use.unused.variable.patch \ | ||
| 21 | " | ||
| 22 | |||
| 23 | inherit autotools | ||
