aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/jp2-pixbuf-loader/README5
-rw-r--r--graphics/jp2-pixbuf-loader/doinst.sh3
-rw-r--r--graphics/jp2-pixbuf-loader/git2tarxz.sh46
-rw-r--r--graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.SlackBuild112
-rw-r--r--graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.info10
-rw-r--r--graphics/jp2-pixbuf-loader/slack-desc19
6 files changed, 195 insertions, 0 deletions
diff --git a/graphics/jp2-pixbuf-loader/README b/graphics/jp2-pixbuf-loader/README
new file mode 100644
index 0000000000..2e9eca2dd1
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/README
@@ -0,0 +1,5 @@
+jp2-pixbuf-loader (jpeg2000 support for gdk-pixbuf2)
+
+This is a GdkPixbuf loader module for JPEG2000. It uses OpenJPEG
+to load images. In particular, this allows qiv to display jpeg2000
+images.
diff --git a/graphics/jp2-pixbuf-loader/doinst.sh b/graphics/jp2-pixbuf-loader/doinst.sh
new file mode 100644
index 0000000000..364414cfa1
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then
+ /usr/bin/update-gdk-pixbuf-loaders >/dev/null 2>&1
+fi
diff --git a/graphics/jp2-pixbuf-loader/git2tarxz.sh b/graphics/jp2-pixbuf-loader/git2tarxz.sh
new file mode 100644
index 0000000000..88964072b6
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/git2tarxz.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that this script doesn't need to be run as root. It does
+# need to be able to write to the current directory it's run from.
+
+# Takes one optional argument, which is the commit or tag to create
+# a tarball of. With no arg, HEAD is used.
+
+PRGNAM=jp2-pixbuf-loader
+CLONE_URL=https://notabug.org/necklace/jp2-pixbuf-loader
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+VERTAG=$( git tag --sort=version:refname | tail -1 | sed 's,^v,,' )
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${VERTAG}+${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=$VERSION"
diff --git a/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.SlackBuild b/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.SlackBuild
new file mode 100644
index 0000000000..00d1218f74
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/bash
+
+# Slackware build script for jp2-pixbuf-loader
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Notes:
+
+# - I'm using the latest git because it actually has some important fixes.
+
+# - gdk-pixbuf2 upstream used to support jpeg2000 via jasper, but
+# removed it from their repo a while back. I could have done a
+# jasper-pixbuf-loader like I did for pcx, but jasper doesn't
+# fully support the jpeg2000 standard. This probably doesn't fully
+# support it either, but it does support more of it anyway.
+
+# - I only ever test this with qiv. geeqie can display jpeg2000 without
+# installing this, and I don't really know what else on SBo might use it.
+
+# - /usr/share/thumbnailers/jp2-pixbuf.thumbnailer is included in the
+# package, but it may not be useful. It's for GUI filemanagers. I
+# checked dolphin and thunar, and they already know how to display
+# thumbnails for .jp2 files without this package. Tried nautilus,
+# and it won't display thumbnails *with* this package. Not being
+# a user of any of the above, I have no idea what's going on and
+# no real motivation to spend any more time on it. Including the
+# thumbnailer doesn't *hurt* anything so I'll leave it in case
+# someone finds it useful for something.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jp2-pixbuf-loader
+VERSION=${VERSION:-0.0.2+20240318_cbd8c7a}
+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-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod -h 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod -h 644 {} +
+
+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 \
+ -Dstrip=true \
+ -Dgdk_pixbuf_query_loaders_path=/bin/true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGELOG* README* COPYING* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/douninst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.info b/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.info
new file mode 100644
index 0000000000..8a8ccaff6f
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/jp2-pixbuf-loader.info
@@ -0,0 +1,10 @@
+PRGNAM="jp2-pixbuf-loader"
+VERSION="0.0.2+20240318_cbd8c7a"
+HOMEPAGE="https://notabug.org/necklace/jp2-pixbuf-loader"
+DOWNLOAD="https://slackware.uk/~urchlay/src/jp2-pixbuf-loader-0.0.2+20240318_cbd8c7a.tar.xz"
+MD5SUM="6e3e4e2db1a775ea68c11c8f32a1cbaa"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/graphics/jp2-pixbuf-loader/slack-desc b/graphics/jp2-pixbuf-loader/slack-desc
new file mode 100644
index 0000000000..783936277d
--- /dev/null
+++ b/graphics/jp2-pixbuf-loader/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------------------------------------------------------|
+jp2-pixbuf-loader: jp2-pixbuf-loader (jpeg2000 support for gdk-pixbuf2)
+jp2-pixbuf-loader:
+jp2-pixbuf-loader: This is a GdkPixbuf loader module for JPEG2000. It uses OpenJPEG
+jp2-pixbuf-loader: to load images. In particular, this allows qiv to display jpeg2000
+jp2-pixbuf-loader: images.
+jp2-pixbuf-loader:
+jp2-pixbuf-loader:
+jp2-pixbuf-loader:
+jp2-pixbuf-loader:
+jp2-pixbuf-loader:
+jp2-pixbuf-loader: