ports/mail/dovecot22/files/patch-src_plugins_fts_decode2text.sh
Danilo G. Baio bd62adb536 Add mail/dovecot22 (v2.2.35) and mail/dovecot-pigeonhole04 (v0.4.23)
This brings back Dovecot 2.2.35 to the tree because there is an issue
with version 2.3.1 and replication in some scenarios [1].

Keep this version until this problem gets fixed upstream.

1 - https://www.dovecot.org/list/dovecot/2018-April/111477.html

Approved by:	adamw (maintainer of mail/dovecot)
Approved by:	ler   (maintainer of mail/dovecot-pigeonhole)
2018-04-22 21:35:38 +00:00

18 lines
587 B
Bash

/usr gets changed to ${LOCALBASE} in post-patch:, so we
cheat and set xpdf's path to /usr/lib.
--- src/plugins/fts/decode2text.sh.orig 2015-12-12 16:32:01 UTC
+++ src/plugins/fts/decode2text.sh
@@ -79,7 +79,11 @@ wait_timeout() {
LANG=en_US.UTF-8
export LANG
if [ $fmt = "pdf" ]; then
- /usr/bin/pdftotext $path - 2>/dev/null&
+ if [ -x /usr/lib/xpdf/pdftotext ]; then
+ /usr/lib/xpdf/pdftotext $path - 2>/dev/null&
+ else
+ /usr/bin/pdftotext $path - 2>/dev/null&
+ fi
wait_timeout 2>/dev/null
elif [ $fmt = "doc" ]; then
(/usr/bin/catdoc $path; true) 2>/dev/null&