From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCsYQ-0007S3-GM for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCsYB-0003Jq-5y for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:23 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCsYA-0003JN-He for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCsYA-0006uw-EO for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:14 -0400 Subject: [bug#33079] [PATCH 26/34] gnu: ocaml-bisect: Update to 1.3.1. Resent-Message-ID: From: Julien Lepiller Date: Wed, 17 Oct 2018 22:34:34 +0200 Message-Id: <20181017203442.7075-26-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-bisect): Update to 1.3.1. (ocaml4.02-bisect): New variable. * gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch: Update patch. --- ...sect-fix-camlp4-in-another-directory.patch | 246 ++++++++++++++---- 1 file changed, 202 insertions(+), 44 deletions(-) diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch index 2056b4235..fd9a4c940 100644 --- a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch +++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch @@ -1,16 +1,28 @@ -From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001 +From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001 From: Julien Lepiller -Date: Wed, 14 Dec 2016 14:14:59 +0100 +Date: Fri, 21 Sep 2018 22:31:29 +0200 Subject: [PATCH] fix camlp4 in another directory --- - Makefile | 11 ++++++----- - configure | 13 ++++++++++++- - myocamlbuild.ml | 2 +- - 3 files changed, 19 insertions(+), 7 deletions(-) + Makefile | 11 ++++++----- + configure | 13 ++++++++++++- + tests/Makefile | 2 +- + tests/camlp4-comments/Makefile | 2 +- + tests/camlp4-exclude-file/Makefile | 2 +- + tests/camlp4-exclude/Makefile | 2 +- + tests/camlp4-instrument-fast/Makefile | 2 +- + tests/camlp4-instrument/Makefile | 2 +- + tests/combine-expr/Makefile | 2 +- + tests/ppx-comments/Makefile | 2 +- + tests/ppx-exclude-file/Makefile | 2 +- + tests/ppx-exclude/Makefile | 2 +- + tests/ppx-instrument-fast/Makefile | 2 +- + tests/ppx-instrument/Makefile | 2 +- + tests/report/Makefile | 2 +- + 15 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile -index 4a8ce17..d94a6d5 100644 +index b0980ee..6697922 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build @@ -19,12 +31,12 @@ index 4a8ce17..d94a6d5 100644 PATH_TESTS=$(PATH_BASE)/tests -PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect +PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect - - + + # DEFINITIONS @@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect PROJECT_NAME=bisect - OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild + OCAMLBUILD=ocamlbuild OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX) -OCAMLBUILD_FLAGS=-classic-display -no-links +CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)") @@ -33,22 +45,22 @@ index 4a8ce17..d94a6d5 100644 MODULES_MLPACK=$(PROJECT_NAME).mlpack MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack @@ -80,11 +81,11 @@ veryclean: clean - rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css - + rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css + install: FORCE - cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \ + cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \ - if [ "$(PPX)" = "TRUE" ]; then \ + if [ "$(PPX)" = "TRUE" ]; then \ - cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \ + cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \ - fi; \ -- (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ -+ (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ - if [ -x "$(PATH_OCAMLFIND)" ]; then \ - $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ - $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ + fi; \ +- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \ ++ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \ + if [ -x "$(PATH_OCAMLFIND)" ]; then \ + $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \ + $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \ diff --git a/configure b/configure -index bb7ebf4..61a3095 100755 +index bb7ebf4..43ef46b 100755 --- a/configure +++ b/configure @@ -21,7 +21,9 @@ @@ -79,47 +91,193 @@ index bb7ebf4..61a3095 100755 ppx='TRUE';; *) - echo "usage: $0 [-ocaml-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; -+ echo "usage: $0 [-prefix ] [-ocaml-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; ++ echo "usage: $0 [-prefix ] [-ocaml-prefix ] [-camlp4-prefix ] [-ocamlfind ] [-no-native-dynlink] [-devel]"; exit 1;; esac shift @@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then exit 1 fi - + +# prefix default value +test -z $prefix && prefix=$ocaml_prefix + # make options make_quiet=`make -f - < Makefile.config ++echo "PREFIX=$prefix" >> Makefile.config echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config +echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config echo "WARNINGS=$devel" >> Makefile.config - echo "NO_CAMLP4=$no_camlp4" >> Makefile.config - echo "PPX=$ppx" >> Makefile.config - echo "MAKE_QUIET=$make_quiet" >> Makefile.config -+echo "PREFIX=$prefix" >> Makefile.config - echo "" >> Makefile.config - echo 'Makefile.config successfully created' -diff --git a/myocamlbuild.ml b/myocamlbuild.ml -index 8aa25fd..09a7d48 100644 ---- a/myocamlbuild.ml -+++ b/myocamlbuild.ml -@@ -70,7 +70,7 @@ let () = - | After_rules -> - let camlp4of = - try -- let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in -+ let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in - Filename.concat path_bin "camlp4of" - with _ -> "camlp4of" in - flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]); --- -2.7.4 +diff --git a/tests/Makefile b/tests/Makefile +index 1aba27f..9642323 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -41,7 +41,7 @@ one: FORCE + else \ + echo "Running tests for '$(NAME)'..." | tee -a _log; \ + (cd $(NAME) && \ +- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \ ++ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \ + COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \ + REPORT=../../_build/src/report/report.byte && \ + cd ..) || echo '*** error' >> _log; \ +diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-comments/Makefile ++++ b/tests/camlp4-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile +index ab13983..e2520fa 100644 +--- a/tests/camlp4-exclude-file/Makefile ++++ b/tests/camlp4-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile +index 18aada4..d71a7bc 100644 +--- a/tests/camlp4-exclude/Makefile ++++ b/tests/camlp4-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile +index f60767f..8506e38 100644 +--- a/tests/camlp4-instrument-fast/Makefile ++++ b/tests/camlp4-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile +index 33fca72..a918118 100644 +--- a/tests/camlp4-instrument/Makefile ++++ b/tests/camlp4-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cmp + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cmp +diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile +index 46ae9eb..e8e2af2 100644 +--- a/tests/combine-expr/Makefile ++++ b/tests/combine-expr/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + + default: clean compile run report + +diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-comments/Makefile ++++ b/tests/ppx-comments/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile +index a575a77..0dd1a20 100644 +--- a/tests/ppx-exclude-file/Makefile ++++ b/tests/ppx-exclude-file/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile +index a517af4..f502a42 100644 +--- a/tests/ppx-exclude/Makefile ++++ b/tests/ppx-exclude/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile +index da78bb6..1195988 100644 +--- a/tests/ppx-instrument-fast/Makefile ++++ b/tests/ppx-instrument-fast/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile +index f8c645a..667526f 100644 +--- a/tests/ppx-instrument/Makefile ++++ b/tests/ppx-instrument/Makefile +@@ -2,7 +2,7 @@ default: + @rm -fr *.result *.cm* + @for file in *.ml; do \ + echo " testing '$$file' ..."; \ +- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ ++ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \ + diff -q $$file.reference $$file.result || exit 1; \ + done + @rm -fr *.result *.cm* +diff --git a/tests/report/Makefile b/tests/report/Makefile +index a7ffe44..a968bf9 100644 +--- a/tests/report/Makefile ++++ b/tests/report/Makefile +@@ -1,4 +1,4 @@ +-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) ++COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS) + XMLLINT=$(shell which xmllint) + + default: clean compile run report +-- +2.18.0 -- 2.18.0