guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: gnu: cmake-minimal: Remove bundled jsoncpp.


From: guix-commits
Subject: 03/04: gnu: cmake-minimal: Remove bundled jsoncpp.
Date: Sat, 25 Jan 2020 09:03:15 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit b5fc075d01d76eafde4d297b146ae43f08e2f347
Author: Marius Bakke <address@hidden>
AuthorDate: Sat Jan 25 14:21:03 2020 +0100

    gnu: cmake-minimal: Remove bundled jsoncpp.
    
    * gnu/packages/cmake.scm (cmake-minimal)[source](snippet): New field.  Purge
    bundled jsoncpp.
    [inputs]: Add JSONCPP.
    [arguments]: Adjust accordingly.
    * gnu/packages/serialization.scm (jsoncpp)[arguments]: For native builds, 
use
    CMAKE-BOOTSTRAP.
---
 gnu/packages/cmake.scm         | 19 ++++++++++++++++---
 gnu/packages/serialization.scm |  6 +++++-
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 252ea1b..ce97699 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -42,9 +42,11 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages xml)
+  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
 ;;; The "bootstrap" CMake.  It is used to build the inputs of 'cmake-minimal'
@@ -71,7 +73,6 @@
                                 ;; "cmcompress"
                                 "cmcurl"
                                 "cmexpat"
-                                ;; "cmjsoncpp"
                                 ;; "cmlibarchive"
                                 "cmliblzma"
                                 ;; "cmlibuv"
@@ -88,7 +89,7 @@
                (string-append "--parallel=" parallel-job-count)
                (string-append "--prefix=" out)
                "--system-libs"
-               "--no-system-jsoncpp"    ; FIXME: Circular dependency.
+               "--no-system-jsoncpp"
                ;; By default, the man pages and other docs land
                ;; in PREFIX/man and PREFIX/doc, but we want them
                ;; in share/{man,doc}.  Note that unlike
@@ -202,9 +203,21 @@ and workspaces that can be used in the compiler 
environment of your choice.")
   (package
     (inherit cmake-bootstrap)
     (name "cmake-minimal")
+    (source (origin
+              (inherit (package-source cmake-bootstrap))
+              (snippet
+               (match (origin-snippet (package-source cmake-bootstrap))
+                 ((begin exp ...)
+                  (append '(begin (delete-file-recursively 
"Utilities/cmjsoncpp"))
+                          exp))))))
     (native-inputs
      `(("curl" ,curl)
-       ,@(alist-delete "curl" (package-native-inputs cmake-bootstrap))))))
+       ("jsoncpp" ,jsoncpp)
+       ,@(alist-delete "curl" (package-native-inputs cmake-bootstrap))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments cmake-bootstrap)
+       ((#:configure-flags flags ''())
+        `(delete "--no-system-jsoncpp" ,flags))))))
 
 ;;; The "user-facing" CMake, now with manuals and HTML documentation.
 (define-public cmake
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 72cc70e..0b3eb7e 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
@@ -296,7 +297,10 @@ that implements both the msgpack and msgpack-rpc 
specifications.")
                 "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES")))
+     `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES")
+       ,@(if (%current-target-system)
+             '()
+             `(#:cmake ,cmake-bootstrap))))
     (synopsis "C++ library for interacting with JSON")
     (description "JsonCpp is a C++ library that allows manipulating JSON 
values,
 including serialization and deserialization to and from strings.  It can also



reply via email to

[Prev in Thread] Current Thread [Next in Thread]