aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.ocaml.mk
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2008-05-19 15:05:35 +0800
committerstas <stas@FreeBSD.org>2008-05-19 15:05:35 +0800
commit91f77f56213ea2aa1185339b229711191f5e95a7 (patch)
tree80f0c918474571860bb3cbc6f6c30c14d052c9e1 /Mk/bsd.ocaml.mk
parent4db7e72463c97e59121cfe8bc1d3f7df608e5c8c (diff)
downloadfreebsd-ports-gnome-91f77f56213ea2aa1185339b229711191f5e95a7.tar.gz
freebsd-ports-gnome-91f77f56213ea2aa1185339b229711191f5e95a7.tar.zst
freebsd-ports-gnome-91f77f56213ea2aa1185339b229711191f5e95a7.zip
- Add a knob to generate pkg-plist for ocaml findlib
ports automatically. Now if USE_OCAMLFIND_PLIST is defined all files under findlib target directories will be added to pkg-plist and thus requires no entries in static pkg-plist. This is important since a number of ocaml ports install its package files conditionally depending on platform and ocaml configurations and thus static entries are not possible. PR: ports/122844 (based on) Submitted by: Jaap Boender <jaapb@kerguelen.org>
Diffstat (limited to 'Mk/bsd.ocaml.mk')
-rw-r--r--Mk/bsd.ocaml.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/Mk/bsd.ocaml.mk b/Mk/bsd.ocaml.mk
index 5ae0e7a1d334..e92624bc699b 100644
--- a/Mk/bsd.ocaml.mk
+++ b/Mk/bsd.ocaml.mk
@@ -1,7 +1,7 @@
# ex:ts=4
#
# $MBSDlabs: portmk/bsd.ocaml.mk,v 1.18 2006/08/06 18:47:23 stas Exp $
-# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.ocaml.mk,v 1.2 2008-04-19 17:46:02 miwi Exp $
+# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.ocaml.mk,v 1.3 2008-05-19 07:05:35 stas Exp $
#
# bsd.ocaml.mk - Support for the Objective Caml language packages
#
@@ -20,6 +20,8 @@
# USE_OCAML_LDCONFIG - Set if your port installs shared libraries
# into ocaml site-lib dir. OCaml ld.conf file
# will be automatically processed.
+# USE_OCAMLFIND_PLIST - Add contents of findlib target directories
+# automatically.
# USE_OCAML_WASH - Set if your port wants to automatically
# purge shared Ocaml dirs on uninstall. It's
# useful when installing to non-standard PREFIX
@@ -122,6 +124,10 @@ pre-install-script:
. if !target(ocaml-findlib)
ocaml-findlib:
. for DIR in ${OCAML_PKGDIRS}
+. if defined(USE_OCAMLFIND_PLIST)
+ @${FIND} ${PREFIX}/${OCAML_SITELIBDIR}/${DIR}/ -type f -print | ${SED} -e \
+ 's,^${PREFIX}/,,' >> ${TMPPLIST}
+. endif
@${ECHO_CMD} "@unexec rmdir %D/${OCAML_SITELIBDIR}/${DIR} 2>/dev/null || true" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec ${OCAMLFIND} remove ${DIR} 2>/dev/null" \
>> ${TMPPLIST}