From patchwork Sat Apr 17 17:06:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 28605 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 8386827BC7A; Sat, 17 Apr 2021 18:08:31 +0100 (BST) 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_H4,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 1DE7827BC79 for ; Sat, 17 Apr 2021 18:08:27 +0100 (BST) Received: from localhost ([::1]:54674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXoQk-0008IF-7W for patchwork@mira.cbaines.net; Sat, 17 Apr 2021 13:08:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXoQQ-0008Ez-1W for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXoQP-0000ER-OS for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXoQP-0005bY-Hd for guix-patches@gnu.org; Sat, 17 Apr 2021 13:08:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47661] [PATCH v2 07/33] gnu: emacs-telega: Adjust to changes in emacs-build-system. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Apr 2021 17:08:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47661 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47661@debbugs.gnu.org Received: via spool by 47661-submit@debbugs.gnu.org id=B47661.161867924421203 (code B ref 47661); Sat, 17 Apr 2021 17:08:05 +0000 Received: (at 47661) by debbugs.gnu.org; 17 Apr 2021 17:07:24 +0000 Received: from localhost ([127.0.0.1]:44302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXoPj-0005Vl-Il for submit@debbugs.gnu.org; Sat, 17 Apr 2021 13:07:24 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:62992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXoPh-0005VZ-ED for 47661@debbugs.gnu.org; Sat, 17 Apr 2021 13:07:22 -0400 Received: from localhost.localdomain (194-96-9-9.adsl.highway.telekom.at [194.96.9.9]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FMzyv12qbz1LBRx for <47661@debbugs.gnu.org>; Sat, 17 Apr 2021 19:07:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4FMzyv12qbz1LBRx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1618679239; bh=7iqX/M+PZC3wa8utgNZwd2ggyn1iwh3SJq5hIssJlCI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UHc9N5/D9/SYRfZXRuyF1BHbN/s8slKxjaW4+yNg045c9plksWkvqkbuiYchOndbI TlAJAJTQ07BVAZPlaWNvS6lOHeiRkSJIjMXl7a4bQTLGmgUiviEFza3HhynS2xot/t zq1oZbzzOO/USgj3PLb/cEY1s7xxcCh8KzSJ9Eu0= From: Leo Prikler Date: Sat, 17 Apr 2021 19:06:22 +0200 Message-Id: <20210417170648.3810-7-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417170648.3810-1-leo.prikler@student.tugraz.at> References: <20210417170648.3810-1-leo.prikler@student.tugraz.at> MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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/emacs-telega.scm (emacs-telega)[#:phases]: Reorder. : Rename to... : ... this. Also don't patch paths to subdirs. Remove the snippet, that would push contrib to the load path. : Rename to... : ... this. : Also install etc. : Removed phases. --- gnu/packages/emacs-xyz.scm | 62 +++++++++----------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index f825436f5e..6740657eb0 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -25206,7 +25206,9 @@ other @code{helm-type-file} sources such as @code{helm-locate}.") (("python3 run_tests.py") "")) #t)) - (add-after 'check 'telega-paths-patch + (add-after 'unpack 'expand-load-path + (assoc-ref emacs:%standard-phases 'expand-load-path)) + (add-after 'unpack 'patch-sources (lambda* (#:key inputs #:allow-other-keys) ;; Hard-code paths to `ffplay` and `ffmpeg`. (let ((ffplay-bin (string-append (assoc-ref inputs "ffmpeg") @@ -25222,24 +25224,15 @@ other @code{helm-type-file} sources such as @code{helm-locate}.") (string-append "(and (file-executable-p \"" ffmpeg-bin "\")" "\"" ffmpeg-bin "\")")))) - ;; Modify telega-util to reflect unique dir name in - ;; `telega-install-data' phase. - (substitute* "telega-util.el" - (("\\(concat \"etc/\" filename\\) telega--lib-directory") - "(concat \"telega-data/\" filename) - (locate-dominating-file telega--lib-directory - \"telega-data\")")) - ;; Modify telega.el to reflect unique dir name in - ;; `telega-install-contrib' phase. + ;; This would push the "contrib" sources to the load path, + ;; but as contrib is not installed alongside telega, it does + ;; nothing. (substitute* "telega.el" - (("\\(push \\(expand-file-name \"contrib\" telega--lib-directory\\) load-path\\)") - "(push (expand-file-name \"telega-contrib\" - (locate-dominating-file telega--lib-directory - \"telega-contrib\")) load-path)")) + (("\\(push .* load-path\\)") "")) #t)) ;; The server test suite has a hardcoded path. ;; Reset this behavior to use the proper path. - (add-after 'unpack 'server-suite-patch + (add-after 'unpack 'patch-test-suite (lambda _ (substitute* "server/run_tests.py" (("~/.telega/telega-server") @@ -25251,39 +25244,14 @@ other @code{helm-type-file} sources such as @code{helm-locate}.") (invoke "python3" "server/run_tests.py") #t)) (delete 'configure) - ;; Build emacs-side using `emacs-build-system' - (add-after 'compress-documentation 'emacs-add-source-to-load-path - (assoc-ref emacs:%standard-phases 'add-source-to-load-path)) - ;; Manually invoke bytecompilation for the contrib - ;; subdirectory. - (add-after 'emacs-add-source-to-load-path 'emacs-bytecomp-contrib - (lambda _ - (substitute* "Makefile" - (("byte-recompile-directory \".\"") - "byte-recompile-directory \"contrib\"")) - (invoke "make" "compile") - #t)) - (add-after 'emacs-bytecomp-contrib 'emacs-install - (assoc-ref emacs:%standard-phases 'install)) - ;; This step installs subdir /etc, which contains images, sounds and - ;; various other data, next to the site-lisp dir. - (add-after 'emacs-install 'telega-install-data - (lambda* (#:key outputs #:allow-other-keys) - (copy-recursively - "etc" - (string-append (assoc-ref outputs "out") - "/share/emacs/telega-data/")) - #t)) - (add-after 'emacs-install 'telega-install-contrib - (lambda* (#:key outputs #:allow-other-keys) - (copy-recursively - "contrib" - (string-append (assoc-ref outputs "out") - "/share/emacs/telega-contrib")) - #t)) - (add-after 'telega-install-contrib 'emacs-build + (add-after 'expand-load-path 'emacs-install + (lambda args + (apply (assoc-ref emacs:%standard-phases 'install) + #:include `("etc" ,@emacs:%default-include) + args))) + (add-after 'emacs-install 'emacs-build (assoc-ref emacs:%standard-phases 'build)) - (add-after 'telega-install-contrib 'emacs-make-autoloads + (add-after 'emacs-install 'emacs-make-autoloads (assoc-ref emacs:%standard-phases 'make-autoloads))))) (inputs `(("ffmpeg" ,ffmpeg))) ; mp4/gif support.