Subject: [bug#72406] [PATCH emacs-team WIP v3 20/24] gnu: emacs-xelb: Build variants.

From: Liliana Marie Prikler <[email-masked]>
Date: Sat, 10 Aug 2024 07:52:51 +0200

* gnu/packages/emacs-xyz.scm (emacs-xelb)[arguments]: Drop #:emacs.
[properties]: Add ‘minimal-variant’.
(emacs-no-x-toolkit-xelb, emacs-next-xelb, emacs-pgtk-xelb): New variables.
(emacs-xelb-no-x-toolkit): Deprecate in favour of emacs-no-x-toolkit-xelb.
---
 gnu/packages/emacs-xyz.scm | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 22c21340bc..b825cd26e0 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20237,14 +20237,8 @@ (define-public emacs-xelb
                (base32
                 "12ikrnvik1n1fdc6ixx53d0z84v269wi463380k0i5zb6q8ncwpk"))))
     (build-system emacs-build-system)
-    ;; The following functions and variables needed by emacs-xelb are
-    ;; not included in emacs-minimal:
-    ;; x-display-screens, x-keysym-table, x-alt-keysym, x-meta-keysym
-    ;; x-hyper-keysym, x-super-keysym, libxml-parse-xml-region
-    ;; x-display-pixel-width, x-display-pixel-height
     (arguments
      (list
-      #:emacs emacs
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'expand-load-path 'regenerate-el-files
@@ -20265,7 +20259,25 @@ (define-public emacs-xelb
 X11 protocol based on the XML description files from the XCB project.  It
 features an object-oriented API and permits a certain degree of concurrency.
 It should enable you to implement low-level X11 applications.")
-    (license license:gpl3+)))
+    (license license:gpl3+)
+    ;; The following functions and variables needed by emacs-xelb are
+    ;; not included in emacs-minimal:
+    ;; x-display-screens, x-keysym-table, x-alt-keysym, x-meta-keysym
+    ;; x-hyper-keysym, x-super-keysym, libxml-parse-xml-region
+    ;; x-display-pixel-width, x-display-pixel-height
+    (properties `((minimal-variant . ,(delay emacs-no-x-toolkit-xelb))))))
+
+(define-public emacs-next-xelb
+  (package-with-emacs-next emacs-xelb))
+
+(define-public emacs-pgtk-xelb
+  (package-with-emacs-pgtk emacs-xelb))
+
+(define-public emacs-no-x-toolkit-xelb
+  (package-with-emacs-no-x-toolkit emacs-xelb))
+
+(define-public emacs-xelb-no-x-toolkit
+  (deprecated-package "emacs-xelb-no-x-toolkit" emacs-no-x-toolkit-xelb))
 
 (define-public emacs-exwm
   (package
-- 
2.45.2