[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: calibre: Fix PDF to EPUB conversion.
From: |
guix-commits |
Subject: |
01/01: gnu: calibre: Fix PDF to EPUB conversion. |
Date: |
Mon, 21 Jan 2019 04:56:44 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit b65b78ff386978ea4f29ddf2c913ed0fe3d582d0
Author: Mathieu Othacehe <address@hidden>
Date: Mon Jan 21 10:52:10 2019 +0100
gnu: calibre: Fix PDF to EPUB conversion.
When trying to convert a PDF to EPUB, the following error occurs:
File
"/gnu/store/kz6bgqw9z7akj11zh20wkx14cgq0s3n2-calibre-3.35.0/lib/calibre/calibre/ebooks/pdf/pdftohtml.py",
line 76, in pdftohtml
_('Could not find pdftohtml, check it is in your PATH'))
Hardcode pdftohtml binary path by patching pdftohtml.py.
* gnu/packages/ebook.scm (calibre)[arguments]: Patch pdftohtml.py in
'configure phase to set hardcode pdftohtml binary path.
---
gnu/packages/ebook.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 2859258..0ab482c 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -177,6 +177,10 @@
(pyqt (assoc-ref inputs "python2-pyqt")))
(substitute* "setup/build_environment.py"
(("sys.prefix") (string-append "'" pyqt "'")))
+ (substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
+ (("PDFTOHTML = 'pdftohtml'")
+ (string-append "PDFTOHTML = \"" (assoc-ref inputs "poppler")
+ "/bin/pdftohtml\"")))
(setenv "PODOFO_INC_DIR" (string-append podofo
"/include/podofo"))
(setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))
#t)))