Hi attached my git patch for this recipe. hoping it is good.. gn8 Sylvain
From 292b923a589afc41e8d333cc88b721b2ee7bea0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Par=C3=A9?= <[email protected]> Date: Wed, 15 Dec 2010 21:09:09 +0100 Subject: [PATCH] gwaterpas: first recipe for this app in its 0.3 version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
* see http://wiki.openmoko.org/wiki/Gwaterpas * new file: gwaterpas/gwaterpas-0.3/desktop_fix.patch * new file: gwaterpas/gwaterpas-0.3/remove_buildflags.patch * new file: gwaterpas/gwaterpas-0.3/sensors_fix.patch * new file: gwaterpas/gwaterpas_0.3.bb * thanks to playya for his help! Signed-off-by: Sylvain Paré <[email protected]> --- recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch | 16 ++++++ .../gwaterpas-0.3/remove_buildflags.patch | 53 ++++++++++++++++++++ recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch | 22 ++++++++ recipes/gwaterpas/gwaterpas_0.3.bb | 28 ++++++++++ 4 files changed, 119 insertions(+), 0 deletions(-) create mode 100644 recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch create mode 100644 recipes/gwaterpas/gwaterpas-0.3/remove_buildflags.patch create mode 100644 recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch create mode 100755 recipes/gwaterpas/gwaterpas_0.3.bb diff --git a/recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch b/recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch new file mode 100644 index 0000000..413feac --- /dev/null +++ b/recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch @@ -0,0 +1,16 @@ +--- a/desktop~ 2010-12-15 19:40:04.776645571 +0100 ++++ b/desktop 2010-12-15 19:40:04.796645571 +0100 +@@ -1,11 +1,9 @@ + [Desktop Entry] +-Encoding=UTF-8 + Name=Waterpas + Comment=3D sensor + Exec=gwaterpas + Icon=/usr/share/gwaterpas/icon.png + Terminal=false + Type=Application +-Categories=Utilities;Utility; +-SingleInstance=true +-StartupNotify=true ++Categories=Utility; ++ diff --git a/recipes/gwaterpas/gwaterpas-0.3/remove_buildflags.patch b/recipes/gwaterpas/gwaterpas-0.3/remove_buildflags.patch new file mode 100644 index 0000000..a4438e5 --- /dev/null +++ b/recipes/gwaterpas/gwaterpas-0.3/remove_buildflags.patch @@ -0,0 +1,53 @@ +--- a/Makefile 2009-01-31 17:28:42.000000000 +0100 ++++ b/Makefile 2010-12-15 18:41:59.280095000 +0100 +@@ -1,24 +1,11 @@ +-WITH_SVN=openmoko +- + PROG=gwaterpas + default:$(PROG) + +-CPPFLAGS = +-CFLAGS = -Wall -Os -g3 +-CXXFLAGS = -Wall -Os -g3 -fexceptions +-LDFLAGS = +-CC=gcc +-CXX=g++ +-LD=$(CXX) +- + LDLIBS = -lfltk +-#LDLIBS +=-lXft -lX11 + + include make/include + +-DESTDIR=/usr/local +- +-$(PROG)-dbg : main.o Fl_Level.o ++gwaterpas:Fl_Level.o main.o + + install:default desktop icon.png + @install -D -p $(PROG) $(DESTDIR)/usr/bin/$(PROG) +--- a/make/include 2008-12-07 16:55:24.000000000 +0100 ++++ b/make/include 2010-12-15 18:39:03.700095000 +0100 +@@ -103,20 +103,7 @@ + % : %.cc + % : %.o + +-ifdef WITH_SVN +-SVNVERSION := $(shell svnversion .) +-#SVNPATH := $(shell echo $(WITH_SVN) | sed -e "s/^[^\/]*\///g") +-SVNPATH := $(shell svn info | grep URL | sed -e "s/^.*\/$(WITH_SVN)\/\(.*\)/\1/g") +-%.ov : +- @echo " SVN $* $(SVNVERSION), $(SVNPATH)" +- @echo "const char * argp_program_version = \"$* r$(SVNVERSION), $(SVNPATH)\";" \ +- |$(CROSS)$(CC) -x c - -c -o $@ $(CPPFLAGS) $(CFLAGS) +-%-dbg : %.ov +- @echo " LD " $* $(LDLIBS) $(LDLIBS_$*) +- @$(CROSS)$(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_$*) +-else +-%-dbg : ++% : + @echo " LD " $* $(LDLIBS) $(LDLIBS_$*) +- @$(CROSS)$(LD) -o $@ $(LDFLAGS) $^ $(LDLIBS) +-endif ++ @$(CROSS)$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) + diff --git a/recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch b/recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch new file mode 100644 index 0000000..93b68ae --- /dev/null +++ b/recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch @@ -0,0 +1,22 @@ +--- a/main.cc~ 2010-12-15 15:10:04.196645570 +0100 ++++ b/main.cc 2010-12-15 15:10:04.216645570 +0100 +@@ -41,8 +41,8 @@ + + #include "Fl_Level.H" + +-static const char dev0 [] = "/dev/input/event2"; +-static const char dev1 [] = "/dev/input/event3"; ++static const char dev0 [] = "/dev/input/event3"; ++static const char dev1 [] = "/dev/input/event4"; + + struct _3d { + double x, y, z; +@@ -252,7 +252,7 @@ + switch (lp->type) { + case EV_SYN: + break; +- case EV_REL: ++ case EV_ABS: + switch (lp->code) { + case REL_X: + s->raw.x = lp->value /-1e3; diff --git a/recipes/gwaterpas/gwaterpas_0.3.bb b/recipes/gwaterpas/gwaterpas_0.3.bb new file mode 100755 index 0000000..5bab04e --- /dev/null +++ b/recipes/gwaterpas/gwaterpas_0.3.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Gwaterpas" +AUTHOR = "Kurt Van Dijck" +SECTION = "Utility" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.openmoko.org/wiki/Gwaterpas" +LICENSE = "GPL" +DEPENDS = "fltk" + +PR = "r0" + +SRC_URI = "http://www.ecirc.net/openmoko/gwaterpas-${PV}.tgz \ + file://sensors_fix.patch;apply=yes \ + file://remove_buildflags.patch;apply=yes \ + file://desktop_fix.patch;apply=yes \ +" + +SRC_URI[md5sum] = "b3be847e3f89dbbcdca3e0184686bcef" + +#EXTRA_OEMAKE="LD=\"$CC\"" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/gwaterpas ${D}${bindir} + install -d ${D}/${datadir}/applications + install -m 0644 ${S}/desktop ${D}/${datadir}/applications/gwaterpas.desktop + install -d ${D}/${datadir}/gwaterpas + install -m 0644 ${S}/icon.png ${D}/${datadir}/gwaterpas/icon.png +} -- 1.7.1
_______________________________________________ Shr-devel mailing list [email protected] http://lists.shr-project.org/mailman/listinfo/shr-devel
