Package: mupdf
Version: 1.17.0+ds1-1
Severity: wishlist
X-Debbugs-Cc: none, J-V Peetz <[email protected]>
Dear Kan-Ru Chen,
please find attached a patch which makes /usr/bin/mupdf able to work with files
compressed with zstandard. The patch also replaces the usage of tempfile
by mktemp.
Maybe, you like to consider it for a future release.
Best regards,
Jörg.
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (600, 'testing'), (500, 'unstable'), (5, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.7.14 (SMP w/8 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages mupdf depends on:
ii libc6 2.30-8
ii libfreetype6 2.10.2+dfsg-3
ii libharfbuzz0b 2.6.7-1
ii libjbig2dec0 0.18+20200417-1
ii libjpeg62-turbo 1:2.0.5-1.1
ii libmujs1 1.0.7-2
ii libopenjp2-7 2.3.1-1
ii libx11-6 2:1.6.10-3
ii libxext6 2:1.3.3-1+b2
ii zlib1g 1:1.2.11.dfsg-2
mupdf recommends no packages.
Versions of packages mupdf suggests:
pn mupdf-tools <none>
-- no debconf information
--- xx/usr/bin/mupdf 2020-08-06 14:48:09.000000000 +0200
+++ /usr/bin/mupdf 2020-07-23 11:23:14.114410084 +0200
@@ -23,7 +23,7 @@
cmd="/usr/lib/mupdf/mupdf-x11"
-ext=".gz .Z .xz .bz2"
+ext=".gz .Z .xz .bz2 .zst"
file=""
cmdtmp=$cmd
@@ -44,12 +44,13 @@
test "$file" || exec $cmd "$@"
-tmp=$(tempfile -s .pdf)
+tmp=$(mktemp -t fileXXXXXX.pdf)
case "$file" in
*.gz|*.Z) zcat -- "$file" > $tmp && file=$tmp;;
*.xz) xzcat -- "$file" > $tmp && file=$tmp;;
*.bz2) bzcat -- "$file" > $tmp && file=$tmp;;
+ *.zst) zstdcat -- "$file" > $tmp && file=$tmp;;
esac
trap 'rm -f $tmp' EXIT