aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-num/install-DESTDIR.patch
diff options
context:
space:
mode:
authoralpine-mips-patches <info@mobile-stream.com>2019-02-22 12:53:47 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-03-06 07:31:30 +0000
commit8ba03110f1f5bf03b243ede9bf7b2cc1e502c038 (patch)
treecb58000a048a213c004fb41c2ccff6890fea409d /testing/ocaml-num/install-DESTDIR.patch
parentda25a5be5b33f233119e11f4a9124262b6b8a757 (diff)
downloadaports-8ba03110f1f5bf03b243ede9bf7b2cc1e502c038.tar.bz2
aports-8ba03110f1f5bf03b243ede9bf7b2cc1e502c038.tar.xz
testing/ocaml-num: new aport
This is an indirect prerequisite (via coq) for CompCert. Tested with ocaml-4.07.1 only.
Diffstat (limited to 'testing/ocaml-num/install-DESTDIR.patch')
-rw-r--r--testing/ocaml-num/install-DESTDIR.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/ocaml-num/install-DESTDIR.patch b/testing/ocaml-num/install-DESTDIR.patch
new file mode 100644
index 0000000000..def0b316dd
--- /dev/null
+++ b/testing/ocaml-num/install-DESTDIR.patch
@@ -0,0 +1,55 @@
+diff --git a/src/Makefile b/src/Makefile
+index 8a88035..2f191af 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -91,10 +91,10 @@ install:
+ cp META.in META
+ $(OCAMLFIND) install num META
+ rm -f META
+- $(INSTALL_DATA) $(TOINSTALL) $(STDLIBDIR)
++ $(INSTALL_DATA) $(TOINSTALL) $(DESTDIR)$(STDLIBDIR)
+ ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
+- $(INSTALL_DIR) $(STDLIBDIR)/stublibs
+- $(INSTALL_DLL) $(TOINSTALL_STUBS) $(STDLIBDIR)/stublibs
++ $(INSTALL_DIR) $(DESTDIR)$(STDLIBDIR)/stublibs
++ $(INSTALL_DLL) $(TOINSTALL_STUBS) $(DESTDIR)$(STDLIBDIR)/stublibs
+ endif
+
+ findlib-install:
+@@ -106,9 +106,9 @@ findlib-uninstall:
+ $(OCAMLFIND) remove num
+
+ uninstall: findlib-uninstall
+- cd $(STDLIBDIR) && rm -f $(TOINSTALL)
++ cd $(DESTDIR)$(STDLIBDIR) && rm -f $(TOINSTALL)
+ ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true"
+- cd $(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
++ cd $(DESTDIR)$(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS)
+ endif
+
+ clean:
+diff --git a/toplevel/Makefile b/toplevel/Makefile
+index 8c91b0b..48a73ce 100644
+--- a/toplevel/Makefile
++++ b/toplevel/Makefile
+@@ -1,6 +1,7 @@
+ OCAMLC=ocamlc
+ OCAMLDEP=ocamldep
+ OCAMLFIND=ocamlfind
++STDLIBDIR=$(shell $(OCAMLC) -where)
+
+ CAMLCFLAGS=-I ../src -I +compiler-libs \
+ -w +a-4-9-41-42-44-45-48 -warn-error A \
+@@ -22,10 +23,10 @@ TOINSTALL=\
+ num_top.cma num_top.cmi num_top_printers.cmi
+
+ install:
+- $(OCAMLFIND) install num-top META $(TOINSTALL)
++ $(OCAMLFIND) install -destdir $(DESTDIR)$(STDLIBDIR) num-top META $(TOINSTALL)
+
+ uninstall:
+- $(OCAMLFIND) remove num-top
++ $(OCAMLFIND) remove -destdir $(DESTDIR)$(STDLIBDIR) num-top
+
+ clean:
+ rm -f *.cm[ioxta] *.cmx[as] *.cmti