From patchwork Wed Mar 10 09:00:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 27589 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 A057F27BC50; Wed, 10 Mar 2021 09:03:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4800D27BC51 for ; Wed, 10 Mar 2021 09:03:39 +0000 (GMT) Received: from localhost ([::1]:52412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJukk-0005kv-Cw for patchwork@mira.cbaines.net; Wed, 10 Mar 2021 04:03:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJujM-0003rR-H7 for guix-patches@gnu.org; Wed, 10 Mar 2021 04:02:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJujL-0007VI-VV for guix-patches@gnu.org; Wed, 10 Mar 2021 04:02:12 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJujL-00049I-TN for guix-patches@gnu.org; Wed, 10 Mar 2021 04:02:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#42885] [PATCH 24/27] gnu: calibre: Patch some paths. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Mar 2021 09:02:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42885@debbugs.gnu.org Received: via spool by 42885-submit@debbugs.gnu.org id=B42885.161536692215791 (code B ref 42885); Wed, 10 Mar 2021 09:02:11 +0000 Received: (at 42885) by debbugs.gnu.org; 10 Mar 2021 09:02:02 +0000 Received: from localhost ([127.0.0.1]:48700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJujB-00046V-Rf for submit@debbugs.gnu.org; Wed, 10 Mar 2021 04:02:02 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:20430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJuj8-00045A-AG for 42885@debbugs.gnu.org; Wed, 10 Mar 2021 04:01:59 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4DwR0J6FnJzQjxL for <42885@debbugs.gnu.org>; Wed, 10 Mar 2021 10:01:52 +0100 (CET) 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=1615366911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jNjZlBur9eLZQT8QQSaEAuoMBCmbxturj76H7MOqUdY=; b=on7UibHth/vDrtpDRDGTtwDlotSGEah9NQwba+T662myTiRzCcbZM2DFTBz/nLUQQCkMpy K0vKBaK0p81eZ4iMiOqhSK+QACUZeGwSEVH5wflYZbd+tDQQDHPAIqrbPxzF7xc658Y1mO oDwvG+bEXaUhZIt1us1OHG7DGEV5GpsA+8ZrOUXmZKEK/9anNx/r2yg3kXrxSPfkLb9PT8 JtOKlR0IqVDsw7X3cXCEOM7yVvlUa3bXjXg/PoVrT3Q7tX2SGwtUo6SRvf9a6D89FHL+d4 /PxBXXu2mCQ95uu11E+UXMkZ1drzJxZmgQLvZ5whrtarV0BRd/NXSnxFX7DLfg== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id hTPbYAbay_RY for <42885@debbugs.gnu.org>; Wed, 10 Mar 2021 10:01:49 +0100 (CET) From: Brendan Tildesley Date: Wed, 10 Mar 2021 20:00:50 +1100 Message-Id: <20210310090053.21612-24-mail@brendan.scot> In-Reply-To: <20210310090053.21612-1-mail@brendan.scot> References: <20210310090053.21612-1-mail@brendan.scot> MIME-Version: 1.0 X-MBO-SPAM-Probability: * X-Rspamd-Score: 0.89 / 15.00 / 15.00 X-Rspamd-Queue-Id: E4B071868 X-Rspamd-UID: ca1dcb X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/packages/ebook.scm (calibre): [inputs]: Add libjpeg and libjxz. [arguments]: substitute Calibre's weird get_exe_path procedure that looks in poppler's output directory for binaries with direct paths to jpegtran, cjpeg, optipng, and JxrDecApp. --- gnu/packages/ebook.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 124fcda4df..be367a5245 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -161,6 +161,8 @@ ("icu4c" ,icu4c) ("libmtp" ,libmtp) ("libpng" ,libpng) + ("libjpeg" ,libjpeg-turbo) + ("libjxr" ,libjxr) ("libusb" ,libusb) ("openssl" ,openssl) ("optipng" ,optipng) @@ -246,7 +248,12 @@ sip-include-dirs = [\"" pyqt "/share/sip" "\"]"))) (("PDFTOHTML = 'pdftohtml'") (string-append "PDFTOHTML = \"" (assoc-ref inputs "poppler") "/bin/pdftohtml\""))) - + ;; get_exe_path looks in poppler's output for these binaries. + (substitute* "src/calibre/utils/img.py" + (("get_exe_path..jpegtran..") (string-append "'" (which "jpegtran") "'")) + (("get_exe_path..cjpeg..") (string-append "'" (which "cjpeg") "'")) + (("get_exe_path..optipng..") (string-append "'" (which "optipng") "'")) + (("get_exe_path..JxrDecApp..") (string-append "'" (which "JxrDecApp") "'"))) ;; Calibre thinks we are installing desktop files into a home ;; directory, but here we butcher the script in to installing ;; to calibres /share directory.