aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/meh/README7
-rw-r--r--graphics/meh/meh-giflib.patch2
-rw-r--r--graphics/meh/meh.17
-rw-r--r--graphics/meh/meh.SlackBuild23
-rw-r--r--graphics/meh/slack-desc2
5 files changed, 29 insertions, 12 deletions
diff --git a/graphics/meh/README b/graphics/meh/README
index bd5ee48a12..68dc80bb63 100644
--- a/graphics/meh/README
+++ b/graphics/meh/README
@@ -4,8 +4,11 @@ meh is a small, simple, super fast image viewer using raw XLib.
It is similar to feh, but faster and simpler.
meh can use ImageMagick's convert to view almost 200 file formats,
-though it is slower for these formats. Built in formats are JPEG, PNG,
-BMP, and netpbm.
+though it is slower for these formats (note: this actually *works* as
+of 0.3-3). Built in formats are JPEG, GIF, PNG, BMP, and netpbm.
+
+Animations (e.g. GIF, MNG) are not supported. Only the first frame
+will be displayed.
Features:
diff --git a/graphics/meh/meh-giflib.patch b/graphics/meh/meh-giflib.patch
index b58dfd167d..55f23baf2d 100644
--- a/graphics/meh/meh-giflib.patch
+++ b/graphics/meh/meh-giflib.patch
@@ -64,7 +64,7 @@ diff -u -r meh-0.3/src/gif.c meh-0.3-git/src/gif.c
+
+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+ DGifCloseFile(g->gif,&ret);
-+ if(ret != GIF_OK) {
++ if(ret != D_GIF_SUCCEEDED) {
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
+ fprintf(stderr, "GIFLIB: %s\n", GifErrorString(ret));
+#elif defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
diff --git a/graphics/meh/meh.1 b/graphics/meh/meh.1
index ee2d9d18ad..a576b08ea4 100644
--- a/graphics/meh/meh.1
+++ b/graphics/meh/meh.1
@@ -1,4 +1,4 @@
-.TH MEH 1 "2013-12-28"
+.TH MEH 1 "2025-01-19"
.SH NAME
meh \- simple, minimalist, super fast image viewer
.SH SYNOPSIS
@@ -22,7 +22,10 @@ but faster and simpler.
can use ImageMagick's
.BR convert (1)
to view almost 200 file formats, though it is slower for these formats.
-Built-in formats are JPEG, PNG, BMP, and netpbm.
+Built-in formats are JPEG, PNG, BMP, GIF, and netpbm.
+.LP
+Animations (e.g. GIF, MNG) are not supported. Only the first frame will
+be displayed.
.SH OPTIONS
.TP
.BR \-list \ [\fILISTFILE\fR]
diff --git a/graphics/meh/meh.SlackBuild b/graphics/meh/meh.SlackBuild
index cdf5ba03db..847464bde0 100644
--- a/graphics/meh/meh.SlackBuild
+++ b/graphics/meh/meh.SlackBuild
@@ -22,6 +22,12 @@
# Now maintained by B. Watson <urchlay@slackware.uk>.
+# 20250117 bkw: BUILD=2
+# - stop spewing spurious 'GIFLIB: (null)' to stderr when viewing gifs.
+# - fix imagemagick support so it actually *works*.
+# - add GIF to the list of built-in formats in README, man page.
+# - mention that animations aren't supported in README, man.
+
# 20180628 bkw:
# - Take over maintenance.
# - Add man page, BUILD=2
@@ -31,7 +37,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=meh
VERSION=${VERSION:-0.3}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -54,16 +60,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
@@ -78,15 +80,24 @@ 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 {} \+
-# Fixes for giflib-5.1 from https://github.com/jhawthorn/meh
+# 20250117 bkw: Fixes for giflib-5.1, originally from
+# https://github.com/jhawthorn/meh but modified slightly:
+# DGifCloseFile(g->gif,&ret) sets ret to D_GIF_SUCCEEDED (aka 0) on
+# success, *NOT* GIF_OK (aka 1).
patch -p1 < $CWD/meh-giflib.patch
+# 20250117 bkw: this fixes imagemagick support, so we can view e.g.
+# webp, jpeg2000, etc.
+sed -i '/argv/s,"255","16",' src/imagemagick.c
+
CFLAGS="$SLKCFLAGS" make
install -D -s -o root -g root -m 755 $PRGNAM $PKG/usr/bin/$PRGNAM
# 20180628 bkw: Man page originally came from upstream's git, and I
# added the key bindings section (and sent a patch upstream, hopefully
# he likes it).
+# 20250119 bkw: add GIF to the list of builtin types, mention that
+# animation's not supported.
mkdir -p $PKG/usr/man/man1
gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
diff --git a/graphics/meh/slack-desc b/graphics/meh/slack-desc
index 20fa771db3..4cea7a890d 100644
--- a/graphics/meh/slack-desc
+++ b/graphics/meh/slack-desc
@@ -13,7 +13,7 @@ meh: It is similar to feh, but faster and simpler.
meh:
meh: It can use ImageMagick's convert to view almost 200 file formats,
meh: though it is slower for these formats. Built in formats are JPEG,
-meh: PNG, BMP, and netpbm.
+meh: GIF, PNG, BMP, and netpbm.
meh:
meh: Homepage: https://www.johnhawthorn.com/meh/
meh: