pkgsrc-ng/misc/dose3/patches/patch-Makefile.config.in
2016-11-18 22:39:22 +01:00

34 lines
1.0 KiB
Plaintext

$NetBSD: patch-Makefile.config.in,v 1.2 2016/06/19 10:36:59 jaapb Exp $
Use OCaml site-lib directory for installation
--- Makefile.config.in.orig 2016-06-15 10:23:22.000000000 +0000
+++ Makefile.config.in
@@ -9,25 +9,8 @@ OCAMLFIND=@OCAMLFIND@
DOSELIBS = _build/doselibs
-BINDIR = @prefix@@bindir@
-# if prefix is /usr/local (default), then we use ocamlfind,
-# otherwise use build the destdir using the given prefix
-ifeq (@prefix@,/usr/local)
- ifeq ("@OCAML_OS_TYPE@","Win32")
- LIBDIR=$(shell ocamlfind printconf destdir | cygpath -f - -m)
- else
- LIBDIR = $(shell ocamlfind printconf destdir)
- endif
-else
- LIBDIR = @prefix@@libdir@/ocaml/$(shell ocamlc -version)
-endif
-
-# if DESTDIR is specified, we ignore the prefix and we use the
-# default debian location
-ifneq ($(DESTDIR),)
- BINDIR = $(DESTDIR)@bindir@
- LIBDIR = $(DESTDIR)@libdir@/ocaml
-endif
+BINDIR=${DESTDIR}@bindir@
+LIBDIR=${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}
INSTALL=$(OCAMLFIND) install -destdir $(LIBDIR)
UNINSTALL=$(OCAMLFIND) remove -destdir $(LIBDIR)