aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/omgps
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-07-30 23:50:12 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-07-31 00:14:55 +0200
commit2fba7222716ba4e9782ebc6e5077f99669bf69b3 (patch)
tree98e219ede466bc142955b090e5744724823d9bee /meta-oe/recipes-navigation/omgps
parent15b9efea5d229a3a2b108b9eac253417f09687ff (diff)
downloadmeta-openembedded-contrib-2fba7222716ba4e9782ebc6e5077f99669bf69b3.tar.gz
meta-openembedded-contrib-2fba7222716ba4e9782ebc6e5077f99669bf69b3.tar.bz2
meta-openembedded-contrib-2fba7222716ba4e9782ebc6e5077f99669bf69b3.zip
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')
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps/fix.capability.patch59
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch68
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch11
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch12
-rw-r--r--meta-oe/recipes-navigation/omgps/omgps_svn.bb23
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 @@
+we need to include config.h first to know if HAVE_SYS_CAPABILITY_H is enabled or no, otherwise
+sys/capability.h is not included and later used
+| src/network.c: In function 'can_ping':
+| src/network.c:198:2: error: 'cap_flag_value_t' undeclared (first use in this function)
+| src/network.c:198:2: note: each undeclared identifier is reported only once for each function it appears in
+| src/network.c:198:19: error: expected ';' before 'cap'
+| src/network.c:199:2: error: 'cap_t' undeclared (first use in this function)
+| src/network.c:199:8: error: expected ';' before 'caps'
+| src/network.c:200:6: error: 'caps' undeclared (first use in this function)
+| cc1: warnings being treated as errors
+| src/network.c:203:2: error: implicit declaration of function 'cap_get_flag'
+| src/network.c:203:21: error: 'CAP_SYS_NICE' undeclared (first use in this function)
+| src/network.c:203:35: error: 'CAP_EFFECTIVE' undeclared (first use in this function)
+| src/network.c:203:51: error: 'cap' undeclared (first use in this function)
+| src/network.c:204:17: error: 'CAP_CLEAR' undeclared (first use in this function)
+| src/network.c:210:1: error: control reaches end of non-void function
+| make[1]: *** [omgps-network.o] Error 1
+
+and -lcap is needed for 2 functions later (should be added only for HAVE_SYS_CAPABILITY_H enabled, but I don't care enough)
+| omgps-network.o: In function `can_ping':
+| /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:199: undefined reference to `cap_get_proc'
+| /OE/tmpdir-shr/work/armv4t-oe-linux-gnueabi/omgps-0.1+svnr109-r1/omgps/src/network.c:203: undefined reference to `cap_get_flag'
+| collect2: ld returned 1 exit status
+
+--- omgps.orig/src/network.c 2009-10-28 18:51:16.000000000 +0100
++++ omgps/src/network.c 2011-05-09 09:59:11.637676772 +0200
+@@ -19,16 +19,16 @@
+ #include <assert.h>
+ #include <glib.h>
+
+-#if (HAVE_SYS_CAPABILITY_H)
+-#undef _POSIX_SOURCE
+-#include <sys/capability.h>
+-#endif
+-
+ #include "config.h"
+ #include "util.h"
+ #include "network.h"
+ #include "customized.h"
+
++#if (HAVE_SYS_CAPABILITY_H)
++#undef _POSIX_SOURCE
++#include <sys/capability.h>
++#endif
++
+ /**
+ * Ping: reference <Unix network programming>, volume 1, third edition.
+ */
+--- omgps.orig/Makefile.am 2009-10-28 18:51:17.000000000 +0100
++++ omgps/Makefile.am 2011-05-09 10:04:58.578676679 +0200
+@@ -33,7 +33,7 @@
+
+ omgps_CFLAGS = $(common_CFLAGS) -O2
+ omgps_LDFLAGS =
+-omgps_LDADD = @DEPENDENCIES_LIBS@ -lpython$(PY_VERSION)
++omgps_LDADD = @DEPENDENCIES_LIBS@ -lcap -lpython$(PY_VERSION)
+
+ omgps_SOURCES = \
+ 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 @@
+diff -uNr omgps.orig/src/include/map_repo.h omgps/src/include/map_repo.h
+--- omgps.orig/src/include/map_repo.h 2009-07-20 19:54:08.000000000 +0200
++++ omgps/src/include/map_repo.h 2010-01-17 14:55:24.000000000 +0100
+@@ -3,6 +3,9 @@
+
+ #include <glib.h>
+ #include <gdk/gdk.h>
++// workaround Python.h unconditionally (re)defines _XOPEN_SOURCE and _POSIX_C_SOURCE
++#undef _XOPEN_SOURCE
++#undef _POSIX_C_SOURCE
+ #include <Python.h>
+
+ #define MAP_MAX_BG_COLORS 5
+diff -uNr omgps.orig/src/include/py_ext.h omgps/src/include/py_ext.h
+--- omgps.orig/src/include/py_ext.h 2009-07-20 19:54:08.000000000 +0200
++++ omgps/src/include/py_ext.h 2010-01-17 14:55:57.000000000 +0100
+@@ -4,8 +4,8 @@
+ void py_ext_init();
+ void py_ext_cleanup();
+
+-void inline py_ext_trylock();
+-void inline py_ext_lock();
+-void inline py_ext_unlock();
++void py_ext_trylock();
++void py_ext_lock();
++void py_ext_unlock();
+
+ #endif /* PY_EXT_H_ */
+diff -uNr omgps.orig/src/include/uart.h omgps/src/include/uart.h
+--- omgps.orig/src/include/uart.h 2009-07-20 19:54:08.000000000 +0200
++++ omgps/src/include/uart.h 2010-01-17 14:33:00.000000000 +0100
+@@ -12,9 +12,9 @@
+ extern void uart_cleanup();
+ extern void uart_close();
+
+-extern inline int read_with_timeout(U1 *buf, int len);
+-extern inline int write_with_timeout(U1 *buf, int len);
+-extern inline gboolean read_fixed_len(U1 *buf, int expected_len);
++extern int read_with_timeout(U1 *buf, int len);
++extern int write_with_timeout(U1 *buf, int len);
++extern gboolean read_fixed_len(U1 *buf, int expected_len);
+
+ extern int sysfs_get_gps_device_power();
+ extern gboolean gps_device_power_on();
+diff -uNr omgps.orig/src/py_ext.c omgps/src/py_ext.c
+--- omgps.orig/src/py_ext.c 2009-07-20 19:54:08.000000000 +0200
++++ omgps/src/py_ext.c 2010-01-17 14:56:46.000000000 +0100
+@@ -26,17 +26,17 @@
+ Py_Finalize();
+ }
+
+-void inline py_ext_trylock()
++void py_ext_trylock()
+ {
+ TRYLOCK_MUTEX(&lock);
+ }
+
+-void inline py_ext_lock()
++void py_ext_lock()
+ {
+ LOCK_MUTEX(&lock);
+ }
+
+-void inline py_ext_unlock()
++void py_ext_unlock()
+ {
+ UNLOCK_MUTEX(&lock);
+ }
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 @@
+diff -uNr omgps.orig//src/uart.c omgps/src/uart.c
+--- omgps.orig//src/uart.c 2010-08-22 23:34:09.000000000 +0200
++++ omgps/src/uart.c 2010-08-22 23:33:54.000000000 +0200
+@@ -30,6 +30,7 @@
+ * NOTE: these file paths are subject to change according to kernel and distribution.
+ */
+ static const char *sysfs_gps_power[] = {
++ "/sys/bus/platform/devices/gta02-pm-gps.0/power_on",
+ "/sys/bus/platform/devices/neo1973-pm-gps.0/power_on",
+ "/sys/bus/platform/devices/neo1973-pm-gps.0/pwron"
+ };
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 @@
+--- a/src/settings.c 2011-12-12 13:21:30.573400795 +0100
++++ b/src/settings.c 2011-12-12 14:11:05.269606119 +0100
+@@ -278,6 +278,9 @@
+ }
+
+ ret = check_settings(errbuf, ERRBUF_LEN);
++ if (ret == FALSE) {
++ snprintf(errbuf, ERRBUF_LEN, "Something wrong while loading settings file");
++ }
+
+ if (fd > 0)
+ 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 @@
+DESCRIPTION = "GPS application for openmoko freerunner"
+HOMEPAGE = "http://omgps.googlecode.com"
+SECTION = "openmoko/applications"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+DEPENDS = "gtk+ python-pygobject dbus-glib"
+SRCREV = "109"
+PV = "0.1+svnr${SRCPV}"
+S = "${WORKDIR}/${PN}"
+
+do_configure_prepend() {
+ sed -i "s#PY_VERSION = 2.6#PY_VERSION = ${PYTHON_BASEVERSION}#g" ${S}/Makefile.am
+ sed -i "s#PY_INC_DIR = \$(OPIEDIR)#PY_INC_DIR = ${STAGING_DIR_HOST}#g" ${S}/Makefile.am
+}
+
+SRC_URI = "svn://omgps.googlecode.com/svn/trunk;module=omgps;protocol=http \
+ file://gcc-4.4.patch \
+ file://sysfs.node.2.6.32.patch \
+ file://fix.capability.patch \
+ file://use.unused.variable.patch \
+"
+
+inherit autotools