summaryrefslogtreecommitdiff
path: root/recipes/fbgrab
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/fbgrab
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/fbgrab')
-rw-r--r--recipes/fbgrab/fbgrab-viewer-native_1.0.bb31
-rw-r--r--recipes/fbgrab/fbgrab/fbgrab_1bpp.patch52
-rw-r--r--recipes/fbgrab/fbgrab/makefile.patch21
-rw-r--r--recipes/fbgrab/fbgrab_1.0.bb19
4 files changed, 123 insertions, 0 deletions
diff --git a/recipes/fbgrab/fbgrab-viewer-native_1.0.bb b/recipes/fbgrab/fbgrab-viewer-native_1.0.bb
new file mode 100644
index 0000000000..2494918c31
--- /dev/null
+++ b/recipes/fbgrab/fbgrab-viewer-native_1.0.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Viewer for a network enabled fbgrab"
+HOMEPAGE = "http://svn.openezx.org/trunk/src/userspace/fbgrab/"
+LICENSE = "GPL"
+SECTION = "console/network"
+DEPENDS = "libpng-native"
+PV = "0.0+svn${SRCDATE}"
+PR = "r30"
+
+SRC_URI = "svn://svn.openezx.org/trunk/src/userspace;module=fbgrab;proto=http"
+S = "${WORKDIR}/fbgrab"
+
+inherit native
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} -g -Wall -lpng -lX11 -o fbgrab-viewer fbgrab-viewer.c
+}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0755 fbgrab-viewer ${DEPLOY_DIR_IMAGE}/fbgrab-viewer
+}
+
+do_stage() {
+ :
+}
+
+do_install() {
+ :
+}
+
+addtask deploy before do_install after do_compile
diff --git a/recipes/fbgrab/fbgrab/fbgrab_1bpp.patch b/recipes/fbgrab/fbgrab/fbgrab_1bpp.patch
new file mode 100644
index 0000000000..8c6dff27b3
--- /dev/null
+++ b/recipes/fbgrab/fbgrab/fbgrab_1bpp.patch
@@ -0,0 +1,52 @@
+--- fbgrab-1.0.orig/fbgrab.c 2002-04-15 22:22:54.000000000 +0200
++++ fbgrab-1.0/fbgrab.c 2008-12-15 20:18:55.000000000 +0100
+@@ -135,6 +135,26 @@
+ fatal_error("Error: Not enough memory or data\n");
+ }
+
++static void convert1to32(int width, int height,
++ unsigned char *inbuffer,
++ unsigned char *outbuffer)
++{
++ unsigned int i, j;
++ unsigned char *ptr = outbuffer;
++
++ for (i=0; i < (unsigned int) height*width >> 3; i++)
++ {
++ for(j=0; j < 8; j++)
++ {
++ /* BLUE = 0, GREEN = 1, RED = 2 */
++ *ptr = *(ptr+1) = *(ptr+2) = ((inbuffer[i] >> (7-j)) & 1) ? 255 : 0;
++ /* ALPHA = 3 */
++ *(ptr+3) = '\0';
++ ptr += 4;
++ }
++ }
++}
++
+ static void convert1555to32(int width, int height,
+ unsigned char *inbuffer,
+ unsigned char *outbuffer)
+@@ -270,6 +290,10 @@
+
+ switch(bits)
+ {
++ case 1:
++ convert1to32(width, height, inbuffer, outbuffer);
++ write_PNG(outbuffer, filename, width, height, interlace);
++ break;
+ case 15:
+ convert1555to32(width, height, inbuffer, outbuffer);
+ write_PNG(outbuffer, filename, width, height, interlace);
+@@ -405,7 +429,10 @@
+ strncpy(infile, device, MAX_LEN - 1);
+ }
+
+- buf_size = width * height * (((unsigned int) bitdepth + 7) >> 3);
++ if (bitdepth == 1)
++ buf_size = (width * height) >> 3;
++ else
++ buf_size = width * height * (((unsigned int) bitdepth + 7) >> 3);
+
+ buf_p = malloc(buf_size);
+
diff --git a/recipes/fbgrab/fbgrab/makefile.patch b/recipes/fbgrab/fbgrab/makefile.patch
new file mode 100644
index 0000000000..01ee502bd7
--- /dev/null
+++ b/recipes/fbgrab/fbgrab/makefile.patch
@@ -0,0 +1,21 @@
+--- fbgrab-1.0/Makefile.orig 2002-03-20 20:49:06.000000000 +0100
++++ fbgrab-1.0/Makefile 2004-06-11 18:02:56.000000000 +0200
+@@ -4,13 +4,12 @@
+ ###
+
+ fbgrab: fbgrab.c
+- splint +posixlib fbgrab.c
+- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab
++ ${CC} ${CFLAGS} ${LDFLAGS} fbgrab.c -lpng -lm -lz -o fbgrab
+
+ install:
+ strip fbgrab
+- install fbgrab /usr/bin/fbgrab
+- install fbgrab.1.man /usr/man/man1/fbgrab.1
++ install fbgrab ${DESTDIR}/usr/bin/fbgrab
++ install fbgrab.1.man ${DESTDIR}/usr/share/man/man1/fbgrab.1
+
+ clean:
+- rm -f fbgrab *~ \#*\#
+\ No newline at end of file
++ rm -f fbgrab *~ \#*\#
diff --git a/recipes/fbgrab/fbgrab_1.0.bb b/recipes/fbgrab/fbgrab_1.0.bb
new file mode 100644
index 0000000000..28ac55f943
--- /dev/null
+++ b/recipes/fbgrab/fbgrab_1.0.bb
@@ -0,0 +1,19 @@
+SECTION = "console/network"
+DESCRIPTION = "framebuffer screenshot program"
+LICENSE = "GPL"
+
+PR = "r2"
+
+DEPENDS = " zlib libpng "
+
+SRC_URI = "http://hem.bredband.net/gmogmo/fbgrab/fbgrab-${PV}.tar.gz \
+ file://makefile.patch;patch=1 \
+ http://people.openezx.org/ao2/fbgrab_network_mode.diff;patch=1 \
+ file://fbgrab_1bpp.patch;patch=1 \
+ "
+
+do_install() {
+ install -d ${D}${bindir} ${D}${mandir}/man1/
+ install -m 0755 fbgrab ${D}${bindir}
+ install -m 0644 fbgrab.1.man ${D}${mandir}/man1/fbgrab.1
+}