aboutsummaryrefslogtreecommitdiff
path: root/graphics/fbv
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/fbv')
-rw-r--r--graphics/fbv/fbv.SlackBuild40
-rw-r--r--graphics/fbv/fbv.info8
-rw-r--r--graphics/fbv/giflib5_api.diff66
-rw-r--r--graphics/fbv/manhelp.diff123
-rw-r--r--graphics/fbv/png16_api.diff21
5 files changed, 49 insertions, 209 deletions
diff --git a/graphics/fbv/fbv.SlackBuild b/graphics/fbv/fbv.SlackBuild
index a2317b45e9..1c780a3e44 100644
--- a/graphics/fbv/fbv.SlackBuild
+++ b/graphics/fbv/fbv.SlackBuild
@@ -6,14 +6,15 @@
# 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.
+# 20250115 bkw:
+# - updated for v1.0c.
+# - remove old giflib5_api and png16_api diffs (unneeded on Slack >= 15.0).
+# - rework manhelp.diff for new version.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=fbv
-VERSION=${VERSION:-1.0b}
+VERSION=${VERSION:-1.0c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -37,16 +38,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -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
@@ -58,16 +55,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
- \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-
-# Check for new giflib API, apply patch only if needed. This changed
-# between Slack 14.1 and 14.2.
-grep -q DGifOpenFileName.*Error /usr/include/gif_lib.h && \
- patch -p1 < $CWD/giflib5_api.diff
-
-# Patch is needed for linpng-1.6, and does no harm on 1.4.
-patch -p1 < $CWD/png16_api.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -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.
@@ -78,16 +67,17 @@ patch -p1 < $CWD/manhelp.diff
--prefix=/usr \
--mandir=/usr/man
-# have to do this instead, to use our CFLAGS:
-sed -i "s,-O2,$SLKCFLAGS," Makefile
-
-make
+# 20250116 bkw: for some reason, the new upstream made CC=g++ the
+# default in 1.0c, though it's C code (and 1.0b used gcc). This serves
+# no purpose and slows things down. Also go ahead and wedge our flags
+# into CC.
+make CC="${CC:-gcc} $SLKCFLAGS"
strip $PRGNAM
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1
-make install DESTDIR=$PKG
+mkdir -p $PKG/usr/bin
+make install bindir=$PKG/usr/bin mandir=$PKG/usr/man
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog README TODO VERSION $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/graphics/fbv/fbv.info b/graphics/fbv/fbv.info
index 497283391c..8d751becd4 100644
--- a/graphics/fbv/fbv.info
+++ b/graphics/fbv/fbv.info
@@ -1,8 +1,8 @@
PRGNAM="fbv"
-VERSION="1.0b"
-HOMEPAGE="http://s-tech.elsat.net.pl/"
-DOWNLOAD="https://ponce.cc/slackware/sources/repo/fbv-1.0b.tar.gz"
-MD5SUM="3e466375b930ec22be44f1041e77b55d"
+VERSION="1.0c"
+HOMEPAGE="https://github.com/jstkdng/"
+DOWNLOAD="https://github.com/jstkdng/fbv/archive/1.0c/fbv-1.0c.tar.gz"
+MD5SUM="8adac009ac6032b0a157e0c23f39a4fa"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/graphics/fbv/giflib5_api.diff b/graphics/fbv/giflib5_api.diff
deleted file mode 100644
index 6de9afd0ed..0000000000
--- a/graphics/fbv/giflib5_api.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -Naur fbv-1.0b/gif.c fbv-1.0b.patched/gif.c
---- fbv-1.0b/gif.c 2003-08-24 16:23:02.000000000 -0400
-+++ fbv-1.0b.patched/gif.c 2015-11-22 12:16:54.093999000 -0500
-@@ -31,10 +31,10 @@
- #include <string.h>
- #define min(a,b) ((a) < (b) ? (a) : (b))
- #define gflush return(FH_ERROR_FILE);
--#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
--#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
-+#define grflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
-+#define mgrflush { int dummy; free(lb); free(slb); DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
- #define agflush return(FH_ERROR_FORMAT);
--#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
-+#define agrflush { int dummy; DGifCloseFile(gft, &dummy); return(FH_ERROR_FORMAT); }
-
-
- int fh_gif_id(char *name)
-@@ -80,8 +80,9 @@
- GifRecordType rt;
- ColorMapObject *cmap;
- int cmaps;
-+ int dummyopenarg;
-
-- gft=DGifOpenFileName(name);
-+ gft=DGifOpenFileName(name, &dummyopenarg);
- if(gft==NULL){printf("err5\n"); gflush;} //////////
- do
- {
-@@ -170,7 +171,7 @@
- }
- }
- while( rt!= TERMINATE_RECORD_TYPE );
-- DGifCloseFile(gft);
-+ DGifCloseFile(gft, &dummyopenarg);
- return(FH_ERROR_OK);
- }
-
-@@ -183,8 +184,9 @@
- GifByteType *extension;
- int extcode;
- GifRecordType rt;
-+ int dummyopenarg;
-
-- gft=DGifOpenFileName(name);
-+ gft=DGifOpenFileName(name, &dummyopenarg);
- if(gft==NULL) gflush;
- do
- {
-@@ -197,7 +199,7 @@
- px=gft->Image.Width;
- py=gft->Image.Height;
- *x=px; *y=py;
-- DGifCloseFile(gft);
-+ DGifCloseFile(gft, &dummyopenarg);
- return(FH_ERROR_OK);
- break;
- case EXTENSION_RECORD_TYPE:
-@@ -210,7 +212,7 @@
- }
- }
- while( rt!= TERMINATE_RECORD_TYPE );
-- DGifCloseFile(gft);
-+ DGifCloseFile(gft, &dummyopenarg);
- return(FH_ERROR_FORMAT);
- }
- #endif
diff --git a/graphics/fbv/manhelp.diff b/graphics/fbv/manhelp.diff
index 96a26c9cd9..5de26afc68 100644
--- a/graphics/fbv/manhelp.diff
+++ b/graphics/fbv/manhelp.diff
@@ -1,111 +1,48 @@
-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
+diff -wNaur fbv-1.0c/fbv.1 fbv-1.0c.patched/fbv.1
+--- fbv-1.0c/fbv.1 2024-12-03 08:01:22.000000000 -0500
++++ fbv-1.0c.patched/fbv.1 2025-01-16 03:37:59.510083511 -0500
@@ -1,4 +1,4 @@
-.TH fbv 1 "2001-02-18"
-+.TH fbv 1 "2014-10-16"
++.TH fbv 1 "2025-01-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<delay>\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
+@@ -84,6 +84,16 @@
+ h Help and image information
+ .TE
+
+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
++ ...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 <tomek@smoczy.net>
.br
-@@ -55,4 +102,3 @@
- .br
- Marcin 'Piaskowy' Zieba <piaskowy@irc.pl>
- .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 @@
+diff -wNaur fbv-1.0c/main.c fbv-1.0c.patched/main.c
+--- fbv-1.0c/main.c 2024-12-03 08:01:22.000000000 -0500
++++ fbv-1.0c.patched/main.c 2025-01-16 03:38:51.046078661 -0500
+@@ -606,8 +606,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 <d> | -s <delay> : 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);
+ " -h, --help Show this help\n"
+ " -a, --alpha Use the alpha channel (if applicable)\n"
+- " -c, --dontclear Do not clear the screen before and after displaying the image\n"
+- " -u, --donthide Do not hide the cursor before and after displaying the image\n"
++ " -c, --noclear Do not clear the screen before and after displaying the image\n"
++ " -u, --nohide Do not hide the cursor before and after displaying the image\n"
+ " -i, --noinfo Supress image information\n"
+ " -f, --shrink Shrink (using a simple resizing routine) the image to fit onto screen if necessary\n"
+ " -k, --colorshrink Shrink (using a 'color average' resizing routine) the image to fit onto screen if necessary\n"
+@@ -636,6 +636,7 @@
+ " m : Rotate the image 90 degrees right\n"
+ " p : Disable all transformations\n"
+ " h : Help and image information\n"
++ " q : Quit\n"
+ " Copyright (C) 2000 - 2004 Mateusz Golicz, Tomasz Sterna.\n"
+ " Copyright (C) 2013 yanlin, godspeed1989@gitbub\n", name);
}
-
diff --git a/graphics/fbv/png16_api.diff b/graphics/fbv/png16_api.diff
deleted file mode 100644
index 235b343666..0000000000
--- a/graphics/fbv/png16_api.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Naur fbv-1.0b/png.c fbv-1.0b.patched/png.c
---- fbv-1.0b/png.c 2003-08-24 16:22:22.000000000 -0400
-+++ fbv-1.0b.patched/png.c 2015-11-22 12:21:33.247999000 -0500
-@@ -69,7 +69,7 @@
- fclose(fh); return(FH_ERROR_FORMAT);
- }
- rp=0;
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- if(rp) free(rp);
-@@ -161,7 +161,7 @@
- fclose(fh); return(FH_ERROR_FORMAT);
- }
- rp=0;
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- if(rp) free(rp);