freebsd-ports/graphics/llpp/files/patch-misc_llppac
Carlos J. Puga Medina e0deda9088 graphics/llpp: Update to v25, unbreak after r431509
Changelog:
  http://repo.or.cz/llpp.git/shortlog/refs/tags/v25

PR:		216158
Submitted by:	Tobias Kortkamp <t@tobik.me> (maintainer)
2017-01-25 22:11:15 +00:00

37 lines
1.1 KiB
Text

--- misc/llppac.orig 2016-11-29 15:11:31 UTC
+++ misc/llppac
@@ -7,7 +7,7 @@ die() {
}
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/llpp"
-test -d "$cachedir" || die "cache directory '$cachedir' does not exist"
+mkdir -p "$cachedir"
caspsuf=
type=
@@ -49,6 +49,7 @@ while getopts m:t:f opt; do
m) mime=$OPTARG;;
t) type=$OPTARG;;
f) force=1;;
+ c) css="-s $OPTARG";;
?) die "usage: $0 [-m mime/type] [-t filter] [-f] [path|url]";;
esac
done
@@ -117,7 +118,7 @@ case $type in
djvu) conv='ddjvu -format=pdf - "$casp"';;
html) {
missing prince "PrinceXML(http://www.princexml.com/)"
- conv='prince -s /home/malc/xsrc/llpp/misc/rr.css - -o "$casp"'
+ conv='prince $css - -o "$casp"'
};;
word) {
if executable_p unoconv && test -z "$dc"; then
@@ -200,7 +201,7 @@ EOF
*) die "unhandled filter type: '$type'";;
esac
-hash=$(md5sum "$md5of") || die "$hash"
+hash=$(md5 -q "$md5of") || die "$hash"
casp=$cachedir/${hash%% *}$caspsuf
(test -n "$force" -o ! -e "$casp") && eval "$filt" "$conv"