ocaml: opam-file-format: Allow to disable dynamic linking

This commit is contained in:
Alexander Bantyev 2019-11-14 23:29:12 +03:00
parent 07b838f13b
commit 484e0a89f9
No known key found for this signature in database
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 15 additions and 0 deletions

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
patches = [ ./optional-static.patch ];
meta = {
description = "Parser and printer for the opam file syntax";
license = stdenv.lib.licenses.lgpl21;

View File

@ -0,0 +1,13 @@
diff -u a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,1 +1,5 @@
-TARGETS = opam-file-format.cma opam-file-format.cmxa opam-file-format.cmxs
+TARGETS = opam-file-format.cma opam-file-format.cmxa
+
+ifeq "$(NATDYNLINK)" "true"
+TARGETS = $(TARGETS) opam-file-format.cmxs
+endif
all: $(TARGETS)