>From f8af42e7a9348610d5a413c0838ae22dda47da0b Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 24 Jun 2017 12:54:16 -0300 Subject: [PATCH] gnu: Add msgpack-c++-11 and opendht variant. opendht: Update to 1.3.3-5. * gnu/packages/crypto.scm (opendht): Update to 1.3.3-5. * gnu/packages/crypto.scm (opendht-with-msgpack-c++-11): New variable. * gnu/packages/serialization.scm (msgpack-c++-11): New variable. --- gnu/packages/crypto.scm | 98 +++++++++++++++++++++--------------------- gnu/packages/serialization.scm | 12 +++++- 2 files changed, 60 insertions(+), 50 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index 6f02d86..38211be 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016 ng0 ;;; Copyright © 2016, 2017 Eric Bavier +;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,58 +118,57 @@ OpenBSD tool of the same name.") "See base64.c in the distribution for the license from IBM."))))) - (define-public opendht - (package - (name "opendht") - (version "0.6.1") - (source - (origin - (method url-fetch) - (uri - (string-append - "https://github.com/savoirfairelinux/" name - "/archive/" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (modules '((guix build utils))) - (snippet - '(begin - (delete-file-recursively "src/argon2") - (substitute* "src/Makefile.am" - (("./argon2/libargon2.la") "") - (("SUBDIRS = argon2") "")) - (substitute* "src/crypto.cpp" - (("argon2/argon2.h") "argon2.h")) - (substitute* "configure.ac" - (("src/argon2/Makefile") "")))) - (sha256 - (base32 - "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x")))) - (build-system gnu-build-system) - (inputs - `(("gnutls" ,gnutls) - ("nettle" ,nettle) - ("readline" ,readline) - ("argon2" ,argon2))) - (propagated-inputs - `(("msgpack" ,msgpack))) ;included in several installed headers - (native-inputs - `(("autoconf" ,autoconf) - ("pkg-config" ,pkg-config) - ("automake" ,automake) - ("libtool" ,libtool))) - (arguments - `(#:configure-flags '("--disable-tools" "--disable-python") - #:phases (modify-phases %standard-phases - (add-before 'configure 'autoconf - (lambda _ - (zero? (system* "autoreconf" "-vfi"))))))) - (home-page "https://github.com/savoirfairelinux/opendht/") - (synopsis "Distributed Hash Table (DHT) library") - (description "OpenDHT is a Distributed Hash Table (DHT) library. It may + (let ((release "1.3.3") + (revision 5)) + (package + (name "opendht") + (version (if (zero? revision) + release + (string-append release "-" + (number->string revision)))) + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/savoirfairelinux/" name + "/archive/" release ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "07c8pj3wd7vmz505w508nlc4pssv38ca9s1asv8ydq9qvppd780b")))) + (build-system gnu-build-system) + (inputs + `(("gnutls" ,gnutls) + ("nettle" ,nettle) + ("readline" ,readline))) + (propagated-inputs + `(("argon2" ,argon2) + ("msgpack" ,msgpack))) ; included in several installed headers + (native-inputs + `(("autoconf" ,autoconf) + ("pkg-config" ,pkg-config) + ("automake" ,automake) + ("libtool" ,libtool))) + (arguments + `(#:configure-flags '("--with-argon2") + #:phases (modify-phases %standard-phases + (add-before 'configure 'autoconf + (lambda _ + (zero? + (system* "autoreconf" "-vfi"))))))) + (home-page "https://github.com/savoirfairelinux/opendht/") + (synopsis "Distributed Hash Table (DHT) library") + (description "OpenDHT is a Distributed Hash Table (DHT) library. It may be used to manage peer-to-peer network connections as needed for real time communication.") - (license license:gpl3))) + (license license:gpl3+)))) + +(define-public opendht-with-msgpack-c++-11 + (package + (inherit opendht) + (name "opendht-with-msgpack-c++-11") + (propagated-inputs + `(("msgpack-c++-11" ,msgpack-c++-11) + ,@(alist-delete "msgpack" (package-propagated-inputs opendht)))))) (define-public encfs (package diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 6a3d8f9..ad50ef5 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017 Corentin Bocquillon +;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,6 @@ arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON.") (license license:bsd-3))) - (define-public msgpack (package (name "msgpack") @@ -133,6 +133,16 @@ such as compact binary encodings, XML, or JSON.") serialization.") (license license:boost1.0))) +(define-public msgpack-c++-11 + (package + (inherit msgpack) + (name "msgpack-c++-11") + (arguments + (substitute-keyword-arguments (package-arguments msgpack) + ((#:make-flags msgpack-make-flags) + `(append ,msgpack-make-flags + '("-DMSGPACK_CXX11=ON"))))))) + (define-public libmpack (package (name "libmpack") -- 1.9.1