diff --git a/lang/mono6.8/Makefile b/lang/mono6.8/Makefile index 4f7e2c046525..2ea82556a582 100644 --- a/lang/mono6.8/Makefile +++ b/lang/mono6.8/Makefile @@ -1,127 +1,127 @@ PORTNAME= mono PORTVERSION= 6.8.0.123 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= lang MASTER_SITES= https://download.mono-project.com/sources/mono/ PKGNAMESUFFIX= 6.8 DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= ports@FreeBSD.org COMMENT= Open source implementation of .NET Development Framework WWW= https://www.mono-project.com/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= riscv64 riscv64sf BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser \ bash:shells/bash \ cmake-core>0:devel/cmake-core LIB_DEPENDS= libinotify.so:devel/libinotify RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \ ca_root_nss>=0:security/ca_root_nss \ sqlite3>0:databases/sqlite3 \ zip>=0:archivers/zip CONFLICTS_INSTALL= certmgr coin-or-disco disco mono mono[0-9]* USES= autoreconf:2.69 bison compiler:c11 cpe gmake iconv libtool localbase \ pathfix perl5 python shebangfix tar:xz USE_PERL5= build GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share USE_LDCONFIG= yes SHEBANG_FILES= mono/mini/genmdesc.py \ mono/tests/gc-descriptors/gen-descriptor-tests.py \ mono/tests/test_lldb.py scripts/mono-find-provides.in \ scripts/mono-find-requires.in scripts/mono-heapviz \ scripts/mono-package-runtime BINARY_ALIAS= python=${PYTHON_CMD} CONFIGURE_ARGS_aarch64= --with-csc=mcs CONFIGURE_ARGS= ${CONFIGURE_ARGS_${ARCH}} --disable-dtrace # Do not remove - this is needed to work around automake's lack of hinting CONFIGURE_ENV+= ac_cv_header_sys_inotify_h=yes MAKE_ENV= MONO_SHARED_DIR="${WRKDIR}" \ INSTALL_STRIP_FLAG="${STRIP}" TEST_ARGS= -k TEST_TARGET= check PORTSCOUT= limit:^\d+\.\d+\.[1-9]\d* # XXX MCL mat says: no. Options must not change themselves depending on what is installed. # XXX MCL just leave this out for now to try to get *something* done. # .if !exists(${LOCALBASE}/bin/mcs) # OPTIONS_SLAVE= MONOLITE # .endif # intentionally sorted alpha, then SPECTRE and MONODEV at the end # because they have performance and security implications OPTIONS_DEFINE= BIGARRAY MONOLITE NINJA NLS ODBC X11 SPECTRE MONODEV OPTIONS_DEFAULT= MONOLITE NLS X11 OPTIONS_SUB= yes BIGARRAY_DESC= Enable allocating arrays greater than Int32.MaxValue BIGARRAY_CONFIGURE_ENABLE= big-arrays MONOLITE_DESC= Use monolite to bootstrap mcs (otherwise use installed mcs) MONOLITE_DISTFILES= monolite-linux-${MONOLITE_VERSION}-latest.tar.gz:monolite MONOLITE_MASTER_SITES= http://download.mono-project.com/monolite/:monolite # DO NOT ALTER OR REMOVE. DANGER, CASE-SENSITIVE! # monolite 2020-01-13 @ 1798d23b MONOLITE_VERSION= 1798d23b-3dbc-4161-b3f4-6bb00134ee4e MONODEV_DESC= Build for Mono development (disables crash privacy) MONODEV_CONFIGURE_ON= --enable-icall-symbol-map --enable-icall-export --with-crash_privacy=no NINJA_DESC= Use ninja to build wherever possible NINJA_CONFIGURE_ON= --enable-ninja NINJA_USES= ninja:build NLS_DESC= NLS Localization Support NLS_CONFIGURE_OFF= --disable-nls NLS_USES= gettext ODBC_DESC= System.Data: support for unixODBC ODBC_BUILD_DEPENDS= unixODBC>0:databases/unixODBC ODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC SPECTRE_DESC= Enable internal Mono Spectre mitigations (SEE pkg-descr) SPECTRE_CONFIGURE_ON= --with-spectre-mitigation=yes X11_USES= display:test X11_CONFIGURE_WITH= x X11_RUN_DEPENDS= pango>0:x11-toolkits/pango \ libgdiplus>0:x11-toolkits/libgdiplus .include .if ${ARCH:Mpowerpc*} PLIST+= ${.CURDIR}/pkg-plist.powerpc .endif .include .if defined(QEMU_EMULATING) && "${QEMU_EMULATING}" == "1" BROKEN= fails to build under qemu: Roslyn requires more functional POSIX implementation .endif post-patch: # Needed to force regeneration due to tarball packaging ${RM} ${WRKSRC}/configure ${WRKSRC}/Makefile \ ${WRKSRC}/mono/Makefile \ ${WRKSRC}/mono/native/Makefile post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/mono # XXX Drop after devel/msbuild >= 16.0 per https://github.com/mono/msbuild/commit/48f3571f4036 ${RLN} ${STAGEDIR}${PREFIX}/lib/mono/msbuild/Current \ ${STAGEDIR}${PREFIX}/lib/mono/msbuild/15.0 ${ECHO_CMD} lib/mono/msbuild/15.0 >>${TMPPLIST} .include diff --git a/lang/mono6.8/files/patch-external_corefx_src_Native_Unix_System.Native_pal__networkstatistics.c b/lang/mono6.8/files/patch-external_corefx_src_Native_Unix_System.Native_pal__networkstatistics.c new file mode 100644 index 000000000000..f8a93eb99274 --- /dev/null +++ b/lang/mono6.8/files/patch-external_corefx_src_Native_Unix_System.Native_pal__networkstatistics.c @@ -0,0 +1,117 @@ +--- external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.c.orig 2020-05-11 17:58:42 UTC ++++ external/corefx/src/Native/Unix/System.Native/pal_networkstatistics.c +@@ -19,6 +19,7 @@ + + #include + #include ++#include + #include + #include + +@@ -27,6 +28,8 @@ + #include + #endif + #include ++#include ++#include + #include + #include + #include +@@ -295,8 +298,7 @@ int32_t SystemNative_GetActiveTcpConnectionInfos(struc + *infoCount = count; + + // sizeof(struct xtcpcb) == 524 +- struct tcpcb tcp_pcb; +- struct inpcb in_pcb; ++ struct xinpcb in_pcb; + struct xinpgen* xHeadPtr; + int32_t connectionIndex = -1; + xHeadPtr = (struct xinpgen*)buffer; +@@ -307,11 +309,10 @@ int32_t SystemNative_GetActiveTcpConnectionInfos(struc + connectionIndex++; + struct xtcpcb* head_xtcpb = (struct xtcpcb*)xHeadPtr; + +- tcp_pcb = head_xtcpb->xt_tp; + in_pcb = head_xtcpb->xt_inp; + + struct NativeTcpConnectionInformation* ntci = &infos[connectionIndex]; +- ntci->State = SystemNative_MapTcpState(tcp_pcb.t_state); ++ ntci->State = SystemNative_MapTcpState(head_xtcpb->t_state); + + uint8_t vflag = in_pcb.inp_vflag; // INP_IPV4 or INP_IPV6 + if ((vflag & INP_IPV4) == INP_IPV4) +@@ -393,7 +394,6 @@ int32_t SystemNative_GetActiveUdpListeners(struct IPEn + } + *infoCount = count; + +- struct inpcb in_pcb; + struct xinpgen* xHeadPtr; + int32_t connectionIndex = -1; + xHeadPtr = (struct xinpgen*)buffer; +@@ -403,22 +403,21 @@ int32_t SystemNative_GetActiveUdpListeners(struct IPEn + { + connectionIndex++; + struct xinpcb* head_xinpcb = (struct xinpcb*)xHeadPtr; +- in_pcb = head_xinpcb->xi_inp; + struct IPEndPointInfo* iepi = &infos[connectionIndex]; + +- uint8_t vflag = in_pcb.inp_vflag; // INP_IPV4 or INP_IPV6 ++ uint8_t vflag = head_xinpcb->inp_vflag; // INP_IPV4 or INP_IPV6 + if ((vflag & INP_IPV4) == INP_IPV4) + { +- memcpy_s(iepi->AddressBytes, sizeof_member(struct IPEndPointInfo, AddressBytes), &in_pcb.inp_laddr.s_addr, 4); ++ memcpy_s(iepi->AddressBytes, sizeof_member(struct IPEndPointInfo, AddressBytes), &head_xinpcb->inp_laddr.s_addr, 4); + iepi->NumAddressBytes = 4; + } + else + { +- memcpy_s(iepi->AddressBytes, sizeof_member(struct IPEndPointInfo, AddressBytes), &in_pcb.in6p_laddr.s6_addr, 16); ++ memcpy_s(iepi->AddressBytes, sizeof_member(struct IPEndPointInfo, AddressBytes), &head_xinpcb->in6p_laddr.s6_addr, 16); + iepi->NumAddressBytes = 16; + } + +- iepi->Port = in_pcb.inp_lport; ++ iepi->Port = head_xinpcb->inp_lport; + } + + free(buffer); +@@ -435,7 +434,7 @@ int32_t SystemNative_GetNativeIPInterfaceStatistics(ch + return -1; + } + +- int statisticsMib[] = {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST2, 0}; ++ int statisticsMib[] = {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0}; + + size_t len; + // Get estimated data length +@@ -464,12 +463,11 @@ int32_t SystemNative_GetNativeIPInterfaceStatistics(ch + headPtr += ((struct if_msghdr*)headPtr)->ifm_msglen) + { + struct if_msghdr* ifHdr = (struct if_msghdr*)headPtr; +- if (ifHdr->ifm_index == interfaceIndex && ifHdr->ifm_type == RTM_IFINFO2) ++ if (ifHdr->ifm_index == interfaceIndex && ifHdr->ifm_type == RTM_IFINFO) + { +- struct if_msghdr2* ifHdr2 = (struct if_msghdr2*)ifHdr; +- retStats->SendQueueLength = (uint64_t)ifHdr2->ifm_snd_maxlen; ++ retStats->SendQueueLength = 0; + +- struct if_data64 systemStats = ifHdr2->ifm_data; ++ struct if_data systemStats = ifHdr->ifm_data; + retStats->Mtu = systemStats.ifi_mtu; + retStats->Speed = systemStats.ifi_baudrate; // bits per second. + retStats->InPackets = systemStats.ifi_ipackets; +@@ -517,12 +515,12 @@ int32_t SystemNative_GetNumRoutes() + } + + uint8_t* headPtr = buffer; +- struct rt_msghdr2* rtmsg; ++ struct rt_msghdr* rtmsg; + int32_t count = 0; + + for (size_t i = 0; i < len; i += rtmsg->rtm_msglen) + { +- rtmsg = (struct rt_msghdr2*)&buffer[i]; ++ rtmsg = (struct rt_msghdr*)&buffer[i]; + if (rtmsg->rtm_flags & RTF_UP) + { + count++;