[Pkg-ocaml-maint-commits] [jocaml] 06/15: Automatically apply OCaml's patches

Mehdi Dogguy mehdi at moszumanska.debian.org
Thu May 8 22:12:46 UTC 2014


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

mehdi pushed a commit to branch master
in repository jocaml.

commit aa2044e1af1e51be0895fe1dc0d79445dc631b53
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Thu May 8 21:24:20 2014 +0200

    Automatically apply OCaml's patches
---
 debian/control |  1 +
 debian/rules   | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 95e7223..e43c5fe 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends:
  libncurses5-dev,
  libgdbm-dev,
  dh-ocaml (>= 1.0~),
+ ocaml-source (>= 3.12.1~),
  ocaml-nox (>= 3.12.1~)
 Homepage: http://jocaml.inria.fr/
 Standards-Version: 3.9.2
diff --git a/debian/rules b/debian/rules
index a96f991..bb54ce2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,16 @@ OCAMLC := $(if $(wildcard /usr/bin/ocamlc.opt),/usr/bin/ocamlc.opt,/usr/bin/ocam
 
 override_dh_auto_configure:
 	OCAMLINIT_SED=$(OCAMLINIT_OPTS) dh_ocamlinit
+	tar xf /usr/src/ocaml-source-$(OCAML_ABI).tar ocaml-$(OCAML_ABI)/debian-patches
+	for patch in `ls -1 ocaml-$(OCAML_ABI)/debian-patches/*.patch`; do	\
+		case $$patch in							\
+			*Put-manpages-in-section-3o-instead-of-3*|*Add-const-qualifiers-in-Tcl-Tk-bindings*) \
+				echo "Skipping $$patch";;			\
+			*)							\
+				quilt import -f -d n $$patch;;			\
+		esac								\
+	done
+	dh_quilt_patch
 	for ext in sub guess; do \
 		if [ -f /usr/share/misc/config.$$ext ]; then \
 			cp -f /usr/share/misc/config.$$ext $(CURDIR)/config/gnu/config.$$ext; \
@@ -38,8 +48,10 @@ ifdef JOCAML_OPT_ARCH
 endif
 
 override_dh_auto_clean:
+	dh_quilt_unpatch
 	dh_ocamlinit -d
 	$(RM) -f $(OFILES)
+	$(RM) -r -f ocaml-$(OCAML_ABI)
 	if [ -f Makefile -a -f config/Makefile ]; then \
 		$(MAKE) clean;   \
 	fi
@@ -69,4 +81,4 @@ override_dh_ocaml:
 		--nodefined-map=jocaml:Topdirs,Toploop,Topmain,Topstart,Condition,Thread,ThreadUnix,Event,Mutex,UnixLabels,Unix
 
 %:
-	dh --with quilt,ocaml $@
+	dh --with ocaml $@

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



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