GNU bug report logs - #35054
[PATCH core-updates] guix: cmake-build-system: Add option '#:glib-or-gtk?'.

Previous Next

Package: guix-patches;

Reported by: Timo Eisenmann <eisenmann <at> fn.de>

Date: Sat, 30 Mar 2019 21:30:02 UTC

Severity: normal

Tags: patch

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35054 in the body.
You can then email your comments to 35054 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35054; Package guix-patches. (Sat, 30 Mar 2019 21:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Timo Eisenmann <eisenmann <at> fn.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 30 Mar 2019 21:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Timo Eisenmann <eisenmann <at> fn.de>
To: guix-patches <at> gnu.org
Cc: Timo Eisenmann <eisenmann <at> fn.de>
Subject: [PATCH core-updates] guix: cmake-build-system: Add option
 '#:glib-or-gtk?'.
Date: Sat, 30 Mar 2019 23:26:27 +0100
* guix/build-system/cmake.scm (%cmake-build-system-modules): Use
%gnu-build-system-modules instead of %glib-or-gtk-build-system-modules.
(lower): Add key 'glib-or-gtk?', defaulting to #f.
(cmake-build): Same.
[builder]: If 'glib-or-gtk?' is #f, remove phases 'glib-or-gtk-compile-schemas'
and 'glib-or-gtk-wrap'.
* guix/build/cmake-build-system.scm (%standard-phases): Use %standard-phases
from 'glib-or-gtk-build-system' instead of 'gnu-build-system'.
* doc/guix.texi (Build Systems): Document it.
---
 doc/guix.texi                     |  5 +++++
 guix/build-system/cmake.scm       | 16 ++++++++++++----
 guix/build/cmake-build-system.scm |  7 +++++--
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 3afdccac75..3025c3c1e1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -58,6 +58,7 @@ Copyright @copyright{} 2018 Gábor Boskovits@*
 Copyright @copyright{} 2018 Florian Pelz@*
 Copyright @copyright{} 2018 Laura Lazzati@*
 Copyright @copyright{} 2018 Alex Vong@*
+Copyright @copyright{} 2019 Timo Eisenmann@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -5795,6 +5796,10 @@ parameter specifies in abstract terms the flags passed to the compiler;
 it defaults to @code{"RelWithDebInfo"} (short for ``release mode with
 debugging information''), which roughly means that code is compiled with
 @code{-O2 -g}, as is the case for Autoconf-based packages by default.
+
+The @code{#:glib-or-gtk?} parameter, when set to @code{#t}, adds the phases
+@code{glib-or-gtk-wrap} and @code{glib-or-gtk-compile-schemas} for packages
+making use of GLib or GTK+.  It defaults to @code{#f}.
 @end defvr
 
 @defvr {Scheme Variable} dune-build-system
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index ca88fadddf..f9aee3a46e 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -25,6 +25,7 @@
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix packages)
   #:use-module (ice-9 match)
   #:export (%cmake-build-system-modules
@@ -34,14 +35,15 @@
 ;; Commentary:
 ;;
 ;; Standard build procedure for packages using CMake. This is implemented as an
-;; extension of `gnu-build-system'.
+;; extension of `gnu-build-system', with the option to turn on the glib/gtk
+;; phases from `glib-or-gtk-build-system'.
 ;;
 ;; Code:
 
 (define %cmake-build-system-modules
   ;; Build-side modules imported by default.
   `((guix build cmake-build-system)
-    ,@%gnu-build-system-modules))
+    ,@%glib-or-gtk-build-system-modules))
 
 (define (default-cmake)
   "Return the default CMake package."
@@ -53,6 +55,7 @@
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (cmake (default-cmake))
+                (glib-or-gtk? #f)
                 #:allow-other-keys
                 #:rest arguments)
   "Return a bag for NAME."
@@ -99,6 +102,7 @@
                       (build-type "RelWithDebInfo")
                       (tests? #t)
                       (test-target "test")
+                      (glib-or-gtk? #f)
                       (parallel-build? #t) (parallel-tests? #f)
                       (validate-runpath? #t)
                       (patch-shebangs? #t)
@@ -115,7 +119,11 @@
   "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE
 provides a 'CMakeLists.txt' file as its build system."
   (define builder
-    `(begin
+    `(let ((build-phases (if ,glib-or-gtk?
+                             ,phases
+                             (modify-phases ,phases
+                               (delete 'glib-or-gtk-compile-schemas)
+                               (delete 'glib-or-gtk-wrap)))))
        (use-modules ,@modules)
        (cmake-build #:source ,(match (assoc-ref inputs "source")
                                 (((? derivation? source))
@@ -129,7 +137,7 @@ provides a 'CMakeLists.txt' file as its build system."
                     #:inputs %build-inputs
                     #:search-paths ',(map search-path-specification->sexp
                                           search-paths)
-                    #:phases ,phases
+                    #:phases build-phases
                     #:configure-flags ,configure-flags
                     #:make-flags ,make-flags
                     #:out-of-source? ,out-of-source?
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index 9b1112f2d6..17b671fc70 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -21,6 +21,7 @@
 
 (define-module (guix build cmake-build-system)
   #:use-module ((guix build gnu-build-system) #:prefix gnu:)
+  #:use-module ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
   #:use-module (guix build utils)
   #:use-module (ice-9 match)
   #:export (%standard-phases
@@ -84,8 +85,10 @@
 
 (define %standard-phases
   ;; Everything is as with the GNU Build System except for the `configure'
-  ;; and 'check' phases.
-  (modify-phases gnu:%standard-phases
+  ;; and 'check' phases.  Also, there are some extra phases for packages
+  ;; making use of GLib or GTK+, which will be removed if the glib-or-gtk? key
+  ;; is #f (the default).
+  (modify-phases glib-or-gtk:%standard-phases
     (delete 'bootstrap)
     (replace 'check check)
     (replace 'configure configure)))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35054; Package guix-patches. (Thu, 07 Apr 2022 12:39:03 GMT) Full text and rfc822 format available.

Message #8 received at 35054 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Timo Eisenmann <eisenmann <at> fn.de>
Cc: 35054 <at> debbugs.gnu.org
Subject: Re: bug#35054: [PATCH core-updates] guix: cmake-build-system: Add
 option '#:glib-or-gtk?'.
Date: Thu, 07 Apr 2022 14:38:06 +0200
Hi,

Thank you for your contribution [1].  It appears that it fell into the
crack.  Sorry for that.

: <http://issues.guix.gnu.org/issue/35054>


On Sat, 30 Mar 2019 at 23:26, Timo Eisenmann <eisenmann <at> fn.de> wrote:
> * guix/build-system/cmake.scm (%cmake-build-system-modules): Use
> %gnu-build-system-modules instead of %glib-or-gtk-build-system-modules.
> (lower): Add key 'glib-or-gtk?', defaulting to #f.
> (cmake-build): Same.
> [builder]: If 'glib-or-gtk?' is #f, remove phases 'glib-or-gtk-compile-schemas'
> and 'glib-or-gtk-wrap'.
> * guix/build/cmake-build-system.scm (%standard-phases): Use %standard-phases
> from 'glib-or-gtk-build-system' instead of 'gnu-build-system'.
> * doc/guix.texi (Build Systems): Document it.

What is the rationale for this change?


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#35054; Package guix-patches. (Sat, 09 Apr 2022 04:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 35054 <at> debbugs.gnu.org (full text, mbox):

From: Timo Eisenmann <eisenmann <at> fn.de>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 35054 <at> debbugs.gnu.org
Subject: Re: bug#35054: [PATCH core-updates] guix: cmake-build-system:
 Add option '#:glib-or-gtk?'.
Date: Sat, 09 Apr 2022 06:44:31 +0200
Hello,

> Thank you for your contribution [1].  It appears that it fell into the
> crack.  Sorry for that.
No problem.

> What is the rationale for this change?
I don't remember.  Seems like I just sent it without any explanation.
Sorry about that.

Please feel free to close this.

Regards,
Timo Eisenmann




Reply sent to zimoun <zimon.toutoune <at> gmail.com>:
You have taken responsibility. (Tue, 12 Apr 2022 18:25:01 GMT) Full text and rfc822 format available.

Notification sent to Timo Eisenmann <eisenmann <at> fn.de>:
bug acknowledged by developer. (Tue, 12 Apr 2022 18:25:01 GMT) Full text and rfc822 format available.

Message #16 received at 35054-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Timo Eisenmann <eisenmann <at> fn.de>
Cc: 35054-done <at> debbugs.gnu.org
Subject: Re: bug#35054: [PATCH core-updates] guix: cmake-build-system: Add
 option '#:glib-or-gtk?'.
Date: Tue, 12 Apr 2022 19:17:56 +0200
Hi,

On Sat, 09 Apr 2022 at 06:44, Timo Eisenmann <eisenmann <at> fn.de> wrote:

> Please feel free to close this.

Thanks.  Done.


Cheers,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 May 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.