diff options
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r-- | gnu/packages/pdf.scm | 126 |
1 files changed, 59 insertions, 67 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 6eee460740..a592d11bce 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -84,6 +84,7 @@ #:use-module (gnu packages lua) #:use-module (gnu packages man) #:use-module (gnu packages markup) + #:use-module (gnu packages nss) #:use-module (gnu packages ocr) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -231,29 +232,30 @@ please install the @code{flyer-composer-gui} package."))) (define-public poppler (package (name "poppler") - (version "21.07.0") + (version "22.09.0") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 - "1m54hsi8z6c13jdbjwz55flkra1mahmkw2igavbf8p86d2gv4sp2")))) + "0bhyli95h3dkirjc0ibh08s4nim6rn7f38sbfzdwln8k454gga6p")))) (build-system cmake-build-system) ;; FIXME: ;; use libcurl: no - (inputs `(("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libtiff" ,libtiff) - ("lcms" ,lcms) - ("openjpeg" ,openjpeg) - ("zlib" ,zlib) - - ;; To build poppler-glib (as needed by Evince), we need Cairo and - ;; GLib. But of course, that Cairo must not depend on Poppler. - ("cairo" ,cairo-sans-poppler))) + (inputs (list fontconfig + freetype + libjpeg-turbo + libpng + libtiff + lcms + nss ;for 'pdfsig' + openjpeg + poppler-data + zlib + ;; To build poppler-glib (as needed by Evince), we need Cairo and + ;; GLib. But of course, that Cairo must not depend on Poppler. + cairo-sans-poppler)) (propagated-inputs ;; As per poppler-cairo and poppler-glib.pc. ;; XXX: Ideally we'd propagate Cairo too, but that would require a @@ -262,24 +264,26 @@ please install the @code{flyer-composer-gui} package."))) (native-inputs (list pkg-config `(,glib "bin") ; glib-mkenums, etc. - gobject-introspection)) + gobject-introspection + python)) (arguments - `(#:tests? #f ;no test data provided with the tarball - #:configure-flags - (let* ((out (assoc-ref %outputs "out")) - (lib (string-append out "/lib"))) - (list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files - "-DENABLE_ZLIB=ON" - "-DENABLE_BOOST=OFF" ;disable Boost to save size - (string-append "-DCMAKE_INSTALL_LIBDIR=" lib) - (string-append "-DCMAKE_INSTALL_RPATH=" lib))) - ,@(if (%current-target-system) - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-PKG_CONFIG - (lambda _ - (setenv "PKG_CONFIG" ,(pkg-config-for-target)))))) - '()))) + (list + ;; The Poppler test suite needs to be downloaded separately and contains + ;; non-free (and non-auditable) files, so we skip them. See + ;; <https://lists.gnu.org/archive/html/guix-devel/2022-06/msg00394.html>. + #:tests? #f + #:configure-flags + #~(list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files + "-DENABLE_ZLIB=ON" + "-DENABLE_BOOST=OFF" ;disable Boost to save size + (string-append "-DCMAKE_INSTALL_LIBDIR=" #$output "/lib") + (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib")) + #:phases + (if (%current-target-system) #~%standard-phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-PKG_CONFIG + (lambda _ + (setenv "PKG_CONFIG" #$(pkg-config-for-target)))))))) (synopsis "PDF rendering library") (description "Poppler is a PDF rendering library based on the xpdf-3.0 code base.") @@ -844,46 +848,34 @@ line tools for batch rendering @command{pdfdraw}, rewriting files (define-public qpdf (package - (name "qpdf") - (version "10.0.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version - "/qpdf-" version ".tar.gz")) - (sha256 - (base32 - "0yw2cpw7ygfd6jlgpwbi8vsnvv9p55zxp9h17x77z2qq733pf8jx")))) - (build-system gnu-build-system) - (arguments - `(#:disallowed-references (,perl) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-paths - (lambda _ - (substitute* "make/libtool.mk" - (("SHELL=/bin/bash") - (string-append "SHELL=" (which "bash")))) - (substitute* (append - '("qtest/bin/qtest-driver") - (find-files "." "\\.test")) - (("/usr/bin/env") (which "env"))) - #t))))) - (native-inputs - (list pkg-config perl)) - (propagated-inputs - ;; In Requires.private of libqpdf.pc. - (list libjpeg-turbo zlib)) - (synopsis "Command-line tools and library for transforming PDF files") - (description - "QPDF is a command-line program that does structural, content-preserving + (name "qpdf") + (version "11.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version + "/qpdf-" version ".tar.gz")) + (sha256 + (base32 + "0bg2d4585nxss2zakq105ibhzzsa1bhwpmr0k8752fg2qqxcz9rl")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags #~'("-DBUILD_STATIC_LIBS=OFF"))) + (native-inputs + (list perl pkg-config)) + (propagated-inputs + ;; In Requires.private of libqpdf.pc. + (list libjpeg-turbo zlib)) + (synopsis "Command-line tools and library for transforming PDF files") + (description + "QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It includes support for merging and splitting PDFs and to manipulate the list of pages in a PDF file. It is not a PDF viewer or a program capable of converting PDF into other formats.") - ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0. - ;; Users can still choose to use the old license at their option. - (license (list license:asl2.0 license:clarified-artistic)) - (home-page "https://qpdf.sourceforge.net/"))) + ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0. + ;; Users can still choose to use the old license at their option. + (license (list license:asl2.0 license:clarified-artistic)) + (home-page "https://qpdf.sourceforge.net/"))) (define-public qpdfview (package |