From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0JssOtdoj2GqjQAAgWs5BA (envelope-from ) for ; Sat, 13 Nov 2021 08:27:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wNLhNddoj2EjcQAA1q6Kng (envelope-from ) for ; Sat, 13 Nov 2021 07:27:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 864E81CB45 for ; Sat, 13 Nov 2021 08:27:19 +0100 (CET) Received: from localhost ([::1]:39482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlnRW-0002VH-7G for larch@yhetil.org; Sat, 13 Nov 2021 02:27:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlnRG-0002V7-LA for guix-patches@gnu.org; Sat, 13 Nov 2021 02:27:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlnRG-0001ic-Bf for guix-patches@gnu.org; Sat, 13 Nov 2021 02:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlnRG-0005R8-4T for guix-patches@gnu.org; Sat, 13 Nov 2021 02:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51803] [PATCH] gnu: emacs: Make DocView PDF work out of the box. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Nov 2021 07:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51803@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163678837120830 (code B ref -1); Sat, 13 Nov 2021 07:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Nov 2021 07:26:11 +0000 Received: from localhost ([127.0.0.1]:46411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlnQR-0005Pu-8R for submit@debbugs.gnu.org; Sat, 13 Nov 2021 02:26:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:41128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlnQO-0005Pl-HK for submit@debbugs.gnu.org; Sat, 13 Nov 2021 02:26:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlnQO-0002RK-8p for guix-patches@gnu.org; Sat, 13 Nov 2021 02:26:08 -0500 Received: from [2a00:1450:4864:20::444] (port=46697 helo=mail-wr1-x444.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlnQM-0001ax-7z for guix-patches@gnu.org; Sat, 13 Nov 2021 02:26:07 -0500 Received: by mail-wr1-x444.google.com with SMTP id u1so19481492wru.13 for ; Fri, 12 Nov 2021 23:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:mime-version:to:content-transfer-encoding :message-id; bh=yesR+RKkU4WTe3vrllMb730iThulBC9KnW9P0xWVado=; b=lYqLaVBNtpDneRtdzeeJGduqMdxYpAqApzyfVDRkgxOJSvGYJFUG+p3EVeNAQJwUni Sg8WpLnukr3ErX2cIoVHDyaOdbkUx44qtnKuZSN/R6niL6AXGk037KbTmDZgOU5hTRWL HpaqGYgJIrts+VKkxuLVgsFZxrSqEkW6MYXjOiHGbRRb/AxDrAcbjUVAhT7iXI0EZJY2 5XjWQ7YGg+t3o+eb+ZkeJpNgW6gyfKZT0TN4nBDf0XaIfmK3uWeP+JL5SjIniOlfCDiW uvpW3cwoXWg0rxE+O5AC5lTZPvfCLKAg4jgivCiwX/VxWWHRAP5ojMAYFvxFKmo5RZgA zung== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version:to :content-transfer-encoding:message-id; bh=yesR+RKkU4WTe3vrllMb730iThulBC9KnW9P0xWVado=; b=V1R1+NRJSNneQLvy/CPZ/aMR0DFrr41ifwU4pxc7wXLK9UEOfUnETN46Q1+WUZ3VQP d34aHqEqI8E2AnDvyzM2JWcJga7bhIrtMOHhFJHfyfBKgV0fRvu/8DhusIlbdmmsESbD wZS5ClLOasOQbkCnZnpJea+4T7z6XeTfqxo5GaJO7cnA0ZAXQiZcVwr4quuHtr3Ej/9s 1g/fHdZU6BnLwznaVsGVdqNL1S2ZPKUVfKj/PTm6aZ/ffEDZ58q6I8hhAyV2ghCoel/Q J3BhaFWc2NHhmPe7+Keg0mVBat0Ylv/1wxgPnfm1r3wq7zP0cP2o2eYRsxT6VGc8oksY NSZw== X-Gm-Message-State: AOAM530a+FiENPUNKXByXjhHJJzy6sL/3GEVGukMX1xOPLJYqyMb/rJJ Lcayd6xfyP13rAl5YH/0M05Ybc364bkupQ== X-Google-Smtp-Source: ABdhPJzZQ5zfDq9IFVBeai2R49Km3cXpMJXNKEtDoHSHdhSo5kj2kqg5NbsQta8k4YjUFAskicF9Fw== X-Received: by 2002:a5d:6707:: with SMTP id o7mr25441427wru.172.1636788364648; Fri, 12 Nov 2021 23:26:04 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z8sm8103529wrh.54.2021.11.12.23.26.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 23:26:04 -0800 (PST) From: Liliana Marie Prikler Date: Sat, 13 Nov 2021 07:44:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <60c9459544fef0b2e19d30396acaf9dac6076e72.camel@gmail.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::444 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=liliana.prikler@gmail.com; helo=mail-wr1-x444.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636788439; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yesR+RKkU4WTe3vrllMb730iThulBC9KnW9P0xWVado=; b=W8Rfaaq6MRJs+cILBdeO3GywztLaRRVoBzuU/bnVXRbPOh40VsVAQ8ldFdMUur2q2idIM+ rOmm7/o+TPw5dHYiRarUVlEoKEg8mOvSlmhrr2Eg0m+lwZKAOFLWRfCZxwblaqgZgGoE8k KrE5g8swSb0b7lIDnbultkif465cwR5C3k0SF2Ejb+LRdK/P3EocduedsVxyoDlcq/80V6 qpfL7MH/DFypOrxfE3C66ZSV3RWnKtoU7J4VeVtUy9hJXFD+AeGJfxTN/DKF85gTscfYIV ccsnDd4HXCucy8+dL0eG1g1NqyK56VBa+R460wk507RWRblDznp0D0kmmMWn+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636788439; a=rsa-sha256; cv=none; b=oUreLhjKsimMaJ7sxPrU4cBOoHjRPR8y3MuTutdjl+CbOcrPPx6BaIrXNxyZKIPiE34FSV QN2XXJIxe0+3RD2rVo6OeTxomdBIUGncC1ksSTh+mp8NAv8x7/l8EyJwYjlPAF0CMD9Cvc vuYMkiCulvd6DKK93+X0K6L/FkMPs8NLGHqdk9LqQsPM60dSSzYHCLo5bjJIrX22z3GlAE kf60iVHtoiM1rOGiVaWKMuzbuVMw7/6QkhgeZLIaTUhzPOHA1/NGnbWfmR7USUIla1ZPDs NkUD9esEdgWELll3y60S4UYBBPxMastbZiusTr6QvBIlY5QYoKlGjICmZ7VHuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lYqLaVBN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lYqLaVBN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 864E81CB45 X-Spam-Score: -1.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: PYVmkfk/ULAH * gnu/packages/emacs.scm (emacs)[patch-program-file-names]: Add patches for the programs “gs”, “dvipdf”, “ps2pdf” and “pdftotext”. [inputs]: Add ghostscript and poppler. --- This patch might be simplified post core-updates merge by using search-input-file. gnu/packages/emacs.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 22d8db3839..7cc726be6f 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Jesse John Gildersleve ;;; Copyright © 2019 Valentin Ignatev -;;; Copyright © 2019 Liliana Marie Prikler +;;; Copyright © 2019, 2021 Liliana Marie Prikler ;;; Copyright © 2019 Amin Bandali ;;; Copyright © 2020 Jack Hill ;;; Copyright © 2020 Morgan Smith @@ -54,6 +54,7 @@ (define-module (gnu packages emacs) #:use-module (gnu packages fribidi) #:use-module (gnu packages gd) #:use-module (gnu packages gettext) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) ; for librsvg #:use-module (gnu packages gtk) @@ -63,6 +64,7 @@ (define-module (gnu packages emacs) #:use-module (gnu packages mail) ; for mailutils #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) @@ -128,7 +130,7 @@ (define-public emacs #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-program-file-names - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (substitute* '("src/callproc.c" "lisp/term.el" "lisp/htmlfontify.el" @@ -136,6 +138,17 @@ (define-public emacs "lisp/progmodes/sh-script.el") (("\"/bin/sh\"") (format #f "~s" (which "sh")))) + (substitute* "lisp/doc-view.el" + (("\"(gs|dvipdf|ps2pdf)\"" all what) + (let ((ghostscript (assoc-ref inputs "ghostscript"))) + (if ghostscript + (string-append "\"" ghostscript "/bin/" what "\"") + all))) + (("\"(pdftotext)\"" all what) + (let ((poppler (assoc-ref inputs "poppler"))) + (if poppler + (string-append "\"" poppler "/bin/" what "\"") + all)))) #t)) (add-before 'configure 'fix-/bin/pwd (lambda _ @@ -258,6 +271,8 @@ (define* (emacs-byte-compile-directory dir) ("acl" ,acl) ("jansson" ,jansson) ("gmp" ,gmp) + ("ghostscript" ,ghostscript) + ("poppler" ,poppler) ;; When looking for libpng `configure' links with `-lpng -lz', so we ;; must also provide zlib as an input. -- 2.33.1