[Pkg-ocaml-maint-commits] [SCM] fieldslib packaging branch, master, updated. debian/0.1.0-1-1-g7c608b7

Stefano Zacchiroli zack at upsilon.cc
Fri Dec 11 10:20:45 UTC 2009


The following commit has been merged in the master branch:
commit 7c608b7c1a8232d81c52687ad4d0b590729b8e82
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date:   Fri Dec 11 10:50:38 2009 +0100

    void building native code objects on non-native architectures
    
    new patch debian/patches/0001-support-for-bytecode-only-build.patch
    
    Closes: #559720

diff --git a/debian/changelog b/debian/changelog
index f83a9d3..2ff60ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+fieldslib (0.1.0-2) unstable; urgency=low
+
+  * Use quilt for patch management
+  * Avoid building native code objects on non-native architectures: new
+    patch 0001-support-for-bytecode-only-build (Closes: #559720)
+
+ -- Stefano Zacchiroli <zack at debian.org>  Fri, 11 Dec 2009 11:12:14 +0100
+
 fieldslib (0.1.0-1) unstable; urgency=low
 
   * Initial release (Closes: #555197)
diff --git a/debian/control b/debian/control
index c8af248..28fd07b 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Stefano Zacchiroli <zack at debian.org>,
 Build-Depends:
  cdbs,
  debhelper (>= 7),
+ quilt,
  ocaml-nox (>= 3.11.1),
  ocaml-findlib,
  camlp4,
diff --git a/debian/patches/0001-support-for-bytecode-only-build.patch b/debian/patches/0001-support-for-bytecode-only-build.patch
new file mode 100644
index 0000000..18073b6
--- /dev/null
+++ b/debian/patches/0001-support-for-bytecode-only-build.patch
@@ -0,0 +1,74 @@
+From: Stefano Zacchiroli <zack at upsilon.cc>
+Date: Fri, 11 Dec 2009 10:45:33 +0100
+Subject: [PATCH] support for bytecode-only build
+
+---
+ Makefile      |    9 +++++++++
+ OCamlMakefile |    2 +-
+ lib/Makefile  |    8 +++++++-
+ 3 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e5bd9d9..dec8f1c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,10 +3,19 @@ all:
+ 	@cd lib && $(MAKE)
+ 	@cd sample && $(MAKE)
+ 
++.PHONY: byte
++byte:
++	@cd lib && $(MAKE) byte
++	@cd sample && $(MAKE)
++
+ .PHONY:	install
+ install:
+ 	@cd lib && $(MAKE) $@
+ 
++.PHONY:	installbyte
++installbyte:
++	@cd lib && $(MAKE) $@
++
+ .PHONY:	uninstall
+ uninstall:
+ 	@cd lib && $(MAKE) $@
+diff --git a/OCamlMakefile b/OCamlMakefile
+index e9deb24..b7042bf 100644
+--- a/OCamlMakefile
++++ b/OCamlMakefile
+@@ -1216,7 +1216,7 @@ libinstall:	all
+ 	$(QUIET)printf "\nInstallation successful.\n"
+ 
+ .PHONY: libinstall-byte-code
+-libinstall-byte-code:	all
++libinstall-byte-code:
+ 	$(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
+ 	$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
+ 	  $(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
+diff --git a/lib/Makefile b/lib/Makefile
+index 5fd5087..af8b13e 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -14,14 +14,20 @@ all: \
+ 	fieldslib.cma fieldslib.cmxa \
+ 	pa_fields_conv.cmi pa_fields_conv.cmo
+ 
++byte: \
++	pack-byte-code \
++	fieldslib.cma \
++	pa_fields_conv.cmi pa_fields_conv.cmo
++
+ #toplevel-library:	byte-code-library \
+ #	$(OCAMLC) -a -o sexplib_top.cma sexplib.cma install_printers.cmo
+ 
+ LIBINSTALL_FILES = \
+-  fieldslib.cmi fieldslib.cma fieldslib.cmxa $(wildcard fieldslib.a) \
++  fieldslib.cmi fieldslib.cma $(wildcard fieldslib.cmxa) $(wildcard fieldslib.a) \
+   $(wildcard fieldslib.lib) pa_fields_conv.cmi pa_fields_conv.cmo
+ 
+ install:	libinstall
++installbyte:	libinstall-byte-code
+ uninstall:	libuninstall
+ 
+ clean::	clean-doc
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1eea0ff
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-support-for-bytecode-only-build.patch
diff --git a/debian/rules b/debian/rules
index 9cf4f9a..1931402 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,14 +1,21 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/class/makefile.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
 include /usr/share/cdbs/1/rules/ocaml.mk
 
 LIB_NAME = fields
 PKG_NAME = lib$(LIB_NAME)-camlp4-dev
 DESTDIR = $(CURDIR)/debian/$(PKG_NAME)$(OCAML_STDLIB_DIR)
+OCAMLFIND_INSTFLAGS=-destdir $(DESTDIR)
 
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
 DEB_MAKE_BUILD_TARGET = all
-DEB_MAKE_INSTALL_TARGET = install OCAMLFIND_INSTFLAGS="-destdir $(DESTDIR)"
+DEB_MAKE_INSTALL_TARGET = install OCAMLFIND_INSTFLAGS="$(OCAMLFIND_INSTFLAGS)"
+else
+DEB_MAKE_BUILD_TARGET = byte
+DEB_MAKE_INSTALL_TARGET = installbyte OCAMLFIND_INSTFLAGS="$(OCAMLFIND_INSTFLAGS)"
+endif
 
 OCAML_DHOCAML_FLAGS := --runtime-map=$(PKG_NAME)
 

-- 
fieldslib packaging



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