summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/orrery
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/orrery
parent15b9efea5d229a3a2b108b9eac253417f09687ff (diff)
downloadmeta-openembedded-2fba7222716ba4e9782ebc6e5077f99669bf69b3.tar.gz
mcnavi, monav, omgps, orrery: import from meta-smartphone
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation/orrery')
-rw-r--r--meta-oe/recipes-navigation/orrery/orrery/orrery.pngbin0 -> 19475 bytes
-rw-r--r--meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch59
-rw-r--r--meta-oe/recipes-navigation/orrery/orrery_2.7.bb30
3 files changed, 89 insertions, 0 deletions
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 000000000..d9865b70c
--- /dev/null
+++ b/meta-oe/recipes-navigation/orrery/orrery/orrery.png
Binary files 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 000000000..92d194de0
--- /dev/null
+++ b/meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch
@@ -0,0 +1,59 @@
1From: Benjamin Deering
2Subject: orrery crashing X
3Date: Thursday, September 2, 2010 - 5:25 pm
4Link: http://kerneltrap.org/mailarchive/openmoko-community/2010/9/3/13218
5
6diff -uNr orrery.orig//orrery.c orrery/orrery.c
7--- orrery.orig//orrery.c 2009-11-30 06:59:44.000000000 +0100
8+++ orrery/orrery.c 2010-11-15 22:33:17.000000000 +0100
9@@ -1238,12 +1238,44 @@
10 }
11 currentEntry = currentEntry->forwardPointer;
12 }
13- if (nDarkGreyPoints > 0)
14- gdk_draw_points(pixmap, darkGreyGC, darkGreyPoints, nDarkGreyPoints);
15- if (nGreyPoints > 0)
16- gdk_draw_points(pixmap, greyGC, greyPoints, nGreyPoints);
17- if (nWhitePoints > 0)
18- gdk_draw_points(pixmap, whiteGC, whitePoints, nWhitePoints);
19+ GdkPixbuf* starDrawingBuf = gdk_pixbuf_get_from_drawable( NULL,
20+ pixmap,
21+ gdk_colormap_get_system()
22+ , 0, 0, 0, 0, displayWidth, displayHeight);
23+ g_assert (gdk_pixbuf_get_bits_per_sample (starDrawingBuf) == 8);
24+ guchar* p;
25+ int rowstride = gdk_pixbuf_get_rowstride (starDrawingBuf);
26+ guchar* pixels = gdk_pixbuf_get_pixels (starDrawingBuf);
27+ int n_channels = gdk_pixbuf_get_n_channels (starDrawingBuf);
28+ GdkGCValues starGCval;
29+ GdkColor starColor;
30+ int pointNum;
31+ gdk_gc_get_values(darkGreyGC, &starGCval);
32+ gdk_colormap_query_color( gdk_gc_get_colormap(darkGreyGC),starGCval.foreground.pixel, &starColor );
33+ for( pointNum = 0; pointNum < nDarkGreyPoints; pointNum++) {
34+ p = pixels + darkGreyPoints[pointNum].y * rowstride + darkGreyPoints[pointNum].x * n_channels;
35+ p[0] = starColor.red & 0xff;
36+ p[1] = starColor.green & 0xff;
37+ p[2] = starColor.blue & 0xff;
38+ }
39+ gdk_gc_get_values(greyGC, &starGCval);
40+ gdk_colormap_query_color( gdk_gc_get_colormap(greyGC), starGCval.foreground.pixel, &starColor );
41+ for( pointNum = 0; pointNum < nGreyPoints; pointNum++) {
42+ p = pixels + greyPoints[pointNum].y * rowstride + greyPoints[pointNum].x * n_channels;
43+ p[0] = starColor.red & 0xff;
44+ p[1] = starColor.green & 0xff;
45+ p[2] = starColor.blue & 0xff;
46+ }
47+ gdk_gc_get_values(whiteGC, &starGCval);
48+ gdk_colormap_query_color( gdk_gc_get_colormap(whiteGC), starGCval.foreground.pixel, &starColor );
49+ for( pointNum = 0; pointNum < nWhitePoints; pointNum++) {
50+ p = pixels + whitePoints[pointNum].y * rowstride + whitePoints[pointNum].x * n_channels;
51+ p[0] = starColor.red & 0xff;
52+ p[1] = starColor.green & 0xff;
53+ p[2] = starColor.blue & 0xff;
54+ }
55+ gdk_draw_pixbuf ( pixmap , NULL , starDrawingBuf,
56+ 0, 0, 0, 0, displayWidth, displayHeight, GDK_RGB_DITHER_NORMAL, 0, 0 ) ;
57 }
58
59 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 000000000..1e41f5bbd
--- /dev/null
+++ b/meta-oe/recipes-navigation/orrery/orrery_2.7.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Astronomical application which displays the night sky"
2HOMEPAGE = "http://projects.openmoko.org/projects/orrery/"
3SECTION = "x11/scientific"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://orrery.c;endline=25;md5=d792bdf2b591972da175aecc38d88cfe"
6
7inherit autotools
8
9SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.tar.gz \
10 file://orrery.png \
11 file://use.GdkPixbuf.patch \
12"
13
14SRC_URI[md5sum] = "bd62a33e7554ee1030313dfcdefcda8b"
15SRC_URI[sha256sum] = "645166a5e05b2064ab630534a514697fc47b681951e7fe1d635c259cbdf7a5e6"
16
17S = "${WORKDIR}/${PN}"
18
19do_configure_prepend() {
20 # fix DSO issue with binutils-2.22
21 sed -i 's/ -lrt/ -lrt -lm/g' ${S}/Makefile.am
22}
23do_install_append() {
24 install -d ${D}${datadir}/orrery
25 cp -a ${S}/data/* ${D}${datadir}/orrery
26 install -d ${D}${datadir}/icons
27 install -m 0755 ${WORKDIR}/orrery.png ${D}${datadir}/icons
28}
29
30FILES_${PN} += "${datadir}/icons/orrery.png"