diff options
| author | pinoaffe <pinoaffe@gmail.com> | 2025-08-28 15:24:58 +0200 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-01-12 22:42:10 +0100 |
| commit | 91c4db1eead6d87b02c8e1641d2bc3db0bb247ae (patch) | |
| tree | 65a55fdcd7bf7051330018aa589aae4938c5e6a3 | |
| parent | 75223ca4b6fee77f175fbb6c7700b752acdf81bb (diff) | |
gnu: mupdf: Install shared python libraries.
* gnu/packages/pdf.scm (mupdf)[inputs]: Add leptonica and tesseract-ocr.
[native-inputs]: Add python-3, python-clang-13, and swig-next.
[#:phases]: Add ‘install-python’.
Change-Id: Ia40183cfa2b2a97210d996485f9a2d3a992b4309
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
| -rw-r--r-- | gnu/packages/pdf.scm | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 306a04976b1..eccdcb13840 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -93,6 +93,7 @@ #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages lesstif) #:use-module (gnu packages libffi) + #:use-module (gnu packages llvm) #:use-module (gnu packages linux) #:use-module (gnu packages lua) #:use-module (gnu packages man) @@ -115,6 +116,7 @@ #:use-module (gnu packages sdl) #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) + #:use-module (gnu packages swig) #:use-module (gnu packages tex) #:use-module (gnu packages time) #:use-module (gnu packages tcl) @@ -950,15 +952,20 @@ and based on PDF specification 1.7.") gumbo-parser harfbuzz jbig2dec + leptonica libjpeg-turbo libx11 libxext mujs openjpeg openssl + tesseract-ocr zlib)) (native-inputs - (list pkg-config)) + (list pkg-config + python-3 + python-clang-13 + swig-next)) (arguments (list #:tests? #f ;no check target @@ -986,7 +993,23 @@ and based on PDF specification 1.7.") (string-append "prefix=" #$output)) #:phases #~(modify-phases %standard-phases - (delete 'configure)))) ;no configure script + (delete 'configure) ;no configure script + (add-after 'install 'install-python + (lambda* (#:key make-flags #:allow-other-keys) + (substitute* "Makefile" + (("\\(pydir\\)") + (format #f "(prefix)/lib/python~s/site-packages" + #$(version-major+minor + (package-version + (this-package-native-input "python")))))) + (apply invoke + "make" + "install-shared-python" + "USE_SYSTEM_LIBS=yes" + "HAVE_LEPTONICA=yes" + "HAVE_TESSERACT=yes" + "VENV_FLAG=" + make-flags)))))) (home-page "https://mupdf.com") (synopsis "Lightweight PDF viewer and toolkit") (description |
