GNU logs - #35054, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#35054] [PATCH core-updates] guix: cmake-build-system: Add option '#:glib-or-gtk?'.
Resent-From: Timo Eisenmann <eisenmann@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 30 Mar 2019 21:30:02 +0000
Resent-Message-ID: <handler.35054.B.155398136016034 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 35054
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 35054 <at> debbugs.gnu.org
Cc: Timo Eisenmann <eisenmann@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.155398136016034
          (code B ref -1); Sat, 30 Mar 2019 21:30:02 +0000
Received: (at submit) by debbugs.gnu.org; 30 Mar 2019 21:29:20 +0000
Received: from localhost ([127.0.0.1]:37616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hALXT-0004AX-KO
	for submit <at> debbugs.gnu.org; Sat, 30 Mar 2019 17:29:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eisenmann@HIDDEN>) id 1hALXS-0004AI-1L
 for submit <at> debbugs.gnu.org; Sat, 30 Mar 2019 17:29:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:42208)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <eisenmann@HIDDEN>) id 1hALXM-0002P9-R6
 for submit <at> debbugs.gnu.org; Sat, 30 Mar 2019 17:29:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40967)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eisenmann@HIDDEN>) id 1hALXL-0005uG-Ec
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 17:29:12 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eisenmann@HIDDEN>) id 1hALXK-0002OQ-6I
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 17:29:11 -0400
Received: from mout2.freenet.de ([195.4.92.92]:38158)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <eisenmann@HIDDEN>) id 1hALXJ-0002N1-Tw
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 17:29:10 -0400
Received: from [195.4.92.165] (helo=mjail2.freenet.de)
 by mout2.freenet.de with esmtpa (ID eisenmann@HIDDEN) (port 25) (Exim 4.90_1
 #2) id 1hALXF-0007CY-Pd
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 22:29:05 +0100
Received: from [::1] (port=49630 helo=mjail2.freenet.de)
 by mjail2.freenet.de with esmtpa (ID eisenmann@HIDDEN) (Exim 4.90_1 #2)
 id 1hALXF-00088W-Ms
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 22:29:05 +0100
Received: from sub3.freenet.de ([195.4.92.122]:46454)
 by mjail2.freenet.de with esmtpa (ID eisenmann@HIDDEN) (Exim 4.90_1 #2)
 id 1hALV8-0003y9-25
 for guix-patches@HIDDEN; Sat, 30 Mar 2019 22:26:54 +0100
Received: from p200300d403edff0053193646953a2512.dip0.t-ipconnect.de
 ([2003:d4:3ed:ff00:5319:3646:953a:2512]:46276 helo=localhost.localdomain)
 by sub3.freenet.de with esmtpsa (ID eisenmann@HIDDEN)
 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (port 587) (Exim 4.90_1 #2)
 id 1hALV7-0004r7-VF; Sat, 30 Mar 2019 22:26:54 +0100
From: Timo Eisenmann <eisenmann@HIDDEN>
Date: Sat, 30 Mar 2019 23:26:27 +0100
Message-Id: <20190330222627.10650-1-eisenmann@HIDDEN>
X-Mailer: git-send-email 2.21.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Originated-At: 2003:d4:3ed:ff00:5319:3646:953a:2512!46276
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 195.4.92.92
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* 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





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Timo Eisenmann <eisenmann@HIDDEN>
Subject: bug#35054: Acknowledgement ([PATCH core-updates] guix:
 cmake-build-system: Add option '#:glib-or-gtk?'.)
Message-ID: <handler.35054.B.155398136016034.ack <at> debbugs.gnu.org>
References: <20190330222627.10650-1-eisenmann@HIDDEN>
X-Gnu-PR-Message: ack 35054
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 35054 <at> debbugs.gnu.org
Date: Sat, 30 Mar 2019 21:30:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 35054 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
35054: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35054
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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