Bug 176061

Summary: [maintainer update] devel/ocaml-lwt to 2.4.3
Product: Ports & Packages Reporter: jaapb
Component: Individual Port(s)Assignee: John Marino <marino>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description jaapb 2013-02-12 10:30:00 UTC
This is an update of devel/ocaml-lwt to its latest version, 2.4.3. As can be expected with such a big version change, the list of changes is huge (see ${WRKSRC}/lwt-2.4.3/CHANGES for more details).

It might be necessary to incorporate ports/176060 first, otherwise the dependency textproc/ocaml-text might not build (this was the case on my system).

Fix: result of svn diff included.

Patch attached with submission follows:
How-To-Repeat: n/a
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2013-02-14 08:16:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2013-03-28 06:19:15 UTC
Responsible Changed
From-To: miwi->bf

pass over to bf, he is dealing with the big ocaml update.
Comment 3 John Marino freebsd_committer freebsd_triage 2014-03-26 18:12:44 UTC
Responsible Changed
From-To: bf->marino

I will take this too
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-03-26 22:51:37 UTC
Author: marino
Date: Wed Mar 26 22:51:33 2014
New Revision: 349303
URL: http://svnweb.freebsd.org/changeset/ports/349303
QAT: https://qat.redports.org/buildarchive/r349303/

Log:
  devel/ocaml-lwt: Upgrade from 1.1.0 -> 2.4.3 and support stage
  
  This is a major update.  The PR was followed, but it came pre-stage
  era.  The staging came from pkgsrc where the maintainer maintains the
  same DESTDIR-enabled package.
  
  PR:		ports/176061
  Submitted by:	maintainer (Jaap Boender)
  Stage support:	Taken from pkgsrc

Modified:
  head/devel/ocaml-lwt/Makefile
  head/devel/ocaml-lwt/distinfo

Modified: head/devel/ocaml-lwt/Makefile
==============================================================================
--- head/devel/ocaml-lwt/Makefile	Wed Mar 26 22:36:46 2014	(r349302)
+++ head/devel/ocaml-lwt/Makefile	Wed Mar 26 22:51:33 2014	(r349303)
@@ -2,39 +2,77 @@
 # $FreeBSD$
 
 PORTNAME=	lwt
-PORTVERSION=	1.1.0
-PORTREVISION=	1
+PORTVERSION=	2.4.3
 CATEGORIES=	devel
-MASTER_SITES=	http://www.ocsigen.org/download/
+MASTER_SITES=	http://ocsigen.org/download/
 PKGNAMEPREFIX=	ocaml-
 
 MAINTAINER=	jaapb@kerguelen.org
 COMMENT=	Cooperative threading library for OCaml
 
+LICENSE=	LGPL21
+
+BUILD_DEPENDS=		${SA_DIR}/react/react.a:${PORTSDIR}/devel/ocaml-react \
+			${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
+RUN_DEPENDS=		${SA_DIR}/react/react.a:${PORTSDIR}/devel/ocaml-react \
+			${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
+
 MAKE_JOBS_UNSAFE=	yes
 
+USES=			gmake
 USE_OCAML=		yes
-OCAMLC_DEPEND=		ocaml>=3.10:${OCAMLC_PORT}
+OCAMLC_DEPEND=		ocaml>=3.11:${OCAMLC_PORT}
 USE_OCAML_FINDLIB=	yes
 USE_OCAMLFIND_PLIST=	yes
-USE_OCAML_LDCONFIG=	yes
+HAS_CONFIGURE=		yes
+CONFIGURE_ARGS=		--destdir "${STAGEDIR}" \
+			--prefix "${PREFIX}" \
+			--enable-ssl \
+			--enable-react \
+			--disable-libev \
+			--disable-glib
 
-USE_GMAKE=		yes
 DOCSDIR=		${PREFIX}/share/doc/ocaml/${PORTNAME}
-PORTDOCS=		*
-
-BUILD_DEPENDS+=		${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
-RUN_DEPENDS+=		${SA_DIR}/ssl/ssl.a:${PORTSDIR}/security/ocaml-ssl
-
 SA_DIR=         	${PREFIX}/${OCAML_SITELIBDIR}
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=		TOPLEVEL
+OPTIONS_DEFAULT=	TOPLEVEL
+TOPLEVEL_DESC=		Include enhanced OCaml toplevel
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MTOPLEVEL}
+CONFIGURE_ARGS+=	--enable-toplevel --enable-text
+BUILD_DEPENDS+=		${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
+RUN_DEPENDS+=		${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
+PLIST_FILES=		bin/lwt-toplevel
+.else
+CONFIGURE_ARGS+=	--disable-toplevel --disable-text
+.endif
 
-post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_MAN} ${WRKSRC}/_build/lwt.docdir/* ${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+CONFIGURE_ARGS+=	--enable-docs --docdir ${STAGEDIR}${DOCSDIR}
+# For some reason, ocaml-text is needed when building documentation
+BUILD_DEPENDS+=		${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
+RUN_DEPENDS+=		${SA_DIR}/text/text.a:${PORTSDIR}/textproc/ocaml-text
+.else
+CONFIGURE_ARGS+=	--disable-docs
 .endif
 
-.include <bsd.port.post.mk>
+post-patch:
+	@${REINPLACE_CMD} -e 's,"install" :: findlib_name,"install" :: "-destdir ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib" :: "-ldconf /dev/null" :: findlib_name,' \
+		${WRKSRC}/setup.ml
+
+do-configure:
+	(cd ${WRKSRC}; ocaml setup.ml -configure ${CONFIGURE_ARGS})
+	@${REINPLACE_CMD} -e 's%"-lev"%"-lev -L${PREFIX}/lib/ev -Wl,-R${PREFIX}/lib/ev"%' \
+		${WRKSRC}/setup.data
+
+do-build:
+	(cd ${WRKSRC}; ocaml setup.ml -build)
+
+do-install:
+	${MKDIR} ${STAGEDIR}${SA_DIR}
+	(cd ${WRKSRC}; ocaml setup.ml -install)
+
+.include <bsd.port.mk>

Modified: head/devel/ocaml-lwt/distinfo
==============================================================================
--- head/devel/ocaml-lwt/distinfo	Wed Mar 26 22:36:46 2014	(r349302)
+++ head/devel/ocaml-lwt/distinfo	Wed Mar 26 22:51:33 2014	(r349303)
@@ -1,2 +1,2 @@
-SHA256 (lwt-1.1.0.tar.gz) = 6c9087e1185de933091fcd147f1c125157b01921d32ca0e2304319c2d72ee9d6
-SIZE (lwt-1.1.0.tar.gz) = 32844
+SHA256 (lwt-2.4.3.tar.gz) = efee23937750290d6dee96eed6c0bbdb19817d5be6eefcba61ac5031fac10107
+SIZE (lwt-2.4.3.tar.gz) = 504000
_______________________________________________
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 5 John Marino freebsd_committer freebsd_triage 2014-03-26 23:07:01 UTC
State Changed
From-To: open->closed

Committed. Thanks!