summaryrefslogtreecommitdiffstats
path: root/office/paps
diff options
context:
space:
mode:
author B. Watson2023-05-03 22:59:06 +0200
committer Willy Sudiarto Raharjo2023-05-06 03:28:31 +0200
commit3c988cae12cede1e3188f73da6ecb785b768b6ca (patch)
treeb818cde24868731b22fc00d2a86b523a49c37f7d /office/paps
parent672fd494df9635e58cd657347f8b75e196481695 (diff)
downloadslackbuilds-3c988cae12cede1e3188f73da6ecb785b768b6ca.tar.gz
office/paps: Updated for version 0.8.0, fix src-to-paps.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/paps')
-rw-r--r--office/paps/README4
-rw-r--r--office/paps/paps.SlackBuild20
-rw-r--r--office/paps/paps.info6
-rw-r--r--office/paps/src-to-paps.diff31
4 files changed, 54 insertions, 7 deletions
diff --git a/office/paps/README b/office/paps/README
index 0f0dd83909..d3f61b8f75 100644
--- a/office/paps/README
+++ b/office/paps/README
@@ -3,3 +3,7 @@ paps (Unicode-aware text to PostScript/PDF/SVG converter)
paps reads a UTF-8 encoded file and generates a PostScript language
(or PDF, or SVG) rendering of it, on standard output. The rendering is
done by creating outline curves through the pango ft2 backend.
+
+Optional runtime dependency: source-highlight. This is only used by
+the src-to-paps command, and can be installed after the fact, without
+rebuilding paps.
diff --git a/office/paps/paps.SlackBuild b/office/paps/paps.SlackBuild
index 93e901a428..07883a48fb 100644
--- a/office/paps/paps.SlackBuild
+++ b/office/paps/paps.SlackBuild
@@ -23,6 +23,11 @@
# Now maintained by B. Watson <urchlay@slackware.uk>.
+# 20230503 bkw: update for v0.8.0.
+# - README.md is back.
+# - fix src-to-paps shebang and path to .outlang file.
+# - document optional dependency source-highlight.
+
# 20210929 bkw: fix build on -current (--disable-Werror).
# 20191130 bkw: update for v0.7.1. upstream removed README.md and examples.
@@ -39,7 +44,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=paps
-VERSION=${VERSION:-0.7.1}
+VERSION=${VERSION:-0.8.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -87,6 +92,12 @@ 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 the shebang: #!/usr/bin/python is still python 2 on Slackware 15.0.
+# Fix the hardcoded path to pango_markup.outlang.
+# Add a few more filename extensions for autodetecting various languages,
+# including ".SlackBuild".
+patch -p1 < $CWD/src-to-paps.diff
+
./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -102,9 +113,10 @@ make
make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING.LIB ChangeLog NEWS $PKG/usr/doc/$PRGNAM-$VERSION/
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING.LIB ChangeLog NEWS README.md $PKGDOC/
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/office/paps/paps.info b/office/paps/paps.info
index 0d8cb9081d..4e9493944a 100644
--- a/office/paps/paps.info
+++ b/office/paps/paps.info
@@ -1,8 +1,8 @@
PRGNAM="paps"
-VERSION="0.7.1"
+VERSION="0.8.0"
HOMEPAGE="https://github.com/dov/paps"
-DOWNLOAD="https://github.com/dov/paps/releases/download/v0.7.1/paps-0.7.1.tar.gz"
-MD5SUM="b058bcc7d958fb53408942088cc1f365"
+DOWNLOAD="https://github.com/dov/paps/releases/download/v0.8.0/paps-0.8.0.tar.gz"
+MD5SUM="6bd661b8fd224adc3343a91e6521a4f2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/office/paps/src-to-paps.diff b/office/paps/src-to-paps.diff
new file mode 100644
index 0000000000..794f8d1bcf
--- /dev/null
+++ b/office/paps/src-to-paps.diff
@@ -0,0 +1,31 @@
+diff -Naur paps-0.8.0/scripts/src-to-paps paps-0.8.0.patched/scripts/src-to-paps
+--- paps-0.8.0/scripts/src-to-paps 2023-02-09 02:27:38.000000000 -0500
++++ paps-0.8.0.patched/scripts/src-to-paps 2023-05-03 16:53:01.568348300 -0400
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+
+ ######################################################################
+ # Use GNU source-hightlight to turn source code into pango markup
+@@ -49,7 +49,7 @@
+ # Defaults
+
+ # TBD - Make this a configuration variable
+-pango_outlang_path = '/usr/local/share/paps/pango_markup.outlang'
++pango_outlang_path = '/usr/share/paps/pango_markup.outlang'
+
+ parser = argparse.ArgumentParser(description='Process a file')
+ parser.add_argument('-o', '--output',
+@@ -114,7 +114,11 @@
+ '.cpp' : 'C',
+ '.cxx' : 'C',
+ '.cc' : 'C',
+- '.c' : 'C'
++ '.c' : 'C',
++ '.pl' : 'perl',
++ '.SlackBuild' : 'sh',
++ '.cs' : 'csharp',
++ '.s' : 'asm'
+ }.get(Path(fn).suffix)
+ if args.source_lang is None
+ else args.source_lang)