[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#35446] [PATCH v2 06/24] gnu: calibre: Move font unbundling to after
From: |
Brendan Tildesley |
Subject: |
[bug#35446] [PATCH v2 06/24] gnu: calibre: Move font unbundling to after check phase. |
Date: |
Sat, 4 May 2019 02:42:14 +1000 |
* gnu/packagse/ebook.scm (calibre): Move font unbundling to after check
phase. Some of the tests use the font files for various things. It's more
convenient to just allow the font files to be there than to patche the
tests.
We also take the chance to switch from copying the font files in, to having
font-liberation as an input and symlinking them.
---
gnu/packages/ebook.scm | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index f2875ef2fc..007ca9fc47 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -95,14 +95,12 @@
(snippet
'(begin
(delete-file "src/odf/thumbnail.py")
- (delete-file-recursively "resources/fonts/liberation")
#t))
(patches (search-patches "calibre-no-updates-dialog.patch"
"calibre-remove-test-unrar.patch"))))
(build-system python-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
- ("font-liberation" ,font-liberation)
("qtbase" ,qtbase) ; for qmake
;; xdg-utils is supposed to be used for desktop integration, but it
;; also creates lots of messages
@@ -113,6 +111,7 @@
(inputs
`(("chmlib" ,chmlib)
("fontconfig" ,fontconfig)
+ ("font-liberation" ,font-liberation)
("glib" ,glib)
("icu4c" ,icu4c)
("js-mathjax" ,js-mathjax)
@@ -191,17 +190,18 @@
(invoke "python2" "setup.py" "mathjax""--system-mathjax"
"--path-to-mathjax"
(string-append (assoc-ref inputs "js-mathjax")
"/share/javascript/mathjax"))
(invoke "python2" "setup.py" "rapydscript")))
- (add-after 'install 'install-font-liberation
+ ;; The font TTF files are used in some miscellaneous tests, so we
+ ;; unbundle them here to avoid patching the tests.
+ (add-after 'install 'unbundle-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")))
+ (let ((font-dest (string-append (assoc-ref outputs "out")
+
"/share/calibre/fonts/liberation"))
+ (font-src (string-append (assoc-ref inputs
"font-liberation")
+ "/share/fonts/truetype")))
+ (delete-file-recursively font-dest)
+ (symlink font-src font-dest))
#t))
- (add-after 'install-font-liberation 'install-mimetypes
+ (add-after 'unbundle-font-liberation 'install-mimetypes
(lambda* (#:key outputs #:allow-other-keys)
(install-file "resources/calibre-mimetypes.xml"
(string-append (assoc-ref outputs "out")
--
2.21.0
- [bug#35446] [PATCH v2 02/24] gnu: calibre: Use system mathjax., (continued)
- [bug#35446] [PATCH v2 02/24] gnu: calibre: Use system mathjax., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 11/24] gnu: Add python-soupsieve, python2-soupsieve, Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 05/24] gnu: calibre: Patch out unrar test., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 09/24] gnu: python-regex, python2-regex: Update to 2019.04.14., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 07/24] gnu: Add python-html2text, python2-html2text., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 03/24] gnu: calibre: Build rapydscript., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 14/24] gnu: calibre: Disable Qt test., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 08/24] gnu: calibre: Add python2-html2text as an input., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 06/24] gnu: calibre: Move font unbundling to after check phase.,
Brendan Tildesley <=
- [bug#35446] [PATCH v2 17/24] gnu: calibre: Remove some comments., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 19/24] gnu: calibre: Remove libxrender as an input., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 21/24] gnu: calibre: Install man pages., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 10/24] gnu: calibre: Disable tests that require networking., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 13/24] gnu: calibre: Disable bs4 test., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 16/24] gnu: calibre: Enable tests., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 20/24] gnu: calibre: Delete various junk from source., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 18/24] gnu: calibre: Unbundle python2-odfpy., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 12/24] gnu: calibre: Use linux.py to install desktop files., Brendan Tildesley, 2019/05/03
- [bug#35446] [PATCH v2 15/24] gnu: calibre: Disable sqlite test., Brendan Tildesley, 2019/05/03