summaryrefslogtreecommitdiffstats
path: root/office/zathura/zathura.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/zathura/zathura.SlackBuild')
-rw-r--r--office/zathura/zathura.SlackBuild98
1 files changed, 65 insertions, 33 deletions
diff --git a/office/zathura/zathura.SlackBuild b/office/zathura/zathura.SlackBuild
index 61c24d49df..4f5130e113 100644
--- a/office/zathura/zathura.SlackBuild
+++ b/office/zathura/zathura.SlackBuild
@@ -23,6 +23,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20240319 bkw: update for v0.5.4 and zathura-pdf-poppler 0.3.2.
+# These are the last versions that will build on Slackware 15.0
+# due to newer versions needing a newer pango.
+
+# 20230105 bkw: update for v0.5.1 and zathura-pdf-poppler 0.3.1.
+
+# 20221114 bkw:
+# - update for v0.5.1. zathura-pdf-poppler is still 0.3.0.
+# - fix bash/zsh/fish completion.
+# - change symlink name from pdf.so to libpdf.so (helps with completion).
+# - make zathura-pdf-poppler optional.
+# - update prebuilt man pages.
+# - stop installing duplicate man pages if Sphinx is installed.
+
# 20210801 bkw:
# - update for v0.4.8 and -current. build uses meson now, so this script
# can no longer build old zathura versions.
@@ -32,7 +46,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=zathura
-VERSION=${VERSION:-0.4.8}
+VERSION=${VERSION:-0.5.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,7 +55,7 @@ PKGTYPE=${PKGTYPE:-tgz}
# plugins. This build includes the default PDF plugin, without which zathura
# is completely useless.
PLUGIN=$PRGNAM-pdf-poppler
-PLUGINVER=${PLUGINVER:-0.3.0}
+PLUGINVER=${PLUGINVER:-0.3.2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -90,6 +104,15 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
fixperms
+# 20240319 bkw: upstream decided we needed a newer meson, but this
+# builds just fine with our older one.
+sed -i '/meson_version/s,>=0\.61,>=0.59,' meson.build
+
+# 20221114 bkw: Maik Wagner and Alexander Verbovetsky reported that
+# fish and bash completion weren't working, due to the symlink I use
+# to switch between the PDF plugins. This patch should fix it.
+patch -p1 < $CWD/fix_completion.diff
+
mkdir build
cd build
CFLAGS="$SLKCFLAGS" \
@@ -107,8 +130,9 @@ cd build
DESTDIR=$PKG $NINJA install
cd ..
-# man pages taken from Debian. I did this to avoid a dependency
-# on Sphinx (and its tree of 13 deps).
+# man pages prebuilt on a Slackware box with Sphinx installed. I did
+# this to avoid a dependency on Sphinx (and its tree of 13 deps).
+rm -rf $PKG/usr/man # in case we had Sphinx already...
for i in $CWD/man/*.*; do
dest="$PKG/usr/man/man$( echo $i | sed 's,.*\.,,' )"
mkdir -p "$dest"
@@ -124,37 +148,45 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# less easy to navigate).
cp -a doc/api $PKG/usr/doc/$PRGNAM-$VERSION
-# Now build the plugin.
-cd $TMP
-rm -rf $PLUGIN-$PLUGINVER
-tar xvf $CWD/$PLUGIN-$PLUGINVER.tar.gz
-cd $PLUGIN-$PLUGINVER
-fixperms
-
-export PKG_CONFIG_PATH=$PKG/usr/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
-
-mkdir build
-cd build
- CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
- CXXFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
- meson .. \
- --buildtype=release \
- --infodir=/usr/info \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --mandir=/usr/man \
- --prefix=/usr \
- --sysconfdir=/etc \
- -Dstrip=true \
- -Dplugindir=/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf
- "${NINJA:=ninja}"
- DESTDIR=$PKG $NINJA install
-cd ..
-
-ln -s pdf/libpdf-poppler.so $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf.so
+# Now build the plugin, unless the user disabled it.
+if [ "${POPPLER:-yes}" != "no" ]; then
+ INCLUDES="includes"
+ cd $TMP
+ rm -rf $PLUGIN-$PLUGINVER
+ tar xvf $CWD/$PLUGIN-$PLUGINVER.tar.gz
+ cd $PLUGIN-$PLUGINVER
+ fixperms
+ sed -i '/meson_version/s,>=0\.61,>=0.59,' meson.build
+
+ export PKG_CONFIG_PATH=$PKG/usr/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
+
+ mkdir build
+ cd build
+ CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
+ CXXFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true \
+ -Dplugindir=/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+ cd ..
+
+ ln -s pdf/libpdf-poppler.so $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/libpdf.so
+else
+ # if we don't include the plugin, we still want the empty plugin dir.
+ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM
+ INCLUDES="DOES NOT include"
+fi
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s,@INCLUDES@,$INCLUDES," $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG