From nobody@FreeBSD.org  Tue Jun  1 12:17:20 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CF2011065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jun 2010 12:17:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id B3F6D8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Jun 2010 12:17:20 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o51CHK1r058038
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 Jun 2010 12:17:20 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o51CHKRo058037;
	Tue, 1 Jun 2010 12:17:20 GMT
	(envelope-from nobody)
Message-Id: <201006011217.o51CHKRo058037@www.freebsd.org>
Date: Tue, 1 Jun 2010 12:17:20 GMT
From: Vitaly Magerya <vmagerya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] lang/mlton: make it build again
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: jesper.louis.andersen@gmail.com

>Number:         147278
>Category:       ports
>Synopsis:       [patch] lang/mlton: make it build again
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pgj
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 01 12:20:02 UTC 2010
>Closed-Date:    Tue Jun 22 22:13:40 UTC 2010
>Last-Modified:  Tue Jun 22 22:13:40 UTC 2010
>Originator:     Vitaly Magerya
>Release:        FreeBSD 8.0-RELEASE i386
>Organization:
>Environment:
>Description:
For a long time now lang/mlton failed to build, and is already marked
as BROKEN, DEPRECATED and EXPIRED.

This happens because the precompiled mlton distribution used for
bootstrapping (mlton-20070826-1.i386-freebsd.tbz) is linked against
libgmp.so.7, while current math/gmp installs libgmp.so.10.

There is also a problem with NOPORTDOCS: when it's defined, the port
does not try to install docs, but still tries to build them.

Finally, the last master site has relocated and needs updating.
>How-To-Repeat:

>Fix:
The attached patch:
1. Updates the last master site.
2. Sets LD_LIBMAP to redirect libgmp.so.7 to libgmp.so.10.
3. Changes ALL_TARGET when running with NOPORTDOCS to prevent docs
   building.
4. Replaces the non-existant devel/mingw32-libgmp4 dependency with
   math/mingw32-libgmp4.

I only tested with NOPORTDOCS, as the build already takes a lot of time.
I hope the committer has more patience than I have.

I did not test SMLNJ and MINGW32 options.

Patch attached with submission follows:

diff -ruN mlton.orig/Makefile mlton/Makefile
--- mlton.orig/Makefile	2010-06-01 14:31:55.000000000 +0000
+++ mlton/Makefile	2010-06-01 15:16:45.000000000 +0000
@@ -16,7 +16,7 @@
 CATEGORIES=	lang
 MASTER_SITES=	http://mlton.org/pages/Download/attachments/ \
 		http://mlton.org/pages/Experimental/attachments/ \
-		http://www.cse.unsw.edu.au/~tbourke/distfiles/
+		http://www.tbrk.org/distfiles/
 DISTFILES=	${BOOT_DIST} ${SRC_DIST}
 EXTRACT_ONLY=	${SRC_DIST}
 
@@ -28,10 +28,6 @@
 RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
 BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash
 
-BROKEN=		does not build
-DEPRECATED=	has been broken for 5 months
-EXPIRATION_DATE=2010-01-08
-
 OPTIONS=	SMLNJ	"Bootstrap with SML/NJ (can take >15 hours)"	off \
 		MINGW32	"Add the mingw32 target (requires wine)"	off
 
@@ -41,6 +37,9 @@
 BUILD_DEPENDS+=	gsed:${PORTSDIR}/textproc/gsed \
 		htmldoc:${PORTSDIR}/textproc/htmldoc \
 		latex:${PORTSDIR}/print/teTeX
+.else
+INSTALL_TARGET=	install-no-docs
+ALL_TARGET=	all-no-docs
 .endif
 
 SRC_DIST=	${DISTNAME}-1.src.tgz
@@ -49,17 +48,22 @@
 BUILD_DEPENDS+=	smlnj-devel>=110.65:${PORTSDIR}/lang/sml-nj-devel
 BOOT_DIST=
 MAKE_ENV+=	SMLNJ_DEVEL=yes
+.if defined(NOPORTDOCS)
+ALL_TARGET=	nj-mlton all-no-docs
+.else
 ALL_TARGET=	bootstrap-nj
+.endif
 .else
 BOOT_DIST=	${PORTNAME}-${BOOT_VER}-1.${MACHINE_ARCH}-freebsd${OSRELMAJ}.${BOOT_SUF}
+MAKE_ENV+=	LD_LIBMAP=libgmp.so.7=libgmp.so.10
 .endif
 
 .if defined(WITH_MINGW32)
 BUILD_DEPENDS+=	wine:${PORTSDIR}/emulators/wine \
 		mingw32-gcc:${PORTSDIR}/devel/mingw32-gcc \
-		${LOCALBASE}/mingw32/lib/libgmp.a:${PORTSDIR}/devel/mingw32-libgmp4
+		${LOCALBASE}/mingw32/lib/libgmp.a:${PORTSDIR}/math/mingw32-libgmp4
 RUN_DEPENDS+=	mingw32-gcc:${PORTSDIR}/devel/mingw32-gcc \
-		${LOCALBASE}/mingw32/lib/libgmp.a:${PORTSDIR}/devel/mingw32-libgmp4
+		${LOCALBASE}/mingw32/lib/libgmp.a:${PORTSDIR}/math/mingw32-libgmp4
 
 PLIST_SUB+=	MINGW32CROSS=""
 .else
@@ -78,10 +82,6 @@
 		PATH=${WRKSRC}/build/bin:${BOOT_WRKSRC}/bin:${PATH} \
 		PREFIX=${PREFIX}
 
-.if defined(NOPORTDOCS)
-INSTALL_TARGET=	install-no-docs
-.endif
-
 .if ${ARCH} == "i386"
 MLTON_ARCH=	"x86"
 .endif


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Jun 1 12:22:14 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147278 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jesper.louis.andersen@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/147278: [patch] lang/mlton: make it build again
Date: Tue, 1 Jun 2010 12:22:13 UT

 Maintainer of lang/mlton,
 
 Please note that PR ports/147278 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/147278
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/147278: [patch] lang/mlton: make it build again
Date: Mon, 7 Jun 2010 23:07:50 +0200

 On Tue, Jun 1, 2010 at 2:22 PM, Edwin Groothuis <edwin@freebsd.org> wrote:
 > Maintainer of lang/mlton,
 >
 > Please note that PR ports/147278 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:
 > =C2=A0 =C2=A0http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/147278
 
 Long time since I've last had a FreeBSD machine, sorry. With my now
 severely limited knowledge it looks ok though.
 
 --=20
 J.
Responsible-Changed-From-To: freebsd-ports-bugs->pgj 
Responsible-Changed-By: pgj 
Responsible-Changed-When: Mon Jun 21 08:45:28 UTC 2010 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147278 
State-Changed-From-To: feedback->open 
State-Changed-By: pgj 
State-Changed-When: Mon Jun 21 08:46:24 UTC 2010 
State-Changed-Why:  
The maintainer has already approved it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147278 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/147278: commit references a PR
Date: Tue, 22 Jun 2010 22:09:06 +0000 (UTC)

 pgj         2010-06-22 22:08:57 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/mlton           Makefile 
   Added files:
     lang/mlton/files     
                          patch-..-mlton-bootstrap-lib-mlton-include-cenv.h 
   Log:
   - Unbreak build
   - Update master sites
   - Prevent building documentation when NOPORTDOCS defined
   - Fix dependency on math/mingw32-libgmp4
   - Adapt boostrap to the recent GMP update
   - Respect LOCALBASE (added by pgj)
   
   PR:             ports/147278
   Submitted by:   Vitaly Magerya <vmagerya@gmail.com>
   Approved by:    maintainer
   Feature safe:   yes
   
   Revision  Changes    Path
   1.27      +30 -18    ports/lang/mlton/Makefile
   1.1       +11 -0     ports/lang/mlton/files/patch-..-mlton-bootstrap-lib-mlton-include-cenv.h (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: pgj 
State-Changed-When: Tue Jun 22 22:12:58 UTC 2010 
State-Changed-Why:  
The patch has been committed with some modifications.  Thank you for 
your submission! :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147278 
>Unformatted:
