Bug 188158 - lang/ocaml Update to 4.01.0
Summary: lang/ocaml Update to 4.01.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-01 08:10 UTC by Michael Grünewald
Modified: 2014-04-26 22:40 UTC (History)
0 users

See Also:


Attachments
ocaml.patch (55.67 KB, patch)
2014-04-22 22:37 UTC, Michael Grünewald
no flags Details | Diff
patch.txt (33.47 KB, text/plain; charset=UTF-8)
2014-04-26 13:42 UTC, Michael Grünewald
no flags Details
patch.txt (33.55 KB, text/plain; charset=UTF-8)
2014-04-26 15:43 UTC, Michael Grünewald
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grünewald 2014-04-01 08:10:00 UTC
We want to have ocaml-4.01.0 in the ports and take the opportunity of the upgrade to add staging.  I made some progress on this but still have two small issues:

- The underlying build system uses strip on installed, read-only, files.
- The package list must be actualised.

Once these small issues are fixed, the port can be tested.

Progresses can be followed there:
 https://bitbucket.org/michipili/ports-bsd/branch/ocaml-4.01.0
Comment 1 Edwin Groothuis freebsd_committer 2014-04-01 08:10:04 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer 2014-04-01 08:10:05 UTC
Maintainer of lang/ocaml,

Please note that PR ports/188158 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/188158

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2014-04-01 08:10:06 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 John Marino freebsd_committer 2014-04-08 20:00:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marino

I'll take it.
Comment 5 freebsd.contact 2014-04-08 20:07:10 UTC
I don't know what "package list must be actualised" means.  If I had to
guess, this is European speak for "updated".  Or the german "aktuell"
meaning to update, but this is a false friend in English. :)

The real issue is the stripping.  Ocaml has to stop doing this, it for
sure breaks coccinelle and probably others.  That has to fixed!

John

P.S. this got assigned back to maintainer because the laposte.net email
address wasn't used when the PR was submitted.
Comment 6 Michael Grünewald 2014-04-08 22:48:49 UTC
On Apr 8, 2014, at 9:07 PM, John Marino wrote:

> I don't know what "package list must be actualised" means.  If I had =
to
> guess, this is European speak for "updated".  Or the german "aktuell"
> meaning to update, but this is a false friend in English. :)

I will keep good note of this. :)

> The real issue is the stripping.  Ocaml has to stop doing this, it for
> sure breaks coccinelle and probably others.  That has to fixed!

Do you see purely and simply removing stripping an option?  It would be =
the easier way to go=97provided that it does not break the installation.

I will check this out tomorrow.

Michael
Comment 7 freebsd.contact 2014-04-08 22:54:05 UTC
On 4/8/2014 23:48, Michael Grünewald wrote:
> On Apr 8, 2014, at 9:07 PM, John Marino wrote:
>> The real issue is the stripping.  Ocaml has to stop doing this, it
>> for sure breaks coccinelle and probably others.  That has to
>> fixed!
> 
> Do you see purely and simply removing stripping an option?  It would
> be the easier way to goprovided that it does not break the
> installation.

Yes.  From what I understand, it is currently always wrong to strip an
ocaml binary.  They should never be stripped.

From https://github.com/DragonFlyBSD/DPorts/issues/80 :

"Ocaml can be built to native ELF binary or to a portable bytecode. The
ocamlc compiler builds to bytecode and the ocamlopt compiler builds to
native.  The issue comes from the uses of the ocaml compiler flags
-custom when building to bytecode. This is flag is somehow deprecated
because it produce elf files which do not follow the ELF format exactly.
Hence, when you try to strip such a file, you actually strip the
bytecode from it and it corrupts the binary.

There are a few possible fix here :
1) disable strip (the easy solution)
2) force the port to be built to native code, but i failed to do so
because i don't really understand the build system or only strip when
built to native.
3) remove the use of -custom but that's probably something for upstream."
Comment 8 Michael Grünewald 2014-04-12 13:59:14 UTC
John Marino wrote:
> On 4/8/2014 23:48, Michael Grünewald wrote:
>> Do you see purely and simply removing stripping an option?  It would
>> be the easier way to goprovided that it does not break the
>> installation.
> Yes.  From what I understand, it is currently always wrong to strip an
> ocaml binary.  They should never be stripped.
I think you are referring to binaries generated by the bytecode
compiler: they consist of a copy of ocamlrun with the bytecode program
embedded in the part removed by the strip(1) utility.  Stripping native
code program should be fine.

As far as I understand, stripping is only useful to save place (or
obfuscate a binary), therefore I just removed the stripping part and
made further adjustments.

The current state of my work is

  1610209 (Tip of ocaml-4.01.0)
  https://bitbucket.org/michipili/ports-bsd/commits/branch/ocaml-4.01.0

ocaml/ocaml-4.01.0 > portlint reported:
> WARN: Makefile: [172]: possible direct use of command "install" found.
use ${INSTALL_foobaa} instead.

This is a false positive, caused by `install` being a source for `check`
and `install`.

> WARN: Makefile: use of DISTFILES with single file discouraged.
distribution filename should be set by DISTNAME and EXTRACT_SUFX.
> WARN: Makefile: DISTFILES/DISTNAME affects WRKSRC. take caution when
changing them.

We do this because documentation is provided in separate distfiles,
which are conditionally downloaded.

There is still one open issue:  when preparing a package with `make
package` the `pkg-static` program reports duplicate entries for all
example and documentation files.  Any idea how I could fix this? My only
reference for staging is the FreeBSD wiki, which is quite terse about
PORTEXAMPLES and PORTDOCS.

Best regards,
Michael
Comment 9 freebsd.contact 2014-04-13 14:10:29 UTC
Hmm, I did not get the response by mail.  Luckily I checked the PR manually.

RE: portlint, forget about those warnings.  I've seen similar false
positives and I am familiar with them.

Regarding duplicate plist entries: This happens when both PORTDOCS are
defined and entries in the pkg-plist are given.  Only one or the other
is needed.  Same case for PORTEXAMPLES.

I just checked the code and that's exactly what is happening here:
> PORTDOCS=	htmlman ${DOCSDISTNAME}-refman.ps.gz \
> 		${DOCSDISTNAME}-refman.pdf

> %%PORTDOCS%%%%DOCSDIR%%/htmlman/advexamples.html
> %%PORTDOCS%%%%DOCSDIR%%/htmlman/browser.html
> %%PORTDOCS%%%%DOCSDIR%%/htmlman/classes.html
> %%PORTDOCS%%%%DOCSDIR%%/htmlman/comp.html
[snip]

Personally I would remove all the %%PORTDOCS%% lines (including @dirrm)
from the pkg-list to make it shorter.  Try that, and run check-orphans.
  Also check the temporary plist generated in $WRKDIR to verify they
appear once in that list.

it's documented in PHB too:
http://www.freebsd.org/doc/en/books/porters-handbook/install.html#install-documentation

HTH,
John
Comment 10 freebsd.contact 2014-04-20 20:09:27 UTC
Hi Michael,
Did you follow my last post to this PR?  You're only a couple of minutes
away from finishing off this port.  I could probably do it myself but I
thought you'd like to complete it and give me a clean patch set.

Thanks,
John
Comment 11 Michael Grünewald 2014-04-22 22:37:09 UTC
Hi John,

John Marino wrote:
> Did you follow my last post to this PR?  You're only a couple of minutes
> away from finishing off this port.  I could probably do it myself but I
> thought you'd like to complete it and give me a clean patch set.
I was away on Easter and could not finish the patch before leaving.

I hope the attached patch will work for you.


Thank you for your support!
Michael
Comment 12 freebsd.contact 2014-04-26 02:49:25 UTC
I think this patch must have bitrotted.
It produces failed hunks in both the Makefile and the pkg-plist (the
latter is huge, 799 lines).

Try applying it to the version provided by portsnap to reproduce.
Thanks,
John
Comment 13 Michael Grünewald 2014-04-26 13:42:32 UTC
John Marino wrote:
> I think this patch must have bitrotted.
It did, I worked against @349516 without noticing changes that flewed in
before @352244.  I hope this new patch will do.

Also we had a PR[1] related to OCaml for which the reporter proposed a
patch, which I included in my work.

  [1]: ports/188330: lang/ocaml: Fix X11 build on head
-- 
Best Regards,
Michael
Comment 14 freebsd.contact 2014-04-26 14:36:39 UTC
Almost, but not quite.

It's not staged correctly - look at this log exerpt:

> cd man; gmake install
> gmake[2]: Entering directory `/work/a/ports/lang/ocaml/work/ocaml-4.01.0/man'
> for i in *.m; do install  -o root -g wheel -m 444  $i /usr/local/man/man1/`basename $i .m`.1; done
> echo '.so man1/ocamlc.1' > /usr/local/man/man1/ocamlc.opt.1
> echo '.so man1/ocamlopt.1' > /usr/local/man/man1/ocamlopt.opt.1
> echo '.so man1/ocamlcp.1' > /usr/local/man/man1/ocamloptp.1
> gmake[2]: Leaving directory `/work/a/ports/lang/ocaml/work/ocaml-4.01.0/man'


At least some man pages are getting installed directly to /usr/local.

I ran this again all 8 platforms:
https://redports.org/buildarchive/20140426131937-62217/

It passed on FreeBSD 10 and FreeBSD-current, but has leftovers on
FreeBSD 8 and FreeBSD 9.  But the man pages are installed in /usr/local
on all of them (but likely removed on the new platforms thus masking the
issue).

Take a look at all 8 logs and see if you can find the issue.  You are
very very close though.

John
Comment 15 Michael Grünewald 2014-04-26 15:43:43 UTC
John Marino wrote:
> Take a look at all 8 logs and see if you can find the issue. You are
> very very close though.
Great, let's see if this one fits!
Comment 16 Michael Grünewald 2014-04-26 17:55:07 UTC
Meanwhile, I subscribed to redports and triggered a new build, which
succeed!

https://redports.org/buildarchive/20140426162246-85121/
Comment 17 dfilter service freebsd_committer 2014-04-26 18:20:41 UTC
Author: marino
Date: Sat Apr 26 17:20:32 2014
New Revision: 352274
URL: http://svnweb.freebsd.org/changeset/ports/352274
QAT: https://qat.redports.org/buildarchive/r352274/

Log:
  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

Added:
  head/lang/ocaml/files/patch-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-asmrun-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-byterun-Makefile.common   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-Makefile.shared   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-dynlink-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-labltk-lib-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-labltk-support-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-systhreads-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-otherlibs-threads-Makefile   (contents, props changed)
  head/lang/ocaml/files/patch-stdlib-Makefile   (contents, props changed)
Deleted:
  head/lang/ocaml/files/patch-testsuite-backtrace-Makefile
Modified:
  head/lang/ocaml/Makefile
  head/lang/ocaml/distinfo
  head/lang/ocaml/files/edit_pkg-plist.sed
  head/lang/ocaml/files/patch-configure
  head/lang/ocaml/pkg-plist

Modified: head/lang/ocaml/Makefile
==============================================================================
--- head/lang/ocaml/Makefile	Sat Apr 26 17:04:45 2014	(r352273)
+++ head/lang/ocaml/Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -2,18 +2,23 @@
 # $FreeBSD$
 
 PORTNAME=	ocaml
-PORTVERSION=	4.00.1
-PORTREVISION=	1
+PORTVERSION=	4.01.0
 CATEGORIES=	lang
-MASTER_SITES=	http://caml.inria.fr/distrib/${DISTNAME:R}/ \
+MASTER_SITES=	http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ \
 		${MASTER_SITE_GENTOO}
 MASTER_SITE_SUBDIR=	distfiles
 PKGNAMESUFFIX=	${SFX}
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
-EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
-MAINTAINER?=	michael.grunewald@laposte.net
-COMMENT?=	The Objective Caml compiler and programming environment
+MAINTAINER=	michipili@gmail.com
+COMMENT=	The Objective Caml compiler and programming environment
+
+LICENSE=		QPL10 LGPL20
+LICENSE_COMB=		multi
+LICENSE_NAME_QPL10=	Q Public License, Version 1.0
+LICENSE_FILE_QPL10=	${WRKSRC}/LICENSE
+LICENSE_PERMS_QPL10=	auto-accept
 
 USES=		gmake tar:bzip2
 REINPLACE_ARGS=	-i ""
@@ -23,14 +28,16 @@ STRIP=
 SSP_UNSAFE=	yes
 MAKE_JOBS_UNSAFE=	yes
 
+MAKE_ENV+=	STAGEDIR="${STAGEDIR}"
 CONFIGURE_ARGS=	-verbose -prefix "${PREFIX}" \
 		-cc "${CC} ${CFLAGS}" \
 		-as "${AS} ${ASFLAGS}" \
 		-aspp "${CC} -c" \
 		-partialld "${LD} -r"
 
-OPTIONS_DEFINE= X11 TK THREADS CMP_LIB OPT_DEF DOCS
+OPTIONS_DEFINE= X11 TK THREADS OPT_DEF DOCS
 OPTIONS_DEFAULT=X11 TK THREADS
+OPT_DEF_DESC=	Use system-optimized binaries by default
 TK_DESC=	LablTk library (requires X11 support)
 CMP_LIB_DESC=	Install compiler libraries
 OPT_DEF_DESC=	Use system-optimizes binaries by default
@@ -39,15 +46,21 @@ PORTDOCS=	htmlman ${DOCSDISTNAME}-refman
 
 MODOPT=		camlp4o camlp4r ocamlc ocamldep ocamldoc ocamllex ocamlopt
 PATTERN=	[[:space:]]*(do|then)?[[:space:]]*)(\$$\(CP\)|cp)([[:space:]]
-DOCSDISTNAME=   ${DISTNAME:C/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\1.\2/}
+DOCSDISTNAME=	${DISTNAME:C/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\1.\2/}
+
+CONFLICTS=	metaocaml-[0-9]*
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MDOCS}
-DISTFILES+= 	${DOCSDISTNAME}-refman-html.tar.gz \
+DISTFILES+=	${DOCSDISTNAME}-refman-html.tar.gz \
 		${DOCSDISTNAME}-refman.ps.gz \
 		${DOCSDISTNAME}-refman.pdf
+EXTRACT_ONLY+=	${DOCSDISTNAME}-refman-html.tar.gz
+PLIST_SUB+=	DOC=""
+PORTDOCS=	htmlman ${DOCSDISTNAME}-refman.ps.gz ${DOCSDISTNAME}-refman.pdf
+.else
+PLIST_SUB+=	DOC="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MTHREADS}
@@ -64,30 +77,31 @@ CONFIGURE_ARGS+=-no-pthread
 .if ${PORT_OPTIONS:MX11}
 PLIST_SUB+=	X11=""
 USE_XORG=	x11
+CONFLICTS+=	ocaml-nox11-[0-9]*
 CONFIGURE_ARGS+=-x11include ${LOCALBASE}/include -x11lib ${LOCALBASE}/lib
 .else
 PLIST_SUB+=	X11="@comment "
-WITHOUT_TK=	yes
 SFX=		-nox11
-CONFLICTS+=	ocaml-[0-9]* ocaml-notk-[0-9]*
-CONFIGURE_ARGS+=-no-x11
+CONFLICTS+=	ocaml-[0-9]*
+CONFIGURE_ARGS+=-no-graph
 .endif
 
-.if ! ${PORT_OPTIONS:MTK}
-PLIST_SUB+=	TK="@comment "
-.if ${PORT_OPTIONS:MX11}
-SFX=		-notk
-CONFLICTS+=	ocaml-[0-9]* ocaml-nox11-[0-9]*
+.if ${PORT_OPTIONS:MTK}
+. if ${PORT_OPTIONS:MEXAMPLES}
+PORTEXAMPLES=	examples_camltk examples_labltk
 .endif
-CONFIGURE_ARGS+=-no-tk
-.else
-USES+=		tk:84,85
+. if ! ${PORT_OPTIONS:MX11}
+IGNORE=requires X11 support to build TK bindings
+. endif
+USES+=		tk:84+
 PLIST_SUB+=	TK=""
-CONFLICTS+=	ocaml-nox11-[0-9]* ocaml-notk-[0-9]*
 CONFIGURE_ARGS+=	-tkdefs \
 			"-I${TCL_INCLUDEDIR} -I${TK_INCLUDEDIR} ${THR_CPP}" \
-			-tklibs "-L${LOCALBASE}/lib -ltk${TK_SHLIB_VER} \
-			-ltcl${TCL_SHLIB_VER} ${THR_LD}"
+			-tklibs "-L${LOCALBASE}/lib -ltk${TK_VER:S|.||} \
+			-ltcl${TCL_VER:S|.||} ${THR_LD}"
+.else
+PLIST_SUB+=	TK="@comment "
+CONFIGURE_ARGS+=-no-tk
 .endif
 
 .include <bsd.port.pre.mk>
@@ -101,6 +115,10 @@ PLIST_SUB+=	PROF="@comment "
 PLIST_SUB+=	PROF=""
 .endif
 
+.if ${OCAML_ARCH} == sparc64
+BROKEN=	ocamlc.opt seg-faults on ${ARCH}, please try to fix
+.endif
+
 post-extract:
 .if ${OCAML_ARCH} == power
 	${MV} ${WRKSRC}/asmrun/power-elf.S ${WRKSRC}/asmrun/power-bsd.S
@@ -124,9 +142,12 @@ post-patch:
 		-e 's|-lbfd -ldl|-lbfd $$dllib|' \
 		${WRKSRC}/configure
 # don't hardcode gcc for depend target
-	@${REINPLACE_CMD} -e 's|gcc|$$(CC)|' \
-		${WRKSRC}/*/Makefile \
-		${WRKSRC}/*/*/Makefile
+# be aware of staging
+	@${REINPLACE_CMD} -E \
+		-e 's|gcc|$$(CC)|' \
+		-e '/^install/,/^$$/s@\$$\(((INSTALL_)?(BIN|LIB|STUBLIB|COMPLIB|MANO?|INSTALL|INSTALL_CUSTOM)DIR)\)@$$(STAGEDIR)$$(\1)@g' \
+		`find ${WRKSRC} -name 'Makefile*'`
+	@${REINPLACE_CMD} -E -e 's/^DIR=/DIR=$$(STAGEDIR)/' ${WRKSRC}/man/Makefile
 .if ${PORT_OPTIONS:MTK}
 	@${REINPLACE_CMD} -e 's|/usr/bin/wish|${WISH}|' \
 		${WRKSRC}/otherlibs/labltk/examples_labltk/hello.tcl
@@ -144,7 +165,7 @@ post-configure:
 # user's umask(1)
 	@${FIND} ${WRKDIR} -type f -name Makefile -print0 | \
 		${XARGS} -0 -n 5 -x ${REINPLACE_CMD} -E \
-		-e 's,\$$\(ARCH\),${OCAML_ARCH},g' \
+		-e 's,\$$\(ARCH\),${OCAML_ARCH},g'	\
 		-e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \4,' \
 		-e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \4,' \
 		-e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \4,' \
@@ -152,46 +173,39 @@ post-configure:
 
 check test: install
 	@cd ${WRKSRC}/testsuite; ${RM} -f _log; for d in tests/* ; do \
-	${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} one DIR=$${d} \
+	${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \
 	2>&1 | tee -a _log || ${TRUE} ; done ; \
-	${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} report
+	${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report
 
 post-install:
-	@${TOUCH} ${PREFIX}/lib/ocaml/ocamldoc/custom/.keep
-	@${CHMOD} 755 ${PREFIX}/lib/ocaml/expunge
+#	@${TOUCH} ${STAGEDIR}${PREFIX}/lib/ocaml/ocamldoc/custom/.keep
+	@${CHMOD} 755 ${STAGEDIR}${PREFIX}/lib/ocaml/expunge
 .if ${PORT_OPTIONS:MTK}
-	@${MKDIR} ${EXAMPLESDIR}
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	@(cd ${WRKSRC}/otherlibs/labltk && \
-		${COPYTREE_SHARE} examples_labltk ${EXAMPLESDIR} \
-		"! -name .cvsignore" && \
-		${COPYTREE_SHARE} examples_camltk ${EXAMPLESDIR} \
-		"! -name .cvsignore")
+		${COPYTREE_SHARE} examples_labltk ${STAGEDIR}${EXAMPLESDIR} \
+		"! -name .ignore" && \
+		${COPYTREE_SHARE} examples_camltk ${STAGEDIR}${EXAMPLESDIR} \
+		"! -name .ignore")
 .endif
-
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	(cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${DOCSDIR})
-	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${DOCSDIR}
-	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${STAGEDIR}${DOCSDIR})
+	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR}
 .endif
 
-.for PROG in camlp4o.opt camlp4of.opt camlp4oof.opt camlp4orf.opt \
-	camlp4r.opt camlp4rf.opt ocamlc.opt ocamldep.opt ocamldoc.opt \
-	ocamllex.opt ocamlopt.opt ocamlrun ocamlyacc
-	@${STRIP_CMD} ${PREFIX}/bin/${PROG}
-.endfor
-
 # Fix permissions for ld.conf
-	@${CHMOD} 644 ${PREFIX}/lib/ocaml/ld.conf
+	@${CHMOD} 644 ${STAGEDIR}${PREFIX}/lib/ocaml/ld.conf
 
 # Do we want .opt version of tools to be the default ?
 .if ${PORT_OPTIONS:MOPT_DEF}
 . for module in ${MODOPT}
 #	First, we save bytecode version
-	@${MV} ${PREFIX}/bin/${module} ${PREFIX}/bin/${module}.byte
+	@${MV} ${STAGEDIR}${PREFIX}/bin/${module} ${STAGEDIR}${PREFIX}/bin/${module}.byte
 
 #	Next make .opt version be the default one (via link)
-	@${LN} ${PREFIX}/bin/${module}.opt ${PREFIX}/bin/${module}
+	@${LN} ${STAGEDIR}${PREFIX}/bin/${module}.opt ${STAGEDIR}${PREFIX}/bin/${module}
 	@${ECHO_CMD} "bin/${module}.byte" >> ${TMPPLIST}
 	@${ECHO_CMD} "@exec ${LN} %D/${module}.opt %D/${module}" >> ${TMPPLIST}
 . endfor

Modified: head/lang/ocaml/distinfo
==============================================================================
--- head/lang/ocaml/distinfo	Sat Apr 26 17:04:45 2014	(r352273)
+++ head/lang/ocaml/distinfo	Sat Apr 26 17:20:32 2014	(r352274)
@@ -1,8 +1,8 @@
-SHA256 (ocaml-4.00.1.tar.bz2) = 33c3f4acff51685f5bfd7c260f066645e767d4e865877bf1613c176a77799951
-SIZE (ocaml-4.00.1.tar.bz2) = 2762205
-SHA256 (ocaml-4.00-refman-html.tar.gz) = 8ca43859d8a71f0941a2453b7b808d7e58ad54804a9cf285875fa30e6576b31a
-SIZE (ocaml-4.00-refman-html.tar.gz) = 549757
-SHA256 (ocaml-4.00-refman.ps.gz) = 6146264fef7ae73f7ebb8dc49a3b1adae9d5bd4f9a14a2670c9d43f7e6a253c3
-SIZE (ocaml-4.00-refman.ps.gz) = 1075658
-SHA256 (ocaml-4.00-refman.pdf) = 76ba2cf60a605b2427f995563f6dc6c7dbb39be6b066f6d96b23926e8cc9babc
-SIZE (ocaml-4.00-refman.pdf) = 1453678
+SHA256 (ocaml-4.01.0.tar.bz2) = b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a
+SIZE (ocaml-4.01.0.tar.bz2) = 3691090
+SHA256 (ocaml-4.01-refman-html.tar.gz) = 01019c8f8a29a8a7f422e090704b666ade2a007d57ea9412285f88f716656001
+SIZE (ocaml-4.01-refman-html.tar.gz) = 571422
+SHA256 (ocaml-4.01-refman.ps.gz) = 4de67ef967b8b39a6f030df258087239d6f7dee869a3973d7a782b7986b809c6
+SIZE (ocaml-4.01-refman.ps.gz) = 1089703
+SHA256 (ocaml-4.01-refman.pdf) = 389e434f534153530ba234299d0f3a0e4271d18b091b9216e4a37335ebd33424
+SIZE (ocaml-4.01-refman.pdf) = 1478900

Modified: head/lang/ocaml/files/edit_pkg-plist.sed
==============================================================================
--- head/lang/ocaml/files/edit_pkg-plist.sed	Sat Apr 26 17:04:45 2014	(r352273)
+++ head/lang/ocaml/files/edit_pkg-plist.sed	Sat Apr 26 17:20:32 2014	(r352274)
@@ -1,6 +1,9 @@
-/.p.cmx$/s@^@%%PROF%%@
+/\.p\.cmx$/s@^@%%PROF%%@
 /examples_labeltk/{
   s@share/examples@%%EXAMPLESDIR%%@
   s@^@%%TK%%@
 }
 /graphics/s@^@%%X11%%@
+/labltk/s@^@%%TK%%@
+/ocamlbrowser/s@^@%%TK%%@
+/dlllabltk.so/s@^@%%TK%%@

Added: head/lang/ocaml/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,28 @@
+--- Makefile.orig	2013-06-17 15:15:18.000000000 +0200
++++ Makefile	2014-04-01 08:23:13.000000000 +0200
+@@ -298,7 +298,7 @@
+ 	if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
+ 	   else :; fi
+ 	cp config/Makefile $(LIBDIR)/Makefile.config
+-	BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \
++	BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR) PREFIX=$(PREFIX) \
+ 	  ./build/partial-install.sh
+ 
+ # Installation of the native-code compiler
+@@ -318,14 +318,14 @@
+ 	cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
+ 	cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
+ 	cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
++	$(RANLIB) compilerlibs/ocamlcommon.a compilerlibs/ocamlbytecomp.a \
++		compilerlibs/ocamloptcomp.a
+ 	cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
+ 	   compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
+ 	   compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
+ 	   $(BYTESTART:.cmo=.cmx) $(BYTESTART:.cmo=.o) \
+ 	   $(OPTSTART:.cmo=.cmx) $(OPTSTART:.cmo=.o) \
+ 	   $(COMPLIBDIR)
+-	cd $(COMPLIBDIR) && $(RANLIB) ocamlcommon.a ocamlbytecomp.a \
+-	   ocamloptcomp.a
+ 
+ clean:: partialclean
+ 

Added: head/lang/ocaml/files/patch-asmrun-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-asmrun-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,25 @@
+--- asmrun/Makefile.orig	2013-06-24 10:16:27.000000000 +0200
++++ asmrun/Makefile	2014-04-01 07:12:29.000000000 +0200
+@@ -64,14 +64,12 @@
+ 
+ install-default:
+ 	cp libasmrun.a $(LIBDIR)/libasmrun.a
+-	cd $(LIBDIR); $(RANLIB) libasmrun.a
+ 
+ install-noruntimed:
+ .PHONY: install-noruntimed
+ 
+ install-runtimed:
+ 	cp libasmrund.a $(LIBDIR)/libasmrund.a
+-	cd $(LIBDIR); $(RANLIB) libasmrund.a
+ .PHONY: install-runtimed
+ 
+ install-noprof:
+@@ -79,7 +77,6 @@
+ 
+ install-prof:
+ 	cp libasmrunp.a $(LIBDIR)/libasmrunp.a
+-	cd $(LIBDIR); $(RANLIB) libasmrunp.a
+ 
+ power-bsd_elf.S: power-elf.S
+ 	cp power-elf.S power-bsd_elf.S

Added: head/lang/ocaml/files/patch-byterun-Makefile.common
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-byterun-Makefile.common	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,10 @@
+--- byterun/Makefile.common.orig	2014-04-01 07:13:45.000000000 +0200
++++ byterun/Makefile.common	2014-04-01 07:13:58.000000000 +0200
+@@ -51,7 +51,6 @@
+ install::
+ 	cp ocamlrun$(EXE) $(BINDIR)/ocamlrun$(EXE)
+ 	cp libcamlrun.$(A) $(LIBDIR)/libcamlrun.$(A)
+-	cd $(LIBDIR); $(RANLIB) libcamlrun.$(A)
+ 	if test -d $(LIBDIR)/caml; then : ; else mkdir $(LIBDIR)/caml; fi
+ 	for i in $(PUBLIC_INCLUDES); do \
+ 	  sed -f ../tools/cleanup-header $$i > $(LIBDIR)/caml/$$i; \

Modified: head/lang/ocaml/files/patch-configure
==============================================================================
--- head/lang/ocaml/files/patch-configure	Sat Apr 26 17:04:45 2014	(r352273)
+++ head/lang/ocaml/files/patch-configure	Sat Apr 26 17:20:32 2014	(r352274)
@@ -1,27 +1,15 @@
---- configure.orig	2012-06-26 15:33:50.000000000 +0000
-+++ configure
-@@ -88,6 +88,8 @@ while : ; do
-         withcurses=no;;
-     -no-shared-libs|--no-shared-libs)
-         withsharedlibs=no;;
-+    -no-x11|--no-x11)
-+        x11_wanted=no;;
-     -x11include*|--x11include*)
-         x11_include_dir=$2; shift;;
-     -x11lib*|--x11lib*)
-@@ -537,9 +539,9 @@ if test $withsharedlibs = "yes"; then
-       mksharedlib="$flexlink"
-       mkmaindll="$flexlink -maindll"
+--- configure.orig	2013-08-23 08:22:36.000000000 +0200
++++ configure	2014-04-26 14:15:43.000000000 +0200
+@@ -547,7 +547,7 @@
        shared_libraries_supported=true;;
--    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
-+    *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
+     *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
        sharedcccompopts="-fPIC"
 -      mksharedlib="$bytecc -shared"
 +      mksharedlib="$bytecc $bytecclinkopts -shared"
        bytecclinkopts="$bytecclinkopts -Wl,-E"
        byteccrpath="-Wl,-rpath,"
        mksharedlibrpath="-Wl,-rpath,"
-@@ -549,7 +551,7 @@ if test $withsharedlibs = "yes"; then
+@@ -557,7 +557,7 @@
        case "$bytecc" in
          gcc*)
            sharedcccompopts="-fPIC"
@@ -30,7 +18,7 @@
            byteccrpath="-Wl,-rpath,"
            mksharedlibrpath="-Wl,-rpath,"
            shared_libraries_supported=true;;
-@@ -565,11 +567,11 @@ if test $withsharedlibs = "yes"; then
+@@ -573,11 +573,11 @@
          gcc*)
            sharedcccompopts="-fPIC"
            if sh ./solaris-ld; then
@@ -44,7 +32,7 @@
              bytecclinkopts="$bytecclinkopts -Wl,-E"
              natdynlinkopts="-Wl,-E"
              byteccrpath="-Wl,-rpath,"
-@@ -593,12 +595,12 @@ if test $withsharedlibs = "yes"; then
+@@ -601,12 +601,12 @@
        mksharedlibrpath="-rpath "
        shared_libraries_supported=true;;
      i[3456]86-*-darwin[89].*)
@@ -54,12 +42,12 @@
        dl_needs_underscore=false
        shared_libraries_supported=true;;
      *-apple-darwin*)
--      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress"
-+      mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress"
+-      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
++      mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
        bytecccompopts="$dl_defs $bytecccompopts"
        dl_needs_underscore=false
        shared_libraries_supported=true;;
-@@ -608,7 +610,7 @@ if test $withsharedlibs = "yes"; then
+@@ -616,7 +616,7 @@
        shared_libraries_supported=false;;
      *-*-openbsd*)
        sharedcccompopts="-fPIC"
@@ -68,67 +56,40 @@
        bytecclinkopts="$bytecclinkopts -Wl,-E"
        natdynlinkopts="-Wl,-E"
        byteccrpath="-Wl,-rpath,"
-@@ -633,7 +635,7 @@ if test $withsharedlibs = "yes"; then
-     x86_64-*-linux*)              natdynlink=true;;
-     i[3456]86-*-darwin[89].*)     natdynlink=true;;
-     i[3456]86-*-darwin*)
--      if test $arch64 == true; then
-+      if test $arch64 = true; then
-         natdynlink=true
-       fi;;
-     x86_64-*-darwin*)             natdynlink=true;;
-@@ -641,6 +643,8 @@ if test $withsharedlibs = "yes"; then
-     sparc*-*-linux*)              natdynlink=true;;
-     i686-*-kfreebsd*)             natdynlink=true;;
-     x86_64-*-kfreebsd*)           natdynlink=true;;
-+    i[345]86-*-dragonfly*)        natdynlink=true;;
-+    x86_64-*-dragonfly*)          natdynlink=true;;
-     i[345]86-*-freebsd*)          natdynlink=true;;
-     x86_64-*-freebsd*)            natdynlink=true;;
-     i[345]86-*-openbsd*)          natdynlink=true;;
-@@ -672,6 +676,7 @@ case "$host" in
-   sparc*-*-gnu*)                arch=sparc; system=gnu;;
-   i[3456]86-*-linux*)           arch=i386; system=linux_`sh ./runtest elf.c`;;
-   i[3456]86-*-*bsd*)            arch=i386; system=bsd_`sh ./runtest elf.c`;;
-+  i[3456]86-*-dragonfly*)       arch=i386; system=bsd_`sh ./runtest elf.c`;;
-   i[3456]86-*-nextstep*)        arch=i386; system=nextstep;;
-   i[3456]86-*-solaris*)         if $arch64; then
-                                   arch=amd64; system=solaris
-@@ -687,6 +692,7 @@ case "$host" in
+@@ -695,6 +695,7 @@
                                  fi;;
    i[3456]86-*-gnu*)             arch=i386; system=gnu;;
    powerpc*-*-linux*)            arch=power; model=ppc; system=elf;;
-+  powerpc-*-freebsd*)           arch=power; model=ppc; system=elf;;
++  powerpc*-*-freebsd*)          arch=power; model=ppc; system=elf;;
    powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
+   powerpc-*-openbsd*)           arch=power; model=ppc; system=bsd_elf;;
    powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
-   powerpc-*-darwin*)            arch=power; system=rhapsody
-@@ -700,6 +706,7 @@ case "$host" in
-   arm*-*-linux-gnueabi)         arch=arm; system=linux_eabi;;
-   x86_64-*-linux*)              arch=amd64; system=linux;;
-   x86_64-*-gnu*)                arch=amd64; system=gnu;;
-+  x86_64-*-dragonfly*)          arch=amd64; system=dragonfly;;
-   x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
-   x86_64-*-netbsd*)             arch=amd64; system=netbsd;;
-   x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
-@@ -724,7 +731,7 @@ else
+@@ -734,7 +735,7 @@
  fi
  
  nativecccompopts=''
 -nativecclinkopts=''
 +nativecclinkopts=""
+ # FIXME the naming of nativecclinkopts is broken: these are options for
+ # ld (for shared libs), not for cc
  nativeccrpath="$byteccrpath"
- 
- case "$arch,$nativecc,$system,$host_type" in
-@@ -786,6 +793,8 @@ case "$arch,$model,$system" in
+@@ -803,6 +804,7 @@
    amd64,*,linux) profiling='prof';;
    amd64,*,gnu) profiling='prof';;
    arm,*,linux*) profiling='prof';;
-+  *,*,dragonfly) profiling='prof';;
 +  *,*,freebsd) profiling='prof';;
    *) profiling='noprof';;
  esac
  
-@@ -1544,10 +1553,10 @@ fi
+@@ -1388,7 +1390,6 @@
+         x11_libs="-L$dir"
+         case "$host" in
+           *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
+-          *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
+           *) x11_link="-L$dir -lX11";;
+         esac
+       fi
+@@ -1564,10 +1565,10 @@
  # Look for BFD library
  
  if ./hasgot -i bfd.h && \

Added: head/lang/ocaml/files/patch-otherlibs-Makefile.shared
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-Makefile.shared	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,19 @@
+--- otherlibs/Makefile.shared.orig	2013-07-23 16:48:47.000000000 +0200
++++ otherlibs/Makefile.shared	2014-04-01 07:24:57.000000000 +0200
+@@ -59,14 +59,14 @@
+ install::
+ 	if test -f dll$(CLIBNAME)$(EXT_DLL); then \
+ 	  cp dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
++	$(RANLIB) lib$(CLIBNAME).$(A)
+ 	cp lib$(CLIBNAME).$(A) $(LIBDIR)/
+-	cd $(LIBDIR); $(RANLIB) lib$(CLIBNAME).$(A)
+ 	cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
+ 	if test -n "$(HEADERS)"; then cp $(HEADERS) $(LIBDIR)/caml/; fi
+ 
+ installopt:
++	$(RANLIB) $(LIBNAME).a
+ 	cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
+-	cd $(LIBDIR); $(RANLIB) $(LIBNAME).a
+ 	if test -f $(LIBNAME).cmxs; then cp $(LIBNAME).cmxs $(LIBDIR)/; fi
+ 
+ partialclean:

Added: head/lang/ocaml/files/patch-otherlibs-dynlink-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-dynlink-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,13 @@
+--- otherlibs/dynlink/Makefile.orig	2013-07-23 16:48:47.000000000 +0200
++++ otherlibs/dynlink/Makefile	2014-04-01 07:44:36.000000000 +0200
+@@ -71,8 +71,8 @@
+ 
+ installopt:
+ 	if $(NATDYNLINK); then \
+-	  cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR) && \
+-	  cd $(LIBDIR) && $(RANLIB) dynlink.$(A); \
++	  $(RANLIB) dynlink.$(A); \
++	  cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR); \
+ 	fi
+ 
+ partialclean:

Added: head/lang/ocaml/files/patch-otherlibs-labltk-lib-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-labltk-lib-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,11 @@
+--- otherlibs/labltk/lib/Makefile.orig	2012-09-30 14:31:27.000000000 +0200
++++ otherlibs/labltk/lib/Makefile	2014-04-01 07:22:17.000000000 +0200
+@@ -99,7 +99,7 @@
+ 
+ installopt:
+ 	@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
++	$(RANLIB) $(LIBNAME).$(A)
+ 	cp $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALLDIR)
+-	cd $(INSTALLDIR); $(RANLIB) $(LIBNAME).$(A)
+ 	chmod 644 $(INSTALLDIR)/$(LIBNAME).cmxa
+ 	chmod 644 $(INSTALLDIR)/$(LIBNAME).$(A)

Added: head/lang/ocaml/files/patch-otherlibs-labltk-support-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-labltk-support-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,12 @@
+--- otherlibs/labltk/support/Makefile.orig	2012-07-17 17:31:12.000000000 +0200
++++ otherlibs/labltk/support/Makefile	2014-04-01 07:23:59.000000000 +0200
+@@ -43,8 +43,8 @@
+ 
+ install:
+ 	if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
++	$(RANLIB) lib$(LIBNAME).$(A)
+ 	cp $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
+-	cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).$(A)
+ 	cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).$(A)
+ 	if test -f dll$(LIBNAME)$(EXT_DLL); then \
+ 	   cp dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi

Added: head/lang/ocaml/files/patch-otherlibs-systhreads-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-systhreads-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,25 @@
+--- otherlibs/systhreads/Makefile.orig	2013-07-23 16:48:47.000000000 +0200
++++ otherlibs/systhreads/Makefile	2014-04-01 07:26:11.000000000 +0200
+@@ -71,8 +71,8 @@
+ 
+ install:
+ 	if test -f dllthreads.so; then cp dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
++	$(RANLIB) libthreads.a
+ 	cp libthreads.a $(LIBDIR)/libthreads.a
+-	cd $(LIBDIR); $(RANLIB) libthreads.a
+ 	if test -d $(LIBDIR)/threads; then :; else mkdir $(LIBDIR)/threads; fi
+ 	cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
+ 	rm -f $(LIBDIR)/threads/stdlib.cma
+@@ -80,10 +80,10 @@
+ 	cp threads.h $(LIBDIR)/caml/threads.h
+ 
+ installopt:
++	$(RANLIB) libthreadsnat.a
+ 	cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+-	cd $(LIBDIR); $(RANLIB) libthreadsnat.a
++	$(RANLIB) threads.a
+ 	cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
+-	cd $(LIBDIR)/threads; $(RANLIB) threads.a
+ 
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+ 

Added: head/lang/ocaml/files/patch-otherlibs-threads-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-otherlibs-threads-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,12 @@
+--- otherlibs/threads/Makefile.orig	2013-07-23 16:48:47.000000000 +0200
++++ otherlibs/threads/Makefile	2014-04-01 07:27:02.000000000 +0200
+@@ -98,8 +98,8 @@
+ install:
+ 	if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
+ 	mkdir -p $(LIBDIR)/vmthreads
++	$(RANLIB) libvmthreads.a
+ 	cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
+-	cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
+ 	cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi \
+ 	   threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
+ 	cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli \

Added: head/lang/ocaml/files/patch-stdlib-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/ocaml/files/patch-stdlib-Makefile	Sat Apr 26 17:20:32 2014	(r352274)
@@ -0,0 +1,22 @@
+--- stdlib/Makefile.orig	2012-10-15 19:50:56.000000000 +0200
++++ stdlib/Makefile	2014-04-01 07:27:40.000000000 +0200
+@@ -23,8 +23,8 @@
+ installopt: installopt-default installopt-$(PROFILING)
+ 
+ installopt-default:
++	$(RANLIB) stdlib.a
+ 	cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
+-	cd $(LIBDIR); $(RANLIB) stdlib.a
+ 
+ installopt-noprof:
+ 	rm -f $(LIBDIR)/stdlib.p.cmxa; ln -s stdlib.cmxa $(LIBDIR)/stdlib.p.cmxa
+@@ -34,8 +34,8 @@
+ 	rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
+ 
+ installopt-prof:
++	$(RANLIB) stdlib.p.a
+ 	cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
+-	cd $(LIBDIR); $(RANLIB) stdlib.p.a
+ 
+ stdlib.p.cmxa: $(OBJS:.cmo=.p.cmx)
+ 	$(CAMLOPT) -a -o stdlib.p.cmxa $(OBJS:.cmo=.p.cmx)

Modified: head/lang/ocaml/pkg-plist
==============================================================================
--- head/lang/ocaml/pkg-plist	Sat Apr 26 17:04:45 2014	(r352273)
+++ head/lang/ocaml/pkg-plist	Sat Apr 26 17:20:32 2014	(r352274)
@@ -270,6 +270,7 @@ lib/ocaml/compiler-libs/asmgen.cmi
 lib/ocaml/compiler-libs/asmlibrarian.cmi
 lib/ocaml/compiler-libs/asmlink.cmi
 lib/ocaml/compiler-libs/asmpackager.cmi
+lib/ocaml/compiler-libs/ast_mapper.cmi
 lib/ocaml/compiler-libs/asttypes.cmi
 lib/ocaml/compiler-libs/btype.cmi
 lib/ocaml/compiler-libs/bytegen.cmi
@@ -289,8 +290,10 @@ lib/ocaml/compiler-libs/cmt_format.cmi
 lib/ocaml/compiler-libs/cmx_format.cmi
 lib/ocaml/compiler-libs/coloring.cmi
 lib/ocaml/compiler-libs/comballoc.cmi
+lib/ocaml/compiler-libs/compenv.cmi
 lib/ocaml/compiler-libs/compile.cmi
 lib/ocaml/compiler-libs/compilenv.cmi
+lib/ocaml/compiler-libs/compmisc.cmi
 lib/ocaml/compiler-libs/config.cmi
 lib/ocaml/compiler-libs/consistbl.cmi
 lib/ocaml/compiler-libs/ctype.cmi
@@ -301,6 +304,7 @@ lib/ocaml/compiler-libs/emit.cmi
 lib/ocaml/compiler-libs/emitaux.cmi
 lib/ocaml/compiler-libs/emitcode.cmi
 lib/ocaml/compiler-libs/env.cmi
+lib/ocaml/compiler-libs/envaux.cmi
 lib/ocaml/compiler-libs/errors.cmi
 lib/ocaml/compiler-libs/expunge.cmi
 lib/ocaml/compiler-libs/genprintval.cmi
@@ -351,6 +355,7 @@ lib/ocaml/compiler-libs/parser.cmi
 lib/ocaml/compiler-libs/parsetree.cmi
 lib/ocaml/compiler-libs/path.cmi
 lib/ocaml/compiler-libs/pparse.cmi
+lib/ocaml/compiler-libs/pprintast.cmi
 lib/ocaml/compiler-libs/predef.cmi
 lib/ocaml/compiler-libs/primitive.cmi
 lib/ocaml/compiler-libs/printast.cmi
@@ -395,6 +400,8 @@ lib/ocaml/compiler-libs/typeclass.cmi
 lib/ocaml/compiler-libs/typecore.cmi
 lib/ocaml/compiler-libs/typedecl.cmi
 lib/ocaml/compiler-libs/typedtree.cmi
+lib/ocaml/compiler-libs/typedtreeIter.cmi
+lib/ocaml/compiler-libs/typedtreeMap.cmi
 lib/ocaml/compiler-libs/typemod.cmi
 lib/ocaml/compiler-libs/typeopt.cmi
 lib/ocaml/compiler-libs/types.cmi
@@ -764,9 +771,9 @@ lib/ocaml/int_misc.cmx
 %%TK%%lib/ocaml/labltk/tkcompiler
 %%TK%%lib/ocaml/labltk/tkthread.cmi
 %%TK%%lib/ocaml/labltk/tkthread.cmo
-%%THREADS%%%%TK%%lib/ocaml/labltk/tkthread.cmx
+%%TK%%lib/ocaml/labltk/tkthread.cmx
 %%TK%%lib/ocaml/labltk/tkthread.mli
-%%THREADS%%%%TK%%lib/ocaml/labltk/tkthread.o
+%%TK%%lib/ocaml/labltk/tkthread.o
 %%TK%%lib/ocaml/labltk/tkvars.cmi
 %%TK%%lib/ocaml/labltk/tkvars.cmx
 %%TK%%lib/ocaml/labltk/tkvars.mli
@@ -863,6 +870,8 @@ lib/ocaml/ocamlbuild/ocamlbuild_executor
 lib/ocaml/ocamlbuild/ocamlbuild_executor.o
 lib/ocaml/ocamlbuild/ocamlbuild_pack.cmi
 lib/ocaml/ocamlbuild/ocamlbuild_plugin.cmi
+lib/ocaml/ocamlbuild/ocamlbuild_plugin.cmo
+lib/ocaml/ocamlbuild/ocamlbuild_plugin.cmx
 lib/ocaml/ocamlbuild/ocamlbuild_unix_plugin.cmi
 lib/ocaml/ocamlbuild/ocamlbuild_unix_plugin.cmo
 lib/ocaml/ocamlbuild/ocamlbuild_unix_plugin.cmx
@@ -870,7 +879,6 @@ lib/ocaml/ocamlbuild/ocamlbuild_unix_plu
 lib/ocaml/ocamlbuild/ocamlbuildlib.a
 lib/ocaml/ocamlbuild/ocamlbuildlib.cma
 lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa
-lib/ocaml/ocamldoc/custom/.keep
 lib/ocaml/ocamldoc/ocamldoc.hva
 lib/ocaml/ocamldoc/odoc.cmi
 lib/ocaml/ocamldoc/odoc_analyse.cmi
@@ -1082,54 +1090,102 @@ lib/ocaml/weak.cmx
 lib/ocaml/weak.ml
 lib/ocaml/weak.mli
 %%PROF%%lib/ocaml/weak.p.cmx
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/.ignore
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/Makefile
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/Makefile.nt
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/addition.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/eyes.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/fileinput.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/fileopen.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/helloworld.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/images/CamlBook.gif
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/images/Lambda2.back.gif
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/images/dojoji.back.gif
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/jptest.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/mytext.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/socketinput.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/taddition.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/tetris.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/text.ml
-%%TK%%%%EXAMPLESDIR%%/examples_camltk/winskel.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/.ignore
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/Lambda2.back.gif
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/Makefile
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/Makefile.nt
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/README
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/calc.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/clock.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/demo.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/eyes.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/hello.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/hello.tcl
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/lang.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/taquin.ml
-%%TK%%%%EXAMPLESDIR%%/examples_labltk/tetris.ml
-%%TK%%@dirrm %%EXAMPLESDIR%%/examples_labltk
-%%TK%%@dirrm %%EXAMPLESDIR%%/examples_camltk/images
-%%TK%%@dirrm %%EXAMPLESDIR%%/examples_camltk
-@dirrmtry %%EXAMPLESDIR%%
-@dirrm lib/ocaml/vmthreads
-%%THREADS%%@dirrm lib/ocaml/threads
+man/man1/ocamlbuild.1.gz
+man/mann/Arg.3o.gz
+man/mann/Array.3o.gz
+man/mann/ArrayLabels.3o.gz
+man/mann/Bigarray.3o.gz
+man/mann/Bigarray.Array1.3o.gz
+man/mann/Bigarray.Array2.3o.gz
+man/mann/Bigarray.Array3.3o.gz
+man/mann/Bigarray.Genarray.3o.gz
+man/mann/Buffer.3o.gz
+man/mann/Callback.3o.gz
+man/mann/CamlinternalLazy.3o.gz
+man/mann/CamlinternalMod.3o.gz
+man/mann/CamlinternalOO.3o.gz
+man/mann/Complex.3o.gz
+man/mann/Digest.3o.gz
+man/mann/Filename.3o.gz
+man/mann/Format.3o.gz
+man/mann/Gc.3o.gz
+man/mann/Genlex.3o.gz
+man/mann/Hashtbl.3o.gz
+man/mann/Hashtbl.HashedType.3o.gz
+man/mann/Hashtbl.Make.3o.gz
+man/mann/Hashtbl.MakeSeeded.3o.gz
+man/mann/Hashtbl.S.3o.gz
+man/mann/Hashtbl.SeededHashedType.3o.gz
+man/mann/Hashtbl.SeededS.3o.gz
+man/mann/Int32.3o.gz
+man/mann/Int64.3o.gz
+man/mann/Lexing.3o.gz
+man/mann/List.3o.gz
+man/mann/ListLabels.3o.gz
+man/mann/Map.3o.gz
+man/mann/Map.Make.3o.gz
+man/mann/Map.OrderedType.3o.gz
+man/mann/Map.S.3o.gz
+man/mann/Marshal.3o.gz
+man/mann/MoreLabels.3o.gz
+man/mann/MoreLabels.Hashtbl.3o.gz
+man/mann/MoreLabels.Hashtbl.HashedType.3o.gz
+man/mann/MoreLabels.Hashtbl.Make.3o.gz
+man/mann/MoreLabels.Hashtbl.MakeSeeded.3o.gz
+man/mann/MoreLabels.Hashtbl.S.3o.gz
+man/mann/MoreLabels.Hashtbl.SeededHashedType.3o.gz
+man/mann/MoreLabels.Hashtbl.SeededS.3o.gz
+man/mann/MoreLabels.Map.3o.gz
+man/mann/MoreLabels.Map.Make.3o.gz
+man/mann/MoreLabels.Map.OrderedType.3o.gz
+man/mann/MoreLabels.Map.S.3o.gz
+man/mann/MoreLabels.Set.3o.gz
+man/mann/MoreLabels.Set.Make.3o.gz
+man/mann/MoreLabels.Set.OrderedType.3o.gz
+man/mann/MoreLabels.Set.S.3o.gz
+man/mann/Nativeint.3o.gz
+man/mann/Num.3o.gz
+man/mann/Obj.3o.gz
+man/mann/Oo.3o.gz
+man/mann/Parsing.3o.gz
+man/mann/Pervasives.3o.gz
+man/mann/Pervasives.LargeFile.3o.gz
+man/mann/Printexc.3o.gz
+man/mann/Printf.3o.gz
+man/mann/Queue.3o.gz
+man/mann/Random.3o.gz
+man/mann/Random.State.3o.gz
+man/mann/Scanf.3o.gz
+man/mann/Scanf.Scanning.3o.gz
+man/mann/Set.Make.3o.gz
+man/mann/Set.OrderedType.3o.gz
+man/mann/Set.S.3o.gz
+man/mann/Sort.3o.gz
+man/mann/Stack.3o.gz
+man/mann/StdLabels.3o.gz
+man/mann/StdLabels.Array.3o.gz
+man/mann/StdLabels.List.3o.gz
+man/mann/StdLabels.String.3o.gz
+man/mann/Str.3o.gz
+man/mann/Stream.3o.gz
+man/mann/StringLabels.3o.gz
+man/mann/Sys.3o.gz
+man/mann/Unix.3o.gz
+man/mann/Unix.LargeFile.3o.gz
+man/mann/Weak.3o.gz
+man/mann/Weak.Make.3o.gz
+man/mann/Weak.S.3o.gz
+@dirrmtry lib/ocaml/vmthreads
+@dirrmtry lib/ocaml/threads
 @dirrmtry lib/ocaml/stublibs
-@dirrm lib/ocaml/ocamldoc/custom
-@dirrm lib/ocaml/ocamldoc
-@dirrm lib/ocaml/ocamlbuild
+@dirrmtry lib/ocaml/ocamldoc
+@dirrmtry lib/ocaml/ocamlbuild
 %%TK%%@dirrmtry lib/ocaml/labltk
-@dirrm lib/ocaml/compiler-libs
-@dirrm lib/ocaml/camlp4/Camlp4Top
-@dirrm lib/ocaml/camlp4/Camlp4Printers
-@dirrm lib/ocaml/camlp4/Camlp4Parsers
-@dirrm lib/ocaml/camlp4/Camlp4Filters
-@dirrm lib/ocaml/camlp4
-@dirrm lib/ocaml/caml
-@dirrm lib/ocaml
+@dirrmtry lib/ocaml/compiler-libs
+@dirrmtry lib/ocaml/camlp4/Camlp4Top
+@dirrmtry lib/ocaml/camlp4/Camlp4Printers
+@dirrmtry lib/ocaml/camlp4/Camlp4Parsers
+@dirrmtry lib/ocaml/camlp4/Camlp4Filters
+@dirrmtry lib/ocaml/camlp4
+@dirrmtry lib/ocaml/caml
+@dirrmtry lib/ocaml
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 18 John Marino freebsd_committer 2014-04-26 18:31:35 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 19 dfilter service freebsd_committer 2014-04-26 22:39:11 UTC
Author: marino
Date: Sat Apr 26 21:39:06 2014
New Revision: 352383
URL: http://svnweb.freebsd.org/changeset/ports/352383
QAT: https://qat.redports.org/buildarchive/r352383/

Log:
  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

Modified:
  head/lang/ocaml/Makefile
  head/lang/ocaml/pkg-plist

Modified: head/lang/ocaml/Makefile
==============================================================================
--- head/lang/ocaml/Makefile	Sat Apr 26 21:27:44 2014	(r352382)
+++ head/lang/ocaml/Makefile	Sat Apr 26 21:39:06 2014	(r352383)
@@ -3,6 +3,7 @@
 
 PORTNAME=	ocaml
 PORTVERSION=	4.01.0
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ \
 		${MASTER_SITE_GENTOO}
@@ -178,11 +179,11 @@ check test: install
 	${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report
 
 post-install:
-#	@${TOUCH} ${STAGEDIR}${PREFIX}/lib/ocaml/ocamldoc/custom/.keep
+	${RMDIR} ${STAGEDIR}${PREFIX}/lib/ocaml/ocamldoc/custom
 	@${CHMOD} 755 ${STAGEDIR}${PREFIX}/lib/ocaml/expunge
 .if ${PORT_OPTIONS:MTK}
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	@(cd ${WRKSRC}/otherlibs/labltk && \
+	(cd ${WRKSRC}/otherlibs/labltk && \
 		${COPYTREE_SHARE} examples_labltk ${STAGEDIR}${EXAMPLESDIR} \
 		"! -name .ignore" && \
 		${COPYTREE_SHARE} examples_camltk ${STAGEDIR}${EXAMPLESDIR} \
@@ -202,10 +203,10 @@ post-install:
 .if ${PORT_OPTIONS:MOPT_DEF}
 . for module in ${MODOPT}
 #	First, we save bytecode version
-	@${MV} ${STAGEDIR}${PREFIX}/bin/${module} ${STAGEDIR}${PREFIX}/bin/${module}.byte
+	${MV} ${STAGEDIR}${PREFIX}/bin/${module} ${STAGEDIR}${PREFIX}/bin/${module}.byte
 
 #	Next make .opt version be the default one (via link)
-	@${LN} ${STAGEDIR}${PREFIX}/bin/${module}.opt ${STAGEDIR}${PREFIX}/bin/${module}
+	${LN} ${STAGEDIR}${PREFIX}/bin/${module}.opt ${STAGEDIR}${PREFIX}/bin/${module}
 	@${ECHO_CMD} "bin/${module}.byte" >> ${TMPPLIST}
 	@${ECHO_CMD} "@exec ${LN} %D/${module}.opt %D/${module}" >> ${TMPPLIST}
 . endfor

Modified: head/lang/ocaml/pkg-plist
==============================================================================
--- head/lang/ocaml/pkg-plist	Sat Apr 26 21:27:44 2014	(r352382)
+++ head/lang/ocaml/pkg-plist	Sat Apr 26 21:39:06 2014	(r352383)
@@ -1090,7 +1090,22 @@ lib/ocaml/weak.cmx
 lib/ocaml/weak.ml
 lib/ocaml/weak.mli
 %%PROF%%lib/ocaml/weak.p.cmx
+man/man1/ocaml.1.gz
 man/man1/ocamlbuild.1.gz
+man/man1/ocamlc.1.gz
+man/man1/ocamlc.opt.1.gz
+man/man1/ocamlcp.1.gz
+man/man1/ocamldebug.1.gz
+man/man1/ocamldep.1.gz
+man/man1/ocamldoc.1.gz
+man/man1/ocamllex.1.gz
+man/man1/ocamlmktop.1.gz
+man/man1/ocamlopt.1.gz
+man/man1/ocamlopt.opt.1.gz
+man/man1/ocamloptp.1.gz
+man/man1/ocamlprof.1.gz
+man/man1/ocamlrun.1.gz
+man/man1/ocamlyacc.1.gz
 man/mann/Arg.3o.gz
 man/mann/Array.3o.gz
 man/mann/ArrayLabels.3o.gz
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"