ocamlPackages.bitstring: 2.1.1 -> 3.0.0 (#40034)

This commit is contained in:
Vincent Laporte 2018-05-13 17:28:22 +02:00 committed by xeji
parent be53a0f2ef
commit 6131989a7d
3 changed files with 18 additions and 68 deletions

View File

@ -1,44 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index d040f4c..cc1a8f5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,7 +40,7 @@ pkg_extlib = @OCAML_PKG_extlib@
enable_coverage = @enable_coverage@
OCAMLCFLAGS = -g
-OCAMLCPACKAGES =
+OCAMLCPACKAGES = -package camlp4
OCAMLCLIBS = -linkpkg
OCAMLOPTFLAGS = $(OCAMLCFLAGS)
OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
@@ -110,12 +110,13 @@ 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 $(OCAMLCPACKAGES) \
+ bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
-pp camlp4of -c $< -o $@
bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
$(OCAMLFIND) ocamlc -I +camlp4 unix.cma dynlink.cma camlp4lib.cma \
- $(OCAMLCFLAGS) $(OCAMLCLIBS) \
+ $(OCAMLCFLAGS) $(OCAMLCLIBS) $(OCAMLCPACKAGES) \
bitstring.cma bitstring_persistent.cma \
$< -o $@
@@ -158,12 +159,13 @@ tests/test.bmpp: create_test_pattern
create_test_pattern: create_test_pattern.cmo
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -pp camlp4of \
- unix.cma -I +camlp4 dynlink.cma camlp4lib.cma \
+ unix.cma -I `ocamlfind query camlp4` dynlink.cma camlp4lib.cma \
$(OCAMLCLIBS) \
-I . bitstring.cma bitstring_persistent.cma $< -o $@
create_test_pattern.cmo: create_test_pattern.ml
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -pp camlp4of \
+ $(OCAMLCPACKAGES) \
unix.cma -I +camlp4 \
-I . -c $< -o $@

View File

@ -1,26 +1,31 @@
{ stdenv, fetchurl, buildOcaml, time, autoconf, automake }: { stdenv, fetchFromGitHub, ocaml, findlib, jbuilder
, ppx_tools_versioned
, ounit
}:
buildOcaml rec { stdenv.mkDerivation rec {
name = "bitstring"; name = "ocaml${ocaml.version}-bitstring-${version}";
version = "2.1.1"; version = "3.0.0";
src = fetchurl { src = fetchFromGitHub {
url = http://github.com/xguerin/bitstring/archive/v2.1.1.tar.gz; owner = "xguerin";
sha256 = "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"; repo = "bitstring";
rev = "v${version}";
sha256 = "0r49qax7as48jgknzaq6p9rbpmrvnmlic713wzz5bj60j5h0396f";
}; };
patches = [ ./camlp4-git.patch ./srcdir.patch ]; buildInputs = [ ocaml findlib jbuilder ppx_tools_versioned ounit ];
buildPhase = "jbuilder build";
buildInputs = [time autoconf automake];
doCheck = true; doCheck = true;
checkPhase = "jbuilder runtest";
createFindlibDestdir = true; inherit (jbuilder) installPhase;
hasSharedObjects = true;
preConfigure = "./bootstrap";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml"; description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml";
homepage = https://github.com/xguerin/bitstring; homepage = https://github.com/xguerin/bitstring;
inherit (ocaml.meta) platforms;
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
maintainers = [ maintainers.maurer ]; maintainers = [ maintainers.maurer ];
}; };

View File

@ -1,11 +0,0 @@
--- a/Makefile.in 2015-09-01 06:32:15.111441188 +0200
+++ b/Makefile.in 2015-09-01 06:32:56.001084480 +0200
@@ -125,7 +125,7 @@
byteswap.h: byteswap.in.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/byteswap.in.h; \
+ cat $(top_srcdir)/byteswap.in.h; \
} > $@-t
mv -f $@-t $@