From 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 8 Oct 2015 22:51:41 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- ...g_type_init-is-deprecated-for-glib-2.35.0.patch | 33 ++++++ .../omgps/omgps/fix.build.with.glib.2.34.patch | 125 +++++++++++++++++++++ .../omgps/omgps/fix.capability.patch | 62 ++++++++++ .../recipes-navigation/omgps/omgps/gcc-4.4.patch | 71 ++++++++++++ .../omgps/omgps/gdk-pixbuf-2.26.5.patch | 15 +++ .../omgps/omgps/sysfs.node.2.6.32.patch | 14 +++ .../omgps/omgps/use.unused.variable.patch | 15 +++ meta-oe/recipes-navigation/omgps/omgps_svn.bb | 29 +++++ 8 files changed, 364 insertions(+) create mode 100644 meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/fix.build.with.glib.2.34.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/fix.capability.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/gdk-pixbuf-2.26.5.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch create mode 100644 meta-oe/recipes-navigation/omgps/omgps_svn.bb (limited to 'meta-oe/recipes-navigation/omgps') diff --git a/meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch b/meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch new file mode 100644 index 000000000..6b9f465a2 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/0001-g_type_init-is-deprecated-for-glib-2.35.0.patch @@ -0,0 +1,33 @@ +From 22bcf06637d64e40af6c152e28b31eef41e3f583 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 13 Jun 2013 02:35:22 -0700 +Subject: [PATCH] g_type_init() is deprecated for glib >= 2.35.0 + +Call it for old versions. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + src/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index e984da4..a63ddf3 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -486,9 +486,9 @@ int main(int argc, char **argv) + if (strcmp(argv[1], "-log2file") == 0) + log2console = FALSE; + } +- ++#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init(); +- ++#endif + gdk_threads_init(); + + gdk_threads_enter(); +-- +1.7.9.5 + diff --git a/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.glib.2.34.patch b/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.glib.2.34.patch new file mode 100644 index 000000000..ec3bde0cd --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.glib.2.34.patch @@ -0,0 +1,125 @@ +Upstream-Status: Submitted +https://code.google.com/p/omgps/issues/detail?id=15 + +diff -uNr omgps.orig/src/dbus_intf.c omgps/src/dbus_intf.c +--- omgps.orig/src/dbus_intf.c 2011-12-12 12:22:47.000000000 +0100 ++++ omgps/src/dbus_intf.c 2012-11-14 14:44:45.435381443 +0100 +@@ -171,7 +171,7 @@ + gpsdata->svinfo_valid = TRUE; + + int i, j; +- GValueArray *val; ++ GArray *val; + svinfo_channel_t *sv; + + j = 0; +@@ -179,16 +179,16 @@ + val = satellites->pdata[i]; + + sv = &gpsdata->sv_channels[j]; +- sv->sv_id = g_value_get_uint(g_value_array_get_nth(val, 0)); ++ sv->sv_id = g_array_index(val, guint, 0); + +- if (g_value_get_boolean(g_value_array_get_nth(val, 1))) { ++ if (g_array_index(val, gboolean, 1)) { + ++gpsdata->sv_in_use; + sv->flags = 0x01; + } + +- sv->elevation = (int)g_value_get_uint(g_value_array_get_nth(val, 2)); +- sv->azimuth = (int)g_value_get_uint(g_value_array_get_nth(val, 3)); +- sv->cno = g_value_get_uint(g_value_array_get_nth(val, 4)); ++ sv->elevation = (int)g_array_index(val, guint, 2); ++ sv->azimuth = (int)g_array_index(val, guint, 3); ++ sv->cno = g_array_index(val, guint, 4); + if (sv->cno > 0) + ++gpsdata->sv_get_signal; + +diff -uNr omgps.orig/src/main.c omgps/src/main.c +--- omgps.orig/src/main.c 2011-12-12 12:22:47.000000000 +0100 ++++ omgps/src/main.c 2012-11-14 14:46:00.345402222 +0100 +@@ -489,9 +489,6 @@ + + g_type_init(); + +- if (! g_thread_supported ()) +- g_thread_init(NULL); +- + gdk_threads_init(); + + gdk_threads_enter(); +diff -uNr omgps.orig/src/tab_gpscfg.c omgps/src/tab_gpscfg.c +--- omgps.orig/src/tab_gpscfg.c 2011-12-12 12:22:47.000000000 +0100 ++++ omgps/src/tab_gpscfg.c 2012-11-14 15:23:47.526925258 +0100 +@@ -222,7 +222,7 @@ + + static gboolean change_platform_model_cmd(void *model_id) + { +- U1 model = (U1)(int) model_id; ++ U1 model = (U1)GPOINTER_TO_INT(model_id); + int gps_dev_fd = 0; + + /* non ubx means: we need open serial port +@@ -269,7 +269,7 @@ + static void change_platmodel_button_clicked(GtkWidget *widget, gpointer data) + { + int idx = gtk_combo_box_get_active(GTK_COMBO_BOX(platmodel_list)); +- char *model_id = (void *)(int)platmodel_values[idx]; ++ void *model_id = (void *)GINT_TO_POINTER(platmodel_values[idx]); + + if (POLL_ENGINE_TEST(UBX)) { + gtk_widget_set_sensitive(change_platmodel_button, FALSE); +diff -uNr omgps.orig/src/tab_menu.c omgps/src/tab_menu.c +--- omgps.orig/src/tab_menu.c 2011-12-12 12:22:47.000000000 +0100 ++++ omgps/src/tab_menu.c 2012-11-14 15:25:08.217941513 +0100 +@@ -65,7 +65,7 @@ + + static void poll_button_clicked(GtkWidget *widget, gpointer data) + { +- gboolean is_start_bt = (gboolean)data; ++ gboolean is_start_bt = (gboolean) GPOINTER_TO_INT(data); + + if (POLL_STATE_TEST(RUNNING) == is_start_bt) + return; +diff -uNr omgps.orig/src/tab_tile.c omgps/src/tab_tile.c +--- omgps.orig/src/tab_tile.c 2011-12-12 12:22:47.000000000 +0100 ++++ omgps/src/tab_tile.c 2012-11-14 15:25:30.392945800 +0100 +@@ -101,7 +101,7 @@ + static gboolean set_bg_map(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) + { + map_repo_t *repo; +- gboolean clear = (gboolean)data; ++ gboolean clear = (gboolean)GPOINTER_TO_INT(data); + + int type; + +@@ -240,7 +240,7 @@ + + static void alpha_radio_toggled (GtkWidget *widget, gpointer user_data) + { +- int idx = (int)user_data; ++ int idx = (int)GPOINTER_TO_INT(user_data); + + if (g_view.bg_alpha_idx == idx) + return; +@@ -384,7 +384,7 @@ + + for (i=0; i + #include + +-#if (HAVE_SYS_CAPABILITY_H) +-#undef _POSIX_SOURCE +-#include +-#endif +- + #include "config.h" + #include "util.h" + #include "network.h" + #include "customized.h" + ++#if (HAVE_SYS_CAPABILITY_H) ++#undef _POSIX_SOURCE ++#include ++#endif ++ + /** + * Ping: reference , 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 000000000..41f6471d4 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/gcc-4.4.patch @@ -0,0 +1,71 @@ +Upstream-Status: Submitted +https://code.google.com/p/omgps/issues/detail?id=15 + +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 + #include ++// workaround Python.h unconditionally (re)defines _XOPEN_SOURCE and _POSIX_C_SOURCE ++#undef _XOPEN_SOURCE ++#undef _POSIX_C_SOURCE + #include + + #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/gdk-pixbuf-2.26.5.patch b/meta-oe/recipes-navigation/omgps/omgps/gdk-pixbuf-2.26.5.patch new file mode 100644 index 000000000..688080573 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/gdk-pixbuf-2.26.5.patch @@ -0,0 +1,15 @@ +Upstream-Status: Submitted +https://code.google.com/p/omgps/issues/detail?id=15 + +diff -uNr omgps/src/tab_scratch.c omgps.new/src/tab_scratch.c +--- omgps/src/tab_scratch.c 2012-12-22 18:13:25.994788128 +0100 ++++ omgps.new/src/tab_scratch.c 2012-12-22 18:12:45.876790644 +0100 +@@ -51,7 +51,7 @@ + } + + gboolean ret = gdk_pixbuf_save (pixbuf, buf, SCREENSHOT_FILE_TYPE, &err, "tEXt::Software", "omgps", NULL); +- gdk_pixbuf_unref(pixbuf); ++ g_object_unref(pixbuf); + + if (ret) { + char buf1[128]; 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 000000000..290c5e6a7 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/sysfs.node.2.6.32.patch @@ -0,0 +1,14 @@ +Upstream-Status: Submitted +https://code.google.com/p/omgps/issues/detail?id=15 + +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 000000000..3ccb14ea9 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps/use.unused.variable.patch @@ -0,0 +1,15 @@ +Upstream-Status: Submitted +https://code.google.com/p/omgps/issues/detail?id=15 + +--- 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 000000000..aabdd43f1 --- /dev/null +++ b/meta-oe/recipes-navigation/omgps/omgps_svn.bb @@ -0,0 +1,29 @@ +SUMMARY = "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 libcap" +SRCREV = "109" +PV = "0.1+svnr${SRCPV}" +PR = "r2" +S = "${WORKDIR}/${PN}" + +PNBLACKLIST[omgps] ?= "BROKEN: sound.c:61:35: error: 'saveptr' may be used uninitialized in this function [-Werror=maybe-uninitialized]" + +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 \ + file://fix.build.with.glib.2.34.patch \ + file://gdk-pixbuf-2.26.5.patch \ + file://0001-g_type_init-is-deprecated-for-glib-2.35.0.patch \ +" + +inherit autotools pkgconfig -- cgit v1.2.3-54-g00ecf