[Pkg-ocaml-maint-commits] [ocaml-deriving-ocsigen] 01/03: Fix compatibility with type-conv >= 108

Stéphane Glondu glondu at alioth.debian.org
Sun Nov 10 11:42:38 UTC 2013


This is an automated email from the git hooks/post-receive script.

glondu pushed a commit to branch master
in repository ocaml-deriving-ocsigen.

commit 8849bbb105b804e9e0fa94a1b394b150c0b1d244
Author: Stephane Glondu <steph at glondu.net>
Date:   Sun Nov 10 11:29:05 2013 +0100

    Fix compatibility with type-conv >= 108
---
 ...0001-Fix-compatibility-with-type-conv-108.patch |  106 ++++++++++++++++++++
 debian/patches/series                              |    1 +
 2 files changed, 107 insertions(+)

diff --git a/debian/patches/0001-Fix-compatibility-with-type-conv-108.patch b/debian/patches/0001-Fix-compatibility-with-type-conv-108.patch
new file mode 100644
index 0000000..dc8c202
--- /dev/null
+++ b/debian/patches/0001-Fix-compatibility-with-type-conv-108.patch
@@ -0,0 +1,106 @@
+From: Stephane Glondu <steph at glondu.net>
+Date: Sun, 10 Nov 2013 11:28:06 +0100
+Subject: Fix compatibility with type-conv >= 108
+
+Changes cherry-picked from upstream version 0.5.
+---
+ Makefile                 |  2 ++
+ Makefile.config          | 17 ++++++++++++++++-
+ files/META.in            |  2 +-
+ syntax/Makefile          |  2 +-
+ syntax/pa_deriving_tc.ml |  4 ++--
+ 5 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0e9e5cb..92c28e1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,12 +16,14 @@ files/META: files/META.in
+ 	sed -e "s%__NAME__%${PROJECTNAME}%" \
+             -e "s%__LIBDIR__%%" \
+             -e "s%__SYNTAXDIR__%%" \
++            -e "s%__TCNAME__%${TYPECONVNAME}%" \
+ 	  $< > $@
+ 
+ files/META.${PROJECTNAME}: files/META.in
+ 	sed -e "s%__NAME__%${PROJECTNAME}%" \
+             -e "s%__LIBDIR__%directory = \"../lib\"%" \
+             -e "s%__SYNTAXDIR__%directory = \"../syntax\"%" \
++            -e "s%__TCNAME__%${TYPECONVNAME}%" \
+ 	  $< > $@
+ 
+ clean: clean.local
+diff --git a/Makefile.config b/Makefile.config
+index f3303d9..8226e81 100644
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -4,7 +4,22 @@ OCAMLFIND := ocamlfind
+ 
+ NATDYNLINK :=YES
+ 
+-TYPECONV := $(shell ${OCAMLFIND} query type-conv 2>/dev/null)
++TYPECONV1 := \
++  $(shell ${OCAMLFIND} query -p-format type_conv 2>/dev/null)
++TYPECONV2 := \
++  $(shell ${OCAMLFIND} query -p-format type-conv 2>/dev/null)
++
++ifneq "${TYPECONV1}" ""
++TYPECONVNAME := ${TYPECONV1}
++else
++ifneq "${TYPECONV2}" ""
++TYPECONVNAME := ${TYPECONV2}
++else 
++TYPECONVNAME := 
++endif
++endif
++
++TYPECONV := $(shell ${OCAMLFIND} query ${TYPECONVNAME} 2>/dev/null)
+ 
+ OBJEXT := .o
+ LIBEXT := .a
+diff --git a/files/META.in b/files/META.in
+index a10ddb9..f3ebb9d 100644
+--- a/files/META.in
++++ b/files/META.in
+@@ -31,7 +31,7 @@ package "syntax" (
+ package "syntax_tc" (
+   __SYNTAXDIR__
+   exists_if = "pa_deriving_tc.cma"
+-  requires(syntax) = "camlp4,unix,type-conv"
++  requires(syntax) = "camlp4,unix,__TCNAME__"
+   requires(syntax, toploop) += "__NAME__"
+   archive(syntax, preprocessor) = "pa_deriving_tc.cma"
+   archive(syntax, toploop) = "pa_deriving_tc.cma"
+diff --git a/syntax/Makefile b/syntax/Makefile
+index e2be458..0aeaea4 100644
+--- a/syntax/Makefile
++++ b/syntax/Makefile
+@@ -23,7 +23,7 @@ extend.cmo extend.cmx .extend.ml.deps: \
+ pa_deriving.cmo pa_deriving.cmx .pa_deriving.ml.deps: \
+ 	LIBS+=-syntax camlp4o -package camlp4.extend,camlp4.quotations.o
+ pa_deriving_tc.cmo pa_deriving_tc.cmx .pa_deriving_tc.ml.deps: \
+-	LIBS+=-syntax camlp4o -package camlp4.extend,camlp4.quotations.o,type-conv
++	LIBS+=-syntax camlp4o -package camlp4.extend,camlp4.quotations.o,${TYPECONVNAME}
+ 
+ CLASSES := show_class.ml         \
+            dump_class.ml         \
+diff --git a/syntax/pa_deriving_tc.ml b/syntax/pa_deriving_tc.ml
+index bb73d21..a8d32ef 100644
+--- a/syntax/pa_deriving_tc.ml
++++ b/syntax/pa_deriving_tc.ml
+@@ -9,12 +9,12 @@ open Camlp4.PreCast
+ 
+ open Pa_deriving_common
+ 
+-let translate_str deriver types =
++let translate_str deriver _ types =
+   let _loc = Ast.loc_of_ctyp types in
+   let decls = Base.display_errors _loc Type.Translate.decls types in
+   Base.derive_str _loc decls deriver
+ 
+-let translate_sig deriver types =
++let translate_sig deriver _ types =
+   let _loc = Ast.loc_of_ctyp types in
+   let decls = Base.display_errors _loc Type.Translate.decls types in
+   Base.derive_sig _loc decls deriver
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5487126
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-compatibility-with-type-conv-108.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-deriving-ocsigen.git



More information about the Pkg-ocaml-maint-commits mailing list