From 15b8708501d8e92da37cda8d88a0f51bf8bdc60b Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sat, 4 Mar 2017 12:47:12 +0100 Subject: [PATCH] Fix the build on non-opt+64 arches for raw_spacetime --- debian/changelog | 6 ++++++ debian/ocaml-base-nox.install.in | 6 +++--- debian/ocaml-nox.install.in | 6 +++--- debian/ocamlinit.mk | 6 ++++++ debian/rules | 6 ++++-- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 237e98e3..1acc42fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ocaml (4.04.0-2) UNRELEASED; urgency=medium + + * Fix the build on non-opt+64 arches for raw_spacetime. + + -- Ximin Luo Sat, 04 Mar 2017 12:31:51 +0100 + ocaml (4.04.0-1) experimental; urgency=medium [ Mehdi Dogguy ] diff --git a/debian/ocaml-base-nox.install.in b/debian/ocaml-base-nox.install.in index 60efa0ed..1907788b 100644 --- a/debian/ocaml-base-nox.install.in +++ b/debian/ocaml-base-nox.install.in @@ -50,9 +50,9 @@ DYN: @OCamlStdlibDir@/nums.cmxs @OCamlStdlibDir@/printf.cmi @OCamlStdlibDir@/queue.cmi @OCamlStdlibDir@/random.cmi -OPT: @OCamlStdlibDir@/raw_spacetime_lib.cmi -OPT: @OCamlStdlibDir@/raw_spacetime_lib.cma -DYN: @OCamlStdlibDir@/raw_spacetime_lib.cmxs +64: @OCamlStdlibDir@/raw_spacetime_lib.cmi +64: @OCamlStdlibDir@/raw_spacetime_lib.cma +64: DYN: @OCamlStdlibDir@/raw_spacetime_lib.cmxs @OCamlStdlibDir@/scanf.cmi @OCamlStdlibDir@/set.cmi @OCamlStdlibDir@/sort.cmi diff --git a/debian/ocaml-nox.install.in b/debian/ocaml-nox.install.in index 04ab4d3c..1435aec5 100644 --- a/debian/ocaml-nox.install.in +++ b/debian/ocaml-nox.install.in @@ -324,9 +324,9 @@ STD: random.mli STD: random.cmx STD: ratio.cmx STD: ratio.mli -STD: raw_spacetime_lib.cmx -STD: raw_spacetime_lib.cmxa -OPT: @OCamlStdlibDir@/raw_spacetime_lib.mli +64: STD: raw_spacetime_lib.cmx +64: STD: raw_spacetime_lib.cmxa +64: STD: raw_spacetime_lib.mli STD: scanf.ml STD: scanf.mli STD: scanf.cmx diff --git a/debian/ocamlinit.mk b/debian/ocamlinit.mk index 6e87bc90..8a4edf4a 100644 --- a/debian/ocamlinit.mk +++ b/debian/ocamlinit.mk @@ -41,6 +41,12 @@ OCAMLINIT_SED := \ -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%g' \ -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%g' +ifeq ($(DEB_BUILD_ARCH_BITS),64) + OCAMLINIT_SED += -e 's/^64: //' +else + OCAMLINIT_SED += -e '/^64: /d' +endif + ifeq ($(OCAML_HAVE_OCAMLOPT),yes) OCAMLINIT_SED += -e 's/^OPT: //' -e '/^BYTE: /d' else diff --git a/debian/rules b/debian/rules index e9fc69e5..369fb6d1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,9 @@ #!/usr/bin/make -f +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk +include /usr/share/dpkg/buildflags.mk + PACKAGE := ocaml ALL_PACKAGES := $(shell dh_listpackages) OCAMLMAJOR := 4.04 @@ -13,8 +17,6 @@ OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR) OCAML_STDLIB_DIR := /usr/lib/ocaml OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs) OCAML_NATDYNLINK_ARCHS := $(shell cat debian/natdynlink-archs) -DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS)) OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no) OCAML_OCAMLDOC_DESTDIR_HTML = -- 2.30.2