1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-16 03:24:07 +00:00
freebsd-ports/Mk/Uses/mono.mk
David Naylor d442f875f5 Update mono and related ports
USES=mono: minor fixes
 - save a copy of the nuget package in the packages directory
 - force linking of directories, allowing nuget-extract to be rerun
   without `make clean`
 - fix makenuget: nuget requires an equals to identify the version, not a dash

devel/monodevelop: update to 6.2.1.3
 - update nuget packages:
   - link older System.Collection.Immutable 1.1.37 to newer 1.3.1 (used
     by C# and F# respectively)
 - update external github repositories
 - allow post-extract target to be run multiple times
 - change MonoDevelop.Packaging to use a newer version of
   NuGet.Build.Packaging (the older version is no longer fetchable)
 - remove patch integrated upstream
 - moved `nuget restore` patching from post-patch into a patch file (the
   former broke silently)
 - ChangeLog:
   - https://developer.xamarin.com/releases/studio/xamarin.studio_6.2/xamarin.studio_6.2/

irc/smartirc4net: update to 1.1
 - add LICENSE

lang/fsharp: update to 4.1.18
 - add test dependency on libgdiplus
 - update nuget packages
 - update test paths for fsharp assemblies
 - update patches to prevent `nuget restore` from running
 - ChangeLog:
   - Set executable bit correctly on output
   - Integrate visualfsharp
   - Fix regression on binding redirects for System.Collections.Immutable
   - Fix regression in Microsoft.Build.FSharp.targets
   - Fix binding redirects for System.Collections.Immutable
   - Fix version of library going in %PREFIX/lib/mono/fsharp
   - Align fsc task and target file
   - Use install layout that includes mono/fsharp
   - Fix F# Intereactive on Mono 4.9+
   - Update compiler tools
   - Updates to FSharp.Core nuget package for F# 4.1
   - Fix #656: error FS0193: internal error: No access to the given key

lang/mono: various fixes
 - fix linking with lld [1]
 - double maximum handle size [2]
 - add option to run acceptance tests
 - allow for optional bootstrapping of mono via either installed mcs (if
   available) or via downloaded "monolite" (default)
 - add python and py-pillow as dependencies for bin/mono-heapviz
 - add armv6 as a supported architecture (untested)
 - switch to github for source code:
   - official tarball does not include tests
 - patches:
   - recognise FreeBSD for AOT suffix
   - change mono-heapviz to use pillow instead of PIL

multimedia/banshee: tell portscout to ignore this port
 - Portscout was not skipping the 2.9.1 version, and upstream appears to be
   quiet for the last few years.

x11-toolkits/gtk-sharp20: update to 2.12.43
 - ChangeLog:
   - fix compilation on mono-4.8.0 (incorrect use of sizeof())
   - correctly set owned=true on custom constructors

PR:		218885 [1]
PR:		200937 [2]
2017-05-13 07:48:27 +00:00

101 lines
3.0 KiB
Makefile

# $FreeBSD$
#
# mono (c#) support
#
# Feature: mono
# Usage: USES=mono:ARGS
# Valid ARGS: nuget
#
# MAINTAINER= mono@FreeBSD.org
#
# Arguments:
#
# nuget Specifies that the port uses nuget packages. The
# variables NUGET_DEPENDS needs to be set with the names,
# versions and optionally the port origin of the nuget
# packages in the format:
# ${name}=${version}(:${PKGORIGIN})
#
# EXTRACT_ONLY is conditionally overridden to exclude all
# files with a '.nupkg' extension.
#
# Targets:
#
# makenuget This target will output the NUGET_DEPENDS based on the
# port's packages.config file.
#
# Variables overrideable by the port:
#
# NUGET_PACKAGEDIR The directory in which the port expects the
# nuget packages to be available
# default: ${WRKSRC}/packages
.if !defined(_INCLUDE_USES_MONO_MK)
_INCLUDE_USES_MONO_MK= yes
.if !empty(mono_ARGS:Nnuget)
IGNORE= USES=mono only supports an optional nuget argument
.endif
# Set the location of the .wapi directory so we write to a location we
# can always assume to be writable.
MONO_SHARED_DIR= ${WRKDIR}
CONFIGURE_ENV+= MONO_SHARED_DIR="${MONO_SHARED_DIR}"
MAKE_ENV+= MONO_SHARED_DIR="${MONO_SHARED_DIR}" TZ=UTC
BUILD_DEPENDS+= mono:lang/mono
RUN_DEPENDS+= mono:lang/mono
# Set the location that webaps served by XSP should use.
XSP_DOCROOT= ${PREFIX}/www/xsp
# gac utilities
GACUTIL=${LOCALBASE}/bin/gacutil /root ${PREFIX}/lib/ /gacdir ${PREFIX}/lib
GACUTIL_INSTALL=${GACUTIL} /i
GACUTIL_INSTALL_PACKAGE=${GACUTIL} /i /package 1.0 /package 2.0
.if ${mono_ARGS:Mnuget}
NUGET_PACKAGEDIR?= ${WRKSRC}/packages
. for depend in ${NUGET_DEPENDS}
id= ${depend:C/=.*$//}
version= ${depend:C/^.*=//}
group= nuget_${id:S/.//g: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}:${depend}
DISTFILES+= ${DISTFILES_nuget_${depend:C/=.*$//:S/.//g:S/-//g}}
MASTER_SITES+= ${MASTER_SITES_nuget_${depend:C/=.*$//:S/.//g:S/-//g}}
NUGET_NUPKGS+= ${NUGET_NUPKGS_nuget_${depend:C/=.*$//:S/.//g:S/-//g}}
. endfor
EXTRACT_ONLY?= ${_DISTFILES:N*.nupkg}
_USES_extract+= 600:nuget-extract
nuget-extract:
. for nupkg in ${NUGET_NUPKGS}
@${MKDIR} ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/=/./}
@${RM} -f ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C/=.*//}
@${LN} -s ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/=/./} ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C/=.*//}
@tar -xf ${DISTDIR}/${nupkg:C/:.*$//} -C ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/=/./} \
-s/%2B/\+/g -s/%2B/\+/g -s/%2B/\+/g \
--exclude '\[Content_Types\].xml' \
--exclude package/ \
--exclude _rels/
@${CP} ${DISTDIR}/${nupkg:C/:.*$//} ${NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S/=/./}/${nupkg:C/^.*://:S/=/./}.nupkg
. endfor
.endif
makenuget: patch
@${FIND} ${WRKSRC} -name packages.config | \
${XARGS} ${SED} -nE 's|.*<package id="([^"]+)" version="([^"]+)"[^/]*/>.*|\1=\2|gp' | \
${SORT} -u | \
${SED} \
-e '1s|^|NUGET_DEPENDS= |' \
-e '2,$$s|^| |g' \
-e '$$!s|$$| \\|g'
.endif