lang/ocaml: Fix plist issues
These missing man page issues were seen on Redports and reported, then
disappeared after the final patch. Unfortunately they weren't actually
addresses, so it's a mystery why Redports didn't continue to catch the
problem, nor the extra ocamldoc/custom directory (which is why the
ocamldoc/custom/.keep file original existed).
Add the 15 missing man pages to the plist and remove the empty directory
in the post-install target. Strangely enough, Redports still shows an
8x pass. I'm losing a lot of confidence in Redports results...
While here, remove the muting from the post-install target. This is
against convention.
PR: ports/188158

lang/ocaml: Upgrade version 4.00.1 to 4.01.0 and stage
This is a significant update from the maintainer. Not only has stage
support been added (and verified with an 8x pass on RedPorts), but
installed binaries are no longer stripped which was the cause of the
coccinelle malfunction seen on DragonFly.
Licensing was also defined, and the X11 build failure caused by the
use of the -R linker flag without the -Wl prefix has also been
rectified. [2]
PR: ports/188158 [1]
Submitted by: maintainer (Michael Gruenewald)
PR: ports/188330 [2]
Submitted by: madpilot
Approved by: maintainer

ocaml update 1/4: lang/ocaml upgrade from 3.12 to 4.00
There have been manual outstanding PRs on OCAML that have dragged on
for well more than a year. In the meantime, FreeBSD has been painfully
stucking on version 3.12 of Ocaml. Meanwhile, DragonFly's dports have
been maintaining version 4.00.
With a "Just do it" attitude, the dports version of Ocaml has been brought
in. This doesn't have stage support, nor is the the latest version
available. The idea is just get a working base Ocaml 4.00 in ports and
then have the maintainer update the appropriate PRs.
As a consequence, updates to omake, ocaml-findlib, and ocaml-images is
also required and upcoming.
Urged by: portmgr (bapt)
Related PR: ports/173364
Related PR: ports/173453

Fix plist when the THREADS option is off. Also convert to @dirrmtry
in a couple places that are affected by graphics/ocaml-lablgl and/or
x11-toolkits/ocaml-lablgtk2.
No PORTREVISION bump since THREADS is on by default.
Approved by: maintainer (implicit)

- Add support for threaded Tk by passing PTHREAD_LIBS to configure in -tklibs
swith. This allows build with threaded Tk (otherwise configure fails to use
Tk). Also depend on threaded Tk by default in case of THREADS support - with
non-pthread tk library it will not be stable enough
- Add OPTIONS
- Enable builds of non-threaded targets
- Depend on X in case if X is installed, since configure does this by default.
- Rename patchfiles to make portlint happy
- Eliminate the number of reinplace patterns (remove duplicates, optimize)
- Move manpage list in the separate files
- Pass pthread flags to compiler (PTHREAD_CFLAGS/LIBS safety)
- Remove some ugly hacks on setting permissions etc (eliminated by setting
correct permission in COPY_TREE macros)
- Eliminate duplicate entries in PLIST in case of unstalling optimized binaries,
also optimize this part

- Add an empty directory to the package, so deinstalling of the package does
not produce the warning about a nonexisting directory.
PR: ports/73842
Submitted by: Eugene Ossintsev <eugos@gmx.net> (maintainer)

- Split the port into 3 parts: ocaml, ocaml-nox11 (slave port), ocaml-doc
- Strip all the executables which are allowed to be stripped
according to the OCaml documentation
- PORTVERSION looks now more correct because the documentation
(which has the other version number, without the patch level prefix)
is now in a separate port
PR: ports/62291
Submitted by: maintainer