nixpkgs/pkgs/development/ocaml-modules/bitstring/camlp4.patch
2015-06-27 16:54:10 +00:00

85 lines
3.1 KiB
Diff

diff -rupN ocaml-bitstring-2.0.4.orig/camlp4.patch ocaml-bitstring-2.0.4/camlp4.patch
--- ocaml-bitstring-2.0.4.orig/camlp4.patch 1970-01-01 00:00:00.000000000 +0000
+++ ocaml-bitstring-2.0.4/camlp4.patch 2015-06-10 18:06:54.016000000 +0000
@@ -0,0 +1,31 @@
+--- Makefile.in 2015-06-10 20:05:26.603000000 +0200
++++ ../bs-old/Makefile.in 2013-05-14 17:42:32.000000000 +0200
+@@ -40,10 +40,10 @@
+ enable_coverage = @enable_coverage@
+
+ OCAMLCFLAGS = -g
+-OCAMLCPACKAGES = -package camlp4
++OCAMLCPACKAGES =
+ OCAMLCLIBS = -linkpkg
+ OCAMLOPTFLAGS =
+-OCAMLOPTPACKAGES = -package camlp4
++OCAMLOPTPACKAGES =
+ OCAMLOPTLIBS = -linkpkg
+
+ ifneq ($(enable_coverage),no)
+@@ -110,13 +110,12 @@
+ -I +camlp4 -pp camlp4of -c $<
+
+ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
+- $(OCAMLFIND) ocamlc $(OCAMLCPACKAGES) \
+- bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
++ $(OCAMLFIND) ocamlc 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 \
+- $(OCAMLCPACKAGES) $(OCAMLCLIBS) \
++ $(OCAMLCLIBS) \
+ bitstring.cma bitstring_persistent.cma \
+ $< -o $@
+
diff -rupN ocaml-bitstring-2.0.4.orig/Makefile.in ocaml-bitstring-2.0.4/Makefile.in
--- ocaml-bitstring-2.0.4.orig/Makefile.in 2013-05-14 15:42:32.000000000 +0000
+++ ocaml-bitstring-2.0.4/Makefile.in 2015-06-25 20:05:52.759000000 +0000
@@ -40,10 +40,10 @@ pkg_extlib = @OCAML_PKG_extlib@
enable_coverage = @enable_coverage@
OCAMLCFLAGS = -g
-OCAMLCPACKAGES =
+OCAMLCPACKAGES = -package camlp4
OCAMLCLIBS = -linkpkg
OCAMLOPTFLAGS =
-OCAMLOPTPACKAGES =
+OCAMLOPTPACKAGES = -package camlp4
OCAMLOPTLIBS = -linkpkg
ifneq ($(enable_coverage),no)
@@ -110,12 +110,13 @@ bitstring_persistent.cmi: bitstring_pers
-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 \
- $(OCAMLCLIBS) \
+ $(OCAMLCPACKAGES) $(OCAMLCLIBS) \
bitstring.cma bitstring_persistent.cma \
$< -o $@
@@ -158,13 +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 \
- $(OCAMLCLIBS) \
+ unix.cma -I `$(OCAMLFIND) query camlp4` dynlink.cma camlp4lib.cma \
+ $(OCAMLCLIBS) $(OCAMLCPACKAGES) \
-I . bitstring.cma bitstring_persistent.cma $< -o $@
create_test_pattern.cmo: create_test_pattern.ml
$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -pp camlp4of \
- unix.cma -I +camlp4 \
+ unix.cma -I `$(OCAMLFIND) query camlp4` $(OCAMLCPACKAGES) \
-I . -c $< -o $@
# Coverage of tests.