From patchwork Sat Apr 27 09:36:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 13780 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 73ED916F52; Sat, 27 Apr 2019 14:13:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 71D5616F50 for ; Sat, 27 Apr 2019 14:13:34 +0100 (BST) Received: from localhost ([127.0.0.1]:60227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKN93-0000Z2-RG for patchwork@mira.cbaines.net; Sat, 27 Apr 2019 09:13:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKJmf-0007Ac-O4 for guix-patches@gnu.org; Sat, 27 Apr 2019 05:38:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKJmd-0004Ug-Hk for guix-patches@gnu.org; Sat, 27 Apr 2019 05:38:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKJma-0004M2-0K for guix-patches@gnu.org; Sat, 27 Apr 2019 05:38:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKJmZ-00016J-Rf for guix-patches@gnu.org; Sat, 27 Apr 2019 05:38:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35446] [PATCH 13/26] gnu: calibre: Move font unbundling to after check phase. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Apr 2019 09:38:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35446 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35446@debbugs.gnu.org Received: via spool by 35446-submit@debbugs.gnu.org id=B35446.15563578864204 (code B ref 35446); Sat, 27 Apr 2019 09:38:07 +0000 Received: (at 35446) by debbugs.gnu.org; 27 Apr 2019 09:38:06 +0000 Received: from localhost ([127.0.0.1]:34398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKJmX-00015Y-Cd for submit@debbugs.gnu.org; Sat, 27 Apr 2019 05:38:06 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:37976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKJmL-00012j-PR for 35446@debbugs.gnu.org; Sat, 27 Apr 2019 05:37:54 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 5C4CB40F31 for <35446@debbugs.gnu.org>; Sat, 27 Apr 2019 11:37:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1556357868; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mTIAFwMNV2V2OT4OKcLMxQlHbuSkQbYUvyv3Fz3ydHI=; b=FgKJdugzp1CgDmdshSrIrSl3BxaNTrE0/B3XaZC7xS0+3GD9BBKwfq99R353QzXLONh95l 15FYxRLJMSB+o8Z8rE4WXBQDydV74aWY53p4mEbMVeWAqWGnhJm0KELPOsauxkFtLS+55q bs66sPc/g4kzEusUr2EdEPNE0R+tNuKkl7R+vChuqw+y+eGp/9ZkU+jI5eeXGYbEO1P3DY CYQsgaQ8dS39WnXCaLTskIp31CIJfaew5uEr9dx15LQNT6ViFVY9SzC+KRPodXsmhMyTd+ gJApD49k/hJwqr3W+3eciXt6ZPzUfFLTabvu4fAQBKb6plJlTMTI7QiPsevFmg== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id HE86IKm7g2A8 for <35446@debbugs.gnu.org>; Sat, 27 Apr 2019 11:37:39 +0200 (CEST) From: Brendan Tildesley Date: Sat, 27 Apr 2019 19:36:46 +1000 Message-Id: <20190427093659.21851-13-mail@brendan.scot> In-Reply-To: <20190427093659.21851-1-mail@brendan.scot> References: <20190427093659.21851-1-mail@brendan.scot> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Sat, 27 Apr 2019 09:12:43 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 1726f83093..e24d2ac2b9 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) @@ -189,17 +188,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")