From c438809bc460ddb32c895505ebd0ed17031c634d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 9 May 2022 23:23:19 +0300 Subject: gnu: mupdf: Update to 1.19.1. * gnu/packages/pdf.scm (mupdf): Update to 1.19.1. [source]: Remove trailing #t. --- gnu/packages/pdf.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 74c6166cc0..39c428d071 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -704,14 +704,14 @@ (define-public podofo (define-public mupdf (package (name "mupdf") - (version "1.19.0") + (version "1.19.1") (source (origin (method url-fetch) (uri (string-append "https://mupdf.com/downloads/archive/" "mupdf-" version "-source.tar.xz")) (sha256 - (base32 "1i98xqgnzp168hnnhradl8658qsif06wlbvcglz0mmh8wi1rkwrq")) + (base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm")) (modules '((guix build utils))) (snippet '(begin @@ -725,8 +725,7 @@ (define-public mupdf (string-append kept "/" file))) keep) (delete-file-recursively from) - (rename-file kept from)) - #t)))) + (rename-file kept from)))))) (build-system gnu-build-system) (inputs `(("curl" ,curl) -- cgit v1.2.3 From 489dba600be96b3e28187d8afa1ddc07de0d3238 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 9 May 2022 23:24:15 +0300 Subject: gnu: mupdf: Remove input labels. * gnu/packages/pdf.scm (mupdf)[inputs]: Remove input labels. --- gnu/packages/pdf.scm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 39c428d071..7bf3654a6f 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -728,19 +728,19 @@ (define-public mupdf (rename-file kept from)))))) (build-system gnu-build-system) (inputs - `(("curl" ,curl) - ("freeglut" ,freeglut) - ("freetype" ,freetype) - ("gumbo-parser" ,gumbo-parser) - ("harfbuzz" ,harfbuzz) - ("jbig2dec" ,jbig2dec) - ("libjpeg" ,libjpeg-turbo) - ("libx11" ,libx11) - ("libxext" ,libxext) - ("mujs" ,mujs) - ("openjpeg" ,openjpeg) - ("openssl" ,openssl) - ("zlib" ,zlib))) + (list curl + freeglut + freetype + gumbo-parser + harfbuzz + jbig2dec + libjpeg-turbo + libx11 + libxext + mujs + openjpeg + openssl + zlib)) (native-inputs (list pkg-config)) (arguments -- cgit v1.2.3 From f7da6b0be5b7c06d9a648085c550a7dd38f7913d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 9 May 2022 23:27:47 +0300 Subject: gnu: mupdf: Use G-expressions. * gnu/packages/pdf.scm (mupdf)[source, arguments]: Rewrite using G-expressions. --- gnu/packages/pdf.scm | 55 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 7bf3654a6f..5963401975 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -714,18 +714,19 @@ (define-public mupdf (base32 "0gl0wf16m1cafs20h3v1f4ysf7zlbijjyd6s1r1krwvlzriwdsmm")) (modules '((guix build utils))) (snippet - '(begin - ;; Remove bundled software. - (let* ((keep (list "extract" - "lcms2")) ; different from our lcms2 package - (from "thirdparty") - (kept (string-append from "~temp"))) - (mkdir-p kept) - (for-each (lambda (file) (rename-file (string-append from "/" file) - (string-append kept "/" file))) - keep) - (delete-file-recursively from) - (rename-file kept from)))))) + #~(begin + ;; Remove bundled software. + (let* ((keep (list "extract" + "lcms2")) ; different from our lcms2 package + (from "thirdparty") + (kept (string-append from "~temp"))) + (mkdir-p kept) + (for-each (lambda (file) + (rename-file (string-append from "/" file) + (string-append kept "/" file))) + keep) + (delete-file-recursively from) + (rename-file kept from)))))) (build-system gnu-build-system) (inputs (list curl @@ -742,21 +743,23 @@ (define-public mupdf openssl zlib)) (native-inputs - (list pkg-config)) + (list pkg-config)) (arguments - `(#:tests? #f ; no check target - #:make-flags (list "verbose=yes" - (string-append "CC=" ,(cc-for-target)) - "XCFLAGS=-fpic" - "USE_SYSTEM_LIBS=yes" - "USE_SYSTEM_MUJS=yes" - "shared=yes" - ;; Even with the linkage patch we must fix RUNPATH. - (string-append "LDFLAGS=-Wl,-rpath=" - (assoc-ref %outputs "out") "/lib") - (string-append "prefix=" (assoc-ref %outputs "out"))) - #:phases (modify-phases %standard-phases - (delete 'configure)))) ; no configure script + (list + #:tests? #f ; no check target + #:make-flags + #~(list "verbose=yes" + (string-append "CC=" #$(cc-for-target)) + "XCFLAGS=-fpic" + "USE_SYSTEM_LIBS=yes" + "USE_SYSTEM_MUJS=yes" + "shared=yes" + ;; Even with the linkage patch we must fix RUNPATH. + (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + (string-append "prefix=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) ; no configure script (home-page "https://mupdf.com") (synopsis "Lightweight PDF viewer and toolkit") (description -- cgit v1.2.3 From e7b0d63e32407cdcaf405cb69c2e8e5e3e3fd5e2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 20 Apr 2022 00:26:32 -0400 Subject: gnu: Add python-pydyf. * gnu/packages/pdf.scm (python-pydyf): New variable. --- gnu/packages/pdf.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 5963401975..b791a2fc8b 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -20,7 +20,7 @@ ;;; Copyright © 2020-2022 Nicolas Goaziou ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Timotej Lazar -;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020, 2022 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. @@ -701,6 +701,33 @@ (define-public podofo extracting content or merging files.") (license license:lgpl2.0+))) +(define-public python-pydyf + (package + (name "python-pydyf") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pydyf" version)) + (sha256 + (base32 "0b30g3hhxw1bg18r9ax85i1dkg8vy1y1wzas0bg0bxblh7j5sbqy")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-c" "/dev/null"))))))) + (propagated-inputs (list python-pillow)) + (native-inputs (list ghostscript python-pytest)) + (home-page "https://github.com/CourtBouillon/pydyf") + (synopsis "Low-level PDF generator") + (description "@code{pydyf} is a low-level PDF generator written in Python +and based on PDF specification 1.7.") + (license license:bsd-3))) + (define-public mupdf (package (name "mupdf") -- cgit v1.2.3 From 84943a4e0ed49510c0f6ea49ed6bcff9e195b088 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 20 Apr 2022 00:46:18 -0400 Subject: gnu: weasyprint: Update to 54.3. * gnu/packages/pdf.scm (weasyprint): Update to 54.3. [source]: Update git URL. [phases]: Use gexps. {disable-linters}: Delete phase. {register-dejavu-font}: Remove obsolete phase. {patch-library-paths}: Adjust for code changes. Use search-input-file. {check}: Streamline and use xdist. {build, install}: Override to o a PEP 517 build. [inputs]: Add harfbuzz. [propagated-inputs]: Add python-fonttools-full, python-pillow and python-pydyf. [native-inputs]: Remove python-pytest-cov and python-pytest-runner. Add ghostscript, python-flit-core, python-pypa-build, python-pytest and python-pytest-xdist. --- gnu/packages/pdf.scm | 101 +++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 51 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index b791a2fc8b..db04f21242 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -88,6 +88,7 @@ (define-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) @@ -1480,77 +1481,75 @@ (define-public stapler (define-public weasyprint (package (name "weasyprint") - (version "52.1") + (version "54.3") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/FelixSchwarz/WeasyPrint") + (url "https://github.com/Kozea/WeasyPrint") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0rcj9yah3bp6bbvkmny3w4csx4l5v49lc7mrk29g0x77qnwswjy7")))) + "0cn8gpgyic6pmrnhp0540nbgplpsd5aybi7k89anz6m1sshgjzgs")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-library-paths - (lambda* (#:key inputs #:allow-other-keys) - (let ((fontconfig (assoc-ref inputs "fontconfig")) - (glib (assoc-ref inputs "glib")) - (pango (assoc-ref inputs "pango")) - (pangoft2 (assoc-ref inputs "pangoft2"))) - (substitute* "weasyprint/fonts.py" - (("'fontconfig'") - (format #f "'~a/lib/libfontconfig.so'" fontconfig)) - (("'pangoft2-1.0'") - (format #f "'~a/lib/libpangoft2-1.0.so'" pango))) - (substitute* "weasyprint/text.py" - (("'gobject-2.0'") - (format #f "'~a/lib/libgobject-2.0.so'" glib)) - (("'pango-1.0'") - (format #f "'~a/lib/libpango-1.0.so'" pango)) - (("'pangocairo-1.0'") - (format #f "'~a/lib/libpangocairo-1.0.so'" pango))) - #t))) - (add-after 'unpack 'disable-linters - ;; Their check fails; none of our business. - (lambda _ - (substitute* "setup.cfg" - ((".*pytest-flake8.*") "") - ((".*pytest-isort.*") "") - (("--flake8") "") - (("--isort") "")) - #t)) - (add-before 'check 'register-dejavu-font - (lambda* (#:key inputs #:allow-other-keys) - ;; TODO: fix FreeType so that fonts found in XDG_DATA_DIRS are - ;; honored. - (let* ((HOME "/tmp") - (dejavu (assoc-ref inputs "font-dejavu")) - (fonts-dir (string-append HOME "/.fonts"))) - (setenv "HOME" HOME) - (mkdir-p fonts-dir) - (symlink (string-append dejavu "/share/fonts/truetype") - (string-append fonts-dir "/truetype")) - (invoke "fc-cache" "-rv"))))))) - (inputs - `(("fontconfig" ,fontconfig) - ("glib" ,glib) - ("pango" ,pango))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-library-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "weasyprint/text/ffi.py" + (("'gobject-2.0-0'") + (format #f "~s" + (search-input-file inputs "lib/libgobject-2.0.so"))) + (("'pango-1.0-0'") + (format #f "~s" + (search-input-file inputs "lib/libpango-1.0.so"))) + (("'harfbuzz'") + (format #f "~s" + (search-input-file inputs "lib/libharfbuzz.so"))) + (("'fontconfig-1'") + (format #f "~s" + (search-input-file inputs "lib/libfontconfig.so"))) + (("'pangoft2-1.0-0'") + (format #f "~s" + (search-input-file inputs + "lib/libpangoft2-1.0.so")))))) + ;; XXX: PEP 517 manual build copied from python-isort. + (replace 'build + (lambda _ + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-c" "/dev/null" + "-n" (number->string (parallel-job-count)))))) + (replace 'install + (lambda _ + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" "--no-cache-dir" "--no-input" + "install" "--no-deps" "--prefix" #$output whl))))))) + (inputs (list fontconfig glib harfbuzz pango)) (propagated-inputs (list gdk-pixbuf python-cairocffi python-cairosvg python-cffi python-cssselect2 + python-fonttools-full python-html5lib + python-pillow + python-pydyf python-pyphen python-tinycss2)) (native-inputs - (list font-dejavu ;tests depend on it - python-pytest-cov python-pytest-runner)) + (list font-dejavu ;tests depend on it + ghostscript + python-flit-core + python-pypa-build + python-pytest + python-pytest-xdist)) (home-page "https://weasyprint.org/") (synopsis "Document factory for creating PDF files from HTML") (description "WeasyPrint helps web developers to create PDF documents. It -- cgit v1.2.3 From 3a44c8204b9dba000229ea01a3df58544087ff2a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 22 May 2022 02:00:01 +0200 Subject: gnu: img2pdf: Update to 0.4.4. * gnu/packages/pdf.scm (img2pdf): Update to 0.4.4. --- gnu/packages/pdf.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index db04f21242..1f5c1b3005 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017, 2018 Rene Saavedra -;;; Copyright © 2017–2021 Tobias Geerinckx-Rice +;;; Copyright © 2017–2022 Tobias Geerinckx-Rice ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Ben Sturmfels ;;; Copyright © 2019,2020 Hartmut Goebel @@ -1102,13 +1102,13 @@ (define-public impressive (define-public img2pdf (package (name "img2pdf") - (version "0.4.3") + (version "0.4.4") (source (origin (method url-fetch) (uri (pypi-uri "img2pdf" version)) (sha256 - (base32 "17z0bn8kihiyqjd1m5jr80m7ry06l1qn0l8v918xg5gs7q2calcf")))) + (base32 "0g3rpq68y5phnlgxrqn39k10j9nmgksg6m5ic8wgs8v5cjlrij4f")))) (build-system python-build-system) (propagated-inputs (list python-pikepdf python-pillow -- cgit v1.2.3 From 48e18ab4aaea80bebaa5a6c014abbda7439733f6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:36:29 -0400 Subject: gnu: impressive: Update to 0.13.1. * gnu/packages/pdf.scm (impressive): Update to 0.13.1. [inputs]: Move below arguments field. Adjust to use Python 3 packages. [python]: Delete argument. [phases]: Use gexps. {install}: Use search-input-file and this-package-input. Make command executable. --- gnu/packages/pdf.scm | 55 +++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 1f5c1b3005..e2aa13526f 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1052,7 +1052,7 @@ (define-public python2-reportlab (define-public impressive (package (name "impressive") - (version "0.12.1") + (version "0.13.1") (source (origin (method url-fetch) (uri (string-append @@ -1060,36 +1060,33 @@ (define-public impressive version "/Impressive-" version ".tar.gz")) (sha256 (base32 - "1r7ihv41awnlnlry1kymb8fka053wdhzibfwcarn78rr3vs338vl")))) + "0d1d2jxfl9vmy4swcdz660xd4wx91w1i3n07k522pccapwxig294")))) (build-system python-build-system) - - ;; TODO: Add dependency on pdftk. - (inputs (list python2-pygame python2-pillow sdl xpdf)) - (arguments - `(#:python ,python-2 - #:phases (modify-phases %standard-phases - (delete 'build) - (delete 'configure) - (delete 'check) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; There's no 'setup.py' so install things manually. - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (man1 (string-append out "/share/man/man1")) - (sdl (assoc-ref inputs "sdl")) - (xpdf (assoc-ref inputs "xpdf"))) - (mkdir-p bin) - (copy-file "impressive.py" - (string-append bin "/impressive")) - (wrap-program (string-append bin "/impressive") - `("LIBRARY_PATH" ":" prefix ;for ctypes - (,(string-append sdl "/lib"))) - `("PATH" ":" prefix ;for pdftoppm - (,(string-append xpdf "/bin")))) - (install-file "impressive.1" man1) - #t)))))) + (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))))))) + ;; TODO: Add dependency on pdftk. + (inputs (list python-pygame python-pillow sdl xpdf)) (home-page "http://impressive.sourceforge.net") (synopsis "PDF presentation tool with visual effects") (description -- cgit v1.2.3 From aae86d4ddc342bc5950607e000e5f78d314606e5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:36:35 -0400 Subject: gnu: Remove python2-pypdf2. * gnu/packages/pdf.scm (python2-pypdf2): Delete variable. --- gnu/packages/pdf.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index e2aa13526f..baafafcf4a 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1240,9 +1240,6 @@ (define-public python-pypdf2 manage or manipulate PDFs.") (license license:bsd-3))) -(define-public python2-pypdf2 - (package-with-python2 python-pypdf2)) - (define-public python2-pypdf (package (name "python2-pypdf") -- cgit v1.2.3 From 914adf88adc82b694490c5d20279054fedd4e4d2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:36:39 -0400 Subject: gnu: Remove python2-reportlab. * gnu/packages/pdf.scm (python2-reportlab): Delete variable. --- gnu/packages/pdf.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index baafafcf4a..5da1e96e98 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1046,9 +1046,6 @@ (define-public python-reportlab vector formats.") (license license:bsd-3))) -(define-public python2-reportlab - (package-with-python2 python-reportlab)) - (define-public impressive (package (name "impressive") -- cgit v1.2.3 From c0587a5a9156c861a512ed224f1eeff26118c32f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 21:19:37 -0400 Subject: gnu: Remove python2-pypdf. * gnu/packages/pdf.scm (python2-pypdf): Delete variable. --- gnu/packages/pdf.scm | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 5da1e96e98..a0c4b4dc15 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1237,28 +1237,6 @@ (define-public python-pypdf2 manage or manipulate PDFs.") (license license:bsd-3))) -(define-public python2-pypdf - (package - (name "python2-pypdf") - (version "1.13") - (source (origin - (method url-fetch) - (uri (pypi-uri "pyPdf" version)) - (sha256 - (base32 - "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s")))) - (build-system python-build-system) - (arguments - `(#:tests? #f ; no tests - #:python ,python-2)) - (home-page "http://pybrary.net/pyPdf/") - (synopsis "Pure Python PDF toolkit") - (description "PyPDF2 is a pure Python PDF toolkit. - -Note: This module isn't maintained anymore. For new projects please use -python-pypdf2 instead.") - (license license:bsd-3))) - (define-public pdfarranger (package (name "pdfarranger") -- cgit v1.2.3