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.scm128
1 files changed, 109 insertions, 19 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 5a536141f5..71b8177582 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 ng0 <ng0@n0.is>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
@@ -16,7 +16,7 @@
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Ben Sturmfels <ben@sturm.com.au>
-;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;;
;;; This file is part of GNU Guix.
@@ -93,6 +93,78 @@
#:use-module (gnu packages xorg)
#:use-module (srfi srfi-1))
+(define-public flyer-composer
+ (package
+ (name "flyer-composer")
+ (version "1.0rc2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flyer-composer" version))
+ (sha256
+ (base32 "17igqb5dlcgcq4nimjw6cf9qgz6a728zdx1d0rr90r2z0llcchsv"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ;; TODO
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (qtbase (assoc-ref inputs "qtbase"))
+ (qml "/lib/qt5/qml"))
+ (wrap-program (string-append out "/bin/flyer-composer-gui")
+ `("QT_PLUGIN_PATH" ":" =
+ (,(string-append qtbase "/lib/qt5/plugins")))
+ `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" =
+ (,(string-append qtbase "/lib/qt5/plugins/platforms"))))
+ #t))))))
+ (inputs
+ `(("python-pypdf2" ,python-pypdf2)
+ ("python-pyqt" ,python-pyqt)
+ ("python-poppler-qt5" ,python-poppler-qt5)
+ ("qtbase" ,qtbase)))
+ (home-page "http://crazy-compilers.com/flyer-composer")
+ (synopsis "Rearrange PDF pages to print as flyers on one sheet")
+ (description "@command{flyer-composer} can be used to prepare one- or
+two-sided flyers for printing on one sheet of paper.
+
+Imagine you have designed a flyer in A6 format and want to print it using your
+A4 printer. Of course, you want to print four flyers on each sheet. This is
+where Flyer Composer steps in, creating a PDF which holds your flyer four
+times. If you have a second page, Flyer Composer can arrange it the same way
+- even if the second page is in a separate PDF file.
+
+This package contains both the command line tool and the gui too.")
+ (license license:agpl3+)))
+
+(define-public flyer-composer-cli
+ (package/inherit flyer-composer
+ (name "flyer-composer-cli")
+ (arguments
+ `(#:tests? #f ;; TODO
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-gui
+ (lambda _
+ (delete-file-recursively "flyer_composer/gui")
+ (substitute* "setup.cfg"
+ (("^\\s+flyer-composer-gui\\s*=.*") ""))
+ #t)))))
+ (inputs
+ `(("python-pypdf2" ,python-pypdf2)))
+ (description "@command{flyer-composer} can be used to prepare one- or
+two-sided flyers for printing on one sheet of paper.
+
+Imagine you have designed a flyer in A6 format and want to print it using your
+A4 printer. Of course, you want to print four flyers on each sheet. This is
+where Flyer Composer steps in, creating a PDF which holds your flyer four
+times. If you have a second page, Flyer Composer can arrange it the same way
+- even if the second page is in a separate PDF file.
+
+This package contains only the command line tool. If you like to use the gui,
+please install the @code{flyer-composer-gui} package.")))
+
(define-public poppler
(package
(name "poppler")
@@ -750,7 +822,7 @@ using a stylus.")
(define-public xournalpp
(package
(name "xournalpp")
- (version "1.0.17")
+ (version "1.0.18")
(source
(origin
(method git-fetch)
@@ -759,7 +831,7 @@ using a stylus.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0xw2mcgnm4sa9hrhfgp669lfypw97drxjmz5w8i5whaprpvmkxzw"))))
+ (base32 "0a9ygbmd4dwgck3k8wsrm2grynqa0adb12wwspzmzvpisbadffjy"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DENABLE_CPPUNIT=ON") ;enable tests
@@ -772,11 +844,6 @@ using a stylus.")
(modify-phases %standard-phases
(add-after 'unpack 'fix-permissions-on-po-files
(lambda _
- ;; Always generate translations. A recent upstream patch
- ;; disabled it.
- (substitute* "po/CMakeLists.txt"
- (("gettext_create_translations \\(\"\\$\\{potfile\\}\"\\)")
- "gettext_create_translations (\"${potfile}\" ALL)"))
;; Make sure 'msgmerge' can modify the PO files.
(for-each (lambda (po) (chmod po #o666))
(find-files "." "\\.po$"))
@@ -785,7 +852,6 @@ using a stylus.")
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
(native-inputs
`(("cppunit" ,cppunit)
- ("gcc" ,gcc-8) ;requires gcc 8+
("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)))
(inputs
@@ -813,7 +879,7 @@ Xournal++ features:
@item Fill shape functionality
@item PDF Export (with and without paper style)
@item PNG Export (with and without transparent background)
-@item Allow to map different tools / colors etc. to stylus buttons /
+@item Map different tools / colors etc. to stylus buttons /
mouse buttons
@item Sidebar with Page Previews with advanced page sorting, PDF
Bookmarks and Layers (can be individually hidden, editing layer can be
@@ -838,20 +904,44 @@ optimize toolbar for portrait / landscape
(define-public python-reportlab
(package
(name "python-reportlab")
- (version "3.5.32")
+ (version "3.5.42")
(source (origin
(method url-fetch)
(uri (pypi-uri "reportlab" version))
(sha256
(base32
- "0lf8hil9nbm74zl27l8rydxbhwnpr0pbghibsqrc9sglds9l9vw3"))))
+ "0i17qgm7gzy7pzp240mkpsx9rn8rr67jh5npp5bylv3sd41g48cw"))))
(build-system python-build-system)
(arguments
- '(;; FIXME: There is one test failure, but it does not cause the
- ;; build to fail. No time to investigate right now.
- #:test-target "tests"))
+ '(;; FIXME: There is one test failure, building the pdf manual from source,
+ ;; but it does not cause the build to fail.
+ #:test-target "tests"
+ #:configure-flags (list "--use-system-libart")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'find-libraries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libart (assoc-ref inputs "libart-lgpl"))
+ (freetype (assoc-ref inputs "freetype"))
+ (dlt1 (assoc-ref inputs "font-curve-files")))
+ (substitute* "setup.py"
+ (("/usr/include/libart-\\*")
+ (string-append libart "/include/libart-2.0"))
+ (("/usr/include/freetype2")
+ (string-append freetype "/include"))
+ (("http://www.reportlab.com/ftp/pfbfer-20180109.zip")
+ (string-append "file://" dlt1)))
+ #t))))))
(inputs
- `(("freetype" ,freetype)))
+ `(("freetype" ,freetype)
+ ("libart-lgpl" ,libart-lgpl)
+ ("font-curve-files"
+ ,(origin
+ (method url-fetch)
+ (uri "http://www.reportlab.com/ftp/pfbfer-20180109.zip")
+ (sha256
+ (base32
+ "1v0gy4mbx02ys96ssx89420y0njknlrxs2bx64bv4rp8a0al66w5"))))))
(propagated-inputs
`(("python-pillow" ,python-pillow)))
(home-page "https://www.reportlab.com")
@@ -1166,7 +1256,7 @@ multiple files.")
(define-public pdfpc
(package
(name "pdfpc")
- (version "4.3.4")
+ (version "4.4.0")
(source
(origin
(method git-fetch)
@@ -1175,7 +1265,7 @@ multiple files.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "07aafsm4jzdgpahz83p0ajv40hry7gviyadqi13ahr8xdhhwy2sd"))))
+ (base32 "0vh2r32akvasdrghkaq7ard24r2qncp34jfiyshi3zxabm9bhfaa"))))
(build-system cmake-build-system)
(arguments '(#:tests? #f)) ; no test target
(inputs