From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCsYT-0007Ux-Up for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCsYH-0003My-Ue for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:25 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCsYB-0003Jg-2E for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCsYA-0006v3-Uh for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:14 -0400 Subject: [bug#33079] [PATCH 30/34] gnu: Update ocaml-bitstring to 3.1.0. Resent-Message-ID: From: Julien Lepiller Date: Wed, 17 Oct 2018 22:34:38 +0200 Message-Id: <20181017203442.7075-30-julien@lepiller.eu> In-Reply-To: <20181017203442.7075-1-julien@lepiller.eu> References: <20181017223130.775b25fc@lepiller.eu> <20181017203442.7075-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33079@debbugs.gnu.org * gnu/packages/ocaml.scm (ocaml-bitstring): Update to 3.1.0. (ocaml4.02-bitstring): New variable. --- gnu/packages/ocaml.scm | 98 ++++++++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 76d18ed3d..0c78651c5 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -1577,27 +1577,69 @@ ocaml-migrate-parsetree") (define-public ocaml-bitstring (package (name "ocaml-bitstring") - (version "2.1.1") + (version "3.1.0") (source (origin (method url-fetch) - (uri (string-append "https://github.com/xguerin/bitstring" - "/archive/v" version ".tar.gz")) + (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/" + "get/v" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8")) - (patches (search-patches "ocaml-bitstring-fix-configure.patch")))) + "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps")))) (build-system ocaml-build-system) (native-inputs `(("camlp4" ,camlp4) ("time" ,time) ("autoconf" ,autoconf) ("automake" ,automake) - ("bisect" ,ocaml-bisect))) + ("bisect" ,ocaml-bisect) + ("dune" ,dune))) (propagated-inputs - `(("camlp4" ,camlp4))) + `(("camlp4" ,camlp4) + ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned))) (arguments - `(#:configure-flags + `(#:tests? #f; Tests fail to build + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (invoke "jbuilder" "build" "@install") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "dune" "install" + "--prefix" (assoc-ref outputs "out")) + #t))))) + (properties + `((ocaml4.02-variant . ,(delay ocaml4.02-bitstring)))) + (home-page "https://github.com/xguerin/bitstring") + (synopsis "Bitstrings and bitstring matching for OCaml") + (description "Adds Erlang-style bitstrings and matching over bitstrings as +a syntax extension and library for OCaml. You can use this module to both parse +and generate binary formats, files and protocols. Bitstring handling is added +as primitives to the language, making it exceptionally simple to use and very +powerful.") + (license license:isc))) + +(define-public ocaml4.02-bitstring + (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bitstring)))) + (package + (inherit base) + (version "2.1.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/xguerin/bitstring" + "/archive/v" version ".tar.gz")) + (file-name (string-append "ocaml-bitstring-" version ".tar.gz")) + (sha256 + (base32 + "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8")) + (patches (search-patches "ocaml-bitstring-fix-configure.patch")))) + (arguments + `(#:ocaml ,ocaml-4.02 + #:findlib ,ocaml4.02-findlib + #:configure-flags (list "CAMLP4OF=camlp4of" "--enable-coverage") #:make-flags (list (string-append "BISECTLIB=" @@ -1613,6 +1655,17 @@ ocaml-migrate-parsetree") "$(BISECTLIB)/bisect")) #:phases (modify-phases %standard-phases + (add-after 'install 'link-lib + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (stubs (string-append out + "/lib/ocaml/site-lib/stubslibs")) + (lib (string-append out + "/lib/ocaml/site-lib/bitstring"))) + (mkdir-p stubs) + (symlink (string-append lib "/dllbitstring.so") + (string-append stubs "/dllbitstring.so"))) + #t)) (add-before 'configure 'fix-configure (lambda* (#:key inputs #:allow-other-keys) (substitute* "Makefile.in" @@ -1620,25 +1673,16 @@ ocaml-migrate-parsetree") (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH")))) (substitute* "configure" (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash") - "/bin/sh"))))) - (add-after 'install 'link-lib - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (stubs (string-append out - "/lib/ocaml/site-lib/stubslibs")) - (lib (string-append out - "/lib/ocaml/site-lib/bitstring"))) - (mkdir-p stubs) - (symlink (string-append lib "/dllbitstring.so") - (string-append stubs "/dllbitstring.so")))))))) - (home-page "https://github.com/xguerin/bitstring") - (synopsis "Bitstrings and bitstring matching for OCaml") - (description "Adds Erlang-style bitstrings and matching over bitstrings as -a syntax extension and library for OCaml. You can use this module to both parse -and generate binary formats, files and protocols. Bitstring handling is added -as primitives to the language, making it exceptionally simple to use and very -powerful.") - (license license:isc))) + "/bin/sh"))) + #t))))) + (native-inputs + `(("camlp4" ,camlp4-4.02) + ("time" ,time) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("bisect" ,ocaml4.02-bisect))) + (propagated-inputs + `(("camlp4" ,camlp4-4.02)))))) (define-public ocaml-result (package -- 2.18.0