From: Julien Lepiller <julien@lepiller.eu>
To: guix-devel@gnu.org
Subject: [PATCH 16/96] gnu: Add ocaml-bitstring
Date: Tue, 3 Jan 2017 20:10:57 +0100 [thread overview]
Message-ID: <20170103191217.6431-17-julien@lepiller.eu> (raw)
In-Reply-To: <20170103191217.6431-1-julien@lepiller.eu>
* gnu/packages/ocaml.scm (ocaml-bitstring): New variable.
* gnu/packages/patches/ocaml-bitstring-fix-configure.patch: New file.
* gnu/local.mk (dist_patch_DATA): New patch.
---
gnu/local.mk | 1 +
gnu/packages/ocaml.scm | 62 ++++++++++++++++++++++
.../patches/ocaml-bitstring-fix-configure.patch | 53 ++++++++++++++++++
3 files changed, 116 insertions(+)
create mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index cc46b4749..3e8517117 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -751,6 +751,7 @@ dist_patch_DATA = \
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
%D%/packages/patches/nvi-db4.patch \
%D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch \
+ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
%D%/packages/patches/ocaml-Add-a-.file-directive.patch \
%D%/packages/patches/ocaml-findlib-make-install.patch \
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f3f76eb1d..9814e10d2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -32,6 +32,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
@@ -49,6 +50,7 @@
#:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages time)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
#:use-module (gnu packages curl))
@@ -965,3 +967,63 @@ tests. After application execution, it is possible to generate a report in HTML
format that is the replica of the application source code annotated with code
coverage information.")
(license license:gpl3+)))
+
+(define-public ocaml-bitstring
+ (package
+ (name "ocaml-bitstring")
+ (version "2.1.0")
+ (home-page "https://github.com/xguerin/bitstring/")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page "archive/v" version ".tar.gz"))
+ (sha256
+ (base32
+ "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
+ (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
+ (build-system ocaml-build-system)
+ (native-inputs `(("camlp4" ,camlp4)
+ ("time" ,time)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bisect" ,ocaml-bisect)))
+ (propagated-inputs `(("camlp4" ,camlp4)))
+ (arguments `(#:configure-flags
+ (list "CAMLP4OF=camlp4of" "--enable-coverage")
+ #:make-flags
+ (list (string-append "BISECTLIB="
+ (assoc-ref %build-inputs "bisect")
+ "/lib/ocaml/site-lib")
+ (string-append "OCAMLCFLAGS=-g -I "
+ (assoc-ref %build-inputs "camlp4")
+ "/lib/ocaml/site-lib/camlp4 -I "
+ "$(BISECTLIB)/bisect")
+ (string-append "OCAMLOPTFLAGS=-g -I "
+ (assoc-ref %build-inputs "camlp4")
+ "/lib/ocaml/site-lib/camlp4 -I "
+ "$(BISECTLIB)/bisect"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile.in"
+ (("@abs_top_builddir@") (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"))))))))
+ (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)))
diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
new file mode 100644
index 000000000..c358bf3d6
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
@@ -0,0 +1,53 @@
+From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Thu, 15 Dec 2016 21:17:31 +0100
+Subject: [PATCH] fix configure
+
+---
+ Makefile.in | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index d040f4c..85e0b38 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -32,6 +32,7 @@ BISECT_REPORT = @BISECT_REPORT@
+ BYTESWAP_H = @BYTESWAP_H@
+
+ OCAMLLIB = @OCAMLLIB@
++BISECTLIB = $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi)
+ top_srcdir = @top_srcdir@
+
+ pkg_cil = @OCAML_PKG_cil@
+@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
+ OCAMLOPTLIBS = -linkpkg
+
+ ifneq ($(enable_coverage),no)
+-OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLCLIBS += -I +bisect bisect.cma
+-OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLOPTLIBS += -I +bisect bisect.cmxa
+ endif
+
+@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli
+ -I +camlp4 -pp camlp4of -c $<
+
+ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
+- $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
++ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
+ -pp camlp4of -c $< -o $@
+
+ bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
+@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h
+ ifeq ($(enable_coverage),no)
+ PP = -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ else
+-PP = -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
++PP = -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ endif
+
+ check: test
+--
+2.11.0
--
2.11.0
next prev parent reply other threads:[~2017-01-03 19:13 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 19:10 [PATCH 00/96] ocaml-build-system and packages Julien Lepiller
2017-01-03 19:10 ` [PATCH 01/96] gnu: ocaml: Add a .file directive to generated .s files Julien Lepiller
2017-01-03 19:10 ` [PATCH 02/96] gnu: ocaml: Add CAML_LD_LIBRARY_PATH search-path Julien Lepiller
2017-01-03 19:10 ` [PATCH 03/96] gnu: camlp4: compile native Julien Lepiller
2017-01-03 19:10 ` [PATCH 04/96] gnu: Add ocaml-build-system Julien Lepiller
2017-01-03 19:10 ` [PATCH 05/96] gnu: ocaml: Use a prefix for license field Julien Lepiller
2017-01-03 19:10 ` [PATCH 06/96] gnu: ocaml: Use a helper function to download from ocaml-forge Julien Lepiller
2017-01-04 13:38 ` David Craven
2017-01-03 19:10 ` [PATCH 07/96] gnu: camlp4: Install camlp4 META file Julien Lepiller
2017-01-03 19:10 ` [PATCH 08/96] gnu: Add ocaml-ounit Julien Lepiller
2017-01-04 13:55 ` David Craven
2017-01-03 19:10 ` [PATCH 09/96] gnu: Add camlzip Julien Lepiller
2017-01-08 12:16 ` Ben Woodcroft
2017-01-08 17:40 ` Julien Lepiller
2017-01-09 9:56 ` Ben Woodcroft
2017-01-03 19:10 ` [PATCH 10/96] gnu: Add ocamlmod Julien Lepiller
2017-01-04 15:00 ` David Craven
2017-01-04 16:57 ` julien lepiller
2017-01-04 17:35 ` David Craven
2017-01-04 17:55 ` David Craven
2017-01-04 18:19 ` David Craven
2017-01-15 13:14 ` Julien Lepiller
2017-01-15 14:27 ` David Craven
2017-01-04 21:02 ` Ludovic Courtès
2017-01-04 21:45 ` Leo Famulari
2017-01-03 19:10 ` [PATCH 11/96] gnu: Add ocaml-zarith Julien Lepiller
2017-01-03 19:10 ` [PATCH 12/96] gnu: Add ocaml-frontc Julien Lepiller
2017-01-03 19:10 ` [PATCH 13/96] gnu: Add ocaml-qtest Julien Lepiller
2017-01-03 19:10 ` [PATCH 14/96] gnu: Add ocaml-stringext Julien Lepiller
2017-01-03 19:10 ` [PATCH 15/96] gnu: Add ocaml-bisect Julien Lepiller
2017-01-03 19:10 ` Julien Lepiller [this message]
2017-01-03 19:10 ` [PATCH 17/96] gnu: Add ocaml-result Julien Lepiller
2017-01-03 19:10 ` [PATCH 18/96] gnu: Add ocaml-topkg Julien Lepiller
2017-01-03 19:11 ` [PATCH 19/96] gnu: Add ocaml-rresult Julien Lepiller
2017-01-03 19:11 ` [PATCH 20/96] gnu: Add ocaml-mtime Julien Lepiller
2017-01-03 19:11 ` [PATCH 21/96] gnu: Add ocaml-cmdliner Julien Lepiller
2017-01-03 19:11 ` [PATCH 22/96] gnu: Add ocaml-fmt Julien Lepiller
2017-01-03 19:11 ` [PATCH 23/96] gnu: Add ocaml-astring Julien Lepiller
2017-01-03 19:11 ` [PATCH 24/96] gnu: Add ocaml-alcotest Julien Lepiller
2017-01-03 19:11 ` [PATCH 25/96] gnu: Add ocaml-ppx-tools Julien Lepiller
2017-01-03 19:11 ` [PATCH 26/96] gnu: Add ocaml-react Julien Lepiller
2017-01-03 19:11 ` [PATCH 27/96] gnu: Add ocaml-ssl Julien Lepiller
2017-01-03 19:11 ` [PATCH 28/96] gnu: Add ocaml-lwt Julien Lepiller
2017-01-03 19:11 ` [PATCH 29/96] gnu: Add ocaml-logs Julien Lepiller
2017-01-03 19:11 ` [PATCH 30/96] gnu: Add ocaml-fpath Julien Lepiller
2017-01-03 19:11 ` [PATCH 31/96] gnu: Add ocaml-bos Julien Lepiller
2017-01-03 19:11 ` [PATCH 32/96] gnu: Add ocaml-xmlm Julien Lepiller
2017-01-03 19:11 ` [PATCH 33/96] gnu: Add ocaml-ulex Julien Lepiller
2017-01-03 19:11 ` [PATCH 34/96] gnu: Add ocaml-uchar Julien Lepiller
2017-01-03 19:11 ` [PATCH 35/96] gnu: Add ocaml-uutf Julien Lepiller
2017-01-03 19:11 ` [PATCH 36/96] gnu: Add ocaml-jsonm Julien Lepiller
2017-01-03 19:11 ` [PATCH 37/96] gnu: Add ocaml-ocurl Julien Lepiller
2017-01-03 19:11 ` [PATCH 38/96] gnu: Add ocaml-base64 Julien Lepiller
2017-01-03 19:11 ` [PATCH 39/96] gnu: Add ocamlify Julien Lepiller
2017-01-03 19:11 ` [PATCH 40/96] gnu: Add omake Julien Lepiller
2017-01-03 19:11 ` [PATCH 41/96] gnu: Add ocaml-batteries Julien Lepiller
2017-01-03 19:11 ` [PATCH 42/96] gnu: Add ocaml-pcre Julien Lepiller
2017-01-03 19:11 ` [PATCH 43/96] gnu: Add ocaml-expect Julien Lepiller
2017-01-03 19:11 ` [PATCH 44/96] gnu: Add ocaml-fileutils Julien Lepiller
2017-01-03 19:58 ` David Craven
2017-01-03 19:11 ` [PATCH 45/96] gnu: Add ocaml-oasis Julien Lepiller
2017-01-03 19:11 ` [PATCH 46/96] gnu: Add ocaml-js-build-tools Julien Lepiller
2017-01-03 19:11 ` [PATCH 47/96] gnu: Add ocaml-bin-prot Julien Lepiller
2017-01-03 19:11 ` [PATCH 48/96] gnu: Add ocaml-fieldslib Julien Lepiller
2017-01-03 19:11 ` [PATCH 49/96] gnu: Add ocaml-ppx-core Julien Lepiller
2017-01-03 19:11 ` [PATCH 50/96] gnu: Add ocaml-ppx-optcomp Julien Lepiller
2017-01-03 19:11 ` [PATCH 51/96] gnu: Add ocaml-ppx-driver Julien Lepiller
2017-01-03 19:11 ` [PATCH 52/96] gnu: Add ocaml-cppo Julien Lepiller
2017-01-03 19:11 ` [PATCH 53/96] gnu: Add ocaml-ppx-deriving Julien Lepiller
2017-01-03 19:11 ` [PATCH 54/96] gnu: Add ocaml-ppx-type-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 55/96] gnu: Add ocaml-ppx-inline-test Julien Lepiller
2017-01-03 19:11 ` [PATCH 56/96] gnu: Add ocaml-ppx-bench Julien Lepiller
2017-01-03 19:11 ` [PATCH 57/96] gnu: Add ocaml-ppx-compare Julien Lepiller
2017-01-03 19:11 ` [PATCH 58/96] gnu: Add ocaml-sexplib Julien Lepiller
2017-01-03 19:11 ` [PATCH 59/96] gnu: Add ocaml-typerep Julien Lepiller
2017-01-03 19:11 ` [PATCH 60/96] gnu: Add ocaml-variantslib Julien Lepiller
2017-01-03 19:11 ` [PATCH 61/96] gnu: Add ocaml-ppx-sexp-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 62/96] gnu: Add ocaml-ppx-variants-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 63/96] gnu: Add ocaml-ppx-here Julien Lepiller
2017-01-03 19:11 ` [PATCH 64/96] gnu: Add ocaml-ppx-assert Julien Lepiller
2017-01-03 19:11 ` [PATCH 65/96] gnu: Add ocaml-ppx-enumerate Julien Lepiller
2017-01-03 19:11 ` [PATCH 66/96] gnu: Add ocaml-ppx-let Julien Lepiller
2017-01-03 19:11 ` [PATCH 67/96] gnu: Add ocaml-ppx-typerep-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 68/96] gnu: Add ocaml-ppx-sexp-value Julien Lepiller
2017-01-03 19:11 ` [PATCH 69/96] gnu: Add ocaml-ppx-pipebang Julien Lepiller
2017-01-03 19:11 ` [PATCH 70/96] gnu: Add ocaml-ppx-bin-prot Julien Lepiller
2017-01-03 19:11 ` [PATCH 71/96] gnu: Add ocaml-ppx-fail Julien Lepiller
2017-01-03 19:11 ` [PATCH 72/96] gnu: Add ocaml-ppx-custom-printf Julien Lepiller
2017-01-03 19:11 ` [PATCH 73/96] gnu: Add ocaml-ppx-sexp-message Julien Lepiller
2017-01-03 19:11 ` [PATCH 74/96] gnu: Add ocaml-ppx-fields-conv Julien Lepiller
2017-01-03 19:11 ` [PATCH 75/96] gnu: Add ocaml-re Julien Lepiller
2017-01-03 19:11 ` [PATCH 76/96] gnu: Add ocaml-ppx-expect Julien Lepiller
2017-01-03 19:11 ` [PATCH 77/96] gnu: Add ocaml-ppx-jane Julien Lepiller
2017-01-03 19:11 ` [PATCH 78/96] gnu: Add ocaml-core-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 79/96] gnu: Add ocaml-async-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 80/96] gnu: Add ocaml-async-rpc-kernel Julien Lepiller
2017-01-03 19:12 ` [PATCH 81/96] gnu: Add ocaml-core Julien Lepiller
2017-01-03 19:12 ` [PATCH 82/96] gnu: Add ocaml-async-unix Julien Lepiller
2017-01-03 19:12 ` [PATCH 83/96] gnu: Add ocaml-async-extra Julien Lepiller
2017-01-03 19:12 ` [PATCH 84/96] gnu: Add ocaml-async Julien Lepiller
2017-01-03 19:12 ` [PATCH 85/96] gnu: Add ocaml-ocplib-endian Julien Lepiller
2017-01-03 19:12 ` [PATCH 86/96] gnu: Add ocaml-cstruct Julien Lepiller
2017-01-03 19:12 ` [PATCH 87/96] gnu: Add ocaml-hex Julien Lepiller
2017-01-03 19:12 ` [PATCH 88/96] gnu: Add ocaml-ezjsonm Julien Lepiller
2017-01-03 19:12 ` [PATCH 89/96] gnu: Add ocaml-uri Julien Lepiller
2017-01-03 19:12 ` [PATCH 90/96] gnu: Add ocaml-easy-format Julien Lepiller
2017-01-03 19:12 ` [PATCH 91/96] gnu: Add ocaml-optcomp Julien Lepiller
2017-01-03 19:12 ` [PATCH 92/96] gnu: Add ocaml-piqilib Julien Lepiller
2017-01-03 19:12 ` [PATCH 93/96] gnu: Add ocaml-uuidm Julien Lepiller
2017-01-03 19:12 ` [PATCH 94/96] gnu: Add ocamlgraph Julien Lepiller
2017-01-03 19:12 ` [PATCH 95/96] gnu: Add ocaml-piqi Julien Lepiller
2017-01-03 19:12 ` [PATCH 96/96] gnu: Add bap Julien Lepiller
2017-01-03 19:46 ` [PATCH 00/96] ocaml-build-system and packages David Craven
2017-01-03 20:21 ` Julien Lepiller
2017-01-03 20:27 ` David Craven
2017-01-04 20:57 ` Ludovic Courtès
2017-01-25 17:58 ` Ludovic Courtès
2017-01-26 9:27 ` julien lepiller
2017-01-26 18:05 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170103191217.6431-17-julien@lepiller.eu \
--to=julien@lepiller.eu \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).