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(-)
@@ -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