Subject: [bug#72406] [PATCH emacs-team WIP v4 18/24] [WIP] gnu: emacs-dvc: Build variants.

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

XXX: Only emacs-minimal-dvc and emacs-next-dvc build currently.

* gnu/packages/emacs-xyz.scm (emacs-dvc)[native-inputs]: Replace
emacs-minimal with emacs.
[properties]: Add ‘minimal-variant’, ‘next-variant’ and ‘pgtk-variant’.
(emacs-minimal-dvc, emacs-next-dvc, emacs-pgtk-dvc): New variables.
---
 gnu/packages/emacs-xyz.scm | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 764b535d45..f0fb00a697 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -9349,14 +9349,36 @@ (define-public emacs-dvc
                   (("@itemx drop") "@item drop")
                   (("@itemx left file") "@item left file")))))))
       (native-inputs
-       (list autoconf automake emacs-minimal texinfo))
+       (list autoconf automake emacs texinfo))
       (home-page "http://xsteve.at/prg/emacs_dvc/index.html")
       (synopsis "Emacs front-end for various distributed version control systems")
       (description "DVC is a legacy Emacs front-end for a number of
 distributed version control systems.  It currently supports GNU Arch, GNU
 Bazaar, git, Mercurial, and Monotone.  It also provides some integration with
 Gnus, e.g., for applying patches received by email.")
-      (license license:gpl2+))))
+      (license license:gpl2+)
+      (properties
+       `((minimal-variant . ,(delay emacs-minimal-dvc))
+         (next-variant . ,(delay emacs-next-dvc))
+         (pgtk-variant . ,(delay emacs-pgtk-dvc)))))))
+
+(define-public emacs-minimal-dvc
+  (package/inherit emacs-dvc
+    (name "emacs-minimal-dvc")
+    (native-inputs (modify-inputs (package-native-inputs emacs-dvc)
+                     (replace "emacs" emacs-minimal)))))
+
+(define-public emacs-next-dvc
+  (package/inherit emacs-dvc
+    (name "emacs-next-dvc")
+    (native-inputs (modify-inputs (package-native-inputs emacs-dvc)
+                     (replace "emacs" emacs-next)))))
+
+(define-public emacs-pgtk-dvc
+  (package/inherit emacs-dvc
+    (name "emacs-pgtk-dvc")
+    (native-inputs (modify-inputs (package-native-inputs emacs-dvc)
+                     (replace "emacs" emacs-pgtk)))))
 
 (define-public emacs-sudo-edit
   (package
-- 
2.45.2