Commit 0cfd4df4 authored by Ralf Treinen's avatar Ralf Treinen

patch for compilation on bytecode archs

parent fab5de39
ppx-deriving-yojson (3.1-3) unstable; urgency=medium ppx-deriving-yojson (3.1-3) unstable; urgency=medium
* autopkgtest: depends on ocamlbuild * autopkgtest: depends on ocamlbuild
* compilation on bytecode architectures:
- add patch makefile-bytecode
- adapt install target in debian/rules
-- Ralf Treinen <treinen@debian.org> Thu, 12 Jul 2018 08:15:02 +0200 -- Ralf Treinen <treinen@debian.org> Thu, 12 Jul 2018 19:30:59 +0200
ppx-deriving-yojson (3.1-2) unstable; urgency=medium ppx-deriving-yojson (3.1-2) unstable; urgency=medium
......
Author: Ralf Treinen <treinen@debian.org>
Description: fix build target on bytecode-only architectures
Index: ppx-deriving-yojson/Makefile
===================================================================
--- ppx-deriving-yojson.orig/Makefile 2018-07-12 08:29:35.665407949 +0200
+++ ppx-deriving-yojson/Makefile 2018-07-12 08:29:51.037483746 +0200
@@ -1,6 +1,13 @@
+OCAMLOPT := $(shell which ocamlopt)
+ifeq ($(OCAMLOPT),)
+ NATIVE := false
+else
+ NATIVE := true
+endif
+
build:
cp pkg/META.in pkg/META
- ocaml pkg/build.ml native=true native-dynlink=true
+ ocaml pkg/build.ml native=$(NATIVE) native-dynlink=$(NATIVE)
test: build
rm -rf _build/src_test/
makefile-bytecode
#!/usr/bin/make -f #!/usr/bin/make -f
include /usr/share/ocaml/ocamlvars.mk
ODESTDIR = $(CURDIR)/debian/libppx-deriving-yojson-ocaml-dev/usr/lib/ocaml ODESTDIR = $(CURDIR)/debian/libppx-deriving-yojson-ocaml-dev/usr/lib/ocaml
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
FILES := pkg/META _build/src/*.a _build/src/*.c* _build/src/*.mli
else
FILES := pkg/META _build/src/*.c* _build/src/*.mli
endif
%: %:
dh $@ --with ocaml dh $@ --with ocaml
override_dh_auto_install: override_dh_auto_install:
mkdir -p $(ODESTDIR) mkdir -p $(ODESTDIR)
ocamlfind install -destdir $(ODESTDIR) \ ocamlfind install -destdir $(ODESTDIR) ppx_deriving_yojson $(FILES)
ppx_deriving_yojson pkg/META \
_build/src/*.a _build/src/*.c* _build/src/*.mli
override_dh_auto_test: override_dh_auto_test:
# do nothing # do nothing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment