diff options
Diffstat (limited to 'graphics/imv')
-rw-r--r-- | graphics/imv/README | 28 | ||||
-rw-r--r-- | graphics/imv/doinst.sh | 25 | ||||
-rw-r--r-- | graphics/imv/icons/16.png | bin | 0 -> 628 bytes | |||
-rw-r--r-- | graphics/imv/icons/22.png | bin | 0 -> 896 bytes | |||
-rw-r--r-- | graphics/imv/icons/24.png | bin | 0 -> 914 bytes | |||
-rw-r--r-- | graphics/imv/icons/48.png | bin | 0 -> 1648 bytes | |||
-rw-r--r-- | graphics/imv/icons/64.png | bin | 0 -> 2117 bytes | |||
-rw-r--r-- | graphics/imv/icons/96.png | bin | 0 -> 2981 bytes | |||
-rw-r--r-- | graphics/imv/imv.SlackBuild | 145 | ||||
-rw-r--r-- | graphics/imv/imv.info | 10 | ||||
-rw-r--r-- | graphics/imv/slack-desc | 19 |
11 files changed, 227 insertions, 0 deletions
diff --git a/graphics/imv/README b/graphics/imv/README new file mode 100644 index 0000000000..a1d5c75fb0 --- /dev/null +++ b/graphics/imv/README @@ -0,0 +1,28 @@ +imv (image viewer for X and/or Wayland) + +imv is a command line image viewer intended for use with tiling window +managers. Features: + +* Native Wayland and X11 support +* Support for dozens of image formats including: + * PNG + * JPEG + * Animated GIFs (requires FreeImage or libnsgif) + * SVG + * TIFF + * Various RAW formats (requires FreeImage) + * Photoshop PSD files (requires FreeImage) + * WEBP + * HEIF/AVIF (requires libheif) +* Configurable key bindings and behaviour +* Highly scriptable with IPC via imv-msg + +Optional dependencies (autodetected): + +- FreeImage (support for GIF, RAW, PSD formats) +- libnsgif (support for GIF) +- libheif (support for HEIF/AVIF) +- libjxl (support for JXL aka JPEG XL) + +If you don't have at least one of FreeImage or libnsgif, imv won't +support GIF images at all. diff --git a/graphics/imv/doinst.sh b/graphics/imv/doinst.sh new file mode 100644 index 0000000000..7a6eafcfff --- /dev/null +++ b/graphics/imv/doinst.sh @@ -0,0 +1,25 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config etc/imv/imv_config.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/graphics/imv/icons/16.png b/graphics/imv/icons/16.png Binary files differnew file mode 100644 index 0000000000..8da696a803 --- /dev/null +++ b/graphics/imv/icons/16.png diff --git a/graphics/imv/icons/22.png b/graphics/imv/icons/22.png Binary files differnew file mode 100644 index 0000000000..3a766591f7 --- /dev/null +++ b/graphics/imv/icons/22.png diff --git a/graphics/imv/icons/24.png b/graphics/imv/icons/24.png Binary files differnew file mode 100644 index 0000000000..69549b70a2 --- /dev/null +++ b/graphics/imv/icons/24.png diff --git a/graphics/imv/icons/48.png b/graphics/imv/icons/48.png Binary files differnew file mode 100644 index 0000000000..31bb9ee702 --- /dev/null +++ b/graphics/imv/icons/48.png diff --git a/graphics/imv/icons/64.png b/graphics/imv/icons/64.png Binary files differnew file mode 100644 index 0000000000..ed5c510e32 --- /dev/null +++ b/graphics/imv/icons/64.png diff --git a/graphics/imv/icons/96.png b/graphics/imv/icons/96.png Binary files differnew file mode 100644 index 0000000000..89c3510dd1 --- /dev/null +++ b/graphics/imv/icons/96.png diff --git a/graphics/imv/imv.SlackBuild b/graphics/imv/imv.SlackBuild new file mode 100644 index 0000000000..51a2f1d939 --- /dev/null +++ b/graphics/imv/imv.SlackBuild @@ -0,0 +1,145 @@ +#!/bin/bash + +# Slackware build script for imv + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240318 bkw: +# - update for v4.5.0. +# - upstream now has tagged releases, no more commit hash filenames. +# - libjxl is now supported, add to README and slack-desc. +# - note: libnsgif < 1.0.0 is required for build. no problem we have +# 0.2.1, but if libnsgif ever gets updated to 1.0.0, this will need +# fixing. + +# 20230901 bkw: +# - update for v4.4.0. +# - new homepage and git repo, fugly tarball filename. + +# 20210909 bkw: +# - update for v4.3.0. +# - upstream switched to meson, can't build old versions with this script. +# - meson autodetects all the optional libs properly, get rid of the +# messy shell script code that used to do it. +# - add new optional dep libheif. +# - get rid of squelch_libtiff_warnings.diff (upstream fixed it). +# - rework README. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=imv +VERSION=${VERSION:-4.5.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-v$VERSION +tar xvf $CWD/$PRGNAM-v$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz +cd $PRGNAM-v$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 {} + + +# meson takes an option to say where to install the config file, but +# it doesn't actually change where the binary looks for it. +sed -i -e 's,/etc/imv_config,/etc/imv/imv_config,' \ + -e '/\/usr\/local\/etc/d' \ + src/imv.c doc/imv.1.txt + +mkdir build +cd build + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + meson .. \ + --buildtype=release \ + --infodir=/usr/info \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --prefix=/usr \ + --sysconfdir=/etc/$PRGNAM \ + -Dstrip=true + "${NINJA:=ninja}" + DESTDIR=$PKG $NINJA install +cd .. + +gzip -9 $PKG/usr/man/man?/*.? +mv $PKG/etc/$PRGNAM/${PRGNAM}_config $PKG/etc/$PRGNAM/${PRGNAM}_config.new + +# Slackware doesn't have an icon called multimedia-photo-viewer... +mkdir -p $PKG/usr/share/applications +sed -i "s,multimedia-photo-viewer,$PRGNAM," \ + $PKG/usr/share/applications/*.desktop + +# Icon came from Debian moka-icon-theme package. I have no idea +# what the default icon theme is in Debian (equivalent of hicolor in +# Slackware). Don't care, either. So I picked one at random. +for i in 16 22 24 48 64 96; do + mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps + cat $CWD/icons/$i.png > $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png +done +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS* CHANGE* CONTRIB* LICENSE* README* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install + +# update slack-desc to say which optional deps are included +F=no; G=no; H=no; J=no +ldd $PKG/usr/bin/$PRGNAM-x11 > lddtmp +grep -q 'libfreeimage' lddtmp && F=yes +grep -q 'libnsgif' lddtmp && G=yes +grep -q 'libheif' lddtmp && H=yes +grep -q 'libjxl' lddtmp && J=yes + +sed -e "s,@F@,$F," \ + -e "s,@G@,$G," \ + -e "s,@H@,$H," \ + -e "s,@J@,$J," \ + $CWD/slack-desc > $PKG/install/slack-desc + +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/graphics/imv/imv.info b/graphics/imv/imv.info new file mode 100644 index 0000000000..1eb4aed8c8 --- /dev/null +++ b/graphics/imv/imv.info @@ -0,0 +1,10 @@ +PRGNAM="imv" +VERSION="4.5.0" +HOMEPAGE="https://sr.ht/~exec64/imv/" +DOWNLOAD="https://git.sr.ht/~exec64/imv/archive/v4.5.0.tar.gz" +MD5SUM="854614e252c58588e0fbf4a9f75a6b0d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/graphics/imv/slack-desc b/graphics/imv/slack-desc new file mode 100644 index 0000000000..db04840f5a --- /dev/null +++ b/graphics/imv/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------------------------------------------------------| +imv: imv (image viewer for X and/or Wayland) +imv: +imv: imv is a command line image viewer intended for use with tiling window +imv: managers. +imv: +imv: Package built with support for: +imv: +imv: FreeImage: @F@ libnsgif: @G@ libheif: @H@ libjxl: @J@ +imv: +imv: +imv: |