summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm144
1 files changed, 79 insertions, 65 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 74c6166cc0..dd221f7e19 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -221,32 +221,47 @@ times. If you have a second page, Flyer Composer can arrange it the same way
This package contains only the command line tool. If you like to use the gui,
please install the @code{flyer-composer-gui} package.")))
+(define poppler-tests
+ (let ((poppler-version "22.01.0") ; bump when bumping poppler version
+ (revision "0")
+ (commit "0762e0144143e680e24ec8d4c34c46c3716b8713"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/poppler/test.git")
+ (commit commit)))
+ (file-name (git-file-name "poppler-tests"
+ (git-version poppler-version revision commit)))
+ (sha256
+ (base32
+ "1nwgwcddj5fiq200p4f07fl0i5f885c1nfzmvpc6q9p55qxp6brv")))))
+
(define-public poppler
(package
(name "poppler")
- (version "21.07.0")
+ (version "22.01.0")
(source (origin
(method url-fetch)
(uri (string-append "https://poppler.freedesktop.org/poppler-"
version ".tar.xz"))
(sha256
(base32
- "1m54hsi8z6c13jdbjwz55flkra1mahmkw2igavbf8p86d2gv4sp2"))))
+ "0giin9klpj7264n4rl8qwvc6rh650ap2qg39bhz431jvdc2r6d3x"))))
(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
+ 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
@@ -257,22 +272,20 @@ please install the @code{flyer-composer-gui} package.")))
`(,glib "bin") ; glib-mkenums, etc.
gobject-introspection))
(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
+ #: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")
+ (string-append "-DTESTDATADIR=" #+poppler-tests))
+ #: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.")
@@ -777,46 +790,47 @@ 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)
+ (name "qpdf")
+ (version "10.6.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
+ "/qpdf-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07jin19jlcsyxgdxny2ddb08w4kkyl9ivwjw0krn9ncv9wdsa3vg"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:disallowed-references (list 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
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "make/libtool.mk"
+ (("SHELL=/bin/bash")
+ (string-append "SHELL="
+ (search-input-file inputs "/bin/bash"))))
+ (substitute*
+ (append '("qtest/bin/qtest-driver")
+ (find-files "." "\\.test"))
+ (("/usr/bin/env") (which "env"))))))))
+ (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 "http://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 "http://qpdf.sourceforge.net/")))
(define-public qpdfview
(package