From 2fba7222716ba4e9782ebc6e5077f99669bf69b3 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 30 Jul 2012 23:50:12 +0200 Subject: mcnavi, monav, omgps, orrery: import from meta-smartphone Signed-off-by: Martin Jansa --- meta-oe/recipes-navigation/mcnavi/mcnavi_0.3.3.bb | 18 ++++++ .../recipes-navigation/monav/monav/monav.desktop | 10 +++ meta-oe/recipes-navigation/monav/monav/monav.png | Bin 0 -> 21543 bytes meta-oe/recipes-navigation/monav/monav_0.3.bb | 37 +++++++++++ .../omgps/omgps/fix.capability.patch | 59 ++++++++++++++++++ .../recipes-navigation/omgps/omgps/gcc-4.4.patch | 68 +++++++++++++++++++++ .../omgps/omgps/sysfs.node.2.6.32.patch | 11 ++++ .../omgps/omgps/use.unused.variable.patch | 12 ++++ meta-oe/recipes-navigation/omgps/omgps_svn.bb | 23 +++++++ .../recipes-navigation/orrery/orrery/orrery.png | Bin 0 -> 19475 bytes .../orrery/orrery/use.GdkPixbuf.patch | 59 ++++++++++++++++++ meta-oe/recipes-navigation/orrery/orrery_2.7.bb | 30 +++++++++ 12 files changed, 327 insertions(+) create mode 100644 meta-oe/recipes-navigation/mcnavi/mcnavi_0.3.3.bb create mode 100644 meta-oe/recipes-navigation/monav/monav/monav.desktop create mode 100644 meta-oe/recipes-navigation/monav/monav/monav.png create mode 100644 meta-oe/recipes-navigation/monav/monav_0.3.bb 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/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 create mode 100644 meta-oe/recipes-navigation/orrery/orrery/orrery.png create mode 100644 meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch create mode 100644 meta-oe/recipes-navigation/orrery/orrery_2.7.bb diff --git a/meta-oe/recipes-navigation/mcnavi/mcnavi_0.3.3.bb b/meta-oe/recipes-navigation/mcnavi/mcnavi_0.3.3.bb new file mode 100644 index 0000000000..9c7f3f2a0e --- /dev/null +++ b/meta-oe/recipes-navigation/mcnavi/mcnavi_0.3.3.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Free GPS navigation for car and outdoor with OpenStreetMap maps" +HOMEPAGE = "http://www.gps-routes.info/index.php?name=Content&pa=showpage&pid=1" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a" +DEPENDS = "ecore evas imlib2 gpsd edje-native mysql5" + +SRC_URI = "http://www.gps-routes.info/debian/pool/main/m/mcnavi/mcnavi_${PV}.tar.gz" +SRC_URI[md5sum] = "acc07debcdb3ef448b95e6a6cfcf53d8" +SRC_URI[sha256sum] = "d3ce1f5901f13985d877b2b6ad06b64094ba43a4e13cbfe06c7cb2f1abdda309" + +S = "${WORKDIR}/${PN}" + +do_configure_prepend() { + # for some reason our mysql_config returns just sysroot/include_dir while mysql.h is in include_dir/mysql + sed -i 's#`mysql_config --include`#`mysql_config --include`/mysql#g' ${S}/configure.ac +} + +inherit autotools diff --git a/meta-oe/recipes-navigation/monav/monav/monav.desktop b/meta-oe/recipes-navigation/monav/monav/monav.desktop new file mode 100644 index 0000000000..5e861136f0 --- /dev/null +++ b/meta-oe/recipes-navigation/monav/monav/monav.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=MoNav +Exec=monav +Icon=monav +Terminal=false +Type=Application +Categories=Utility;Geography; +X-MB-SingleInstance=true +StartupNotify=true +Comment=Fast navigation system featuring exact routing. diff --git a/meta-oe/recipes-navigation/monav/monav/monav.png b/meta-oe/recipes-navigation/monav/monav/monav.png new file mode 100644 index 0000000000..75b5a79623 Binary files /dev/null and b/meta-oe/recipes-navigation/monav/monav/monav.png differ diff --git a/meta-oe/recipes-navigation/monav/monav_0.3.bb b/meta-oe/recipes-navigation/monav/monav_0.3.bb new file mode 100644 index 0000000000..982d682721 --- /dev/null +++ b/meta-oe/recipes-navigation/monav/monav_0.3.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "MoNav is a fast navigation system featuring exact routing with OpenStreetMap data." +HOMEPAGE = "http://code.google.com/p/monav" +SECTION = "x11/applications" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://misc/license_template_christian;md5=d99c9b3bafdde80adee296762376348d" + +DEPENDS = "qt-mobility-x11" +PR = "r1" + +SRC_URI = "http://monav.googlecode.com/files/${BPN}-${PV}.tar.gz \ + file://monav.png \ + file://monav.desktop" + +SRC_URI[md5sum] = "d048ccef8c6a21e8656aa4af3fcb8329" +SRC_URI[sha256sum] = "5a3bf9e9f7368b81ba8e2f755960082fc42a2e2c78f9de645f99ba293c77ee7f" + +inherit qmake2 qt4x11 + +EXTRA_QMAKEVARS_PRE="CONFIG+="release"" +QMAKE_PROFILES="monavclient.pro" + +do_install_append() { + install -d ${D}${datadir}/monav + install -d ${D}${datadir}/monav/images + cp -a ${S}/images/* ${D}${datadir}/monav/images + + install -d ${D}${datadir}/icons + install -m 0644 ${WORKDIR}/monav.png ${D}${datadir}/icons + + install -d ${D}${bindir} + install -m 0755 ${S}/bin/monav ${D}${bindir}/monav + + install -d ${D}/${datadir}/applications + install -m 0644 ${WORKDIR}/monav.desktop ${D}/${datadir}/applications +} + +FILES_${PN} += "${bindir}/monav ${datadir}/icons/monav.png" 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 + #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 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 + #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/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 diff --git a/meta-oe/recipes-navigation/orrery/orrery/orrery.png b/meta-oe/recipes-navigation/orrery/orrery/orrery.png new file mode 100644 index 0000000000..d9865b70ce Binary files /dev/null and b/meta-oe/recipes-navigation/orrery/orrery/orrery.png differ diff --git a/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch b/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch new file mode 100644 index 0000000000..92d194de08 --- /dev/null +++ b/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch @@ -0,0 +1,59 @@ +From: Benjamin Deering +Subject: orrery crashing X +Date: Thursday, September 2, 2010 - 5:25 pm +Link: http://kerneltrap.org/mailarchive/openmoko-community/2010/9/3/13218 + +diff -uNr orrery.orig//orrery.c orrery/orrery.c +--- orrery.orig//orrery.c 2009-11-30 06:59:44.000000000 +0100 ++++ orrery/orrery.c 2010-11-15 22:33:17.000000000 +0100 +@@ -1238,12 +1238,44 @@ + } + currentEntry = currentEntry->forwardPointer; + } +- if (nDarkGreyPoints > 0) +- gdk_draw_points(pixmap, darkGreyGC, darkGreyPoints, nDarkGreyPoints); +- if (nGreyPoints > 0) +- gdk_draw_points(pixmap, greyGC, greyPoints, nGreyPoints); +- if (nWhitePoints > 0) +- gdk_draw_points(pixmap, whiteGC, whitePoints, nWhitePoints); ++ GdkPixbuf* starDrawingBuf = gdk_pixbuf_get_from_drawable( NULL, ++ pixmap, ++ gdk_colormap_get_system() ++ , 0, 0, 0, 0, displayWidth, displayHeight); ++ g_assert (gdk_pixbuf_get_bits_per_sample (starDrawingBuf) == 8); ++ guchar* p; ++ int rowstride = gdk_pixbuf_get_rowstride (starDrawingBuf); ++ guchar* pixels = gdk_pixbuf_get_pixels (starDrawingBuf); ++ int n_channels = gdk_pixbuf_get_n_channels (starDrawingBuf); ++ GdkGCValues starGCval; ++ GdkColor starColor; ++ int pointNum; ++ gdk_gc_get_values(darkGreyGC, &starGCval); ++ gdk_colormap_query_color( gdk_gc_get_colormap(darkGreyGC),starGCval.foreground.pixel, &starColor ); ++ for( pointNum = 0; pointNum < nDarkGreyPoints; pointNum++) { ++ p = pixels + darkGreyPoints[pointNum].y * rowstride + darkGreyPoints[pointNum].x * n_channels; ++ p[0] = starColor.red & 0xff; ++ p[1] = starColor.green & 0xff; ++ p[2] = starColor.blue & 0xff; ++ } ++ gdk_gc_get_values(greyGC, &starGCval); ++ gdk_colormap_query_color( gdk_gc_get_colormap(greyGC), starGCval.foreground.pixel, &starColor ); ++ for( pointNum = 0; pointNum < nGreyPoints; pointNum++) { ++ p = pixels + greyPoints[pointNum].y * rowstride + greyPoints[pointNum].x * n_channels; ++ p[0] = starColor.red & 0xff; ++ p[1] = starColor.green & 0xff; ++ p[2] = starColor.blue & 0xff; ++ } ++ gdk_gc_get_values(whiteGC, &starGCval); ++ gdk_colormap_query_color( gdk_gc_get_colormap(whiteGC), starGCval.foreground.pixel, &starColor ); ++ for( pointNum = 0; pointNum < nWhitePoints; pointNum++) { ++ p = pixels + whitePoints[pointNum].y * rowstride + whitePoints[pointNum].x * n_channels; ++ p[0] = starColor.red & 0xff; ++ p[1] = starColor.green & 0xff; ++ p[2] = starColor.blue & 0xff; ++ } ++ gdk_draw_pixbuf ( pixmap , NULL , starDrawingBuf, ++ 0, 0, 0, 0, displayWidth, displayHeight, GDK_RGB_DITHER_NORMAL, 0, 0 ) ; + } + + void makeTimeString(char *string) diff --git a/meta-oe/recipes-navigation/orrery/orrery_2.7.bb b/meta-oe/recipes-navigation/orrery/orrery_2.7.bb new file mode 100644 index 0000000000..1e41f5bbd5 --- /dev/null +++ b/meta-oe/recipes-navigation/orrery/orrery_2.7.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Astronomical application which displays the night sky" +HOMEPAGE = "http://projects.openmoko.org/projects/orrery/" +SECTION = "x11/scientific" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://orrery.c;endline=25;md5=d792bdf2b591972da175aecc38d88cfe" + +inherit autotools + +SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.tar.gz \ + file://orrery.png \ + file://use.GdkPixbuf.patch \ +" + +SRC_URI[md5sum] = "bd62a33e7554ee1030313dfcdefcda8b" +SRC_URI[sha256sum] = "645166a5e05b2064ab630534a514697fc47b681951e7fe1d635c259cbdf7a5e6" + +S = "${WORKDIR}/${PN}" + +do_configure_prepend() { + # fix DSO issue with binutils-2.22 + sed -i 's/ -lrt/ -lrt -lm/g' ${S}/Makefile.am +} +do_install_append() { + install -d ${D}${datadir}/orrery + cp -a ${S}/data/* ${D}${datadir}/orrery + install -d ${D}${datadir}/icons + install -m 0755 ${WORKDIR}/orrery.png ${D}${datadir}/icons +} + +FILES_${PN} += "${datadir}/icons/orrery.png" -- cgit 1.2.3-korg