gnu: calibre: Unbundle liberation fonts.

*gnu/packages/ebook.scm (calibre)[source]: Delete liberation .ttf files.
[native-inputs]: Add font-liberation.
[arguments]: Calibre still references the bundled fonts, so we install the
packaged fonts to the directory the bundled fonts would have been.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
This commit is contained in:
Brendan Tildesley 2017-05-14 16:36:13 +10:00 committed by Marius Bakke
parent 29ec085170
commit b3399a0985
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 14 additions and 1 deletions

View File

@ -28,6 +28,7 @@
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils) #:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib) #:use-module (gnu packages glib)
@ -81,6 +82,7 @@
(delete-file-recursively "src/calibre/ebooks/markdown") (delete-file-recursively "src/calibre/ebooks/markdown")
(delete-file-recursively "src/unrar") (delete-file-recursively "src/unrar")
(delete-file "src/odf/thumbnail.py") (delete-file "src/odf/thumbnail.py")
(delete-file-recursively "resources/fonts/liberation")
(substitute* (find-files "." "\\.py") (substitute* (find-files "." "\\.py")
(("calibre\\.ebooks\\.markdown") "markdown")) (("calibre\\.ebooks\\.markdown") "markdown"))
#t)) #t))
@ -91,6 +93,7 @@
(build-system python-build-system) (build-system python-build-system)
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config) `(("pkg-config" ,pkg-config)
("font-liberation" ,font-liberation)
("qtbase" ,qtbase) ; for qmake ("qtbase" ,qtbase) ; for qmake
;; xdg-utils is supposed to be used for desktop integration, but it ;; xdg-utils is supposed to be used for desktop integration, but it
;; also creates lots of messages ;; also creates lots of messages
@ -147,7 +150,17 @@
(substitute* "setup/build_environment.py" (substitute* "setup/build_environment.py"
(("sys.prefix") (string-append "'" pyqt "'"))) (("sys.prefix") (string-append "'" pyqt "'")))
(setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo")) (setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo"))
(setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))))))) (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))))
(add-after 'install 'install-font-liberation
(lambda* (#:key inputs outputs #:allow-other-keys)
(for-each (lambda (file)
(install-file file (string-append
(assoc-ref outputs "out")
"/share/calibre/fonts/liberation")))
(find-files (string-append
(assoc-ref inputs "font-liberation")
"/share/fonts/truetype")))
#t)))))
(home-page "http://calibre-ebook.com/") (home-page "http://calibre-ebook.com/")
(synopsis "E-book library management software") (synopsis "E-book library management software")
(description "Calibre is an ebook library manager. It can view, convert (description "Calibre is an ebook library manager. It can view, convert