From 018a9b8395dff1535342a0d746540d4320bdd8df Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 17 Oct 2014 18:00:27 +0700 Subject: graphics/fbv: Added (image viewer). Signed-off-by: Willy Sudiarto Raharjo --- graphics/fbv/README | 7 +++ graphics/fbv/fbv.SlackBuild | 85 +++++++++++++++++++++++++++++++++ graphics/fbv/fbv.info | 10 ++++ graphics/fbv/manhelp.diff | 111 ++++++++++++++++++++++++++++++++++++++++++++ graphics/fbv/slack-desc | 19 ++++++++ 5 files changed, 232 insertions(+) create mode 100644 graphics/fbv/README create mode 100644 graphics/fbv/fbv.SlackBuild create mode 100644 graphics/fbv/fbv.info create mode 100644 graphics/fbv/manhelp.diff create mode 100644 graphics/fbv/slack-desc diff --git a/graphics/fbv/README b/graphics/fbv/README new file mode 100644 index 0000000000..c58704af1a --- /dev/null +++ b/graphics/fbv/README @@ -0,0 +1,7 @@ +fbv (image viewer for framebuffer console) + +fbv (FrameBuffer Viewer) is a simple program to view pictures on +a linux framebuffer device. In 2000, when fbv was created, there +were no other suitable programs performing the same task, so the +authors decided to follow the rule: 'If you need a tool - write +it yourself!' :-) diff --git a/graphics/fbv/fbv.SlackBuild b/graphics/fbv/fbv.SlackBuild new file mode 100644 index 0000000000..0bde96e9a0 --- /dev/null +++ b/graphics/fbv/fbv.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for fbv + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# The real DOWNLOAD link is http://s-tech.elsat.net.pl/fbv/fbv-1.0b.tar.gz +# but it seems to be intermittently broken, so the .info file has a mirrored +# copy. + +PRGNAM=fbv +VERSION=${VERSION:-1.0b} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Man page is missing a few options, and --help output is wrong. +# Also next/prev/quit options weren't documented in either place. +patch -p1 < $CWD/manhelp.diff + +# Not an autoconf script, doesn't take standard options. +./configure \ + --prefix=/usr \ + --mandir=/usr/man + +# have to do this instead, to use our CFLAGS: +sed -i "s,-O2,$SLKCFLAGS," Makefile + +make +strip $PRGNAM +mkdir -p $PKG/usr/bin $PKG/usr/man/man1 +make install DESTDIR=$PKG + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING ChangeLog README TODO VERSION $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/graphics/fbv/fbv.info b/graphics/fbv/fbv.info new file mode 100644 index 0000000000..01dc060dde --- /dev/null +++ b/graphics/fbv/fbv.info @@ -0,0 +1,10 @@ +PRGNAM="fbv" +VERSION="1.0b" +HOMEPAGE="http://s-tech.elsat.net.pl/" +DOWNLOAD="http://www.sourcefiles.org/Graphics/Viewers/fbv-1.0b.tar.gz" +MD5SUM="3e466375b930ec22be44f1041e77b55d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/graphics/fbv/manhelp.diff b/graphics/fbv/manhelp.diff new file mode 100644 index 0000000000..96a26c9cd9 --- /dev/null +++ b/graphics/fbv/manhelp.diff @@ -0,0 +1,111 @@ +diff -Naur fbv-1.0b/fbv.1 fbv-1.0b.patched/fbv.1 +--- fbv-1.0b/fbv.1 2003-08-24 16:21:07.000000000 -0400 ++++ fbv-1.0b.patched/fbv.1 2014-10-16 23:35:49.000000000 -0400 +@@ -1,4 +1,4 @@ +-.TH fbv 1 "2001-02-18" ++.TH fbv 1 "2014-10-16" + .\" Some roff macros, for reference: + .\" .nh disable hyphenation + .\" .hy enable hyphenation +@@ -42,12 +42,59 @@ + .TP + .BR \fB--delay\fP , "\fB-s\fP \fI\fP" + Slideshow, wait 'delay' tenths of a second before displaying each image +- +-.BR +- Use a,d,w and x to scroll the image +- +- +- ++.TP ++.BR \fB--enlarge\fP , "\fB-e\fP ++Enlarge the image to fit the whole screen if necessary ++.TP ++.BR \fB--ignore-aspect\fP , "\fB-r\fP ++Ignore the image aspect while resizing ++.SH KEYS ++.TP ++.BR \fBSpace\fP , \fBEnter\fP , \fBperiod\fP , \fB>\fR ++Next image (exits after last image) ++.TP ++.BR \fBcomma\fP , \fB<\fR ++Previous image (no effect, on first image) ++.TP ++.BR \fBr\fP ++Redraw the image ++.TP ++.BR \fBa\fP , \fBd\fP , \fBx\fP , \fBw\fP or \fBD\fP , \fBC\fP , \fBB\fP , \fBA\fP ++Pan the image (only if larger than screen) ++.TP ++.BR \fBf\fP ++Toggle resizing on/off ++.TP ++.BR \fBk\fP ++Toggle resizing quality ++.TP ++.BR \fBe\fP ++Toggle enlarging on/off ++.TP ++.BR \fBi\fP ++Toggle respecting the image aspect on/off ++.TP ++.BR \fBn\fP ++Rotate the image 90 degrees left ++.TP ++.BR \fBm\fP ++Rotate the image 90 degrees right ++.TP ++.BR \fBp\fP ++Disable all transformations ++.TP ++.BR \fBq\fP ++Quit fbv ++.PP ++Keystrokes are read from standard input. Normally this is the user's ++terminal, but pipes and redirection also work. This allows for things ++like: ++.PP ++echo emq | fbv --noinfo --noclear image.jpg ++.PP ++\.\.\.which will display image.jpg (enlarged and rotated 90 degrees), then exit, leaving ++the image visible. The "q" in the echo command is actually redundant, as ++fbv will exit on stdin EOF. + .SH AUTHOR + Tomasz 'smoku' Sterna + .br +@@ -55,4 +102,3 @@ + .br + Marcin 'Piaskowy' Zieba + .br +- +diff -Naur fbv-1.0b/main.c fbv-1.0b.patched/main.c +--- fbv-1.0b/main.c 2004-09-07 10:11:00.000000000 -0400 ++++ fbv-1.0b.patched/main.c 2014-10-16 23:35:47.000000000 -0400 +@@ -443,8 +443,8 @@ + "Available options:\n" + " --help | -h : Show this help\n" + " --alpha | -a : Use the alpha channel (if applicable)\n" +- " --dontclear | -c : Do not clear the screen before and after displaying the image\n" +- " --donthide | -u : Do not hide the cursor before and after displaying the image\n" ++ " --noclear | -c : Do not clear the screen before and after displaying the image\n" ++ " --unhide | -u : Do not hide the cursor before and after displaying the image\n" + " --noinfo | -i : Supress image information\n" + " --stretch | -f : Strech (using a simple resizing routine) the image to fit onto screen if necessary\n" + " --colorstretch| -k : Strech (using a 'color average' resizing routine) the image to fit onto screen if necessary\n" +@@ -452,6 +452,8 @@ + " --ignore-aspect| -r : Ignore the image aspect while resizing\n" + " --delay | -s : Slideshow, 'delay' is the slideshow delay in tenths of seconds.\n\n" + "Keys:\n" ++ " Space, Enter, period, > : Next image\n" ++ " comma, > : Previous image\n" + " r : Redraw the image\n" + " a, d, w, x : Pan the image\n" + " f : Toggle resizing on/off\n" +@@ -461,6 +463,7 @@ + " n : Rotate the image 90 degrees left\n" + " m : Rotate the image 90 degrees right\n" + " p : Disable all transformations\n" ++ " q : Quit\n" + "Copyright (C) 2000 - 2004 Mateusz Golicz, Tomasz Sterna.\n", name); + } + diff --git a/graphics/fbv/slack-desc b/graphics/fbv/slack-desc new file mode 100644 index 0000000000..51520012a4 --- /dev/null +++ b/graphics/fbv/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +fbv: fbv (image viewer for framebuffer console) +fbv: +fbv: fbv (FrameBuffer Viewer) is a simple program to view pictures on +fbv: a linux framebuffer device. In 2000, when fbv was created, there +fbv: were no other suitable programs performing the same task, so the +fbv: authors decided to follow the rule: 'If you need a tool - write it +fbv: yourself!' :-) +fbv: +fbv: +fbv: +fbv: -- cgit v1.2.3