mirror of
https://github.com/Ponce/slackbuilds
synced 2024-09-29 17:37:55 +02:00
office/zathura: Updated for version 0.5.1, fix shell completion.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
85a18e946d
commit
99fc22f2a6
7 changed files with 118 additions and 47 deletions
|
@ -7,7 +7,10 @@ saving interface as well as an easy usage that mainly focuses on
|
||||||
keyboard interaction.
|
keyboard interaction.
|
||||||
|
|
||||||
This build includes the zathura core and the zathura-pdf-poppler
|
This build includes the zathura core and the zathura-pdf-poppler
|
||||||
plugin.
|
plugin, by default. If you don't want zathura-pdf-poppler, you can
|
||||||
|
run the script with POPPLER=no set in the environment. In this case,
|
||||||
|
zathura will be useless until you install at least one of the plugins
|
||||||
|
listed below.
|
||||||
|
|
||||||
Other plugins exist to support other file types:
|
Other plugins exist to support other file types:
|
||||||
|
|
||||||
|
|
33
office/zathura/fix_completion.diff
Normal file
33
office/zathura/fix_completion.diff
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
diff -Naur zathura-0.5.1/data/bash-completion.in zathura-0.5.1.patched/data/bash-completion.in
|
||||||
|
--- zathura-0.5.1/data/bash-completion.in 2022-09-08 18:17:27.000000000 -0400
|
||||||
|
+++ zathura-0.5.1.patched/data/bash-completion.in 2022-11-14 14:00:24.545471924 -0500
|
||||||
|
@@ -4,6 +4,7 @@
|
||||||
|
|
||||||
|
local EXTS=""
|
||||||
|
for PLUGIN in @PLUGINDIR@/lib*.so; do
|
||||||
|
+ PLUGIN="$( realpath "$PLUGIN" )"
|
||||||
|
case ${PLUGIN##*/} in
|
||||||
|
libpdf-poppler.so)
|
||||||
|
EXTS="$EXTS|pdf|PDF"
|
||||||
|
diff -Naur zathura-0.5.1/data/fish-completion.in zathura-0.5.1.patched/data/fish-completion.in
|
||||||
|
--- zathura-0.5.1/data/fish-completion.in 2022-09-08 18:17:27.000000000 -0400
|
||||||
|
+++ zathura-0.5.1.patched/data/fish-completion.in 2022-11-14 14:02:01.958086580 -0500
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
# Complete custom suffix based on libraries installed
|
||||||
|
function __fish_complete_zathura
|
||||||
|
for plugin in @PLUGINDIR@/*.so
|
||||||
|
+ set plugin (realpath $plugin)
|
||||||
|
switch (basename $plugin)
|
||||||
|
case libpdf-poppler.so
|
||||||
|
__fish_complete_suffix .pdf
|
||||||
|
diff -Naur zathura-0.5.1/data/zsh-completion.in zathura-0.5.1.patched/data/zsh-completion.in
|
||||||
|
--- zathura-0.5.1/data/zsh-completion.in 2022-09-08 18:17:27.000000000 -0400
|
||||||
|
+++ zathura-0.5.1.patched/data/zsh-completion.in 2022-11-14 14:00:17.978363071 -0500
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
local PLUGIN
|
||||||
|
local -a exts
|
||||||
|
for PLUGIN in @PLUGINDIR@/lib*.so; do
|
||||||
|
+ PLUGIN="$( realpath "$PLUGIN" )"
|
||||||
|
case ${PLUGIN##*/} in
|
||||||
|
libpdf-poppler.so)
|
||||||
|
exts+=( pdf PDF )
|
|
@ -1,8 +1,5 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "ZATHURA" "1" "2021-07-14" "0.4.8" "zathura"
|
|
||||||
.SH NAME
|
|
||||||
zathura \- a document viewer
|
|
||||||
.
|
.
|
||||||
.nr rst2man-indent-level 0
|
.nr rst2man-indent-level 0
|
||||||
.
|
.
|
||||||
|
@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||||
..
|
..
|
||||||
|
.TH "ZATHURA" "1" "2022-09-08" "0.5.1" "zathura"
|
||||||
|
.SH NAME
|
||||||
|
zathura \- a document viewer
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.sp
|
.sp
|
||||||
zathura [\-e XID] [\-c PATH] [\-d PATH] [\-p PATH] [\-w PASSWORD] [\-P NUMBER]
|
zathura [\-e XID] [\-c PATH] [\-d PATH] [\-p PATH] [\-w PASSWORD] [\-P NUMBER]
|
||||||
|
@ -88,13 +88,13 @@ correct file open or does not exist, no new instance will be spanned.
|
||||||
.BI \-\-mode\fB= mode
|
.BI \-\-mode\fB= mode
|
||||||
Start in a non\-default mode
|
Start in a non\-default mode
|
||||||
.TP
|
.TP
|
||||||
.B \-\-fork
|
.B \-\-fork
|
||||||
Fork into background
|
Fork into background
|
||||||
.TP
|
.TP
|
||||||
.B \-\-version
|
.B \-\-version
|
||||||
Display version string and exit
|
Display version string and exit
|
||||||
.TP
|
.TP
|
||||||
.B \-\-help
|
.B \-\-help
|
||||||
Display help and exit
|
Display help and exit
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.SH MOUSE AND KEY BINDINGS
|
.SH MOUSE AND KEY BINDINGS
|
||||||
|
@ -328,7 +328,8 @@ List bookmarks
|
||||||
Close document
|
Close document
|
||||||
.TP
|
.TP
|
||||||
.B exec
|
.B exec
|
||||||
Execute an external command
|
Execute an external command. \fB$FILE\fP expands to the current document path,
|
||||||
|
and \fB$PAGE\fP to the current page number
|
||||||
.TP
|
.TP
|
||||||
.B info
|
.B info
|
||||||
Show document information
|
Show document information
|
||||||
|
@ -424,6 +425,6 @@ appear, if overlay\-scrollbar is enabled in GTK_MODULES.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
pwmt.org
|
pwmt.org
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
2009-2021, pwmt.org
|
2009-2018, pwmt.org
|
||||||
.\" Generated by docutils manpage writer.
|
.\" Generated by docutils manpage writer.
|
||||||
.
|
.
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "ZATHURARC" "5" "2021-07-14" "0.4.8" "zathura"
|
|
||||||
.SH NAME
|
|
||||||
zathurarc \- zathura configuration file
|
|
||||||
.
|
.
|
||||||
.nr rst2man-indent-level 0
|
.nr rst2man-indent-level 0
|
||||||
.
|
.
|
||||||
|
@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||||
..
|
..
|
||||||
|
.TH "ZATHURARC" "5" "2022-09-08" "0.5.1" "zathura"
|
||||||
|
.SH NAME
|
||||||
|
zathurarc \- zathura configuration file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.sp
|
.sp
|
||||||
/etc/zathurarc, $XDG_CONFIG_HOME/zathura/zathurarc
|
/etc/zathurarc, $XDG_CONFIG_HOME/zathura/zathurarc
|
||||||
|
@ -338,7 +338,8 @@ Display link target.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBexec\fP:
|
\fBexec\fP:
|
||||||
.sp
|
.sp
|
||||||
Execute an external command.
|
Execute an external command. \fB$FILE\fP expands to the current document path,
|
||||||
|
and \fB$PAGE\fP to the current page number.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBfocus_inputbar\fP
|
\fBfocus_inputbar\fP
|
||||||
.sp
|
.sp
|
||||||
|
@ -1207,6 +1208,15 @@ Value type: Boolean
|
||||||
Default value: false
|
Default value: false
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.TP
|
.TP
|
||||||
|
.B \fIstatusbar\-page\-percent\fP
|
||||||
|
Display (current page / total pages) as a percent in the statusbar.
|
||||||
|
.INDENT 7.0
|
||||||
|
.IP \(bu 2
|
||||||
|
Value type: Boolean
|
||||||
|
.IP \(bu 2
|
||||||
|
Default value: false
|
||||||
|
.UNINDENT
|
||||||
|
.TP
|
||||||
.B \fIstatusbar\-home\-tilde\fP
|
.B \fIstatusbar\-home\-tilde\fP
|
||||||
Display a short version of the file path, which replaces $HOME with ~, in the statusbar.
|
Display a short version of the file path, which replaces $HOME with ~, in the statusbar.
|
||||||
.INDENT 7.0
|
.INDENT 7.0
|
||||||
|
@ -1362,6 +1372,9 @@ printing
|
||||||
bookmarks and history
|
bookmarks and history
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
|
The strict sandbox mode is still experimental with some libc implementations.
|
||||||
|
Currently supported and tested libc implementations: glibc
|
||||||
|
.sp
|
||||||
No feature regressions are expected when using normal sandbox mode.
|
No feature regressions are expected when using normal sandbox mode.
|
||||||
.sp
|
.sp
|
||||||
When running under WSL, the default is "none" since seccomp is not supported in
|
When running under WSL, the default is "none" since seccomp is not supported in
|
||||||
|
@ -1392,6 +1405,6 @@ zathura(1)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
pwmt.org
|
pwmt.org
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
2009-2021, pwmt.org
|
2009-2018, pwmt.org
|
||||||
.\" Generated by docutils manpage writer.
|
.\" Generated by docutils manpage writer.
|
||||||
.
|
.
|
||||||
|
|
|
@ -14,6 +14,6 @@ zathura: zathura is an application that provides a minimalistic and space
|
||||||
zathura: saving interface as well as an easy usage that mainly focuses on
|
zathura: saving interface as well as an easy usage that mainly focuses on
|
||||||
zathura: keyboard interaction.
|
zathura: keyboard interaction.
|
||||||
zathura:
|
zathura:
|
||||||
zathura:
|
zathura: This package @INCLUDES@ the zathura-pdf-poppler plugin.
|
||||||
zathura:
|
zathura:
|
||||||
zathura:
|
zathura:
|
||||||
|
|
|
@ -23,6 +23,14 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# 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:
|
# 20210801 bkw:
|
||||||
# - update for v0.4.8 and -current. build uses meson now, so this script
|
# - update for v0.4.8 and -current. build uses meson now, so this script
|
||||||
# can no longer build old zathura versions.
|
# can no longer build old zathura versions.
|
||||||
|
@ -32,7 +40,7 @@
|
||||||
cd $(dirname $0) ; CWD=$(pwd)
|
cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
|
||||||
PRGNAM=zathura
|
PRGNAM=zathura
|
||||||
VERSION=${VERSION:-0.4.8}
|
VERSION=${VERSION:-0.5.1}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
PKGTYPE=${PKGTYPE:-tgz}
|
PKGTYPE=${PKGTYPE:-tgz}
|
||||||
|
@ -90,6 +98,11 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||||
cd $PRGNAM-$VERSION
|
cd $PRGNAM-$VERSION
|
||||||
fixperms
|
fixperms
|
||||||
|
|
||||||
|
# 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
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
|
@ -107,8 +120,9 @@ cd build
|
||||||
DESTDIR=$PKG $NINJA install
|
DESTDIR=$PKG $NINJA install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# man pages taken from Debian. I did this to avoid a dependency
|
# man pages prebuilt on a Slackware box with Sphinx installed. I did
|
||||||
# on Sphinx (and its tree of 13 deps).
|
# 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
|
for i in $CWD/man/*.*; do
|
||||||
dest="$PKG/usr/man/man$( echo $i | sed 's,.*\.,,' )"
|
dest="$PKG/usr/man/man$( echo $i | sed 's,.*\.,,' )"
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
|
@ -124,37 +138,44 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
# less easy to navigate).
|
# less easy to navigate).
|
||||||
cp -a doc/api $PKG/usr/doc/$PRGNAM-$VERSION
|
cp -a doc/api $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
|
||||||
# Now build the plugin.
|
# Now build the plugin, unless the user disabled it.
|
||||||
cd $TMP
|
if [ "${POPPLER:-yes}" != "no" ]; then
|
||||||
rm -rf $PLUGIN-$PLUGINVER
|
INCLUDES="includes"
|
||||||
tar xvf $CWD/$PLUGIN-$PLUGINVER.tar.gz
|
cd $TMP
|
||||||
cd $PLUGIN-$PLUGINVER
|
rm -rf $PLUGIN-$PLUGINVER
|
||||||
fixperms
|
tar xvf $CWD/$PLUGIN-$PLUGINVER.tar.gz
|
||||||
|
cd $PLUGIN-$PLUGINVER
|
||||||
|
fixperms
|
||||||
|
|
||||||
export PKG_CONFIG_PATH=$PKG/usr/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
|
export PKG_CONFIG_PATH=$PKG/usr/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
|
CFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
|
||||||
CXXFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
|
CXXFLAGS="$SLKCFLAGS -I$PKG/usr/include" \
|
||||||
meson .. \
|
meson .. \
|
||||||
--buildtype=release \
|
--buildtype=release \
|
||||||
--infodir=/usr/info \
|
--infodir=/usr/info \
|
||||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--mandir=/usr/man \
|
--mandir=/usr/man \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
-Dstrip=true \
|
-Dstrip=true \
|
||||||
-Dplugindir=/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf
|
-Dplugindir=/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf
|
||||||
"${NINJA:=ninja}"
|
"${NINJA:=ninja}"
|
||||||
DESTDIR=$PKG $NINJA install
|
DESTDIR=$PKG $NINJA install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
ln -s pdf/libpdf-poppler.so $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM/pdf.so
|
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
|
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
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
||||||
cd $PKG
|
cd $PKG
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
PRGNAM="zathura"
|
PRGNAM="zathura"
|
||||||
VERSION="0.4.8"
|
VERSION="0.5.1"
|
||||||
HOMEPAGE="https://github.com/pwmt/zathura"
|
HOMEPAGE="https://github.com/pwmt/zathura"
|
||||||
DOWNLOAD="https://github.com/pwmt/zathura/archive/0.4.8/zathura-0.4.8.tar.gz \
|
DOWNLOAD="https://github.com/pwmt/zathura/archive/0.5.1/zathura-0.5.1.tar.gz \
|
||||||
https://github.com/pwmt/zathura-pdf-poppler/archive/0.3.0/zathura-pdf-poppler-0.3.0.tar.gz"
|
https://github.com/pwmt/zathura-pdf-poppler/archive/0.3.0/zathura-pdf-poppler-0.3.0.tar.gz"
|
||||||
MD5SUM="ea5457f064bdcfb1fda1f6f27bafbeb7 \
|
MD5SUM="ebff8233b2e588def137a33a632b1c91 \
|
||||||
c500be47cfac0e76e81309cfa7847353"
|
c500be47cfac0e76e81309cfa7847353"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
|
|
Loading…
Reference in a new issue