unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#53748] [PATCH]: Update g-golf to 0.0.1-1010-1824633.
@ 2022-02-03 14:45 Zhu Zihao
       [not found] ` <handler.53748.B.164389968613583.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2022-02-03 14:45 UTC (permalink / raw)
  To: 53748


[-- Attachment #1.1: Type: text/plain, Size: 164 bytes --]

This patch series update g-golf to 0.0.1-1010-1824633. Add support for
Guile 3. And deprecate variable 'g-golf' in favour of 'guile-g-golf' and
'guile2.2-g-golf'.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Attachment #2: 0001-gnu-g-golf-Update-to-0.0.1-1010-1824633.patch --]
[-- Type: text/x-patch, Size: 8123 bytes --]

From e680954ca2b0d0987045c22642e4c1290a6de05b Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:27:40 +0800
Subject: [PATCH 1/4] gnu: g-golf: Update to 0.0.1-1010-1824633.

* gnu/packages/guile-xyz.scm (g-golf)[arguments]: Use G-Expression.

<phases>: Add phase 'fix-guile-site-directory'. Patch 'configure.ac' before
bootstrapping, avoid breaking configure script in accident.

In phase 'substitute-libs', use `search-input-file` for searching libraries.

In phase 'start-xorg-server', simplify the X server startup script.

[inputs]: Remove gtk+ and clutter.

Use label-less style.

[native-inputs]: Add gtk+ and clutter, they're now only needed in test.

Use label-less style.
---
 gnu/packages/guile-xyz.scm | 124 +++++++++++++++++++------------------
 1 file changed, 63 insertions(+), 61 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index f35ba43057..7be33c060f 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2021 Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2021, 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -117,6 +118,7 @@ (define-module (gnu packages guile-xyz)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
   #:use-module (guix build-system cmake)
@@ -1969,8 +1971,8 @@ (define-public guile-sly
     (license license:gpl3+)))
 
 (define-public g-golf
-  (let ((commit   "ef830107b9765bd6a2da848d0cbe45e11374c0b5")
-        (revision "839"))
+  (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
+        (revision "1010"))
     (package
       (name "g-golf")
       (version (git-version "0.1.0" revision commit))
@@ -1982,69 +1984,69 @@ (define-public g-golf
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "0r472hvmf447kqvkahp1wy4irb5gy8y793hm8r9rc511smdx66cw"))))
+          (base32 "0ncpqv6pbsx9fjmdzvzbjljnhqgw9pynqy9vr9aq35nb7rzrhfdf"))))
       (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("texinfo" ,texinfo)
-         ("gettext" ,gettext-minimal)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)
-         ("xorg-server" ,xorg-server)))
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "--with-guile-site=no")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-guile-site-directory
+              (lambda _
+                (substitute* "configure.ac"
+                  (("SITEDIR=.*$")
+                   "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\";\n")
+                  (("SITECCACHEDIR=\"\\$libdir/g-golf")
+                   "SITECCACHEDIR=\"$libdir/"))))
+            (add-before 'configure 'tests-work-arounds
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; In build environment, There is no /dev/tty
+                (substitute* "test-suite/tests/gobject.scm"
+                  (("/dev/tty") "/dev/null"))))
+            (add-before 'configure 'substitute-libs
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (define (get lib)
+                  (search-input-file inputs (string-append "lib/" lib ".so")))
+
+                (let* ((libgi      (get "libgirepository-1.0"))
+                       (libglib    (get "libglib-2.0"))
+                       (libgobject (get "libgobject-2.0"))
+                       (libg-golf (string-append #$output "/lib/libg-golf")))
+                  (substitute* "g-golf/init.scm"
+                    (("libgirepository-1.0") libgi)
+                    (("libglib-2.0") libglib)
+                    (("libgobject-2.0") libgobject)
+                    (("\\(dynamic-link \"libg-golf\"\\)")
+                     (format #f "~s"
+                             `(catch #t
+                                (lambda ()
+                                  (dynamic-link "libg-golf"))
+                                (lambda _
+                                  (dynamic-link ,libg-golf))))))
+                  (setenv "GUILE_AUTO_COMPILE" "0")
+                  #t)))
+            (add-before 'check 'start-xorg-server
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; The test suite requires a running X server.
+                (system "Xvfb :1 &")
+                (setenv "DISPLAY" ":1")
+                #t)))))
       (inputs
-       `(("guile" ,guile-2.2)
-         ("guile-lib" ,guile2.2-lib)
-         ("clutter" ,clutter)
-         ("gtk" ,gtk+)
-         ("glib" ,glib)))
+       (list guile-3.0 guile-lib glib))
+      (native-inputs
+       (list autoconf
+             automake
+             texinfo
+             gettext-minimal
+             libtool
+             pkg-config
+             ;; required for tests
+             gtk+
+             clutter
+             xorg-server-for-tests))
       (propagated-inputs
        (list gobject-introspection))
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'tests-work-arounds
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; In build environment, There is no /dev/tty
-               (substitute*
-                   "test-suite/tests/gobject.scm"
-                 (("/dev/tty") "/dev/null"))))
-           (add-before 'configure 'substitute-libs
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((get (lambda (key lib)
-                             (string-append (assoc-ref inputs key) "/lib/" lib)))
-                      (libgi      (get "gobject-introspection" "libgirepository-1.0"))
-                      (libglib    (get "glib" "libglib-2.0"))
-                      (libgobject (get "glib" "libgobject-2.0"))
-                      (libgdk     (get "gtk" "libgdk-3")))
-                 (substitute* "configure"
-                   (("SITEDIR=\"\\$datadir/g-golf\"")
-                    "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
-                   (("SITECCACHEDIR=\"\\$libdir/g-golf/")
-                    "SITECCACHEDIR=\"$libdir/"))
-                 (substitute* "g-golf/init.scm"
-                   (("libgirepository-1.0") libgi)
-                   (("libglib-2.0") libglib)
-                   (("libgdk-3") libgdk)
-                   (("libgobject-2.0") libgobject)
-                   (("\\(dynamic-link \"libg-golf\"\\)")
-                    (format #f "~s"
-                            `(dynamic-link
-                              (format #f "~alibg-golf"
-                                      (if (getenv "GUILE_GGOLF_UNINSTALLED")
-                                          ""
-                                          ,(format #f "~a/lib/"
-                                                   (assoc-ref outputs "out"))))))))
-                 (setenv "GUILE_AUTO_COMPILE" "0")
-                 (setenv "GUILE_GGOLF_UNINSTALLED" "1")
-                 #t)))
-           (add-before 'check 'start-xorg-server
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; The test suite requires a running X server.
-               (system (format #f "~a/bin/Xvfb :1 &"
-                               (assoc-ref inputs "xorg-server")))
-               (setenv "DISPLAY" ":1")
-               #t)))))
       (home-page "https://www.gnu.org/software/g-golf/")
       (synopsis "Guile bindings for GObject Introspection")
       (description
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Deprecate-the-g-golf-variable.patch --]
[-- Type: text/x-patch, Size: 1396 bytes --]

From 567b8f456aae2f5af4714ba96af304bfbcdb4538 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:35:10 +0800
Subject: [PATCH 2/4] gnu: Deprecate the 'g-golf' variable.

g-golf now supports both Guile 3.0 and 2.2. Assign a new name to identify
the g-golf for different Guile version.

* gnu/packages/guile-xyz.scm (g-golf): Rename to guile-g-golf.
(g-golf): Define as deprecated by guile-g-golf.
---
 gnu/packages/guile-xyz.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 7be33c060f..5364e65a58 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1970,11 +1970,11 @@ (define-public guile-sly
     (home-page "https://dthompson.us/projects/sly.html")
     (license license:gpl3+)))
 
-(define-public g-golf
+(define-public guile-g-golf
   (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
         (revision "1010"))
     (package
-      (name "g-golf")
+      (name "guile-g-golf")
       (version (git-version "0.1.0" revision commit))
       (source
        (origin
@@ -2057,6 +2057,9 @@ (define (get lib)
 object-oriented programming system, GOOPS.")
       (license license:lgpl3+))))
 
+(define-public g-golf
+  (deprecated-package "g-golf" guile-g-golf))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-guile2.2-g-golf.patch --]
[-- Type: text/x-patch, Size: 909 bytes --]

From 56622a18f2b6c9b820b6564367f6ccdb5d8bb5ec Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:38:59 +0800
Subject: [PATCH 3/4] gnu: Add guile2.2-g-golf.

* gnu/packages/guile-xyz.scm (guile2.2-g-golf): New variable.
---
 gnu/packages/guile-xyz.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 5364e65a58..3fe3c2c690 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2060,6 +2060,14 @@ (define (get lib)
 (define-public g-golf
   (deprecated-package "g-golf" guile-g-golf))
 
+(define-public guile2.2-g-golf
+  (package
+    (inherit guile-g-golf)
+    (inputs
+     (modify-inputs (package-inputs guile-g-golf)
+       (replace "guile" guile-2.2)
+       (replace "guile-lib" guile2.2-lib)))))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-nomad-Depends-on-proper-version-of-g-golf.patch --]
[-- Type: text/x-patch, Size: 873 bytes --]

From af47535974bf92dc2ba6b20b4d5eeaf7ce1e6928 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:39:54 +0800
Subject: [PATCH 4/4] gnu: nomad: Depends on proper version of g-golf.

* gnu/packages/guile-xyz.scm (nomad)[inputs]: Replace 'g-golf' with 'guile2.2-g-golf'.
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 3fe3c2c690..b7922b89f8 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3456,7 +3456,7 @@ (define-public nomad
        ("guile-readline" ,guile2.2-readline)
        ("guile-gcrypt" ,guile2.2-gcrypt)
        ("gnutls" ,gnutls)
-       ("g-golf" ,g-golf)
+       ("g-golf" ,guile2.2-g-golf)
        ("shroud" ,shroud)
        ("emacsy" ,emacsy-minimal)
        ;; Gtk
-- 
2.34.0


[-- Attachment #6: Type: text/plain, Size: 100 bytes --]


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#53748] Acknowledgement ([PATCH]: Update g-golf to 0.0.1-1010-1824633.)
       [not found] ` <handler.53748.B.164389968613583.ack@debbugs.gnu.org>
@ 2022-02-03 15:01   ` Zhu Zihao
  2022-02-03 15:06     ` Zhu Zihao
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2022-02-03 15:01 UTC (permalink / raw)
  To: 53748


[-- Attachment #1.1: Type: text/plain, Size: 63 bytes --]

Forget to clean the name of guile2.2-g-golf. Patches updated.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Attachment #2: 0001-gnu-g-golf-Update-to-0.0.1-1010-1824633.patch --]
[-- Type: text/x-patch, Size: 8123 bytes --]

From e680954ca2b0d0987045c22642e4c1290a6de05b Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:27:40 +0800
Subject: [PATCH 1/4] gnu: g-golf: Update to 0.0.1-1010-1824633.

* gnu/packages/guile-xyz.scm (g-golf)[arguments]: Use G-Expression.

<phases>: Add phase 'fix-guile-site-directory'. Patch 'configure.ac' before
bootstrapping, avoid breaking configure script in accident.

In phase 'substitute-libs', use `search-input-file` for searching libraries.

In phase 'start-xorg-server', simplify the X server startup script.

[inputs]: Remove gtk+ and clutter.

Use label-less style.

[native-inputs]: Add gtk+ and clutter, they're now only needed in test.

Use label-less style.
---
 gnu/packages/guile-xyz.scm | 124 +++++++++++++++++++------------------
 1 file changed, 63 insertions(+), 61 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index f35ba43057..7be33c060f 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2021 Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2021, 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -117,6 +118,7 @@ (define-module (gnu packages guile-xyz)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
   #:use-module (guix build-system cmake)
@@ -1969,8 +1971,8 @@ (define-public guile-sly
     (license license:gpl3+)))
 
 (define-public g-golf
-  (let ((commit   "ef830107b9765bd6a2da848d0cbe45e11374c0b5")
-        (revision "839"))
+  (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
+        (revision "1010"))
     (package
       (name "g-golf")
       (version (git-version "0.1.0" revision commit))
@@ -1982,69 +1984,69 @@ (define-public g-golf
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "0r472hvmf447kqvkahp1wy4irb5gy8y793hm8r9rc511smdx66cw"))))
+          (base32 "0ncpqv6pbsx9fjmdzvzbjljnhqgw9pynqy9vr9aq35nb7rzrhfdf"))))
       (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("texinfo" ,texinfo)
-         ("gettext" ,gettext-minimal)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)
-         ("xorg-server" ,xorg-server)))
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "--with-guile-site=no")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-guile-site-directory
+              (lambda _
+                (substitute* "configure.ac"
+                  (("SITEDIR=.*$")
+                   "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\";\n")
+                  (("SITECCACHEDIR=\"\\$libdir/g-golf")
+                   "SITECCACHEDIR=\"$libdir/"))))
+            (add-before 'configure 'tests-work-arounds
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; In build environment, There is no /dev/tty
+                (substitute* "test-suite/tests/gobject.scm"
+                  (("/dev/tty") "/dev/null"))))
+            (add-before 'configure 'substitute-libs
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (define (get lib)
+                  (search-input-file inputs (string-append "lib/" lib ".so")))
+
+                (let* ((libgi      (get "libgirepository-1.0"))
+                       (libglib    (get "libglib-2.0"))
+                       (libgobject (get "libgobject-2.0"))
+                       (libg-golf (string-append #$output "/lib/libg-golf")))
+                  (substitute* "g-golf/init.scm"
+                    (("libgirepository-1.0") libgi)
+                    (("libglib-2.0") libglib)
+                    (("libgobject-2.0") libgobject)
+                    (("\\(dynamic-link \"libg-golf\"\\)")
+                     (format #f "~s"
+                             `(catch #t
+                                (lambda ()
+                                  (dynamic-link "libg-golf"))
+                                (lambda _
+                                  (dynamic-link ,libg-golf))))))
+                  (setenv "GUILE_AUTO_COMPILE" "0")
+                  #t)))
+            (add-before 'check 'start-xorg-server
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; The test suite requires a running X server.
+                (system "Xvfb :1 &")
+                (setenv "DISPLAY" ":1")
+                #t)))))
       (inputs
-       `(("guile" ,guile-2.2)
-         ("guile-lib" ,guile2.2-lib)
-         ("clutter" ,clutter)
-         ("gtk" ,gtk+)
-         ("glib" ,glib)))
+       (list guile-3.0 guile-lib glib))
+      (native-inputs
+       (list autoconf
+             automake
+             texinfo
+             gettext-minimal
+             libtool
+             pkg-config
+             ;; required for tests
+             gtk+
+             clutter
+             xorg-server-for-tests))
       (propagated-inputs
        (list gobject-introspection))
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'tests-work-arounds
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; In build environment, There is no /dev/tty
-               (substitute*
-                   "test-suite/tests/gobject.scm"
-                 (("/dev/tty") "/dev/null"))))
-           (add-before 'configure 'substitute-libs
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((get (lambda (key lib)
-                             (string-append (assoc-ref inputs key) "/lib/" lib)))
-                      (libgi      (get "gobject-introspection" "libgirepository-1.0"))
-                      (libglib    (get "glib" "libglib-2.0"))
-                      (libgobject (get "glib" "libgobject-2.0"))
-                      (libgdk     (get "gtk" "libgdk-3")))
-                 (substitute* "configure"
-                   (("SITEDIR=\"\\$datadir/g-golf\"")
-                    "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
-                   (("SITECCACHEDIR=\"\\$libdir/g-golf/")
-                    "SITECCACHEDIR=\"$libdir/"))
-                 (substitute* "g-golf/init.scm"
-                   (("libgirepository-1.0") libgi)
-                   (("libglib-2.0") libglib)
-                   (("libgdk-3") libgdk)
-                   (("libgobject-2.0") libgobject)
-                   (("\\(dynamic-link \"libg-golf\"\\)")
-                    (format #f "~s"
-                            `(dynamic-link
-                              (format #f "~alibg-golf"
-                                      (if (getenv "GUILE_GGOLF_UNINSTALLED")
-                                          ""
-                                          ,(format #f "~a/lib/"
-                                                   (assoc-ref outputs "out"))))))))
-                 (setenv "GUILE_AUTO_COMPILE" "0")
-                 (setenv "GUILE_GGOLF_UNINSTALLED" "1")
-                 #t)))
-           (add-before 'check 'start-xorg-server
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; The test suite requires a running X server.
-               (system (format #f "~a/bin/Xvfb :1 &"
-                               (assoc-ref inputs "xorg-server")))
-               (setenv "DISPLAY" ":1")
-               #t)))))
       (home-page "https://www.gnu.org/software/g-golf/")
       (synopsis "Guile bindings for GObject Introspection")
       (description
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Deprecate-the-g-golf-variable.patch --]
[-- Type: text/x-patch, Size: 1396 bytes --]

From 567b8f456aae2f5af4714ba96af304bfbcdb4538 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:35:10 +0800
Subject: [PATCH 2/4] gnu: Deprecate the 'g-golf' variable.

g-golf now supports both Guile 3.0 and 2.2. Assign a new name to identify
the g-golf for different Guile version.

* gnu/packages/guile-xyz.scm (g-golf): Rename to guile-g-golf.
(g-golf): Define as deprecated by guile-g-golf.
---
 gnu/packages/guile-xyz.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 7be33c060f..5364e65a58 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1970,11 +1970,11 @@ (define-public guile-sly
     (home-page "https://dthompson.us/projects/sly.html")
     (license license:gpl3+)))
 
-(define-public g-golf
+(define-public guile-g-golf
   (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
         (revision "1010"))
     (package
-      (name "g-golf")
+      (name "guile-g-golf")
       (version (git-version "0.1.0" revision commit))
       (source
        (origin
@@ -2057,6 +2057,9 @@ (define (get lib)
 object-oriented programming system, GOOPS.")
       (license license:lgpl3+))))
 
+(define-public g-golf
+  (deprecated-package "g-golf" guile-g-golf))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-guile2.2-g-golf.patch --]
[-- Type: text/x-patch, Size: 909 bytes --]

From 56622a18f2b6c9b820b6564367f6ccdb5d8bb5ec Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:38:59 +0800
Subject: [PATCH 3/4] gnu: Add guile2.2-g-golf.

* gnu/packages/guile-xyz.scm (guile2.2-g-golf): New variable.
---
 gnu/packages/guile-xyz.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 5364e65a58..3fe3c2c690 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2060,6 +2060,14 @@ (define (get lib)
 (define-public g-golf
   (deprecated-package "g-golf" guile-g-golf))
 
+(define-public guile2.2-g-golf
+  (package
+    (inherit guile-g-golf)
+    (inputs
+     (modify-inputs (package-inputs guile-g-golf)
+       (replace "guile" guile-2.2)
+       (replace "guile-lib" guile2.2-lib)))))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-nomad-Depends-on-proper-version-of-g-golf.patch --]
[-- Type: text/x-patch, Size: 873 bytes --]

From af47535974bf92dc2ba6b20b4d5eeaf7ce1e6928 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:39:54 +0800
Subject: [PATCH 4/4] gnu: nomad: Depends on proper version of g-golf.

* gnu/packages/guile-xyz.scm (nomad)[inputs]: Replace 'g-golf' with 'guile2.2-g-golf'.
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 3fe3c2c690..b7922b89f8 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3456,7 +3456,7 @@ (define-public nomad
        ("guile-readline" ,guile2.2-readline)
        ("guile-gcrypt" ,guile2.2-gcrypt)
        ("gnutls" ,gnutls)
-       ("g-golf" ,g-golf)
+       ("g-golf" ,guile2.2-g-golf)
        ("shroud" ,shroud)
        ("emacsy" ,emacsy-minimal)
        ;; Gtk
-- 
2.34.0


[-- Attachment #6: Type: text/plain, Size: 100 bytes --]


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#53748] Acknowledgement ([PATCH]: Update g-golf to 0.0.1-1010-1824633.)
  2022-02-03 15:01   ` [bug#53748] Acknowledgement ([PATCH]: Update g-golf to 0.0.1-1010-1824633.) Zhu Zihao
@ 2022-02-03 15:06     ` Zhu Zihao
  2022-02-08 12:25       ` bug#53748: [PATCH]: Update g-golf to 0.0.1-1010-1824633 Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2022-02-03 15:06 UTC (permalink / raw)
  To: 53748


[-- Attachment #1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Attachment #2: 0001-gnu-g-golf-Update-to-0.0.1-1010-1824633.patch --]
[-- Type: text/x-patch, Size: 8124 bytes --]

From 62df1822ea5e58d97ae844c92f7bd30eb6556e57 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:27:40 +0800
Subject: [PATCH 1/4] gnu: g-golf: Update to 0.0.1-1010-1824633.

* gnu/packages/guile-xyz.scm (g-golf)[arguments]: Use G-Expression.

<phases>: Add phase 'fix-guile-site-directory'. Patch 'configure.ac' before
bootstrapping, avoid breaking configure script in accident.

In phase 'substitute-libs', use `search-input-file` for searching libraries.

In phase 'start-xorg-server', simplify the X server startup script.

[inputs]: Remove gtk+ and clutter.

Use label-less style.

[native-inputs]: Add gtk+ and clutter, they're now only needed in test.

Use label-less style.
---
 gnu/packages/guile-xyz.scm | 124 +++++++++++++++++++------------------
 1 file changed, 63 insertions(+), 61 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index f35ba43057..9915d9b65e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2021 Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2021, 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -117,6 +118,7 @@ (define-module (gnu packages guile-xyz)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
   #:use-module (guix build-system cmake)
@@ -1969,8 +1971,8 @@ (define-public guile-sly
     (license license:gpl3+)))
 
 (define-public g-golf
-  (let ((commit   "ef830107b9765bd6a2da848d0cbe45e11374c0b5")
-        (revision "839"))
+  (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
+        (revision "1010"))
     (package
       (name "g-golf")
       (version (git-version "0.1.0" revision commit))
@@ -1982,69 +1984,69 @@ (define-public g-golf
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "0r472hvmf447kqvkahp1wy4irb5gy8y793hm8r9rc511smdx66cw"))))
+          (base32 "0ncpqv6pbsx9fjmdzvzbjljnhqgw9pynqy9vr9aq35nb7rzrhfdf"))))
       (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("texinfo" ,texinfo)
-         ("gettext" ,gettext-minimal)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)
-         ("xorg-server" ,xorg-server)))
+      (arguments
+       (list
+        #:configure-flags
+        #~(list "--with-guile-site=no")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-guile-site-directory
+              (lambda _
+                (substitute* "configure.ac"
+                  (("SITEDIR=.*$")
+                   "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\";\n")
+                  (("SITECCACHEDIR=\"\\$libdir/g-golf/")
+                   "SITECCACHEDIR=\"$libdir/"))))
+            (add-before 'configure 'tests-work-arounds
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; In build environment, There is no /dev/tty
+                (substitute* "test-suite/tests/gobject.scm"
+                  (("/dev/tty") "/dev/null"))))
+            (add-before 'configure 'substitute-libs
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                (define (get lib)
+                  (search-input-file inputs (string-append "lib/" lib ".so")))
+
+                (let* ((libgi      (get "libgirepository-1.0"))
+                       (libglib    (get "libglib-2.0"))
+                       (libgobject (get "libgobject-2.0"))
+                       (libg-golf (string-append #$output "/lib/libg-golf")))
+                  (substitute* "g-golf/init.scm"
+                    (("libgirepository-1.0") libgi)
+                    (("libglib-2.0") libglib)
+                    (("libgobject-2.0") libgobject)
+                    (("\\(dynamic-link \"libg-golf\"\\)")
+                     (format #f "~s"
+                             `(catch #t
+                                (lambda ()
+                                  (dynamic-link "libg-golf"))
+                                (lambda _
+                                  (dynamic-link ,libg-golf))))))
+                  (setenv "GUILE_AUTO_COMPILE" "0")
+                  #t)))
+            (add-before 'check 'start-xorg-server
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; The test suite requires a running X server.
+                (system "Xvfb :1 &")
+                (setenv "DISPLAY" ":1")
+                #t)))))
       (inputs
-       `(("guile" ,guile-2.2)
-         ("guile-lib" ,guile2.2-lib)
-         ("clutter" ,clutter)
-         ("gtk" ,gtk+)
-         ("glib" ,glib)))
+       (list guile-3.0 guile-lib glib))
+      (native-inputs
+       (list autoconf
+             automake
+             texinfo
+             gettext-minimal
+             libtool
+             pkg-config
+             ;; required for tests
+             gtk+
+             clutter
+             xorg-server-for-tests))
       (propagated-inputs
        (list gobject-introspection))
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'tests-work-arounds
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; In build environment, There is no /dev/tty
-               (substitute*
-                   "test-suite/tests/gobject.scm"
-                 (("/dev/tty") "/dev/null"))))
-           (add-before 'configure 'substitute-libs
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((get (lambda (key lib)
-                             (string-append (assoc-ref inputs key) "/lib/" lib)))
-                      (libgi      (get "gobject-introspection" "libgirepository-1.0"))
-                      (libglib    (get "glib" "libglib-2.0"))
-                      (libgobject (get "glib" "libgobject-2.0"))
-                      (libgdk     (get "gtk" "libgdk-3")))
-                 (substitute* "configure"
-                   (("SITEDIR=\"\\$datadir/g-golf\"")
-                    "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
-                   (("SITECCACHEDIR=\"\\$libdir/g-golf/")
-                    "SITECCACHEDIR=\"$libdir/"))
-                 (substitute* "g-golf/init.scm"
-                   (("libgirepository-1.0") libgi)
-                   (("libglib-2.0") libglib)
-                   (("libgdk-3") libgdk)
-                   (("libgobject-2.0") libgobject)
-                   (("\\(dynamic-link \"libg-golf\"\\)")
-                    (format #f "~s"
-                            `(dynamic-link
-                              (format #f "~alibg-golf"
-                                      (if (getenv "GUILE_GGOLF_UNINSTALLED")
-                                          ""
-                                          ,(format #f "~a/lib/"
-                                                   (assoc-ref outputs "out"))))))))
-                 (setenv "GUILE_AUTO_COMPILE" "0")
-                 (setenv "GUILE_GGOLF_UNINSTALLED" "1")
-                 #t)))
-           (add-before 'check 'start-xorg-server
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; The test suite requires a running X server.
-               (system (format #f "~a/bin/Xvfb :1 &"
-                               (assoc-ref inputs "xorg-server")))
-               (setenv "DISPLAY" ":1")
-               #t)))))
       (home-page "https://www.gnu.org/software/g-golf/")
       (synopsis "Guile bindings for GObject Introspection")
       (description
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Deprecate-the-g-golf-variable.patch --]
[-- Type: text/x-patch, Size: 1396 bytes --]

From da6dacaeff05b42b188edd48a52e7babab8c5cc6 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:35:10 +0800
Subject: [PATCH 2/4] gnu: Deprecate the 'g-golf' variable.

g-golf now supports both Guile 3.0 and 2.2. Assign a new name to identify
the g-golf for different Guile version.

* gnu/packages/guile-xyz.scm (g-golf): Rename to guile-g-golf.
(g-golf): Define as deprecated by guile-g-golf.
---
 gnu/packages/guile-xyz.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 9915d9b65e..a23679444d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1970,11 +1970,11 @@ (define-public guile-sly
     (home-page "https://dthompson.us/projects/sly.html")
     (license license:gpl3+)))
 
-(define-public g-golf
+(define-public guile-g-golf
   (let ((commit   "1824633d37da3794f349d6829e9dac2cf89adaa8")
         (revision "1010"))
     (package
-      (name "g-golf")
+      (name "guile-g-golf")
       (version (git-version "0.1.0" revision commit))
       (source
        (origin
@@ -2057,6 +2057,9 @@ (define (get lib)
 object-oriented programming system, GOOPS.")
       (license license:lgpl3+))))
 
+(define-public g-golf
+  (deprecated-package "g-golf" guile-g-golf))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-guile2.2-g-golf.patch --]
[-- Type: text/x-patch, Size: 940 bytes --]

From 3021cdb1b5ed4332a1417550246c487ff2742642 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:38:59 +0800
Subject: [PATCH 3/4] gnu: Add guile2.2-g-golf.

* gnu/packages/guile-xyz.scm (guile2.2-g-golf): New variable.
---
 gnu/packages/guile-xyz.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a23679444d..bec9dc7445 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2060,6 +2060,15 @@ (define (get lib)
 (define-public g-golf
   (deprecated-package "g-golf" guile-g-golf))
 
+(define-public guile2.2-g-golf
+  (package
+    (inherit guile-g-golf)
+    (name "guile2.2-g-golf")
+    (inputs
+     (modify-inputs (package-inputs guile-g-golf)
+       (replace "guile" guile-2.2)
+       (replace "guile-lib" guile2.2-lib)))))
+
 (define-public g-wrap
   (package
     (name "g-wrap")
-- 
2.34.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-nomad-Depends-on-proper-version-of-g-golf.patch --]
[-- Type: text/x-patch, Size: 873 bytes --]

From 71724859e01b7c4154825a15908de35c63bf7386 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 3 Feb 2022 22:39:54 +0800
Subject: [PATCH 4/4] gnu: nomad: Depends on proper version of g-golf.

* gnu/packages/guile-xyz.scm (nomad)[inputs]: Replace 'g-golf' with 'guile2.2-g-golf'.
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index bec9dc7445..996e6014d7 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3457,7 +3457,7 @@ (define-public nomad
        ("guile-readline" ,guile2.2-readline)
        ("guile-gcrypt" ,guile2.2-gcrypt)
        ("gnutls" ,gnutls)
-       ("g-golf" ,g-golf)
+       ("g-golf" ,guile2.2-g-golf)
        ("shroud" ,shroud)
        ("emacsy" ,emacsy-minimal)
        ;; Gtk
-- 
2.34.0


[-- Attachment #6: Type: text/plain, Size: 100 bytes --]


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#53748: [PATCH]: Update g-golf to 0.0.1-1010-1824633.
  2022-02-03 15:06     ` Zhu Zihao
@ 2022-02-08 12:25       ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-02-08 12:25 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 53748-done

Hi,

Zhu Zihao <all_but_last@163.com> skribis:

>>From 62df1822ea5e58d97ae844c92f7bd30eb6556e57 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Thu, 3 Feb 2022 22:27:40 +0800
> Subject: [PATCH 1/4] gnu: g-golf: Update to 0.0.1-1010-1824633.
>
> * gnu/packages/guile-xyz.scm (g-golf)[arguments]: Use G-Expression.
>
> <phases>: Add phase 'fix-guile-site-directory'. Patch 'configure.ac' before
> bootstrapping, avoid breaking configure script in accident.
>
> In phase 'substitute-libs', use `search-input-file` for searching libraries.
>
> In phase 'start-xorg-server', simplify the X server startup script.
>
> [inputs]: Remove gtk+ and clutter.
>
> Use label-less style.
>
> [native-inputs]: Add gtk+ and clutter, they're now only needed in test.
>
> Use label-less style.

[...]

>>From da6dacaeff05b42b188edd48a52e7babab8c5cc6 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Thu, 3 Feb 2022 22:35:10 +0800
> Subject: [PATCH 2/4] gnu: Deprecate the 'g-golf' variable.
>
> g-golf now supports both Guile 3.0 and 2.2. Assign a new name to identify
> the g-golf for different Guile version.
>
> * gnu/packages/guile-xyz.scm (g-golf): Rename to guile-g-golf.
> (g-golf): Define as deprecated by guile-g-golf.

[...]

>>From 3021cdb1b5ed4332a1417550246c487ff2742642 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Thu, 3 Feb 2022 22:38:59 +0800
> Subject: [PATCH 3/4] gnu: Add guile2.2-g-golf.
>
> * gnu/packages/guile-xyz.scm (guile2.2-g-golf): New variable.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-08 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 14:45 [bug#53748] [PATCH]: Update g-golf to 0.0.1-1010-1824633 Zhu Zihao
     [not found] ` <handler.53748.B.164389968613583.ack@debbugs.gnu.org>
2022-02-03 15:01   ` [bug#53748] Acknowledgement ([PATCH]: Update g-golf to 0.0.1-1010-1824633.) Zhu Zihao
2022-02-03 15:06     ` Zhu Zihao
2022-02-08 12:25       ` bug#53748: [PATCH]: Update g-golf to 0.0.1-1010-1824633 Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).