Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2016 15:35:51 +0000 (UTC)
From:      David Naylor <dbn@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r423977 - head/lang/fsharp
Message-ID:  <201610141535.u9EFZpn0054166@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dbn
Date: Fri Oct 14 15:35:51 2016
New Revision: 423977
URL: https://svnweb.freebsd.org/changeset/ports/423977

Log:
  lang/fsharp: fix build, add test support.
  
   - Use license file from source
   - Depend on PCL reference assemblies
   - Download and extract nuget packages
   - Mark the port as MAKE_JOBS_UNSAFE (it always run -j1)
   - Mark the port as architecture agnostic (intepreted by mono)
   - Add test support
  
  PR:		213405

Modified:
  head/lang/fsharp/Makefile
  head/lang/fsharp/distinfo

Modified: head/lang/fsharp/Makefile
==============================================================================
--- head/lang/fsharp/Makefile	Fri Oct 14 15:30:38 2016	(r423976)
+++ head/lang/fsharp/Makefile	Fri Oct 14 15:35:51 2016	(r423977)
@@ -4,20 +4,69 @@
 PORTNAME=	fsharp
 PORTVERSION=	4.0.1.10
 CATEGORIES=	lang
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	mono@FreeBSD.org
 COMMENT=	Functional and object-oriented language for the .NET platform
 
 LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	mono>=3.0:lang/mono
+BUILD_DEPENDS=	mono>=3.0:lang/mono \
+		referenceassemblies-pcl>=4.6-1:lang/referenceassemblies-pcl
 RUN_DEPENDS=	mono>=3.0:lang/mono
 
-NO_PACKAGE=	The build process downloads external dependencies we cannot provide through ports
+NUGET_DEPENDS=	FSharp.Compiler.Tools-4.0.1.3 \
+		FSharp.Data-2.2.5 \
+		FSharp.SRGen.Build.Tasks-3.0.0 \
+		fssrgen-3.0.0 \
+		Microsoft.DiaSymReader-1.0.8 \
+		Microsoft.DiaSymReader.PortablePdb-1.1.0 \
+		System.Collections.Immutable-1.2.0 \
+		System.Reflection.Metadata-1.4.1-beta-24227-04
 
 USE_GITHUB=	yes
 
 USES=		autoreconf gmake mono pkgconfig
 GNU_CONFIGURE=	yes
+MAKE_JOBS_UNSAFE=	Build not parallelizable
+NO_ARCH=	yes
+
+NUGET_PACKAGEDIR=	${WRKSRC}/packages
+
+.for depend in ${NUGET_DEPENDS}
+id=		${depend:C/-.*$//}
+version=	${depend:S/${id}-//}
+group=		nuget_${id:S/.//g}
+nupkg=		${id:tl}.${version}.nupkg
+DISTFILES_${group}:=	${nupkg}:${group}
+MASTER_SITES_${group}:=	https://www.nuget.org/api/v2/package/${id}/${version}?dummy=/:${group}
+NUGET_NUPKGS_${group}:=	${nupkg}:${id}-${version}
+
+DISTFILES+=	${DISTFILES_nuget_${depend:C/-.*$//:S/.//g}}
+MASTER_SITES+=	${MASTER_SITES_nuget_${depend:C/-.*$//:S/.//g}}
+NUGET_NUPKGS+=	${NUGET_NUPKGS_nuget_${depend:C/-.*$//:S/.//g}}
+.endfor
+
+post-extract:
+.for nupkg in ${NUGET_NUPKGS}
+	@${MKDIR} ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/-/./}
+	@tar -xf ${DISTDIR}/${nupkg:C/:.*$//} -C ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/-/./} \
+		-s/%2B/\+/g \
+		--exclude '\[Content_Types\].xml' \
+		--exclude package/ \
+		--exclude _rels/
+.endfor
+
+do-test:
+	${MKDIR} ${WRKDIR}/bin
+	echo "#!/bin/sh" > ${WRKDIR}/bin/fsharpc
+	echo 'exec ${LOCALBASE}/bin/mono ${WRKSRC}/lib/release/fsc.exe "$$@"' >> ${WRKDIR}/bin/fsharpc
+	${CHMOD} 0755 ${WRKDIR}/bin/fsharpc
+	(cd ${WRKSRC}/tests/fsharp/core; \
+		${ENV} \
+			PATH=${WRKDIR}/bin:${PATH} \
+			MONO_PATH=${WRKSRC}/lib/release \
+			./run-all.sh)
 
 .include <bsd.port.mk>

Modified: head/lang/fsharp/distinfo
==============================================================================
--- head/lang/fsharp/distinfo	Fri Oct 14 15:30:38 2016	(r423976)
+++ head/lang/fsharp/distinfo	Fri Oct 14 15:35:51 2016	(r423977)
@@ -1,3 +1,19 @@
-TIMESTAMP = 1470483636
+TIMESTAMP = 1476128531
+SHA256 (fsharp.compiler.tools.4.0.1.3.nupkg) = 98a8792f59f4c9aa7ea02ab96644b71cf5dfe06d51fde0db1b0fe8373bee1ee4
+SIZE (fsharp.compiler.tools.4.0.1.3.nupkg) = 6323760
+SHA256 (fsharp.data.2.2.5.nupkg) = 449cba49c2567b0b1f27d39c0aaaab73607893072809a81563598b06e63234b1
+SIZE (fsharp.data.2.2.5.nupkg) = 2542684
+SHA256 (fsharp.srgen.build.tasks.3.0.0.nupkg) = dc368423704dbfd02659452535e1a270e75c75fb066a4b47b7e0c2442ea77c00
+SIZE (fsharp.srgen.build.tasks.3.0.0.nupkg) = 457178
+SHA256 (fssrgen.3.0.0.nupkg) = 81c6ef8556fada34f184195903200977c3174329be5caa472bcf0c1ef2d6a7e4
+SIZE (fssrgen.3.0.0.nupkg) = 465727
+SHA256 (microsoft.diasymreader.1.0.8.nupkg) = 9cb62775ad29c64f904c11d5d133356e9bebc3bd572de6be45a75d8d283f661c
+SIZE (microsoft.diasymreader.1.0.8.nupkg) = 54176
+SHA256 (microsoft.diasymreader.portablepdb.1.1.0.nupkg) = a080613ea0dc09436e843de1189601df55fc7339b460d8697a4bdbbe219e0b6c
+SIZE (microsoft.diasymreader.portablepdb.1.1.0.nupkg) = 140778
+SHA256 (system.collections.immutable.1.2.0.nupkg) = 7c9eec8208414eebce34f3af5c946f2911e74fd906738f058114d341f0df91fb
+SIZE (system.collections.immutable.1.2.0.nupkg) = 300738
+SHA256 (system.reflection.metadata.1.4.1-beta-24227-04.nupkg) = 0f077b4184d04f7db02e41169b9471e7c630c7dc873398f12eaf70b7a00a7993
+SIZE (system.reflection.metadata.1.4.1-beta-24227-04.nupkg) = 435719
 SHA256 (fsharp-fsharp-4.0.1.10_GH0.tar.gz) = 04659c8b89fc414fd6b5a8bf7842e187a3484abd4d858710339ee122219aa91b
 SIZE (fsharp-fsharp-4.0.1.10_GH0.tar.gz) = 37296094



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610141535.u9EFZpn0054166>