--- /dev/null
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/viewimage
--- /dev/null
+5635ca4a7c852907886f4609bedd0ac0 viewimage-1.0.makefile.patch
+2568d170079aedbbddc674843fd2dd3d viewimage-1.0.tar.gz
--- /dev/null
+# Description: Image viewer which handles all image formats that SDL_image can handle
+# URL: http://chakie.infa.fi/projects/viewimage/
+# Packager: Jose V Beneyto, sepen at crux dot nu
+# Maintainer: Jose V Beneyto, sepen at crux dot nu
+# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
+# Depends on: sdl_image sdl_gfx
+
+name=viewimage
+version=1.0
+release=1
+source=(http://chakie.infa.fi/projects/$name/$name-$version.tar.gz \
+ $name-$version.makefile.patch)
+
+build() {
+ cd $name-$version
+ patch -p1 -i $SRC/$name-$version.makefile.patch
+
+ make \
+ CC="$CC" STRIP="$STRIP" \
+ CFLAGS="$CFLAGS -I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT" \
+ LDFLAGS="-L$CLFS/usr/lib -lSDL -lSDL_image -lSDL_gfx -lpthread"
+
+ make DESTDIR=$PKG install
+}
--- /dev/null
+diff -purN viewimage-1.0.orig/Makefile viewimage-1.0/Makefile
+--- viewimage-1.0.orig/Makefile 2010-01-20 10:32:55.766411301 +0100
++++ viewimage-1.0/Makefile 2010-01-20 10:33:51.194406887 +0100
+@@ -1,3 +1,8 @@
++DESTDIR =
++
++CC = gcc
++STRIP = strip
++
+ CFLAGS = -O2 -Wall $(shell sdl-config --cflags)
+ LDFLAGS = -O2 -Wall $(shell sdl-config --libs) -lSDL_gfx -lSDL_image
+
+@@ -5,8 +10,13 @@ PROGRAM=viewimage
+
+ VERSION=1.0
+
+-all: $(PROGRAM)
+- strip $(PROGRAM)
++all: $(PROGRAM).c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(PROGRAM).c
++ $(STRIP) $(PROGRAM)
++
++install: $(PROGRAM)
++ install -d $(DESTDIR)/usr/bin
++ install -m 0755 $(PROGRAM) $(DESTDIR)/usr/bin/
+
+ clean:
+ rm -f $(PROGRAM) *.o *~