unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49493] [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase.
@ 2021-07-09 15:04 Zhu Zihao
  2021-07-09 15:59 ` bug#49493: " Leo Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Zihao @ 2021-07-09 15:04 UTC (permalink / raw)
  To: 49493; +Cc: Leo Prikler


[-- Attachment #1.1: Type: text/plain, Size: 227 bytes --]

'patch-source' phase will replace binary name with wrong full path name
(e.g. ffmpeg => /gnu/store/<hash>-ffmpeg-X.Ybin/ffmpeg)

This patch attempts to fix this issue, and also add missing
'telega-vvnote.el' to patch targets.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-telega-Fix-patch-source-phase.patch --]
[-- Type: text/x-patch, Size: 2630 bytes --]

From f63d44007a89f13ff9e23bbf0b8fb22ee4d94dcb Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 9 Jul 2021 22:58:34 +0800
Subject: [PATCH] gnu: emacs-telega: Fix 'patch-source' phase.

* gnu/packages/emacs-xyz.scm(emacs-telega):

[arguments]<phases>: Add missing slash in file name.

Patch telega-vvnote.el.
---
 gnu/packages/emacs-xyz.scm | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6ac61fd596..0770795044 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -26290,17 +26290,25 @@ service, and connect it with Emacs via inter-process communication.")
              (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
                     (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg"))
                     (ffplay-bin (string-append ffmpeg "/bin/ffplay")))
-              (substitute* "telega-ffplay.el"
-                (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
-                  all func cmd)
-                 (string-append func " \"" (assoc-ref inputs "ffmpeg")
-                                "bin/" cmd))
-                (("\\(executable-find \"ffplay\"\\)")
-                 (string-append "(and (file-executable-p \"" ffplay-bin "\")"
-                                "\"" ffplay-bin "\")"))
-                (("\\(executable-find \"ffmpeg\"\\)")
-                 (string-append "(and (file-executable-p \"" ffmpeg-bin "\")"
-                                "\"" ffmpeg-bin "\")"))))))
+
+               (define targets
+                 '("telega-ffplay.el" "telega-vvnote.el"))
+
+               (define (patch-ffmpeg file)
+                 (substitute* file
+                   (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
+                     all func cmd)
+                    (string-append func " \"" (assoc-ref inputs "ffmpeg")
+                                   "/bin/" cmd))
+                   (("\\(executable-find \"ffplay\"\\)")
+                    (string-append "(and (file-executable-p \"" ffplay-bin "\")"
+                                   "\"" ffplay-bin "\")"))
+                   (("\\(executable-find \"ffmpeg\"\\)")
+                    (string-append "(and (file-executable-p \"" ffmpeg-bin "\")"
+                                   "\"" ffmpeg-bin "\")"))))
+
+               (for-each patch-ffmpeg targets)
+               #t)))
          (add-after 'unpack 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "telega-server.el"
-- 
2.32.0


[-- Attachment #3: Type: text/plain, Size: 100 bytes --]


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#49493: [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase.
  2021-07-09 15:04 [bug#49493] [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase Zhu Zihao
@ 2021-07-09 15:59 ` Leo Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Prikler @ 2021-07-09 15:59 UTC (permalink / raw)
  To: Zhu Zihao, 49493-done

Am Freitag, den 09.07.2021, 23:04 +0800 schrieb Zhu Zihao:
> 'patch-source' phase will replace binary name with wrong full path
> name
> (e.g. ffmpeg => /gnu/store/<hash>-ffmpeg-X.Ybin/ffmpeg)
> 
> This patch attempts to fix this issue, and also add missing
> 'telega-vvnote.el' to patch targets.
Thanks for catching this.  I've simplified your patch and pushed it.

Regards,
Leo





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-09 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 15:04 [bug#49493] [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase Zhu Zihao
2021-07-09 15:59 ` bug#49493: " Leo Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).