Page MenuHomeFreeBSD

D48227.diff
No OneTemporary

D48227.diff

diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,28 @@
All ports committers are allowed to commit to this file.
+20241231:
+AUTHOR: bofh@FreeBSD.org
+
+ Converted remaining bsd.ocaml.mk to Uses/ocaml.mk
+
+ - Instead of USE_OCAML=yes use USES=ocaml. If empty USES=ocaml implies
+ build and run
+ - Instead of USE_OCAMLFIND_PLIST use USES=ocaml:findplist which also
+ implies USES=ocaml:findlib
+ - Instead of USE_OCAML_CAMLP4 use USES=ocaml:camlp4
+ - Instead of USE_OCAML_FINDLIB use USES=ocaml:findlib
+ - Instead of USE_OCAML_LDCONFIG use USES=ocaml:ldconfig
+ - Instead of USE_OCAML_WASH use USES=ocaml:wash
+ - Instead of NO_OCAML_BUILDDEPENDS use USES=ocaml:run
+ - Instead of NO_OCAML_RUNDDEPENDS use USES=ocaml:build
+ - Instead of USE_OCAML_TK use USES=ocaml:tk which actually implies
+ USES=ocaml:tkbuild and USES=ocaml:tkrun
+ - Instead of NO_OCAMLTK_BUILDDEPENDS use USES=ocaml:tkrun
+ - Instead of NO_OCAMLTK_RUNDEPENDS use USES=ocaml:tkbuild
+ - USES=ocaml:dune remains unchanged
+ - Prepare to add/remove keywords easily
+
20240408:
AUTHOR: flo@FreeBSD.org
@@ -442,7 +464,7 @@
Ports that depend on mlt should now use USES=mlt:<version> to specify
their dependency.
- At the moment the supported version is 6, but will be extended to also
+ At the moment the supported version is 6, but will be extended to also
allow for selection of mlt 7 shortly.
20210604:
@@ -501,8 +523,8 @@
purpose, such as:
* course-writing or course-delivery applications,
* classroom or school management applications (eg, scheduling classes),
- * applications, utilities, or games primarily or substantially designed
- to help the user learn a specific topic or study in general, like typing
+ * applications, utilities, or games primarily or substantially designed
+ to help the user learn a specific topic or study in general, like typing
tutors, flashcard applications, or educational games.
20201110:
@@ -593,7 +615,7 @@
USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of
flavored lua ports, in a similar way as PHP or Python flavors.
-
+
20200115:
AUTHOR: bapt@FreeBSD.org
@@ -605,7 +627,7 @@
The ipv6 virtual category is gone, it does not make sense anymore in 2019
where the norm in applications is to have support both ipv4 and ipv6.
-
+
20191001:
AUTHOR: bapt@FreeBSD.org
diff --git a/Mk/Uses/ocaml.mk b/Mk/Uses/ocaml.mk
--- a/Mk/Uses/ocaml.mk
+++ b/Mk/Uses/ocaml.mk
@@ -1,38 +1,186 @@
-# Provide support to use the Dune package builder for OCaml
+# Provide support for OCaml
+# Feature: ocaml
+# Usage: USES=ocaml or USES=ocaml:args
#
-# Feature: ocaml
-# Usage: USES=ocaml:dune
-# USE_OCAML=yes
+# Valid ARGS: build, camlp4, dune, findlib, findplist, ldconfig, tk, tkbuild, tkrun, wash
+# If empty, defaults to build and run
+#
+# build - Add ocamlc to BUILD|EXTRACT|PATCH_DEPENDS
+#
+# camlp4 - Use camlp4 to build
+#
+# dune - Use dune as a build system
+#
+# findlib - Set if port uses ocamlfind to install packages.
+# Package direcories will be automatically deleted
+#
+# findplist - Add contents of findlib target directories automatically
+#
+# ldconfig - Set if your port installs shared libraries into ocaml
+# site-lib dir. OCaml ld.conf file will be automatically
+# processed. When dune is used Dune may install stublibs in
+# site-lib package directory(ies) or in a single directory
+# below DUNE_LIBDIR.
+#
+# run - Add ocamlc to RUN_DEPENDS
+#
+# tk - Set if port needs ocaml-labltk which implies tkbuild and
+# tkrun
+#
+# tkbuild - Add labltk to BUILD|EXTRACT|PATCH_DEPENDS
+#
+# tkrun - Add labltk to RUN_DEPENDS
+#
+# wash - Set if your port wants to automatically
+# purge shared Ocaml dirs on uninstall. It's
+# useful when installing to non-standard PREFIX
#
# Variables that may be set by the port:
#
-# OCAML_PACKAGES List of packages to build and install, defaults to PORTNAME
+# OCAML_PKGDIRS - Directories under site-lib to be processed
+# if USES=ocaml:findlib specified.
+# Default: ${PORTNAME}
#
-# USE_OCAML_LDCONFIG Dune may install stublibs in site-lib package directory(ies)
-# OCAML_LDLIBS or in a single directory below DUNE_LIBDIR.
+# OCAML_LDLIBS - Directories under PREFIX to be automatically
+# added/removed from ld.conf
+# Default: ${OCAML_SITELIBDIR}/${PORTNAME}
#
-# Appends to: BUILD_DEPENDS, MAKE_ENV
+# OCAML_PACKAGES - List of packages to build and install, defaults to ${PORTNAME}
#
# MAINTAINER: freebsd@dev.thsi.be
.if !defined(_INCLUDE_USES_OCAML_MK)
_INCLUDE_USES_OCAML_MK= yes
-. if empty(ocaml_ARGS:Mdune)
-IGNORE= Incorrect 'USES+= ocaml:${ocaml_ARGS}' ocaml requires a single 'dune' argument (for now)
+_OCAML_VALID_ARGS= build camlp4 dune findlib findplist ldconfig tk tkbuild tkrun wash
+_OCAML_UNKNOWN_ARGS=
+. for arg in ${ocaml_ARGS}
+. if empty(_OCAML_VALID_ARGS:M${arg})
+_OCAML_UNKNOWN_ARGS+= ${arg}
+. endif
+. endfor
+. if !empty(_OCAML_UNKNOWN_ARGS)
+IGNORE= has unknown USES=ocaml arguments: ${_OCAML_UNKNOWN_ARGS}
. endif
-
-. if !defined(OCAML_include)
-.error USES=dune only works with USE_OCAML=yes
+. if ${ocaml_ARGS:Mfindplist} && ${ocaml_ARGS:Mfindlib}
+DEV_WARNING+= "USES=ocaml:findlib is included in USES=ocaml:findplist, so it is not needed"
+. endif
+. if empty(ocaml_ARGS)
+ocaml_ARGS= build,run
. endif
+. if !empty(ocaml_ARGS)
+.undef _USE_OCAML_BUILD
+.undef _USE_OCAML_CAMLP4
+.undef _USE_OCAML_DUNE
+.undef _USE_OCAML_FINDLIB
+.undef _USE_OCAML_FINDPLIST
+.undef _USE_OCAML_LDCONFIG
+.undef _USE_OCAML_RUN
+.undef _USE_OCAML_TKBUILD
+.undef _USE_OCAML_TKRUN
+.undef _USE_OCAML_WASH
+_OCAML_ARGS= ${ocaml_ARGS:S/,/ /g}
+. if ${_OCAML_ARGS:Mcamlp4}
+_USE_OCAML_CAMLP4= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Ncamlp4}
+. endif
+. if ${_OCAML_ARGS:Mdune}
+_USE_OCAML_DUNE= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Ndune}
+. endif
+. if ${_OCAML_ARGS:Mfindplist}
+_USE_OCAML_FINDPLIST= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Nfindplist}
+_OCAML_ARGS+= findlib
+. endif
+. if ${_OCAML_ARGS:Mfindlib}
+_USE_OCAML_FINDLIB= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Nfindlib}
+. endif
+. if ${_OCAML_ARGS:Mldconfig}
+_USE_OCAML_LDCONFIG= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Nldconfig}
+. endif
+. if ${_OCAML_ARGS:Mtk}
+_OCAML_ARGS+= tkbuild
+_OCAML_ARGS+= tkrun
+. endif
+. if ${_OCAML_ARGS:Mtkbuild}
+. if defined(NO_BUILD)
+IGNORE= Makefile error: NO_BUILD and USES=ocaml:tkbuild cannot be set at the same time
+. else
+_USE_OCAML_TKBUILD= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Ntkbuild}
+. endif
+. endif
+. if ${_OCAML_ARGS:Mtkrun}
+_USE_OCAML_TKRUN= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Ntkrun}
+. endif
+. if ${_OCAML_ARGS:Mwash}
+_USE_OCAML_WASH= yes
+_OCAML_ARGS:= ${_OCAML_ARGS:Nwash}
+. endif
+. if empty(_OCAML_ARGS)
+_OCAML_ARGS+= build
+_OCAML_ARGS+= run
+. endif
+. if ${_OCAML_ARGS:Mbuild}
+. if defined(NO_BUILD)
+IGNORE= Makefile error: NO_BUILD and USES=ocaml:build cannot be set at the same time
+. else
+_USE_OCAML_BUILD= yes
+. endif
+. endif
+. if ${_OCAML_ARGS:Mrun}
+_USE_OCAML_RUN= yes
+. endif
+. endif # !empty(ocaml_ARGS)
+
#
-# Dune builder port
+# OCaml programs location
+#
+OCAMLC?= ${LOCALBASE}/bin/ocamlc
+OCAMLC_OPT?= ${LOCALBASE}/bin/ocamlc.opt
+OCAMLCP?= ${LOCALBASE}/bin/ocamlcp
+OCAMLFIND?= ${LOCALBASE}/bin/ocamlfind
+CAMLP4?= ${LOCALBASE}/bin/camlp4
+OCAMLTK?= ${LOCALBASE}/bin/labltk
+
#
-DUNE_PORT?= devel/ocaml-dune
-DUNE_DEPEND?= ocaml-dune>=3.7.1_2:devel/ocaml-dune
+# OCaml library directory
+#
+OCAML_LIBDIR?= lib/ocaml
+
+#
+# Where to install site libraries
+#
+OCAML_SITELIBDIR?= ${OCAML_LIBDIR}/site-lib
-BUILD_DEPENDS+= ${DUNE_DEPEND}
+#
+# OCaml compiler port dependency
+#
+OCAMLC_PORT?= lang/ocaml
+OCAMLC_DEPEND?= ${OCAMLC}:${OCAMLC_PORT}
+
+#
+# OCaml package manager port dependency
+#
+OCAMLFIND_PORT?= devel/ocaml-findlib
+OCAMLFIND_DEPEND?= ${OCAMLFIND}:${OCAMLFIND_PORT}
+
+#
+# OCaml camlp4 port dependency
+#
+CAMLP4_PORT?= devel/ocaml-camlp4
+CAMLP4_DEPEND?= ${CAMLP4}:${CAMLP4_PORT}
+
+#
+# Dune builder port
+#
+. if defined(_USE_OCAML_DUNE)
+BUILD_DEPENDS+= ocaml-dune>=3.7.1_2:devel/ocaml-dune
DUNE_ARGS= --display=short --always-show-command-line \
--no-config -j ${MAKE_JOBS_NUMBER} --profile release \
@@ -50,8 +198,116 @@
DUNE_LIBDIR?= ${OCAML_SITELIBDIR}
OCAML_PACKAGES?= ${PORTNAME}
DUNE_ROOT?= .
+# Left empty for default @install target
+ALL_TARGET?=
+. endif
+
+#
+# OCaml TK bindings dependency
+#
+OCAMLTK_PORT?= x11-toolkits/ocaml-labltk
+OCAMLTK_DEPENDS?= ${OCAMLTK}:${OCAMLTK_PORT}
+
+#
+# Common OCaml examples and documents location
+#
+OCAML_DOCSDIR= ${PREFIX}/share/doc/ocaml
+OCAML_EXAMPLESDIR= ${PREFIX}/share/examples/ocaml
+
+#
+# Location of OCaml ld.conf file
+#
+OCAML_LDCONF?= ${OCAML_LIBDIR}/ld.conf
+
+# ocaml-findlib-1.4.1_1 wants to edit our ld.conf file, which does not
+# work well with staging.
+. if defined(_USE_OCAML_LDCONFIG)
+. if !target(ocaml-ldconfig)
+OCAMLFIND_LDCONF?= /dev/null
+. endif
+. endif
+
+OCAMLFIND_DESTDIR?= ${PREFIX}/${OCAML_SITELIBDIR}
+OCAMLFIND_LDCONF?= ${PREFIX}/${OCAML_LDCONF}
+
+. if defined(_USE_OCAML_BUILD)
+EXTRACT_DEPENDS+= ${OCAMLC_DEPEND}
+PATCH_DEPENDS+= ${OCAMLC_DEPEND}
+BUILD_DEPENDS+= ${OCAMLC_DEPEND}
+. endif
+. if defined(_USE_OCAML_RUN)
+RUN_DEPENDS+= ${OCAMLC_DEPEND}
+. endif
+PLIST_SUB+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}"
-. if USE_OCAML_LDCONFIG
+. if defined(_USE_OCAML_FINDLIB)
+#
+# We'll additionally add ocamlfind to RUN_DEPENDS, since
+# if the port requires ocamlfind to install - it requires
+# some ocaml libraries and these libraries RUN_DEPENDS on
+# ocamlfind
+#
+BUILD_DEPENDS+= ${OCAMLFIND_DEPEND}
+RUN_DEPENDS+= ${OCAMLFIND_DEPEND}
+MAKE_ENV+= OCAMLFIND_DESTDIR="${STAGEDIR}${OCAMLFIND_DESTDIR}" \
+ OCAMLFIND_LDCONF="${OCAMLFIND_LDCONF}"
+
+#
+# Directories under site-lib to process automatically
+#
+OCAML_PKGDIRS?= ${PORTNAME}
+_USES_install+= 250:ocaml-pre-install 735:ocaml-findlib
+. if !target(ocaml-pre-install)
+ocaml-pre-install:
+ ${MKDIR} ${STAGEDIR}${OCAMLFIND_DESTDIR}
+. endif
+. if !target(ocaml-findlib)
+ocaml-findlib:
+. for DIR in ${OCAML_PKGDIRS}
+. if defined(_USE_OCAML_FINDPLIST)
+ @${FIND} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${DIR}/ -type f -print | ${SED} -e \
+ 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
+. endif
+ @${ECHO_CMD} "@postunexec ${OCAMLFIND} remove ${DIR} 2>/dev/null" \
+ >> ${TMPPLIST}
+. endfor
+. endif
+. endif
+
+. if defined(_USE_OCAML_CAMLP4)
+BUILD_DEPENDS+= ${CAMLP4_DEPEND}
+. endif
+
+. if defined(_USE_OCAML_TKBUILD)
+EXTRACT_DEPENDS+= ${OCAMLTK_DEPENDS}
+PATCH_DEPENDS+= ${OCAMLTK_DEPENDS}
+BUILD_DEPENDS+= ${OCAMLTK_DEPENDS}
+. endif
+. if defined(_USE_OCAML_TKRUN)
+RUN_DEPENDS+= ${OCAMLTK_DEPENDS}
+. endif
+
+. if defined(_USE_OCAML_LDCONFIG)
+#
+# Directories under PREFIX for appending to ld.conf
+#
+OCAML_LDLIBS?= ${OCAML_SITELIBDIR}/${PORTNAME}
+_USES_install+= 740:ocaml-ldconfig
+. if !target(ocaml-ldconfig)
+ocaml-ldconfig:
+. for LIB in ${OCAML_LDLIBS}
+ @${ECHO_CMD} "@postexec ${ECHO_CMD} "%D/${LIB}" >> %D/${OCAML_LDCONF}" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@postunexec ${SED} -i \"\" -e '/${LIB:S#/#\/#g}/d' %D/${OCAML_LDCONF}" >> ${TMPPLIST}
+. endfor
+. endif
+. endif
+
+. if defined(_USE_OCAML_WASH)
+PLIST_FILES+= "@rmempty ${OCAML_LDCONF}"
+. endif
+
+. if defined(_USE_OCAML_LDCONFIG) && defined(_USE_OCAML_DUNE)
. if !empty(OCAML_LDLIBS)
. if ${OCAML_LDLIBS:[#]} > 1
. for _l in ${OCAML_LDLIBS}
@@ -68,13 +324,13 @@
. endif
. endif
-# left empty for default @install target
-ALL_TARGET?=
+. if defined(_USE_OCAML_DUNE)
MAKE_ENV+= ${DUNE_ENV}
DO_MAKE_BUILD?= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${DUNE_CMD} build ${DUNE_ARGS} ${DUNE_BUILD_ARGS}
+. endif
-. if !target(do-install) && !defined(NO_INSTALL)
+. if !target(do-install) && !defined(NO_INSTALL) && defined(_USE_OCAML_DUNE)
do-install:
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} ${DUNE_CMD} install ${DUNE_ARGS} ${DUNE_INSTALL_ARGS} ${DUNE_INSTALL_TARGETS})
. endif
diff --git a/Mk/bsd.ocaml.mk b/Mk/bsd.ocaml.mk
deleted file mode 100644
--- a/Mk/bsd.ocaml.mk
+++ /dev/null
@@ -1,198 +0,0 @@
-# ex:ts=4
-#
-# $MBSDlabs: portmk/bsd.ocaml.mk,v 1.18 2006/08/06 18:47:23 stas Exp $
-#
-# bsd.ocaml.mk - Support for the Objective Caml language packages
-#
-# Author: Stanislav Sedov <ssedov@mbsd.msk.ru>
-#
-# Feel free to send any comments and suggestions to maintainer.
-#
-# Currently recognised variables are:
-#
-# USE_OCAML - Set if your port uses OCaml to build/install.
-# NO_OCAML_BUILDDEPENDS - Don't add ocamlc to BUILD|EXTRACT|PATCH_DEPENDS.
-# NO_OCAML_RUNDEPENDS - Don't add ocamlc to RUN_DEPENDS.
-# USE_OCAML_FINDLIB - Set if your port uses ocamlfind to install
-# packages. Package direcories will be
-# automatically deleted.
-# USE_OCAML_CAMLP4 - Set if your port uses camlp4 to build.
-# USE_OCAML_TK - Set if you port needs ocaml-labltk.
-# NO_OCAMLTK_BUILDDEPENDS - Don't add labltk to BUILD|EXTRACT|PATCH_DEPENDS.
-# NO_OCAMLTK_RUNDEPENDS - Don't add labltk to RUN_DEPENDS.
-# 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
-# OCAML_PKGDIRS - Directories under site-lib to be processed
-# if USE_OCAML_FINDLIB specified.
-# Default: ${PORTNAME}
-# OCAML_LDLIBS - Directories under PREFIX to be automatically
-# added/removed from ld.conf
-# Default: ${OCAML_SITELIBDIR}/${PORTNAME}
-
-.if !defined(OCAML_include)
-
-OCAML_MAINTAINER= ports@FreeBSD.org
-OCAML_include= bsd.ocaml.mk
-
-#
-# OCaml programs location
-#
-OCAMLC?= ${LOCALBASE}/bin/ocamlc
-OCAMLC_OPT?= ${LOCALBASE}/bin/ocamlc.opt
-OCAMLCP?= ${LOCALBASE}/bin/ocamlcp
-OCAMLFIND?= ${LOCALBASE}/bin/ocamlfind
-CAMLP4?= ${LOCALBASE}/bin/camlp4
-OCAMLTK?= ${LOCALBASE}/bin/labltk
-
-#
-# OCaml library directory
-#
-OCAML_LIBDIR?= lib/ocaml
-
-#
-# Where to install site libraries
-#
-OCAML_SITELIBDIR?= ${OCAML_LIBDIR}/site-lib
-
-#
-# OCaml compiler port dependency
-#
-OCAMLC_PORT?= lang/ocaml
-OCAMLC_DEPEND?= ${OCAMLC}:${OCAMLC_PORT}
-
-#
-# OCaml package manager port dependency
-#
-OCAMLFIND_PORT?= devel/ocaml-findlib
-OCAMLFIND_DEPEND?= ${OCAMLFIND}:${OCAMLFIND_PORT}
-
-#
-# OCaml camlp4 port dependency
-#
-CAMLP4_PORT?= devel/ocaml-camlp4
-CAMLP4_DEPEND?= ${CAMLP4}:${CAMLP4_PORT}
-
-#
-# OCaml TK bindings dependency
-#
-OCAMLTK_PORT?= x11-toolkits/ocaml-labltk
-OCAMLTK_DEPENDS?= ${OCAMLTK}:${OCAMLTK_PORT}
-
-#
-# Common OCaml examples and documents location
-#
-OCAML_DOCSDIR= ${PREFIX}/share/doc/ocaml
-OCAML_EXAMPLESDIR= ${PREFIX}/share/examples/ocaml
-
-#
-# Location of OCaml ld.conf file
-#
-OCAML_LDCONF?= ${OCAML_LIBDIR}/ld.conf
-
-# ocaml-findlib-1.4.1_1 wants to edit our ld.conf file, which does not
-# work well with staging.
-. if defined(USE_OCAML_LDCONFIG)
-. if !target(ocaml-ldconfig)
-OCAMLFIND_LDCONF?= /dev/null
-. endif
-. endif
-
-OCAMLFIND_DESTDIR?= ${PREFIX}/${OCAML_SITELIBDIR}
-OCAMLFIND_LDCONF?= ${PREFIX}/${OCAML_LDCONF}
-
-. if defined(USE_OCAML)
-. if !defined(NO_OCAML_BUILDDEPENDS)
-EXTRACT_DEPENDS+= ${OCAMLC_DEPEND}
-PATCH_DEPENDS+= ${OCAMLC_DEPEND}
-BUILD_DEPENDS+= ${OCAMLC_DEPEND}
-. endif
-. if !defined(NO_OCAML_RUNDEPENDS)
-RUN_DEPENDS+= ${OCAMLC_DEPEND}
-. endif
-PLIST_SUB+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}"
-. endif
-
-. if defined(USE_OCAML_FINDLIB)
-#
-# We'll additionally add ocamlfind to RUN_DEPENDS, since
-# if the port requires ocamlfind to install - it requires
-# some ocaml libraries and these libraries RUN_DEPENDS on
-# ocamlfind
-#
-BUILD_DEPENDS+= ${OCAMLFIND_DEPEND}
-RUN_DEPENDS+= ${OCAMLFIND_DEPEND}
-MAKE_ENV+= OCAMLFIND_DESTDIR="${STAGEDIR}${OCAMLFIND_DESTDIR}" \
- OCAMLFIND_LDCONF="${OCAMLFIND_LDCONF}"
-
-#
-# Directories under site-lib to process automatically
-#
-OCAML_PKGDIRS?= ${PORTNAME}
-_USES_install+= 735:ocaml-findlib
-. if !target(ocaml-findlib)
-ocaml-findlib:
-. for DIR in ${OCAML_PKGDIRS}
-. if defined(USE_OCAMLFIND_PLIST)
- @${FIND} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${DIR}/ -type f -print | ${SED} -e \
- 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
-. endif
- @${ECHO_CMD} "@postunexec ${OCAMLFIND} remove ${DIR} 2>/dev/null" \
- >> ${TMPPLIST}
-. endfor
-. endif
-. endif
-
-. if defined(USE_OCAML_CAMLP4)
-BUILD_DEPENDS+= ${CAMLP4_DEPEND}
-. endif
-
-. if defined(USE_OCAML_TK)
-. if !defined(NO_OCAMLTK_BUILDDEPENDS)
-EXTRACT_DEPENDS+= ${OCAMLTK_DEPENDS}
-PATCH_DEPENDS+= ${OCAMLTK_DEPENDS}
-BUILD_DEPENDS+= ${OCAMLTK_DEPENDS}
-. endif
-. if !defined(NO_OCAMLTK_RUNDEPENDS)
-RUN_DEPENDS+= ${OCAMLTK_DEPENDS}
-. endif
-. endif
-
-. if defined(USE_OCAML_LDCONFIG)
-#
-# Directories under PREFIX for appending to ld.conf
-#
-OCAML_LDLIBS?= ${OCAML_SITELIBDIR}/${PORTNAME}
-_USES_install+= 740:ocaml-ldconfig
-. if !target(ocaml-ldconfig)
-ocaml-ldconfig:
-. for LIB in ${OCAML_LDLIBS}
- @${ECHO_CMD} "@postexec ${ECHO_CMD} "%D/${LIB}" >> %D/${OCAML_LDCONF}" \
- >> ${TMPPLIST}
- @${ECHO_CMD} "@postunexec ${SED} -i \"\" -e '/${LIB:S#/#\/#g}/d' %D/${OCAML_LDCONF}" >> ${TMPPLIST}
-. endfor
-. endif
-. endif
-
-. if defined(USE_OCAML_WASH)
-PLIST_FILES+= "@rmempty ${OCAML_LDCONF}"
-. endif
-
-.endif #!defined(OCAML_include)
-
-.if defined(_POSTMKINCLUDED)
-
-. if defined(USE_OCAML_FINDLIB)
-
-pre-install: ${STAGEDIR}${OCAMLFIND_DESTDIR}
-${STAGEDIR}${OCAMLFIND_DESTDIR}:
- @${MKDIR} ${.TARGET}
-
-. endif
-
-.endif # _POSTMKINCLUDED
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -360,9 +360,6 @@
# USE_JAVA - If set, this port relies on the Java language.
# Implies inclusion of bsd.java.mk. (Also see
# that file for more information on USE_JAVA_*).
-# USE_OCAML - If set, this port relies on the OCaml language.
-# Implies inclusion of bsd.ocaml.mk. (Also see
-# that file for more information on USE_OCAML*).
##
# USE_GECKO - If set, this port uses the Gecko/Mozilla product.
# See bsd.gecko.mk for more details.
@@ -1409,10 +1406,6 @@
.include "${PORTSDIR}/Mk/bsd.java.mk"
. endif
-. if defined(USE_OCAML)
-.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
-. endif
-
. if defined(USE_APACHE_BUILD)
USES+= apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g}
. elif defined(USE_APACHE_RUN)
@@ -1936,10 +1929,6 @@
.include "${PORTSDIR}/Mk/bsd.java.mk"
. endif
-. if defined(USE_OCAML)
-.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
-. endif
-
. if defined(USE_WX) || defined(USE_WX_NOT)
.include "${PORTSDIR}/Mk/bsd.wx.mk"
. endif
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -210,7 +210,10 @@
XORG_CAT CARGO_USE_GITHUB CARGO_USE_GITLAB CARGO_GIT_SUBDIR \
USE_RUBY USE_RUBY_EXTCONF USE_RUBY_SETUP RUBY_NO_BUILD_DEPENDS \
RUBY_NO_RUN_DEPENDS USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN \
- USE_OPENLDAP WANT_OPENLDAP_VER
+ USE_OPENLDAP WANT_OPENLDAP_VER USE_OCAML USE_OCAML_CAMLP4 USE_OCAML_WASH \
+ USE_OCAML_TK NO_OCAMLTK_BUILDDEPENDS NO_OCAMLTK_RUNDEPENDS \
+ USE_OCAMLFIND_PLIST USE_OCAML_FINDLIB USE_OCAML_LDCONFIG \
+ NO_OCAML_BUILDDEPENDS NO_OCAML_RUNDEPENDS
SANITY_DEPRECATED= MLINKS \
USE_MYSQL WANT_MYSQL_VER \
PYDISTUTILS_INSTALLNOSINGLE
@@ -307,6 +310,17 @@
USE_RUBY_SETUP_ALT= USES=ruby:setup
RUBY_NO_BUILD_DEPENDS_ALT= USES=ruby:run
RUBY_NO_RUN_DEPENDS_ALT= USES=ruby:build
+USE_OCAMLFIND_PLIST_ALT= USES=ocaml:findplist
+USE_OCAML_ALT= USES=ocaml
+USE_OCAML_CAMLP4_ALT= USES=ocaml:camlp4
+USE_OCAML_FINDLIB_ALT= USES=ocaml:findlib
+USE_OCAML_LDCONFIG_ALT= USES=ocaml:ldconfig
+USE_OCAML_TK_ALT= USES=ocaml:tk
+USE_OCAML_WASH_ALT= USES=ocaml:wash
+NO_OCAMLTK_BUILDDEPENDS_ALT= USES=ocaml:tkrun
+NO_OCAMLTK_RUNDEPENDS_ALT= USES=ocaml:tkbuild
+NO_OCAML_BUILDDEPENDS_ALT= USES=ocaml:run
+NO_OCAML_RUNDEPENDS_ALT= USES=ocaml:build
.for a in ${SANITY_DEPRECATED}
. if defined(${a})
diff --git a/archivers/ocaml-bz2/Makefile b/archivers/ocaml-bz2/Makefile
--- a/archivers/ocaml-bz2/Makefile
+++ b/archivers/ocaml-bz2/Makefile
@@ -10,12 +10,10 @@
LICENSE= LGPL21 LGPL3
LICENSE_COMB= dual
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITLAB= yes
GL_ACCOUNT= irill
GL_PROJECT= camlbz2
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/archivers/ocaml-zip/Makefile b/archivers/ocaml-zip/Makefile
--- a/archivers/ocaml-zip/Makefile
+++ b/archivers/ocaml-zip/Makefile
@@ -12,17 +12,12 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake
+USES= gmake ocaml:findlib,ldconfig,wash
USE_GITHUB= yes
GH_ACCOUNT= xavierleroy
GH_PROJECT= camlzip
GH_TAGNAME= rel${PORTVERSION:S/.//}
-USE_OCAML= yes
-USE_OCAML_FINDLIB=yes
-USE_OCAML_LDCONFIG=yes
-USE_OCAML_WASH= yes
-
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/zip/zip.cmxs \
${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/zip/dllcamlzip.so
diff --git a/converters/ocaml-base64/Makefile b/converters/ocaml-base64/Makefile
--- a/converters/ocaml-base64/Makefile
+++ b/converters/ocaml-base64/Makefile
@@ -23,7 +23,6 @@
USE_GITHUB= yes
GH_ACCOUNT= mirage
GH_PROJECT= ocaml-base64
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
@@ -43,7 +42,7 @@
base64/base64.cmxs \
base64/rfc2045/base64_rfc2045.cmxs)
# this port never shipped stublibs
- # cleanup from older port's wrong USE_OCAML_LDCONFIG
+ # cleanup from older port's wrong USES=ocaml:ldconfig
@${ECHO_CMD} @postexec ${SED} -i "''" -e \
"'/^${PREFIX:S#/#\/#g}\/${OCAML_SITELIBDIR:S#/#\/#g}\/base64$$/d'" \
%D/${OCAML_LDCONF} >> ${TMPPLIST}
diff --git a/converters/ocaml-jsonm/Makefile b/converters/ocaml-jsonm/Makefile
--- a/converters/ocaml-jsonm/Makefile
+++ b/converters/ocaml-jsonm/Makefile
@@ -18,8 +18,7 @@
${SA_DIR}/uutf/META:devel/ocaml-uutf
RUN_DEPENDS= ${SA_DIR}/uutf/META:devel/ocaml-uutf
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
SA_DIR= ${LOCALBASE}/${OCAML_SITELIBDIR}
OPTIONS_DEFINE= DOCS
diff --git a/databases/ocaml-dbm/Makefile b/databases/ocaml-dbm/Makefile
--- a/databases/ocaml-dbm/Makefile
+++ b/databases/ocaml-dbm/Makefile
@@ -12,10 +12,9 @@
LICENSE= LGPL20 # with a special exception to clause 6
+USES= ocaml:ldconfig
USE_GITHUB= yes
-USE_OCAML= yes
GH_ACCOUNT= ocaml
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
HAS_CONFIGURE= yes
diff --git a/databases/ocaml-mysql/Makefile b/databases/ocaml-mysql/Makefile
--- a/databases/ocaml-mysql/Makefile
+++ b/databases/ocaml-mysql/Makefile
@@ -12,13 +12,8 @@
LICENSE= LGPL21
-USES= gmake mysql
+USES= gmake ocaml:camlp4,findplist,ldconfig mysql
IGNORE_WITH_MYSQL= 80 81
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAMLFIND_PLIST= yes
-USE_OCAML_LDCONFIG= yes
GNU_CONFIGURE= yes
diff --git a/databases/ocaml-sqlite3/Makefile b/databases/ocaml-sqlite3/Makefile
--- a/databases/ocaml-sqlite3/Makefile
+++ b/databases/ocaml-sqlite3/Makefile
@@ -14,14 +14,11 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
-USES= ocaml:dune pkgconfig sqlite
+USES= ocaml:dune,ldconfig pkgconfig sqlite
USE_GITHUB= yes
GH_ACCOUNT= mmottl
GH_PROJECT= ${PORTNAME}-ocaml
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
-
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/aifad/Makefile b/devel/aifad/Makefile
--- a/devel/aifad/Makefile
+++ b/devel/aifad/Makefile
@@ -18,7 +18,6 @@
GH_ACCOUNT= mmottl
USES= ocaml:dune
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md TODO.md
diff --git a/devel/coccinelle/Makefile b/devel/coccinelle/Makefile
--- a/devel/coccinelle/Makefile
+++ b/devel/coccinelle/Makefile
@@ -17,12 +17,10 @@
LIB_DEPENDS= libpcre.so:devel/pcre
TEST_DEPENDS= bash:shells/bash
-USES= autoreconf gmake perl5 pkgconfig:build python shebangfix
+USES= autoreconf gmake ocaml:camlp4 perl5 pkgconfig:build python shebangfix
USE_GITHUB= nodefault
# until coccinelle/stdcompat releases with ocaml 5.2 support.
GH_TUPLE= thierry-martinez:stdcompat:d53390d788027fe0a2282c4745eb3d1626341f99:stdcompat
-USE_OCAML= 3.0+
-USE_OCAML_CAMLP4= yes
USE_PERL5= build
SHEBANG_FILES= tools/pycocci scripts/cpptests.sh
GNU_CONFIGURE= yes
diff --git a/devel/menhir/Makefile b/devel/menhir/Makefile
--- a/devel/menhir/Makefile
+++ b/devel/menhir/Makefile
@@ -12,7 +12,6 @@
USES= ocaml:dune
USE_GITLAB= yes
-USE_OCAML= yes
GL_SITE= https://gitlab.inria.fr/
GL_ACCOUNT= fpottier
OCAML_PACKAGES= menhir menhirLib menhirSdk
diff --git a/devel/ocaml-annexlib/Makefile b/devel/ocaml-annexlib/Makefile
--- a/devel/ocaml-annexlib/Makefile
+++ b/devel/ocaml-annexlib/Makefile
@@ -14,11 +14,8 @@
BUILD_DEPENDS= ${SA_DIR}/pcre/pcre.a:devel/ocaml-pcre
RUN_DEPENDS= ${SA_DIR}/pcre/pcre.a:devel/ocaml-pcre
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAMLFIND_PLIST= yes
+USES= gmake ocaml:findplist,ldconfig
+
GNU_CONFIGURE= yes
ALL_TARGET= all opt
SA_DIR= ${LOCALBASE}/${OCAML_SITELIBDIR}
diff --git a/devel/ocaml-astring/Makefile b/devel/ocaml-astring/Makefile
--- a/devel/ocaml-astring/Makefile
+++ b/devel/ocaml-astring/Makefile
@@ -16,8 +16,7 @@
ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/devel/ocaml-base/Makefile b/devel/ocaml-base/Makefile
--- a/devel/ocaml-base/Makefile
+++ b/devel/ocaml-base/Makefile
@@ -15,11 +15,9 @@
bash:shells/bash
RUN_DEPENDS= ${SA_DIR}/sexplib0/META:devel/ocaml-sexplib0
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.org odoc-pages
diff --git a/devel/ocaml-bos/Makefile b/devel/ocaml-bos/Makefile
--- a/devel/ocaml-bos/Makefile
+++ b/devel/ocaml-bos/Makefile
@@ -28,8 +28,7 @@
${SA_DIR}/mtime/META:devel/ocaml-mtime \
${SA_DIR}/rresult/META:devel/ocaml-rresult
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-calendar/Makefile b/devel/ocaml-calendar/Makefile
--- a/devel/ocaml-calendar/Makefile
+++ b/devel/ocaml-calendar/Makefile
@@ -11,10 +11,8 @@
LICENSE= LGPL21
+USES= gmake ocaml:findplist
+
GNU_CONFIGURE= yes
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAMLFIND_PLIST= yes
.include <bsd.port.mk>
diff --git a/devel/ocaml-camljava/Makefile b/devel/ocaml-camljava/Makefile
--- a/devel/ocaml-camljava/Makefile
+++ b/devel/ocaml-camljava/Makefile
@@ -9,12 +9,12 @@
LICENSE= GPLv2
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= xavierleroy
GH_PROJECT= camljava
GH_TAGNAME= ${PORTNAME}${DISTVERSION:S/.//}
USE_JAVA= yes
-USE_OCAML= yes
MAKE_ARGS= -e
MAKE_ENV+= CAMLJAVALIB=${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME} \
diff --git a/devel/ocaml-camlp-streams/Makefile b/devel/ocaml-camlp-streams/Makefile
--- a/devel/ocaml-camlp-streams/Makefile
+++ b/devel/ocaml-camlp-streams/Makefile
@@ -13,7 +13,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE README.md
diff --git a/devel/ocaml-camlp4/Makefile b/devel/ocaml-camlp4/Makefile
--- a/devel/ocaml-camlp4/Makefile
+++ b/devel/ocaml-camlp4/Makefile
@@ -12,11 +12,10 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USES= gmake
-USE_OCAML= yes
HAS_CONFIGURE= yes
MAKE_ENV+= DESTDIR="${STAGEDIR}"
MAKE_JOBS_UNSAFE=yes
diff --git a/devel/ocaml-camlp5/Makefile b/devel/ocaml-camlp5/Makefile
--- a/devel/ocaml-camlp5/Makefile
+++ b/devel/ocaml-camlp5/Makefile
@@ -24,9 +24,8 @@
${SA_DIR}/re/META:devel/ocaml-re \
${SA_DIR}/rresult/META:devel/ocaml-rresult
-USES= gmake perl5 tar:tgz
+USES= gmake ocaml perl5 tar:tgz
USE_GITHUB= yes
-USE_OCAML= yes
USE_PERL5= build
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix ${PREFIX} --mandir ${PREFIX}/share/man
diff --git a/devel/ocaml-camomile/Makefile b/devel/ocaml-camomile/Makefile
--- a/devel/ocaml-camomile/Makefile
+++ b/devel/ocaml-camomile/Makefile
@@ -14,11 +14,10 @@
dune:devel/ocaml-dune
RUN_DEPENDS= ${SA_DIR}/camlp-streams/META:devel/ocaml-camlp-streams
-USES= gmake
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= yoriyuki
GH_PROJECT= Camomile
-USE_OCAML= yes
MAKE_ENV= LIBDIR="${PREFIX}/${OCAML_SITELIBDIR}"
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
diff --git a/devel/ocaml-cfg/Makefile b/devel/ocaml-cfg/Makefile
--- a/devel/ocaml-cfg/Makefile
+++ b/devel/ocaml-cfg/Makefile
@@ -13,9 +13,9 @@
BUILD_DEPENDS= dune:devel/ocaml-dune
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= mmottl
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/devel/ocaml-classes/Makefile b/devel/ocaml-classes/Makefile
--- a/devel/ocaml-classes/Makefile
+++ b/devel/ocaml-classes/Makefile
@@ -12,9 +12,8 @@
LICENSE= LGPL21
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAMLFIND_PLIST= yes
+USES= ocaml:findplist
+
MAKE_ENV= INSTALL="${INSTALL_DATA}"
.include <bsd.port.mk>
diff --git a/devel/ocaml-cmdliner/Makefile b/devel/ocaml-cmdliner/Makefile
--- a/devel/ocaml-cmdliner/Makefile
+++ b/devel/ocaml-cmdliner/Makefile
@@ -12,9 +12,8 @@
LICENSE= ISCL
LICENSE_FILE= ${WRKSRC}/LICENSE.md
-USES= gmake tar:tbz
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
+USES= gmake ocaml:ldconfig tar:tbz
+
MAKE_JOBS_UNSAFE= tes
MAKE_ARGS= DOCDIR=${STAGEDIR}${OCAML_DOCSDIR}/${PORTNAME} \
LIBDIR=${STAGEDIR}${PREFIX}/${OCAML_LDLIBS}
diff --git a/devel/ocaml-compiler-libs/Makefile b/devel/ocaml-compiler-libs/Makefile
--- a/devel/ocaml-compiler-libs/Makefile
+++ b/devel/ocaml-compiler-libs/Makefile
@@ -13,7 +13,6 @@
USE_GITHUB= yes
GH_ACCOUNT= janestreet
GH_PROJECT= ocaml-compiler-libs
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.org
diff --git a/devel/ocaml-cppo/Makefile b/devel/ocaml-cppo/Makefile
--- a/devel/ocaml-cppo/Makefile
+++ b/devel/ocaml-cppo/Makefile
@@ -15,9 +15,9 @@
BUILD_DEPENDS= dune:devel/ocaml-dune \
ocamlbuild:devel/ocaml-ocamlbuild
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= ocaml-community
-USE_OCAML= yes
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-csexp/Makefile b/devel/ocaml-csexp/Makefile
--- a/devel/ocaml-csexp/Makefile
+++ b/devel/ocaml-csexp/Makefile
@@ -14,7 +14,6 @@
USE_GITHUB= yes
GH_ACCOUNT= ocaml-dune
GH_PROJECT= csexp
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-cstruct/Makefile b/devel/ocaml-cstruct/Makefile
--- a/devel/ocaml-cstruct/Makefile
+++ b/devel/ocaml-cstruct/Makefile
@@ -21,12 +21,10 @@
${SA_DIR}/ppxlib/META:devel/ocaml-ppxlib \
${SA_DIR}/sexplib/META:devel/ocaml-sexplib
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= mirage
GH_PROJECT= ocaml-${PORTNAME}
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
# missing ${PORTNAME}-async
OCAML_PACKAGES= ${PORTNAME} ${PORTNAME}-lwt ${PORTNAME}-sexp \
${PORTNAME}-unix ppx_${PORTNAME}
diff --git a/devel/ocaml-curses/Makefile b/devel/ocaml-curses/Makefile
--- a/devel/ocaml-curses/Makefile
+++ b/devel/ocaml-curses/Makefile
@@ -10,11 +10,9 @@
LICENSE= LGPL21+ # with a special exception to clause 6
LICENSE_FILE= ${WRKSRC}/COPYING
-USES= ncurses ocaml:dune pkgconfig
+USES= ncurses ocaml:dune,ldconfig pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= mbacarella
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md README.md
diff --git a/devel/ocaml-dolmen/Makefile b/devel/ocaml-dolmen/Makefile
--- a/devel/ocaml-dolmen/Makefile
+++ b/devel/ocaml-dolmen/Makefile
@@ -45,7 +45,6 @@
USE_GITHUB= yes
GH_ACCOUNT= Gbury
-USE_OCAML= yes
OCAML_PACKAGES= ${PORTNAME} ${PORTNAME}_bin ${PORTNAME}_loop \
${PORTNAME}_lsp ${PORTNAME}_model ${PORTNAME}_type
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-domain-name/Makefile b/devel/ocaml-domain-name/Makefile
--- a/devel/ocaml-domain-name/Makefile
+++ b/devel/ocaml-domain-name/Makefile
@@ -14,7 +14,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= hannesm
-USE_OCAML= yes
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-dune/Makefile b/devel/ocaml-dune/Makefile
--- a/devel/ocaml-dune/Makefile
+++ b/devel/ocaml-dune/Makefile
@@ -10,11 +10,10 @@
LICENSE= MIT
-USES= gmake
+USES= gmake ocaml:ldconfig
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
+
SUB_FILES= setup.ml
SUB_LIST= OCAML_SITELIBDIR="${PREFIX}/${OCAML_SITELIBDIR}" \
OCAML_LIBDIR="${PREFIX}/${OCAML_LIBDIR}" \
diff --git a/devel/ocaml-extlib/Makefile b/devel/ocaml-extlib/Makefile
--- a/devel/ocaml-extlib/Makefile
+++ b/devel/ocaml-extlib/Makefile
@@ -16,12 +16,7 @@
BUILD_DEPENDS= cppo:devel/ocaml-cppo
-USES= gmake
-
-USE_OCAML= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAMLFIND_PLIST= yes
+USES= gmake ocaml:camlp4,findplist
MAKE_ARGS= VERSION="${DISTVERSION}"
ALL_TARGET= all opt doc
diff --git a/devel/ocaml-findlib/Makefile b/devel/ocaml-findlib/Makefile
--- a/devel/ocaml-findlib/Makefile
+++ b/devel/ocaml-findlib/Makefile
@@ -12,9 +12,8 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_CAMLP4=yes
+USES= gmake ocaml:camlp4
+
HAS_CONFIGURE= yes
CONFIGURE_ARGS= -bindir "${PREFIX}/bin" -mandir "${PREFIX}/share/man" \
-sitelib "${PREFIX}/${OCAML_SITELIBDIR}" \
diff --git a/devel/ocaml-fmt/Makefile b/devel/ocaml-fmt/Makefile
--- a/devel/ocaml-fmt/Makefile
+++ b/devel/ocaml-fmt/Makefile
@@ -18,8 +18,7 @@
opam-installer:devel/ocaml-opam
RUN_DEPENDS= ${SA_DIR}/cmdliner/META:devel/ocaml-cmdliner
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-fpath/Makefile b/devel/ocaml-fpath/Makefile
--- a/devel/ocaml-fpath/Makefile
+++ b/devel/ocaml-fpath/Makefile
@@ -18,9 +18,7 @@
opam-installer:devel/ocaml-opam
RUN_DEPENDS= ${SA_DIR}/astring/META:devel/ocaml-astring
-USES= tar:tbz
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
+USES= ocaml:findlib tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-gen/Makefile b/devel/ocaml-gen/Makefile
--- a/devel/ocaml-gen/Makefile
+++ b/devel/ocaml-gen/Makefile
@@ -13,7 +13,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= c-cube
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGELOG.md LICENSE README.md
diff --git a/devel/ocaml-hmap/Makefile b/devel/ocaml-hmap/Makefile
--- a/devel/ocaml-hmap/Makefile
+++ b/devel/ocaml-hmap/Makefile
@@ -15,8 +15,7 @@
ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ipaddr/Makefile b/devel/ocaml-ipaddr/Makefile
--- a/devel/ocaml-ipaddr/Makefile
+++ b/devel/ocaml-ipaddr/Makefile
@@ -23,7 +23,6 @@
USE_GITHUB= yes
GH_ACCOUNT= mirage
GH_PROJECT= ocaml-ipaddr
-USE_OCAML= yes
OCAML_PACKAGES= ipaddr ipaddr-cstruct ipaddr-sexp
OCAML_PACKAGES+= macaddr macaddr-cstruct macaddr-sexp
diff --git a/devel/ocaml-lacaml/Makefile b/devel/ocaml-lacaml/Makefile
--- a/devel/ocaml-lacaml/Makefile
+++ b/devel/ocaml-lacaml/Makefile
@@ -10,11 +10,9 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE.md
-USES= blaslapack fortran ocaml:dune
+USES= blaslapack fortran ocaml:dune,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= mmottl
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
MAKE_ENV+= LACAML_LIBS="-L${LOCALBASE}/lib ${BLASLIB} ${LAPACKLIB}"
diff --git a/devel/ocaml-linol/Makefile b/devel/ocaml-linol/Makefile
--- a/devel/ocaml-linol/Makefile
+++ b/devel/ocaml-linol/Makefile
@@ -27,7 +27,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= c-cube
-USE_OCAML= yes
OCAML_PACKAGES= ${PORTNAME} ${PORTNAME}-lwt
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-logs/Makefile b/devel/ocaml-logs/Makefile
--- a/devel/ocaml-logs/Makefile
+++ b/devel/ocaml-logs/Makefile
@@ -23,8 +23,7 @@
${SA_DIR}/fmt/META:devel/ocaml-fmt \
${SA_DIR}/lwt/META:devel/ocaml-lwt
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md tags.ml tool.ml
diff --git a/devel/ocaml-lsp/Makefile b/devel/ocaml-lsp/Makefile
--- a/devel/ocaml-lsp/Makefile
+++ b/devel/ocaml-lsp/Makefile
@@ -20,8 +20,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-
-USE_OCAML= yes
OCAML_PACKAGES= lsp jsonrpc
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-lwt/Makefile b/devel/ocaml-lwt/Makefile
--- a/devel/ocaml-lwt/Makefile
+++ b/devel/ocaml-lwt/Makefile
@@ -21,10 +21,8 @@
USE_GITHUB= yes
GH_ACCOUNT= ocsigen
-USES= ocaml:dune
-USE_OCAML= yes
+USES= ocaml:dune,ldconfig
OCAML_PACKAGES= lwt lwt_ppx lwt_ppx_let lwt_react
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}
PORTDOCS= lwt/CHANGES lwt/LICENSE.md lwt/README.md lwt/odoc-pages \
diff --git a/devel/ocaml-magic/Makefile b/devel/ocaml-magic/Makefile
--- a/devel/ocaml-magic/Makefile
+++ b/devel/ocaml-magic/Makefile
@@ -13,13 +13,10 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
+USES= gmake ocaml:findlib,ldconfig
MAKE_JOBS_UNSAFE= yes
-USES= gmake
GNU_CONFIGURE= yes
ALL_TARGET= doc examples
diff --git a/devel/ocaml-mtime/Makefile b/devel/ocaml-mtime/Makefile
--- a/devel/ocaml-mtime/Makefile
+++ b/devel/ocaml-mtime/Makefile
@@ -16,9 +16,7 @@
ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
-USES= tar:tbz
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
+USES= ocaml:ldconfig tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/devel/ocaml-ocamlbuild/Makefile b/devel/ocaml-ocamlbuild/Makefile
--- a/devel/ocaml-ocamlbuild/Makefile
+++ b/devel/ocaml-ocamlbuild/Makefile
@@ -10,10 +10,9 @@
LICENSE= GPLv2
-USES= gmake
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USE_OCAML= yes
ALL_TARGET= configure all
MAKE_ENV= OCAMLBUILD_LIBDIR=${PREFIX}/${OCAML_LIBDIR}
diff --git a/devel/ocaml-ocplib-endian/Makefile b/devel/ocaml-ocplib-endian/Makefile
--- a/devel/ocaml-ocplib-endian/Makefile
+++ b/devel/ocaml-ocplib-endian/Makefile
@@ -14,7 +14,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= OCamlPro
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md README.md
diff --git a/devel/ocaml-octavius/Makefile b/devel/ocaml-octavius/Makefile
--- a/devel/ocaml-octavius/Makefile
+++ b/devel/ocaml-octavius/Makefile
@@ -14,7 +14,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml-doc
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ounit/Makefile b/devel/ocaml-ounit/Makefile
--- a/devel/ocaml-ounit/Makefile
+++ b/devel/ocaml-ounit/Makefile
@@ -12,7 +12,6 @@
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= ocaml:dune tar:tbz
-USE_OCAML= yes
OCAML_PACKAGES= ounit2
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-parmap/Makefile b/devel/ocaml-parmap/Makefile
--- a/devel/ocaml-parmap/Makefile
+++ b/devel/ocaml-parmap/Makefile
@@ -16,10 +16,7 @@
USE_GITHUB= yes
GH_ACCOUNT= rdicosmo
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
+USES= gmake ocaml:findlib,ldconfig
TARGETS= ${PORTNAME}
diff --git a/devel/ocaml-parsexp/Makefile b/devel/ocaml-parsexp/Makefile
--- a/devel/ocaml-parsexp/Makefile
+++ b/devel/ocaml-parsexp/Makefile
@@ -18,7 +18,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-pcre/Makefile b/devel/ocaml-pcre/Makefile
--- a/devel/ocaml-pcre/Makefile
+++ b/devel/ocaml-pcre/Makefile
@@ -14,12 +14,11 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
LIB_DEPENDS= libpcre.so:devel/pcre
+USES= ocaml:findlib,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= mmottl
GH_PROJECT= ${PORTNAME}-ocaml
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
+
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
PORTEXAMPLES= cloc count_hash pcregrep subst
DOCSDIR= ${PREFIX}/share/doc/pcre-ocaml
diff --git a/devel/ocaml-pcre2/Makefile b/devel/ocaml-pcre2/Makefile
--- a/devel/ocaml-pcre2/Makefile
+++ b/devel/ocaml-pcre2/Makefile
@@ -12,12 +12,10 @@
LIB_DEPENDS= libpcre2-8.so:devel/pcre2
-USES= ocaml:dune pkgconfig
+USES= ocaml:dune,ldconfig pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= camlp5
GH_PROJECT= ${PORTNAME}-ocaml
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/devel/ocaml-pomap/Makefile b/devel/ocaml-pomap/Makefile
--- a/devel/ocaml-pomap/Makefile
+++ b/devel/ocaml-pomap/Makefile
@@ -13,7 +13,7 @@
BUILD_DEPENDS= dune:devel/ocaml-dune
-USE_OCAML= yes
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= mmottl
diff --git a/devel/ocaml-pp_loc/Makefile b/devel/ocaml-pp_loc/Makefile
--- a/devel/ocaml-pp_loc/Makefile
+++ b/devel/ocaml-pp_loc/Makefile
@@ -14,7 +14,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= Armael
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES LICENSE README.md
diff --git a/devel/ocaml-ppx-tools/Makefile b/devel/ocaml-ppx-tools/Makefile
--- a/devel/ocaml-ppx-tools/Makefile
+++ b/devel/ocaml-ppx-tools/Makefile
@@ -13,13 +13,12 @@
BUILD_DEPENDS= dune:devel/ocaml-dune \
cppo:devel/ocaml-cppo
-USES= gmake
-ALL_TARGET= release
-USE_OCAML= yes
-USE_OCAML_FINDLIB=yes
+USES= gmake ocaml:findlib
USE_GITHUB= yes
GH_ACCOUNT= ocaml-ppx
GH_PROJECT= ${PORTNAME:C/-/_/}
+
+ALL_TARGET= release
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME:C/-/_/}
PORTDOCS= CHANGES LICENSE README.md
diff --git a/devel/ocaml-ppx_blob/Makefile b/devel/ocaml-ppx_blob/Makefile
--- a/devel/ocaml-ppx_blob/Makefile
+++ b/devel/ocaml-ppx_blob/Makefile
@@ -19,7 +19,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= johnwhitington
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.txt README.md
diff --git a/devel/ocaml-ppx_compare/Makefile b/devel/ocaml-ppx_compare/Makefile
--- a/devel/ocaml-ppx_compare/Makefile
+++ b/devel/ocaml-ppx_compare/Makefile
@@ -21,7 +21,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ppx_derivers/Makefile b/devel/ocaml-ppx_derivers/Makefile
--- a/devel/ocaml-ppx_derivers/Makefile
+++ b/devel/ocaml-ppx_derivers/Makefile
@@ -12,7 +12,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml-ppx
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/ppx_derivers
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ppx_deriving/Makefile b/devel/ocaml-ppx_deriving/Makefile
--- a/devel/ocaml-ppx_deriving/Makefile
+++ b/devel/ocaml-ppx_deriving/Makefile
@@ -23,7 +23,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml-ppx
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGELOG.md LICENSE.txt README.md
diff --git a/devel/ocaml-ppx_hash/Makefile b/devel/ocaml-ppx_hash/Makefile
--- a/devel/ocaml-ppx_hash/Makefile
+++ b/devel/ocaml-ppx_hash/Makefile
@@ -25,7 +25,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ppx_js_style/Makefile b/devel/ocaml-ppx_js_style/Makefile
--- a/devel/ocaml-ppx_js_style/Makefile
+++ b/devel/ocaml-ppx_js_style/Makefile
@@ -22,7 +22,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-ppx_sexp_conv/Makefile b/devel/ocaml-ppx_sexp_conv/Makefile
--- a/devel/ocaml-ppx_sexp_conv/Makefile
+++ b/devel/ocaml-ppx_sexp_conv/Makefile
@@ -22,7 +22,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-ppx_yojson_conv/Makefile b/devel/ocaml-ppx_yojson_conv/Makefile
--- a/devel/ocaml-ppx_yojson_conv/Makefile
+++ b/devel/ocaml-ppx_yojson_conv/Makefile
@@ -27,7 +27,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= LICENSE.md README.org
diff --git a/devel/ocaml-ppx_yojson_conv_lib/Makefile b/devel/ocaml-ppx_yojson_conv_lib/Makefile
--- a/devel/ocaml-ppx_yojson_conv_lib/Makefile
+++ b/devel/ocaml-ppx_yojson_conv_lib/Makefile
@@ -18,7 +18,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= LICENSE.md
diff --git a/devel/ocaml-ppxlib/Makefile b/devel/ocaml-ppxlib/Makefile
--- a/devel/ocaml-ppxlib/Makefile
+++ b/devel/ocaml-ppxlib/Makefile
@@ -21,7 +21,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml-ppx
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md HISTORY.md LICENSE.md README.md odoc-pages
diff --git a/devel/ocaml-psmt2-frontend/Makefile b/devel/ocaml-psmt2-frontend/Makefile
--- a/devel/ocaml-psmt2-frontend/Makefile
+++ b/devel/ocaml-psmt2-frontend/Makefile
@@ -16,7 +16,6 @@
USE_GITHUB= yes
GH_ACCOUNT= ACoquereau
-USE_OCAML= yes
OCAML_PACKAGES= ${PORTNAME} ${PORTNAME}_bin
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-re/Makefile b/devel/ocaml-re/Makefile
--- a/devel/ocaml-re/Makefile
+++ b/devel/ocaml-re/Makefile
@@ -14,7 +14,6 @@
USE_GITHUB= yes
GH_ACCOUNT= ocaml
GH_PROJECT= ${PKGNAMEPREFIX}${PORTNAME}
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md
diff --git a/devel/ocaml-react/Makefile b/devel/ocaml-react/Makefile
--- a/devel/ocaml-react/Makefile
+++ b/devel/ocaml-react/Makefile
@@ -14,12 +14,7 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
RUN_DEPENDS= cppo:devel/ocaml-cppo
-USES= tar:tbz
-USE_OCAML= yes
-
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAMLFIND_PLIST= yes
+USES= ocaml:findplist,ldconfig tar:tbz
do-build:
cd ${WRKSRC} && ocamlbuild react.cmxs react.cma react.a
diff --git a/devel/ocaml-res/Makefile b/devel/ocaml-res/Makefile
--- a/devel/ocaml-res/Makefile
+++ b/devel/ocaml-res/Makefile
@@ -13,7 +13,7 @@
BUILD_DEPENDS= dune:devel/ocaml-dune
-USE_OCAML= yes
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= mmottl
diff --git a/devel/ocaml-result/Makefile b/devel/ocaml-result/Makefile
--- a/devel/ocaml-result/Makefile
+++ b/devel/ocaml-result/Makefile
@@ -13,8 +13,7 @@
BUILD_DEPENDS= dune:devel/ocaml-dune
-USES= gmake
-USE_OCAML= yes
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= janestreet
diff --git a/devel/ocaml-rresult/Makefile b/devel/ocaml-rresult/Makefile
--- a/devel/ocaml-rresult/Makefile
+++ b/devel/ocaml-rresult/Makefile
@@ -16,8 +16,7 @@
ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
-USES= tar:tbz
-USE_OCAML= yes
+USES= ocaml tar:tbz
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md odoc-pages
diff --git a/devel/ocaml-sdl/Makefile b/devel/ocaml-sdl/Makefile
--- a/devel/ocaml-sdl/Makefile
+++ b/devel/ocaml-sdl/Makefile
@@ -15,13 +15,9 @@
BUILD_DEPENDS= ocaml-lablgl>0:graphics/ocaml-lablgl
-USE_OCAML= yes
-USE_OCAML_FINDLIB=yes
-USE_OCAMLFIND_PLIST=yes
-USE_OCAML_LDCONFIG=yes
-
-USES= gmake sdl
+USES= gmake ocaml:findplist,ldconfig sdl
USE_SDL= sdl
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-lablgldir=${LOCALBASE}/${OCAML_SITELIBDIR}/lablGL \
--with-sdl-prefix=${LOCALBASE} \
diff --git a/devel/ocaml-sem/Makefile b/devel/ocaml-sem/Makefile
--- a/devel/ocaml-sem/Makefile
+++ b/devel/ocaml-sem/Makefile
@@ -13,10 +13,8 @@
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake tar:bzip2
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAML_FINDLIB= yes
+USES= gmake ocaml:findlib,ldconfig tar:bzip2
+
MAKE_ENV= OCAML_LIB_INSTALL="${PREFIX}/lib/ocaml/site-lib/sem" \
INCDIRS="${LOCALBASE}/include" LIBDIRS="${LOCALBASE}/lib"
MAKE_JOBS_UNSAFE= yes
diff --git a/devel/ocaml-sexplib/Makefile b/devel/ocaml-sexplib/Makefile
--- a/devel/ocaml-sexplib/Makefile
+++ b/devel/ocaml-sexplib/Makefile
@@ -23,7 +23,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-sexplib0/Makefile b/devel/ocaml-sexplib0/Makefile
--- a/devel/ocaml-sexplib0/Makefile
+++ b/devel/ocaml-sexplib0/Makefile
@@ -12,7 +12,6 @@
LICENSE_FILE= ${WRKSRC}/LICENSE.md
USES= ocaml:dune
-USE_OCAML= yes
USE_GITHUB= yes
GH_ACCOUNT= janestreet
diff --git a/devel/ocaml-stdio/Makefile b/devel/ocaml-stdio/Makefile
--- a/devel/ocaml-stdio/Makefile
+++ b/devel/ocaml-stdio/Makefile
@@ -14,11 +14,9 @@
BUILD_DEPENDS= ${SA_DIR}/base/META:devel/ocaml-base
RUN_DEPENDS= ${SA_DIR}/base/META:devel/ocaml-base
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= janestreet
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE.md README.md odoc-pages
diff --git a/devel/ocaml-topkg/Makefile b/devel/ocaml-topkg/Makefile
--- a/devel/ocaml-topkg/Makefile
+++ b/devel/ocaml-topkg/Makefile
@@ -15,9 +15,7 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
-USES= tar:tbz
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
+USES= ocaml:findlib tar:tbz
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-trace/Makefile b/devel/ocaml-trace/Makefile
--- a/devel/ocaml-trace/Makefile
+++ b/devel/ocaml-trace/Makefile
@@ -24,8 +24,6 @@
USE_GITHUB= yes
GH_ACCOUNT= c-cube
GH_PROJECT= ocaml-trace
-
-USE_OCAML= yes
OCAML_PACKAGES= trace ppx_trace trace-tef
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/devel/ocaml-type_conv/Makefile b/devel/ocaml-type_conv/Makefile
--- a/devel/ocaml-type_conv/Makefile
+++ b/devel/ocaml-type_conv/Makefile
@@ -14,16 +14,13 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
+USES= gmake ocaml:camlp4,findplist
+
OPTIONS_DEFINE= DOCS
CONFIGURE_ARGS= --disable-docs --prefix ${PREFIX}
HAS_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
-USE_OCAML= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAMLFIND_PLIST= yes
-USES= gmake
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= *
diff --git a/devel/ocaml-uchar/Makefile b/devel/ocaml-uchar/Makefile
--- a/devel/ocaml-uchar/Makefile
+++ b/devel/ocaml-uchar/Makefile
@@ -15,9 +15,9 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild \
opam-installer:devel/ocaml-opam
+USES= ocaml
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USE_OCAML= yes
PLIST_FILES= ${OCAML_SITELIBDIR}/${PORTNAME}/META
diff --git a/devel/ocaml-ulex/Makefile b/devel/ocaml-ulex/Makefile
--- a/devel/ocaml-ulex/Makefile
+++ b/devel/ocaml-ulex/Makefile
@@ -10,12 +10,7 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
-USES= gmake
-USE_OCAML= true
-USE_OCAML_FINDLIB= true
-USE_OCAML_CAMLP4= true
-USE_OCAML_LDCONFIG= true
-USE_OCAMLFIND_PLIST= yes
+USES= gmake ocaml:camlp4,findplist,ldconfig
ALL_TARGET= all all.opt
MAKE_JOBS_UNSAFE= yes
diff --git a/devel/ocaml-uutf/Makefile b/devel/ocaml-uutf/Makefile
--- a/devel/ocaml-uutf/Makefile
+++ b/devel/ocaml-uutf/Makefile
@@ -18,9 +18,7 @@
${LOCALBASE}/${OCAML_SITELIBDIR}/topkg/META:devel/ocaml-topkg \
${LOCALBASE}/${OCAML_SITELIBDIR}/uchar/META:devel/ocaml-uchar
-USES= tar:tbz
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
+USES= ocaml:findlib tar:tbz
OPTIONS_DEFINE= DOCS
diff --git a/devel/ocaml-xstr/Makefile b/devel/ocaml-xstr/Makefile
--- a/devel/ocaml-xstr/Makefile
+++ b/devel/ocaml-xstr/Makefile
@@ -11,13 +11,10 @@
LICENSE= MIT
-WRKSRC= ${WRKDIR}/${PORTNAME}
+USES= gmake ocaml:findplist
-USE_OCAML= yes
-USE_OCAML_FINDLIB=yes
-USE_OCAMLFIND_PLIST=yes
+WRKSRC= ${WRKDIR}/${PORTNAME}
-USES= gmake
ALL_TARGET= all opt
.include <bsd.port.mk>
diff --git a/devel/ocaml-xstrp4/Makefile b/devel/ocaml-xstrp4/Makefile
--- a/devel/ocaml-xstrp4/Makefile
+++ b/devel/ocaml-xstrp4/Makefile
@@ -13,11 +13,8 @@
OPTIONS_DEFINE= EXAMPLES
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAMLFIND_PLIST= yes
+USES= gmake ocaml:camlp4,findplist
+
HAS_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
PORTEXAMPLES= *
diff --git a/devel/omake/Makefile b/devel/omake/Makefile
--- a/devel/omake/Makefile
+++ b/devel/omake/Makefile
@@ -11,10 +11,8 @@
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= ncurses readline
-USE_OCAML= yes
+USES= ncurses ocaml:build readline
-NO_OCAML_RUNDEPENDS= yes
HAS_CONFIGURE= yes
MAKE_ENV= INSTALL_ROOT=${STAGEDIR}
diff --git a/ftp/ocaml-ocurl/Makefile b/ftp/ocaml-ocurl/Makefile
--- a/ftp/ocaml-ocurl/Makefile
+++ b/ftp/ocaml-ocurl/Makefile
@@ -16,17 +16,14 @@
RUN_DEPENDS:= ${BUILD_DEPENDS}
LIB_DEPENDS= libcurl.so:ftp/curl
-USES= gmake
+USES= gmake ocaml:camlp4,findlib,ldconfig
+
GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
USE_GITHUB= yes
GH_ACCOUNT= ygrek
-USE_OCAML= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
OCAML_PKGDIRS= curl
OPTIONS_DEFINE= LWT
diff --git a/games/freetennis/Makefile b/games/freetennis/Makefile
--- a/games/freetennis/Makefile
+++ b/games/freetennis/Makefile
@@ -22,8 +22,7 @@
libgtkgl-2.0.so:x11-toolkits/gtkglarea2 \
libharfbuzz.so:print/harfbuzz
-USES= gettext gl gnome sdl tar:bzip2 xorg
-USE_OCAML= yes
+USES= gettext gl gnome ocaml sdl tar:bzip2 xorg
USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk20 pango
USE_GL= gl glu
USE_SDL= ttf mixer sdl
diff --git a/graphics/ocaml-cairo/Makefile b/graphics/ocaml-cairo/Makefile
--- a/graphics/ocaml-cairo/Makefile
+++ b/graphics/ocaml-cairo/Makefile
@@ -14,10 +14,8 @@
LIB_DEPENDS+= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig
-USES= gnome pkgconfig
+USES= gnome ocaml pkgconfig
USE_GNOME= cairo
-USE_OCAML= yes
-
USE_GITHUB= yes
GH_ACCOUNT= Chris00
GH_PROJECT= ${PKGNAMEPREFIX}${PORTNAME}
diff --git a/graphics/ocaml-images/Makefile b/graphics/ocaml-images/Makefile
--- a/graphics/ocaml-images/Makefile
+++ b/graphics/ocaml-images/Makefile
@@ -16,12 +16,10 @@
${SA_DIR}/findlib/META:devel/ocaml-findlib \
${SA_DIR}/stdio/META:devel/ocaml-stdio
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITLAB= yes
GL_ACCOUNT= camlspotter
GL_PROJECT= camlimages
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
OCAML_LDLIBS=
OCAML_PACKAGES= camlimages
diff --git a/graphics/ocaml-lablgl/Makefile b/graphics/ocaml-lablgl/Makefile
--- a/graphics/ocaml-lablgl/Makefile
+++ b/graphics/ocaml-lablgl/Makefile
@@ -15,13 +15,9 @@
CONFLICTS= ocaml-nox11
-USES= gl gmake tk xorg
+USES= gl gmake ocaml:camlp4,ldconfig,tk tk xorg
USE_XORG= x11 xext xmu
USE_GL= gl glu glut
-USE_OCAML= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAML_TK= yes
OCAML_LDLIBS= ${OCAML_SITELIBDIR}/lablGL
ALL_TARGET= all opt
diff --git a/lang/mtasc/Makefile b/lang/mtasc/Makefile
--- a/lang/mtasc/Makefile
+++ b/lang/mtasc/Makefile
@@ -12,9 +12,7 @@
BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/site-lib/extlib/IO.cmi:devel/ocaml-extlib
-USE_OCAML= yes
-USE_OCAML_FINDLIB=yes
-USE_OCAML_CAMLP4=yes
+USES= ocaml:camlp4,findlib
OCAML_PKGDIRS= # This port uses ocaml-findlib but doesn't install one
OCAMLLEX?= ${LOCALBASE}/bin/ocamllex
diff --git a/lang/ocaml-camlidl/Makefile b/lang/ocaml-camlidl/Makefile
--- a/lang/ocaml-camlidl/Makefile
+++ b/lang/ocaml-camlidl/Makefile
@@ -11,8 +11,7 @@
LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake
-USE_OCAML= yes
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= xavierleroy
GH_TAGNAME= ${PORTNAME}${DISTVERSION:S/.//}
diff --git a/lang/ott/Makefile b/lang/ott/Makefile
--- a/lang/ott/Makefile
+++ b/lang/ott/Makefile
@@ -12,13 +12,10 @@
BUILD_DEPENDS= ${OCAMLFIND_DEPEND} \
ocaml-ocamlgraph>=0:math/ocaml-ocamlgraph
-USES= gmake
-
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= ott-lang
-USE_OCAML= yes
-
ALL_TARGET= world
PLIST_FILES= bin/ott
diff --git a/math/alt-ergo/Makefile b/math/alt-ergo/Makefile
--- a/math/alt-ergo/Makefile
+++ b/math/alt-ergo/Makefile
@@ -35,8 +35,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= OCamlPro
-
-USE_OCAML= yes
OCAML_PACKAGES= alt-ergo alt-ergo-lib alt-ergo-parsers
DUNE_INSTALL_TARGETS= ${OCAML_PACKAGES}
diff --git a/math/coq/Makefile b/math/coq/Makefile
--- a/math/coq/Makefile
+++ b/math/coq/Makefile
@@ -25,14 +25,11 @@
RUN_DEPENDS= ${SA_DIR}/num/META:math/ocaml-num \
${SA_DIR}/zarith/META:math/ocaml-zarith
-USES= emacs gettext-runtime gmake gnome ocaml:dune python:env shebangfix tex
+USES= emacs gettext-runtime gmake gnome ocaml:camlp4,dune,ldconfig python:env shebangfix tex
SHEBANG_FILES= tools/*.py
USE_GITHUB= yes
USE_GNOME= cairo gdkpixbuf2 gtk30 gtksourceview3
USE_LDCONFIG= ${PREFIX}/lib/coq
-USE_OCAML= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_LDCONFIG= yes
OCAML_LDLIBS= ${OCAML_SITELIBDIR}/coq-core
OCAML_PACKAGES= coq-core coq-stdlib coq
diff --git a/math/facile/Makefile b/math/facile/Makefile
--- a/math/facile/Makefile
+++ b/math/facile/Makefile
@@ -11,8 +11,8 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake
-USE_OCAML= yes
+USES= gmake ocaml
+
HAS_CONFIGURE= yes
ALL_TARGET= compile
diff --git a/math/ocaml-farith/Makefile b/math/ocaml-farith/Makefile
--- a/math/ocaml-farith/Makefile
+++ b/math/ocaml-farith/Makefile
@@ -25,7 +25,6 @@
USE_GITLAB= yes
GL_SITE= https://git.frama-c.com
GL_ACCOUNT= pub
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES LICENSE
diff --git a/math/ocaml-num/Makefile b/math/ocaml-num/Makefile
--- a/math/ocaml-num/Makefile
+++ b/math/ocaml-num/Makefile
@@ -12,10 +12,9 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= gmake
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= ocaml
-USE_OCAML= yes
MAKE_ENV= OCAMLFIND_DESTDIR="${STAGEDIR}${OCAMLFIND_DESTDIR}"
MAKE_JOBS_UNSAFE= yes
diff --git a/math/ocaml-ocamlgraph/Makefile b/math/ocaml-ocamlgraph/Makefile
--- a/math/ocaml-ocamlgraph/Makefile
+++ b/math/ocaml-ocamlgraph/Makefile
@@ -13,7 +13,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= backtracking
-USE_OCAML= yes
DUNE_INSTALL_TARGETS= ocamlgraph
ALL_TARGET= ocamlgraph.install
@@ -31,7 +30,7 @@
post-install:
@${STRIP_CMD} \
${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME}/graph.cmxs
-# USE_OCAML_LDCONFIG cleanup
+ # USES=ocaml:ldconfig cleanup
@${ECHO_CMD} @postexec ${SED} -i "''" -e \
"'/^${PREFIX:S#/#\/#g}\/${OCAML_SITELIBDIR:S#/#\/#g}\/ocamlgraph$$/d'" \
%D/${OCAML_LDCONF} >> ${TMPPLIST}
diff --git a/math/ocaml-ocplib-simplex/Makefile b/math/ocaml-ocplib-simplex/Makefile
--- a/math/ocaml-ocplib-simplex/Makefile
+++ b/math/ocaml-ocplib-simplex/Makefile
@@ -19,7 +19,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= OCamlPro
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES.md LICENSE README.md
diff --git a/math/ocaml-zarith/Makefile b/math/ocaml-zarith/Makefile
--- a/math/ocaml-zarith/Makefile
+++ b/math/ocaml-zarith/Makefile
@@ -14,13 +14,11 @@
LIB_DEPENDS= libgmp.so:math/gmp
-USES= gmake localbase:ldflags tar:tgz
+USES= gmake localbase:ldflags ocaml:findlib,ldconfig tar:tgz
USE_GITHUB= yes
GH_ACCOUNT= ocaml
GH_PROJECT= Zarith
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
+
HAS_CONFIGURE= yes
ALL_TARGET= all
CONFIGURE_ENV= DESTDIR=${STAGEDIR}
diff --git a/math/ocamlgsl/Makefile b/math/ocamlgsl/Makefile
--- a/math/ocamlgsl/Makefile
+++ b/math/ocamlgsl/Makefile
@@ -17,9 +17,7 @@
ocaml-stdio>=0:devel/ocaml-stdio
LIB_DEPENDS= libgsl.so:math/gsl
-USES= blaslapack:openblas ocaml:dune pkgconfig
-USE_OCAML= YES
-USE_OCAML_LDCONFIG= YES
+USES= blaslapack:openblas ocaml:dune,ldconfig pkgconfig
OCAML_LDLIBS= gsl
OCAML_PACKAGES= gsl
diff --git a/math/orpie/Makefile b/math/orpie/Makefile
--- a/math/orpie/Makefile
+++ b/math/orpie/Makefile
@@ -22,7 +22,6 @@
USES= ncurses ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= pelzlpj
-USE_OCAML= yes
#XXX DUNE_DOCSDIR= ${DOCSDIR}
PORTDOCS= LICENSE.md README.adoc manual.html manual.pdf
diff --git a/math/teyjus/Makefile b/math/teyjus/Makefile
--- a/math/teyjus/Makefile
+++ b/math/teyjus/Makefile
@@ -15,10 +15,9 @@
BUILD_DEPENDS= omake:devel/omake \
bash:shells/bash
-USES= dos2unix shebangfix
+USES= dos2unix ocaml shebangfix
DOS2UNIX_FILES= source/OMakefile
SHEBANG_GLOB= run_test
-USE_OCAML= yes
USE_GITHUB= yes
CFLAGS+= -Wno-error=comment
diff --git a/net-p2p/mldonkey/Makefile b/net-p2p/mldonkey/Makefile
--- a/net-p2p/mldonkey/Makefile
+++ b/net-p2p/mldonkey/Makefile
@@ -14,15 +14,13 @@
BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/nums.cma:math/ocaml-num
-USES= compiler:c++11-lang cpe gmake iconv pkgconfig tar:bzip2
+USES= compiler:c++11-lang cpe gmake iconv ocaml:camlp4 pkgconfig tar:bzip2
ARCH!= uname -p
.if ${ARCH} == i386
# `as' is used to compile src/utils/lib/md4_i386.s
USE_BINUTILS= yes
.endif
USE_CXXSTD= c++14
-USE_OCAML= yes
-USE_OCAML_CAMLP4=yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ac_cv_lib_charset_locale_charset=no
diff --git a/net/unison/Makefile b/net/unison/Makefile
--- a/net/unison/Makefile
+++ b/net/unison/Makefile
@@ -23,12 +23,10 @@
libharfbuzz.so:print/harfbuzz
x11_CONFLICTS_INSTALL= unison-nox11
-USES= gmake localbase
+USES= gmake localbase ocaml:build
USE_GITHUB= yes
GH_ACCOUNT= bcpierce00
-USE_OCAML= yes
-NO_OCAML_RUNDEPENDS= yes
MAKE_ENV= CLIBS="${LIBS:S/^-/-ccopt -/}" \
COFLAGS="${CFLAGS:C/ *(-[^ ]*) */ -ccopt \"\1 \"/gW}"
WRKSRC_SUBDIR= src
diff --git a/net/unison240/Makefile b/net/unison240/Makefile
--- a/net/unison240/Makefile
+++ b/net/unison240/Makefile
@@ -30,9 +30,8 @@
libfreetype.so:print/freetype2
PLIST_SUB= PORTVERSION=${PORTVERSION}
-USES= gmake
-USE_OCAML= yes
-NO_OCAML_RUNDEPENDS=yes
+USES= gmake ocaml:build
+
MAKE_ARGS= CFLAGS=""
ALL_TARGET= unison all
TEST_TARGET= selftest
diff --git a/net/unison248/Makefile b/net/unison248/Makefile
--- a/net/unison248/Makefile
+++ b/net/unison248/Makefile
@@ -28,10 +28,8 @@
libfreetype.so:print/freetype2
PLIST_SUB= PORTVERSION=${PORTVERSION} VERSIONSUFFIX=${VERSIONSUFFIX}
-USES= gmake localbase
-USE_OCAML= yes
+USES= gmake localbase ocaml:build
WRKSRC_SUBDIR= src
-NO_OCAML_RUNDEPENDS=yes
CONFLICTS= unison-devel
MAKE_ENV= CLIBS="${LIBS:S/^-/-ccopt -/}" COFLAGS="${CFLAGS:C/ *(-[^ ]*) */ -ccopt \"\1 \"/gW}"
MAKE_JOBS_UNSAFE= yes
diff --git a/net/unison251/Makefile b/net/unison251/Makefile
--- a/net/unison251/Makefile
+++ b/net/unison251/Makefile
@@ -28,10 +28,8 @@
libharfbuzz.so:print/harfbuzz
PLIST_SUB= PORTVERSION=${PORTVERSION} VERSIONSUFFIX=${VERSIONSUFFIX}
-USES= gmake localbase
-USE_OCAML= yes
+USES= gmake localbase ocaml:build
WRKSRC_SUBDIR= src
-NO_OCAML_RUNDEPENDS=yes
CONFLICTS= unison-devel
MAKE_ENV= CLIBS="${LIBS:S/^-/-ccopt -/}" COFLAGS="${CFLAGS:C/ *(-[^ ]*) */ -ccopt \"\1 \"/gW}"
ALL_TARGET= unison all
diff --git a/print/texvc/Makefile b/print/texvc/Makefile
--- a/print/texvc/Makefile
+++ b/print/texvc/Makefile
@@ -9,9 +9,8 @@
COMMENT= Convert latex equations to HTML, MathML, PNG
WWW= https://www.mediawiki.org/wiki/Texvc
-USES= gmake
-USE_OCAML= yes
-NO_OCAML_RUNDEPENDS= yes
+USES= gmake ocaml:build
+
BUILD_WRKSRC= ${WRKSRC}/src
PLIST_FILES= bin/texvc
diff --git a/science/kalzium/Makefile b/science/kalzium/Makefile
--- a/science/kalzium/Makefile
+++ b/science/kalzium/Makefile
@@ -17,7 +17,7 @@
RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
USES= cmake compiler:c++11-lang desktop-file-utils gettext gl kde:5 \
- pkgconfig qt:5 tar:xz xorg
+ ocaml:build pkgconfig qt:5 tar:xz xorg
USE_GL= gl glew glu
USE_KDE= auth archive attica bookmarks codecs completion config configwidgets \
coreaddons crash doctools emoticons guiaddons i18n \
@@ -26,8 +26,6 @@
sonnet textwidgets unitconversion widgetsaddons windowsystem \
xmlgui \
ecm:build
-USE_OCAML= yes
-NO_OCAML_RUNDEPENDS= yes
USE_QT= concurrent core dbus declarative gui network opengl printsupport script svg \
widgets xml \
buildtools:build qmake:build
diff --git a/security/ocaml-cryptgps/Makefile b/security/ocaml-cryptgps/Makefile
--- a/security/ocaml-cryptgps/Makefile
+++ b/security/ocaml-cryptgps/Makefile
@@ -12,11 +12,9 @@
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+USES= gmake ocaml:findplist
+
WRKSRC= ${WRKDIR}/${PORTNAME}
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAMLFIND_PLIST= yes
ALL_TARGET= all opt
diff --git a/security/ocaml-cryptokit/Makefile b/security/ocaml-cryptokit/Makefile
--- a/security/ocaml-cryptokit/Makefile
+++ b/security/ocaml-cryptokit/Makefile
@@ -13,12 +13,10 @@
BUILD_DEPENDS= ${LOCALBASE}/${OCAML_SITELIBDIR}/zarith/META:math/ocaml-zarith
RUN_DEPENDS= ${LOCALBASE}/${OCAML_SITELIBDIR}/zarith/META:math/ocaml-zarith
-USES= ocaml:dune
+USES= ocaml:dune,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= xavierleroy
GH_TAGNAME= release${PORTVERSION:S/.//g}
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= *
diff --git a/security/ocaml-lwt_ssl/Makefile b/security/ocaml-lwt_ssl/Makefile
--- a/security/ocaml-lwt_ssl/Makefile
+++ b/security/ocaml-lwt_ssl/Makefile
@@ -18,7 +18,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocsigen
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= CHANGES README.md
diff --git a/security/ocaml-ssl/Makefile b/security/ocaml-ssl/Makefile
--- a/security/ocaml-ssl/Makefile
+++ b/security/ocaml-ssl/Makefile
@@ -11,12 +11,10 @@
LICENSE= LGPL21+
LICENSE_FILE= ${WRKSRC}/COPYING
-USES= ocaml:dune ssl
+USES= ocaml:dune,ldconfig ssl
USE_GITHUB= yes
GH_ACCOUNT= savonet
GH_PROJECT= ocaml-ssl
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME}
diff --git a/sysutils/ledit/Makefile b/sysutils/ledit/Makefile
--- a/sysutils/ledit/Makefile
+++ b/sysutils/ledit/Makefile
@@ -12,8 +12,7 @@
BUILD_DEPENDS= camlp5r:devel/ocaml-camlp5 \
${OCAMLFIND_DEPEND}
-USES= gmake
-USE_OCAML= yes
+USES= gmake ocaml
USE_GITHUB= yes
GH_ACCOUNT= chetmurthy
GH_TAGNAME= ledit-${PORTVERSION:S/./-/}
diff --git a/textproc/ocaml-csv/Makefile b/textproc/ocaml-csv/Makefile
--- a/textproc/ocaml-csv/Makefile
+++ b/textproc/ocaml-csv/Makefile
@@ -10,12 +10,11 @@
LICENSE= LGPL21+
+USES= gmake ocaml:findlib
+OCAML_PKGDIRS= csv
+
WRKSRC= ${WRKDIR}/csv-${PORTVERSION}
-USES= gmake
MAKE_ARGS= byte native
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-OCAML_PKGDIRS= csv
TEST_TARGET= tests
MAKE_JOBS_UNSAFE= yes
diff --git a/textproc/ocaml-expat/Makefile b/textproc/ocaml-expat/Makefile
--- a/textproc/ocaml-expat/Makefile
+++ b/textproc/ocaml-expat/Makefile
@@ -12,17 +12,16 @@
LIB_DEPENDS= libexpat.so:textproc/expat2
-USES= gmake
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_LDCONFIG= yes
+USES= gmake ocaml:findlib,ldconfig
+
MAKE_ARGS= EXPAT_LIBDIR=${LOCALBASE}/lib \
EXPAT_INCDIR=${LOCALBASE}/include \
CAML_INCDIR=${LOCALBASE}/lib/ocaml
ALL_TARGET= all allopt doc
+
OPTIONS_DEFINE= DOCS
-post-install:
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR}
diff --git a/textproc/ocaml-spelll/Makefile b/textproc/ocaml-spelll/Makefile
--- a/textproc/ocaml-spelll/Makefile
+++ b/textproc/ocaml-spelll/Makefile
@@ -14,7 +14,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= c-cube
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
PORTDOCS= LICENSE README.md
diff --git a/textproc/ocaml-text/Makefile b/textproc/ocaml-text/Makefile
--- a/textproc/ocaml-text/Makefile
+++ b/textproc/ocaml-text/Makefile
@@ -10,21 +10,15 @@
BUILD_DEPENDS= ocamlbuild:devel/ocaml-ocamlbuild
+USES= gmake ocaml:camlp4,findplist,ldconfig
USE_GITHUB= yes
GH_ACCOUNT= vbmithr
GH_PROJECT= ${PKGNAMEPREFIX}${PORTNAME}
-USES= gmake
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix ${PREFIX} \
--destdir ${STAGEDIR}
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAMLFIND_PLIST= yes
-
SA_DIR= ${LOCALBASE}/${OCAML_SITELIBDIR}
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
diff --git a/textproc/ocaml-yojson/Makefile b/textproc/ocaml-yojson/Makefile
--- a/textproc/ocaml-yojson/Makefile
+++ b/textproc/ocaml-yojson/Makefile
@@ -16,7 +16,6 @@
USES= ocaml:dune
USE_GITHUB= yes
GH_ACCOUNT= ocaml-community
-USE_OCAML= yes
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
diff --git a/textproc/sexp/Makefile b/textproc/sexp/Makefile
--- a/textproc/sexp/Makefile
+++ b/textproc/sexp/Makefile
@@ -97,7 +97,6 @@
janestreet:typerep:v0.16.0:typerep \
janestreet:uopt:v0.17.0:uopt \
janestreet:variantslib:v0.16.0:variantslib
-USE_OCAML= yes
DUNE_ARGS= bin/main.exe
PLIST_FILES= bin/${PORTNAME}
diff --git a/x11-toolkits/ocaml-graphics/Makefile b/x11-toolkits/ocaml-graphics/Makefile
--- a/x11-toolkits/ocaml-graphics/Makefile
+++ b/x11-toolkits/ocaml-graphics/Makefile
@@ -10,12 +10,10 @@
LICENSE= LGPL21
-USES= ocaml:dune pkgconfig xorg
+USES= ocaml:dune,ldconfig pkgconfig xorg
USE_GITHUB= yes
GH_ACCOUNT= ocaml
GH_PROJECT= graphics
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
USE_XORG= x11 xorgproto
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME}
diff --git a/x11-toolkits/ocaml-lablgtk2/Makefile b/x11-toolkits/ocaml-lablgtk2/Makefile
--- a/x11-toolkits/ocaml-lablgtk2/Makefile
+++ b/x11-toolkits/ocaml-lablgtk2/Makefile
@@ -11,13 +11,8 @@
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
-USES= gmake gnome pkgconfig
+USES= gmake gnome ocaml:camlp4,findlib,ldconfig,wash pkgconfig
USE_GNOME= cairo gdkpixbuf2 gtk20
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_LDCONFIG= yes
-USE_OCAML_WASH= yes
HAS_CONFIGURE= yes
ALL_TARGET= all opt
diff --git a/x11-toolkits/ocaml-lablgtk3/Makefile b/x11-toolkits/ocaml-lablgtk3/Makefile
--- a/x11-toolkits/ocaml-lablgtk3/Makefile
+++ b/x11-toolkits/ocaml-lablgtk3/Makefile
@@ -18,12 +18,8 @@
libfontconfig.so:x11-fonts/fontconfig
RUN_DEPENDS= ocaml-cairo>0:graphics/ocaml-cairo
-USES= gmake gnome pkgconfig
+USES= gmake gnome ocaml:camlp4,findlib,ldconfig pkgconfig
USE_GNOME= cairo gdkpixbuf2 gtk30
-USE_OCAML= yes
-USE_OCAML_FINDLIB= yes
-USE_OCAML_CAMLP4= yes
-USE_OCAML_LDCONFIG= yes
TARGETS= ${PORTNAME}
diff --git a/x11-toolkits/ocaml-labltk/Makefile b/x11-toolkits/ocaml-labltk/Makefile
--- a/x11-toolkits/ocaml-labltk/Makefile
+++ b/x11-toolkits/ocaml-labltk/Makefile
@@ -10,11 +10,10 @@
LICENSE= LGPL20
-USES= gmake tk
+USES= gmake ocaml:ldconfig tk
USE_GITHUB= yes
GH_ACCOUNT= garrigue
-USE_OCAML= yes
-USE_OCAML_LDCONFIG= yes
+
HAS_CONFIGURE= yes
CONFIGURE_ARGS= -tkdefs "-I${LOCALBASE}/include -I${TCL_INCLUDEDIR}\
-I${TK_INCLUDEDIR}" \

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 4:31 PM (6 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16200906
Default Alt Text
D48227.diff (70 KB)

Event Timeline