diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-navigation/orrery | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-navigation/orrery')
-rw-r--r-- | meta-oe/recipes-navigation/orrery/orrery/orrery.png | bin | 0 -> 19475 bytes | |||
-rw-r--r-- | meta-oe/recipes-navigation/orrery/orrery/use.GdkPixbuf.patch | 59 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/orrery/orrery_2.7.bb | 31 |
3 files changed, 90 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 @@ | |||
1 | From: Benjamin Deering | ||
2 | Subject: orrery crashing X | ||
3 | Date: Thursday, September 2, 2010 - 5:25 pm | ||
4 | Link: http://kerneltrap.org/mailarchive/openmoko-community/2010/9/3/13218 | ||
5 | |||
6 | diff -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..e6cbffcf4 --- /dev/null +++ b/meta-oe/recipes-navigation/orrery/orrery_2.7.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Astronomical application which displays the night sky" | ||
2 | HOMEPAGE = "http://projects.openmoko.org/projects/orrery/" | ||
3 | SECTION = "x11/scientific" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://orrery.c;endline=25;md5=d792bdf2b591972da175aecc38d88cfe" | ||
6 | DEPENDS = "gtk+" | ||
7 | |||
8 | inherit autotools-brokensep pkgconfig | ||
9 | |||
10 | SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.tar.gz \ | ||
11 | file://orrery.png \ | ||
12 | file://use.GdkPixbuf.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "bd62a33e7554ee1030313dfcdefcda8b" | ||
16 | SRC_URI[sha256sum] = "645166a5e05b2064ab630534a514697fc47b681951e7fe1d635c259cbdf7a5e6" | ||
17 | |||
18 | S = "${WORKDIR}/${PN}" | ||
19 | |||
20 | do_configure_prepend() { | ||
21 | # fix DSO issue with binutils-2.22 | ||
22 | sed -i 's/ -lrt/ -lrt -lm/g' ${S}/Makefile.am | ||
23 | } | ||
24 | do_install_append() { | ||
25 | install -d ${D}${datadir}/orrery | ||
26 | cp -a ${S}/data/* ${D}${datadir}/orrery | ||
27 | install -d ${D}${datadir}/icons | ||
28 | install -m 0755 ${WORKDIR}/orrery.png ${D}${datadir}/icons | ||
29 | } | ||
30 | |||
31 | FILES_${PN} += "${datadir}/icons/orrery.png" | ||