summaryrefslogtreecommitdiffstats
path: root/office/jfbview
diff options
context:
space:
mode:
Diffstat (limited to 'office/jfbview')
-rw-r--r--office/jfbview/README13
-rw-r--r--office/jfbview/jfbview.SlackBuild117
-rw-r--r--office/jfbview/jfbview.info10
-rw-r--r--office/jfbview/jpdfcat.168
-rw-r--r--office/jfbview/jpdfcat.rst57
-rw-r--r--office/jfbview/jpdfgrep.176
-rw-r--r--office/jfbview/jpdfgrep.rst65
-rw-r--r--office/jfbview/slack-desc19
8 files changed, 425 insertions, 0 deletions
diff --git a/office/jfbview/README b/office/jfbview/README
new file mode 100644
index 0000000000..cd2c9dcc5f
--- /dev/null
+++ b/office/jfbview/README
@@ -0,0 +1,13 @@
+jfbview (framebuffer PDF and image viewer)
+
+jfbview is a PDF and image viewer for the Linux framebuffer. It's fast
+and has some advanced features including:
+ * Arbitrary zoom (10% - 1000%) and rotation;
+ * Table of Contents (TOC) viewer for PDF documents;
+ * Interactive text search for PDF documents;
+ * Multi-threaded rendering;
+ * Asynchronous background pre-caching;
+ * Customizable multi-threaded caching.
+
+Optional dependency: imlib2 (autodetected). This will allow jfbview to
+work as an image viewer as well as a PDF viewer.
diff --git a/office/jfbview/jfbview.SlackBuild b/office/jfbview/jfbview.SlackBuild
new file mode 100644
index 0000000000..7764e89518
--- /dev/null
+++ b/office/jfbview/jfbview.SlackBuild
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Slackware build script for jfbview
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This doesn't depend on mupdf or mupdf-legacy because it includes its
+# own bundled mupdf source.
+
+# 20230104 bkw: BUILD=2
+# - fix imlib2 builds (broke with recent imlib2 update to 1.10.0).
+# - fix PKGTYPE mess.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=jfbview
+VERSION=${VERSION:-0.6.0}
+BUILD=${BUILD:-2}
+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-full-source
+unzip $CWD/$PRGNAM-$VERSION-full-source.zip
+cd $PRGNAM-$VERSION-full-source
+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 {} \+
+
+# fix a typo.
+sed -i 's,Plase,Please,' src/main.cpp
+
+# hardcoded man and doc paths.
+sed -i -e 's,share/man,man,g' \
+ -e "s,share/doc/$PRGNAM,doc/$PRGNAM-$VERSION,g" \
+ doc/CMakeLists.txt
+
+# no autodetect for imlib2, help it out some.
+# 20230104 bkw: imlib2 no longer has /usr/bin/imlib2-config, which
+# the FindImlib2.cmake in jfbview's source wants. Work around it by
+# manually setting the cmake vars it would automatically set.
+if [ "${IMLIB:-yes}" = "yes" ] && pkg-config --exists imlib2; then
+ IMLIB_OPT="-DENABLE_IMAGE_SUPPORT=ON -DIMLIB2_FOUND=ON -DIMLIB2_LIBRARIES=-lImlib2"
+else
+ IMLIB_OPT="-DENABLE_IMAGE_SUPPORT=OFF"
+fi
+
+mkdir -p build
+cd build
+ cmake \
+ $IMLIB_OPT \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install/strip DESTDIR=$PKG
+cd ..
+
+# when building without imlib2, we end up with two almost-identical copies
+# of the binary, weighing in at 36MB apiece. use symlinks instead.
+rm -f $PKG/usr/bin/jfbpdf $PKG/usr/man/man1/jfbpdf.1.gz
+ln -s $PRGNAM $PKG/usr/bin/jfbpdf
+ln -s $PRGNAM.1.gz $PKG/usr/man/man1/jfbpdf.1.gz
+
+# upstream's got a nice man page for the main application, but nothing
+# for jpdf(cat|grep), so I wrote these.
+gzip -9c < $CWD/jpdfcat.1 > $PKG/usr/man/man1/jpdfcat.1.gz
+gzip -9c < $CWD/jpdfgrep.1 > $PKG/usr/man/man1/jpdfgrep.1.gz
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+WITHIM=WITHOUT
+objdump -p $PKG/usr/bin/$PRGNAM | grep -q 'NEEDED.*libImlib2' && WITHIM=with
+
+mkdir -p $PKG/install
+sed "s,@WITHIM@,$WITHIM," $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/office/jfbview/jfbview.info b/office/jfbview/jfbview.info
new file mode 100644
index 0000000000..f3739f0990
--- /dev/null
+++ b/office/jfbview/jfbview.info
@@ -0,0 +1,10 @@
+PRGNAM="jfbview"
+VERSION="0.6.0"
+HOMEPAGE="https://github.com/jichu4n/jfbview"
+DOWNLOAD="https://github.com/jichu4n/jfbview/releases/download/0.6.0/jfbview-0.6.0-full-source.zip"
+MD5SUM="ac41da35a97c008424662d7dc489b841"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/office/jfbview/jpdfcat.1 b/office/jfbview/jpdfcat.1
new file mode 100644
index 0000000000..646552f745
--- /dev/null
+++ b/office/jfbview/jpdfcat.1
@@ -0,0 +1,68 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "JPDFCAT" 1 "2022-01-13" "0.6.0" "SlackBuilds.org"
+.SH NAME
+jpdfcat \- extract and print the text content in a PDF document
+.\" RST source for jpdfcat(1) man page. Convert with:
+.
+.\" rst2man.py jpdfcat.rst > jpdfcat.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+jpdfcat [\fI\-P pass\fP] \fBfilename.pdf\fP
+.SH DESCRIPTION
+.sp
+\fBjpdfcat\fP extracts and prints the text content in a PDF document. It\(aqs
+part of the \fBjfbview\fP suite.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-P,\-\-password=pass
+Unlock PDF document with the given password.
+.TP
+.B \-h,\-\-help
+Show built\-in help message.
+.UNINDENT
+.SH COPYRIGHT
+.sp
+jpdfcat is distributed under the Apache License v2.
+.SH AUTHORS
+.sp
+jpdfcat was written by Chuan Ji.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+\fBjfbview\fP(1), \fBjpdfgrep\fP(1), \fBpdftotext\fP(1)
+.\" Generated by docutils manpage writer.
+.
diff --git a/office/jfbview/jpdfcat.rst b/office/jfbview/jpdfcat.rst
new file mode 100644
index 0000000000..0277a572dd
--- /dev/null
+++ b/office/jfbview/jpdfcat.rst
@@ -0,0 +1,57 @@
+.. RST source for jpdfcat(1) man page. Convert with:
+.. rst2man.py jpdfcat.rst > jpdfcat.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 0.6.0
+.. |date| date::
+
+=======
+jpdfcat
+=======
+
+----------------------------------------------------
+extract and print the text content in a PDF document
+----------------------------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+jpdfcat [*-P pass*] **filename.pdf**
+
+DESCRIPTION
+===========
+
+**jpdfcat** extracts and prints the text content in a PDF document. It's
+part of the **jfbview** suite.
+
+OPTIONS
+=======
+
+-P,--password=pass
+ Unlock PDF document with the given password.
+
+-h,--help
+ Show built-in help message.
+
+COPYRIGHT
+=========
+
+jpdfcat is distributed under the Apache License v2.
+
+AUTHORS
+=======
+
+jpdfcat was written by Chuan Ji.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+**jfbview**\(1), **jpdfgrep**\(1), **pdftotext**\(1)
diff --git a/office/jfbview/jpdfgrep.1 b/office/jfbview/jpdfgrep.1
new file mode 100644
index 0000000000..661f157ccd
--- /dev/null
+++ b/office/jfbview/jpdfgrep.1
@@ -0,0 +1,76 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "JPDFGREP" 1 "2022-01-13" "0.6.0" "SlackBuilds.org"
+.SH NAME
+jpdfgrep \- search for a string in a PDF document
+.\" RST source for jpdfgrep(1) man page. Convert with:
+.
+.\" rst2man.py jpdfgrep.rst > jpdfgrep.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+jpdfgrep [\fI\-P pass\fP] [\fI\-w width\fP] \fBfilename.pdf\fP \fBsearch\-string\fP
+.SH DESCRIPTION
+.sp
+\fBjpdfgrep\fP searches for a string in the text content of a PDF
+document and prints all matching lines. Despite the name, the
+\fBsearch\-string\fP is a fixed string, \fInot\fP a regular expression.
+Also, be aware that the file and search string arguments must
+be given in the opposite order from grep.
+.sp
+\fBjpdfgrep\fP is part of the \fBjfbview\fP suite.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-P,\-\-password=pass
+Unlock PDF document with the given password.
+.TP
+.B \-w,\-\-width=width
+Specify result line width. The default is to autodetect terminal width.
+.TP
+.B \-h,\-\-help
+Show built\-in help message.
+.UNINDENT
+.SH COPYRIGHT
+.sp
+jpdfgrep is distributed under the Apache License v2.
+.SH AUTHORS
+.sp
+jpdfgrep was written by Chuan Ji.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+\fBjfbview\fP(1), \fBjpdfcat\fP(1), \fBpdftotext\fP(1)
+.\" Generated by docutils manpage writer.
+.
diff --git a/office/jfbview/jpdfgrep.rst b/office/jfbview/jpdfgrep.rst
new file mode 100644
index 0000000000..462488b4d9
--- /dev/null
+++ b/office/jfbview/jpdfgrep.rst
@@ -0,0 +1,65 @@
+.. RST source for jpdfgrep(1) man page. Convert with:
+.. rst2man.py jpdfgrep.rst > jpdfgrep.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 0.6.0
+.. |date| date::
+
+========
+jpdfgrep
+========
+
+-------------------------------------
+search for a string in a PDF document
+-------------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+jpdfgrep [*-P pass*] [*-w width*] **filename.pdf** **search-string**
+
+DESCRIPTION
+===========
+
+**jpdfgrep** searches for a string in the text content of a PDF
+document and prints all matching lines. Despite the name, the
+**search-string** is a fixed string, *not* a regular expression.
+Also, be aware that the file and search string arguments must
+be given in the opposite order from grep.
+
+**jpdfgrep** is part of the **jfbview** suite.
+
+OPTIONS
+=======
+
+-P,--password=pass
+ Unlock PDF document with the given password.
+
+-w,--width=width
+ Specify result line width. The default is to autodetect terminal width.
+
+-h,--help
+ Show built-in help message.
+
+COPYRIGHT
+=========
+
+jpdfgrep is distributed under the Apache License v2.
+
+AUTHORS
+=======
+
+jpdfgrep was written by Chuan Ji.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+**jfbview**\(1), **jpdfcat**\(1), **pdftotext**\(1)
diff --git a/office/jfbview/slack-desc b/office/jfbview/slack-desc
new file mode 100644
index 0000000000..91d47c1ba2
--- /dev/null
+++ b/office/jfbview/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------------------------------------------------------|
+jfbview: jfbview (framebuffer PDF and image viewer)
+jfbview:
+jfbview: jfbview is a PDF and image viewer for the Linux framebuffer. It's fast
+jfbview: and has some advanced features including:
+jfbview: * Arbitrary zoom (10% - 1000%) and rotation;
+jfbview: * Table of Contents (TOC) viewer for PDF documents;
+jfbview: * Interactive text search for PDF documents;
+jfbview: * Multi-threaded rendering;
+jfbview: * Asynchronous background pre-caching;
+jfbview: * Customizable multi-threaded caching.
+jfbview: This package built @WITHIM@ imlib2.