diff options
author | Sylvain Paré <sylvain.pare@gmail.com> | 2010-12-15 21:28:06 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-12-16 09:54:45 +0100 |
commit | e0235ba322b4f70e8819d57fbd42c612f50a9304 (patch) | |
tree | 389bb72d90531a19c4a2729bf5a8f16e9a6a8ce6 /recipes/gwaterpas | |
parent | e01fb362ee45c27d84db5e494ac0350e4d4f88ee (diff) | |
download | openembedded-e0235ba322b4f70e8819d57fbd42c612f50a9304.tar.gz |
gwaterpas: first recipe for this app in its 0.3 version
* see http://wiki.openmoko.org/wiki/Gwaterpas
* thanks to playya for his help!
Signed-off-by: Sylvain Paré <sylvain.pare@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/gwaterpas')
-rw-r--r-- | recipes/gwaterpas/gwaterpas-0.3/desktop_fix.patch | 16 | ||||
-rw-r--r-- | recipes/gwaterpas/gwaterpas-0.3/remove_buildflags.patch | 53 | ||||
-rw-r--r-- | recipes/gwaterpas/gwaterpas-0.3/sensors_fix.patch | 22 | ||||
-rwxr-xr-x | recipes/gwaterpas/gwaterpas_0.3.bb | 25 |
4 files changed, 116 insertions, 0 deletions
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 0000000000..413feacda9 --- /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 0000000000..a4438e5870 --- /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 0000000000..93b68ae906 --- /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 0000000000..fac81fc8e1 --- /dev/null +++ b/recipes/gwaterpas/gwaterpas_0.3.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Gwaterpas" +AUTHOR = "Kurt Van Dijck" +SECTION = "Utility" +PRIORITY = "optional" +HOMEPAGE = "http://wiki.openmoko.org/wiki/Gwaterpas" +LICENSE = "GPL" +DEPENDS = "fltk" + +SRC_URI = "http://www.ecirc.net/openmoko/${P}.tgz \ + file://sensors_fix.patch;apply=yes \ + file://remove_buildflags.patch;apply=yes \ + file://desktop_fix.patch;apply=yes \ +" + +SRC_URI[md5sum] = "b3be847e3f89dbbcdca3e0184686bcef" +SRC_URI[sha256sum] = "23d56f10089722a33cde507cd398c82871dd14b80be1bc3f4cd2daee2cfcf641" + +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 +} |