Subject: [PATCH emacs-team WIP v4 06/24] gnu: emacs-libgit: Build variants.

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 11 Aug 2024 14:58:45 +0200

* gnu/packages/emacs-xyz.scm (emacs-libgit)[native-inputs]: Replace emacs-no-x
with emacs.
[properties]: Add ‘next-variant’ and ‘pgtk-variant’.
(emacs-next-libgit, emacs-pgtk-libgit): New variables.
---
 gnu/packages/emacs-xyz.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 2ff1ed4bf0..ce92c12885 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -56,7 +56,7 @@
 ;;; Copyright © 2019 Jelle Licht <[email-masked]>
 ;;; Copyright © 2019 Björn Höfling <[email-masked]>
 ;;; Copyright © 2019 Stephen Webber <[email-masked]>
-;;; Copyright © 2019, 2021 Liliana Marie Prikler <[email-masked]>
+;;; Copyright © 2019, 2021, 2024 Liliana Marie Prikler <[email-masked]>
 ;;; Copyright © 2019 David Wilson <[email-masked]>
 ;;; Copyright © 2020 Paul Garlick <[email-masked]>
 ;;; Copyright © 2020 Robert Smith <[email-masked]>
@@ -1645,14 +1645,29 @@ (define-public emacs-libgit
             (add-after 'emacs-build 'validate-compiled-autoloads
               (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads)))))
       (native-inputs
-       (list emacs-no-x git-minimal pkg-config))
+       (list emacs git-minimal pkg-config))
       (inputs
        (list libgit2))
       (home-page "https://github.com/magit/libegit2")
       (synopsis "Emacs bindings for libgit2")
       (description "This is an experimental module written in C providing
 libgit2 bindings for Emacs, intended to boost the performance of Magit.")
-      (license license:gpl2+))))
+      (license license:gpl2+)
+      (properties
+       `((next-variant . ,(delay emacs-next-libgit))
+         (pgtk-variant . ,(delay emacs-pgtk-libgit)))))))
+
+(define-public emacs-next-libgit
+  (package/inherit emacs-libgit
+    (name "emacs-next-libgit")
+    (native-inputs (modify-inputs (package-inputs emacs-libgit)
+                     (replace "emacs" emacs-next)))))
+
+(define-public emacs-pgtk-libgit
+  (package/inherit emacs-libgit
+    (name "emacs-pgtk-libgit")
+    (native-inputs (modify-inputs (package-inputs emacs-libgit)
+                     (replace "emacs" emacs-pgtk)))))
 
 (define-public emacs-llm
   (package
-- 
2.45.2