diff options
author | B. Watson <urchlay@slackware.uk> | 2022-11-14 14:47:31 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-11-19 10:08:13 +0700 |
commit | 99fc22f2a661ae3f7005d08e13f012aaedf38e01 (patch) | |
tree | fc601506e5473db3dde61a2ed8552ad26616d256 /office | |
parent | 85a18e946dee2ac7adb2bfe6924f3e15df8345ff (diff) |
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>
Diffstat (limited to 'office')
-rw-r--r-- | office/zathura/README | 5 | ||||
-rw-r--r-- | office/zathura/fix_completion.diff | 33 | ||||
-rw-r--r-- | office/zathura/man/zathura.1 | 17 | ||||
-rw-r--r-- | office/zathura/man/zathurarc.5 | 23 | ||||
-rw-r--r-- | office/zathura/slack-desc | 2 | ||||
-rw-r--r-- | office/zathura/zathura.SlackBuild | 85 | ||||
-rw-r--r-- | office/zathura/zathura.info | 6 |
7 files changed, 121 insertions, 50 deletions
diff --git a/office/zathura/README b/office/zathura/README index bedfe1ddc06aa..99ba47a117c81 100644 --- a/office/zathura/README +++ b/office/zathura/README @@ -7,7 +7,10 @@ saving interface as well as an easy usage that mainly focuses on keyboard interaction. 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: diff --git a/office/zathura/fix_completion.diff b/office/zathura/fix_completion.diff new file mode 100644 index 0000000000000..1e12927fa4a69 --- /dev/null +++ b/office/zathura/fix_completion.diff @@ -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 ) diff --git a/office/zathura/man/zathura.1 b/office/zathura/man/zathura.1 index 5df172841ea4b..dd5b216ebb530 100644 --- a/office/zathura/man/zathura.1 +++ b/office/zathura/man/zathura.1 @@ -1,8 +1,5 @@ .\" 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 . @@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .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 .sp 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 Start in a non\-default mode .TP -.B \-\-fork +.B \-\-fork Fork into background .TP -.B \-\-version +.B \-\-version Display version string and exit .TP -.B \-\-help +.B \-\-help Display help and exit .UNINDENT .SH MOUSE AND KEY BINDINGS @@ -328,7 +328,8 @@ List bookmarks Close document .TP .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 .B info Show document information @@ -424,6 +425,6 @@ appear, if overlay\-scrollbar is enabled in GTK_MODULES. .SH AUTHOR pwmt.org .SH COPYRIGHT -2009-2021, pwmt.org +2009-2018, pwmt.org .\" Generated by docutils manpage writer. . diff --git a/office/zathura/man/zathurarc.5 b/office/zathura/man/zathurarc.5 index bd6d64daad9f7..e165c7cd58a20 100644 --- a/office/zathura/man/zathurarc.5 +++ b/office/zathura/man/zathurarc.5 @@ -1,8 +1,5 @@ .\" 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 . @@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .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 .sp /etc/zathurarc, $XDG_CONFIG_HOME/zathura/zathurarc @@ -338,7 +338,8 @@ Display link target. .IP \(bu 2 \fBexec\fP: .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 \fBfocus_inputbar\fP .sp @@ -1207,6 +1208,15 @@ Value type: Boolean Default value: false .UNINDENT .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 Display a short version of the file path, which replaces $HOME with ~, in the statusbar. .INDENT 7.0 @@ -1362,6 +1372,9 @@ printing bookmarks and history .UNINDENT .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. .sp When running under WSL, the default is "none" since seccomp is not supported in @@ -1392,6 +1405,6 @@ zathura(1) .SH AUTHOR pwmt.org .SH COPYRIGHT -2009-2021, pwmt.org +2009-2018, pwmt.org .\" Generated by docutils manpage writer. . diff --git a/office/zathura/slack-desc b/office/zathura/slack-desc index 871551a92b9a1..ee6695b0b226f 100644 --- a/office/zathura/slack-desc +++ b/office/zathura/slack-desc @@ -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: keyboard interaction. zathura: -zathura: +zathura: This package @INCLUDES@ the zathura-pdf-poppler plugin. zathura: zathura: diff --git a/office/zathura/zathura.SlackBuild b/office/zathura/zathura.SlackBuild index 61c24d49df235..e6729f35075c3 100644 --- a/office/zathura/zathura.SlackBuild +++ b/office/zathura/zathura.SlackBuild @@ -23,6 +23,14 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # 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: # - update for v0.4.8 and -current. build uses meson now, so this script # can no longer build old zathura versions. @@ -32,7 +40,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=zathura -VERSION=${VERSION:-0.4.8} +VERSION=${VERSION:-0.5.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -90,6 +98,11 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION 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 cd build CFLAGS="$SLKCFLAGS" \ @@ -107,8 +120,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 +138,44 @@ 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 + + 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 diff --git a/office/zathura/zathura.info b/office/zathura/zathura.info index 70b665d13f512..ab2a7a43c0e4b 100644 --- a/office/zathura/zathura.info +++ b/office/zathura/zathura.info @@ -1,9 +1,9 @@ PRGNAM="zathura" -VERSION="0.4.8" +VERSION="0.5.1" 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" -MD5SUM="ea5457f064bdcfb1fda1f6f27bafbeb7 \ +MD5SUM="ebff8233b2e588def137a33a632b1c91 \ c500be47cfac0e76e81309cfa7847353" DOWNLOAD_x86_64="" MD5SUM_x86_64="" |