bump version
[buildroot.git] / package / fbv / fbv-1.0b-avr32.patch
blobd56f6eb178683cb10f028523bd59788cfa9f230d
1 diff -ur fbv-1.0b/configure fbv-1.0b-avr32/configure
2 --- fbv-1.0b/configure 2004-09-07 13:29:27.000000000 +0200
3 +++ fbv-1.0b-avr32/configure 2006-05-04 11:10:06.000000000 +0200
4 @@ -21,6 +21,7 @@
5 unset png
6 unset bmp
7 unset dfb
8 +unset CC
10 help(){
11 cat << EOF >&2
12 @@ -33,6 +34,7 @@
13 General:
14 --help print this message
15 --libs=LIBS additional libraries required (try -lX11 for ungif, -lz for PNG)
16 + --cc=CC specify compiler to use
18 Directory and file names:
19 --prefix=PREFIX install files in PREFIX [/usr/local]
20 @@ -53,7 +55,7 @@
21 --long help,\
22 prefix:,srcdir:,bindir:,\
23 infodir:,mandir:,\
24 -without-libungif,without-libjpeg,without-libpng,without-bmp,libs: \
25 +without-libungif,without-libjpeg,without-libpng,without-bmp,libs:,cc: \
26 -n "$BASENAME" -- "$@")
28 if [ $? != 0 ] ; then help ; exit 1 ; fi
29 @@ -65,6 +67,7 @@
30 case "$1" in
31 -h|--help) help ; exit 0 ;;
32 --libs) libs="$2"; shift 2 ;;
33 + --cc) CC="$2"; shift 2 ;;
34 --prefix) prefix="$2" ; shift 2 ;;
35 --srcdir) srcdir="$2" ; shift 2 ;;
36 --bindir) bindir="$2" ; shift 2 ;;
37 @@ -80,6 +83,7 @@
38 esac
39 done
41 +[ -z "$CC" ] && CC=cc
42 [ -z "$prefix" ] && prefix="/usr/local"
43 [ -z "$bindir" ] && bindir="${prefix}/bin"
44 [ -z "$mandir" ] && mandir="${prefix}/man"
45 @@ -106,12 +110,12 @@
46 ungif="no"
47 echo "libungif check" >>./config.log
48 echo " 1st:" >>./config.log
49 -cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
50 +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
51 if [ -e \$\$~test ]; then
52 libs="-lungif $libs" ; ungif="yes"
53 else
54 echo " 2nd: -lX11 -L$xdir/lib" >>./config.log
55 - cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs
56 + $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs
57 if [ -e \$\$~test ]; then
58 libs="-lungif -lX11 -L$xdir/lib $libs" ; ungif="yes"
60 @@ -124,7 +128,7 @@
61 echo -n "checking for libjpeg presence... "
62 if [ "$jpeg" != "disabled" ]; then
63 jpeg="no"
64 -cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs
65 +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs
66 if [ -e \$\$~test ]; then
67 libs="-ljpeg $libs" ; jpeg="yes"
69 @@ -135,7 +139,7 @@
70 echo -n "checking for libpng presence... "
71 if [ "$png" != "disabled" ]; then
72 png="no"
73 -cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs
74 +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs
75 if [ -e \$\$~test ]; then
76 libs="-lpng $libs" ; png="yes"
78 diff -ur fbv-1.0b/fb_display.c fbv-1.0b-avr32/fb_display.c
79 --- fbv-1.0b/fb_display.c 2004-09-07 14:09:43.000000000 +0200
80 +++ fbv-1.0b-avr32/fb_display.c 2006-05-04 13:30:25.000000000 +0200
81 @@ -18,8 +18,6 @@
82 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
85 -#include <linux/fb.h>
87 #include <stdio.h>
88 #include <stdlib.h>
89 #include <sys/types.h>
90 @@ -31,7 +29,9 @@
91 #include <asm/types.h>
92 #include <string.h>
93 #include <errno.h>
94 +#include <linux/fb.h>
95 #include "config.h"
97 /* Public Use Functions:
99 * extern void fb_display(unsigned char *rgbbuff,
100 @@ -276,9 +276,6 @@
101 for(i = 0; i < yc; i++, fbptr += scr_xs * cpp, imptr += pic_xs * cpp)
102 memcpy(fbptr, imptr, xc * cpp);
104 - if(cpp == 1)
105 - set8map(fh, &map_back);
107 munmap(fb, scr_xs * scr_ys * cpp);
110 @@ -293,17 +290,17 @@
111 inline static unsigned short make15color(unsigned char r, unsigned char g, unsigned char b)
113 return (
114 - (((r >> 3) & 31) << 10) |
115 + (((r >> 3) & 31)) |
116 (((g >> 3) & 31) << 5) |
117 - ((b >> 3) & 31) );
118 + ((b >> 3) & 31) << 10);
121 inline static unsigned short make16color(unsigned char r, unsigned char g, unsigned char b)
123 return (
124 - (((r >> 3) & 31) << 11) |
125 - (((g >> 2) & 63) << 5) |
126 - ((b >> 3) & 31) );
127 + (((r >> 3) & 31)) |
128 + (((g >> 3) & 31) << 5) |
129 + ((b >> 3) & 31) << 10);
132 void* convertRGB2FB(int fh, unsigned char *rgbbuff, unsigned long count, int bpp, int *cpp)
133 @@ -342,9 +339,9 @@
134 *cpp = 4;
135 i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
136 for(i = 0; i < count ; i++)
137 - i_fbbuff[i] = ((rgbbuff[i*3] << 16) & 0xFF0000) |
138 + i_fbbuff[i] = ((rgbbuff[i*3+2] << 16) & 0xFF0000) |
139 ((rgbbuff[i*3+1] << 8) & 0xFF00) |
140 - (rgbbuff[i*3+2] & 0xFF);
141 + (rgbbuff[i*3] & 0xFF);
142 fbbuff = (void *) i_fbbuff;
143 break;
144 default: