diff options
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r-- | gnu/packages/pdf.scm | 107 |
1 files changed, 60 insertions, 47 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 72aae8b002..f7cd19b974 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2024 dan <i@dan.games> ;;; Copyright © 2023 Benjamin Slade <slade@lambda-y.net> ;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us@ieee.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1000,7 +1001,7 @@ SyncTeX support, and rudimentary support for annotations and forms.") (list discount ffmpeg)) (build-system meson-build-system) (home-page "https://www.flameeyes.com/projects/unpaper") - (synopsis "post-processing tool for scanned pages") + (synopsis "Post-processing tool for scanned pages") (description "@command{unpaper} is a post-processing tool for scanned sheets of paper, especially for book pages that have been scanned from previously created photocopies. @@ -1171,39 +1172,37 @@ vector formats.") (define-public impressive (package (name "impressive") - (version "0.13.1") - (source (origin - (method url-fetch) - (uri (string-append - "mirror://sourceforge/impressive/Impressive/" - version "/Impressive-" version ".tar.gz")) - (sha256 - (base32 - "0d1d2jxfl9vmy4swcdz660xd4wx91w1i3n07k522pccapwxig294")))) + ;; (version "0.13.1") + (version "0.13.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/impressive/Impressive/" + version "/Impressive-" version ".tar.gz")) + (sha256 + (base32 + ;; "0d1d2jxfl9vmy4swcdz660xd4wx91w1i3n07k522pccapwxig294")))) + "0g15q67f992prkjndrk75hhd601iypfmkafhdx7hijs2byr26c83")))) (build-system python-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (delete 'build) - (delete 'configure) - (delete 'check) - (replace 'install - (lambda* (#:key inputs #:allow-other-keys) - ;; There's no 'setup.py' so install things manually. - (let* ((bin (string-append #$output "/bin")) - (impressive (string-append bin "/impressive")) - (man1 (string-append #$output "/share/man/man1"))) - (mkdir-p bin) - (copy-file "impressive.py" impressive) - (chmod impressive #o755) - (wrap-program (string-append bin "/impressive") - `("LIBRARY_PATH" ":" prefix ;for ctypes - (,(string-append #$(this-package-input "sdl") - "/lib"))) - `("PATH" ":" prefix ;for pdftoppm - (,(search-input-file inputs "bin/xpdf")))) - (install-file "impressive.1" man1))))))) + #:phases #~(modify-phases %standard-phases + (delete 'build) + (delete 'configure) + (delete 'check) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + ;; There's no 'setup.py' so install things manually. + (let* ((bin (string-append #$output "/bin")) + (impressive (string-append bin "/impressive")) + (man1 (string-append #$output "/share/man/man1"))) + (mkdir-p bin) + (copy-file "impressive.py" impressive) + (chmod impressive #o755) + (wrap-program (string-append bin "/impressive") + `("PATH" ":" prefix ;for pdftoppm + (,(search-input-file inputs "bin/xpdf")))) + (install-file "impressive.1" man1))))))) ;; TODO: Add dependency on pdftk. (inputs (list bash-minimal python-pygame python-pillow sdl xpdf)) (home-page "https://impressive.sourceforge.net") @@ -1345,26 +1344,40 @@ converter using the Poppler and Cairo libraries.") (define-public python-pypdf (package (name "python-pypdf") - (version "3.2.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/py-pdf/pypdf") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1qwvjr694sabfblx22zd54b9ny40f2gbv3bv6q43myrlxwvvisk6")) - (patches (search-patches - "python-pypdf-annotate-tests-appropriately.patch")))) + (version "5.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/py-pdf/pypdf") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0dl3nmvsk43s2v6a5cwwvfwpyvhsl9wcrdnqbzjsp50zqibi23pz")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-flit)) - (propagated-inputs (list python-typing-extensions)) - (home-page "https://github.com/py-pdf/pypdf") (arguments (list ;; Disable tests that use the network and non-free assets. - #:test-flags #~(list "-m" "not external and not samples"))) + #:test-flags + #~(list "-m" "not samples and not enable_socket" + "--numprocesses" (number->string (parallel-job-count)) + "-k" (string-join + ;; ValueError: cannot save mode RGBA + (list "not test_replace_image" + ;; assert None + "test_writer_xmp_metadata_samples") + " and not ")))) + (native-inputs + (list python-flit + python-pytest + python-pytest-socket + python-pytest-timeout + python-pyyaml + python-pytest-xdist)) + (propagated-inputs + (list python-typing-extensions + python-pillow)) + (home-page "https://github.com/py-pdf/pypdf") (synopsis "Python PDF library") (description "This package provides a PDF library capable of splitting, merging, |