summary refs log tree commit diff
path: root/gnu/packages/serialization.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/serialization.scm')
-rw-r--r--gnu/packages/serialization.scm71
1 files changed, 54 insertions, 17 deletions
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 3ff90deb87..ff94a21aae 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -30,8 +30,8 @@
 
 (define-module (gnu packages serialization)
   #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix gexp)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix hg-download)
   #:use-module (guix git-download)
@@ -134,7 +134,7 @@ implement RPC protocols.")
 (define-public cereal
   (package
     (name "cereal")
-    (version "1.3.0")
+    (version "1.3.2")
     (source
      (origin
        (method git-fetch)
@@ -144,22 +144,22 @@ implement RPC protocols.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"))))
+         "02sd90ynya7wg013zwzjr79fsv4bzqgfg9l2mapd4j38rv06gahx"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags '("-DSKIP_PORTABILITY_TEST=ON")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'skip-sandbox
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("add_subdirectory\\(sandbox\\)") ""))))
-         (add-after 'install 'install-doc
-           (lambda _
-             (let ((doc (string-append %output "/share/doc/html")))
-               (invoke "make" "doc")
-               (mkdir-p doc)
-               (copy-recursively "doc/html" doc)))))))
+     (list
+      #:configure-flags #~'("-DSKIP_PORTABILITY_TEST=ON"
+                            ;; Don't bother building the sandbox examples.
+                            "-DSKIP_PERFORMANCE_COMPARISON=ON"
+                            "-DBUILD_SANDBOX=OFF")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-doc
+            (lambda _
+              (let ((doc (string-append #$output "/share/doc/html")))
+                (invoke "make" "doc")
+                (mkdir-p doc)
+                (copy-recursively "doc/html" doc)))))))
     (native-inputs
      (list doxygen))
     (home-page "https://uscilab.github.io/cereal/")
@@ -168,7 +168,44 @@ implement RPC protocols.")
      "Cereal is a header-only C++11 serialization library.  Cereal takes
 arbitrary data types and reversibly turns them into different representations,
 such as compact binary encodings, XML, or JSON.")
-    (license license:bsd-3)))
+    ;; Note: Cereal bundles forked versions of rapidxml and rapidjson
+    ;; (see include/cereal/external/), so list their licenses too.
+    (license (list license:bsd-3        ;Cereal itself
+                   ;; The bundled RapidXML is dual Boost/Expat (users choice).
+                   ;; RapidJSON is Expat licensed, and further bundles a
+                   ;; stdint.h with BSD-3.
+                   license:boost1.0 license:expat
+                   ;; Finally, include/cereal/external/base64.hpp has a
+                   ;; home-grown BSD-like license.
+                   (license:non-copyleft
+                    "file://include/cereal/external/LICENSE")))))
+
+;; Some packages fail with the latest version.  Remove this variable
+;; when unused.
+(define-public cereal-1.3.0
+  (package
+    (inherit cereal)
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/USCiLab/cereal")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name "cereal" version))
+       (sha256
+        (base32
+         "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments cereal)
+       ((#:configure-flags flags #~'())
+        #~'("-DSKIP_PORTABILITY_TEST=ON"))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-before 'configure 'skip-sandbox
+              (lambda _
+                (substitute* "CMakeLists.txt"
+                  (("add_subdirectory\\(sandbox\\)") ""))))))))))
 
 (define-public msgpack
   (package