mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
lang/mono: convert to a meta port after 6c225bcc57
- Removing everything in favor of RUN_DEPENDS - Add QA check to prevent future consumers PR: 251795
This commit is contained in:
parent
1e14213dcf
commit
4553130a9c
27 changed files with 8 additions and 9512 deletions
|
@ -984,6 +984,9 @@ depends_blacklist()
|
|||
lang/julia)
|
||||
instead="a dependency on lang/julia\${JULIA_DEFAULT:S/.//}"
|
||||
;;
|
||||
lang/mono)
|
||||
instead="USES=mono"
|
||||
;;
|
||||
devel/llvm)
|
||||
instead="a dependency on devel/llvm\${LLVM_DEFAULT}"
|
||||
;;
|
||||
|
|
|
@ -1,107 +1,12 @@
|
|||
PORTNAME= mono
|
||||
PORTVERSION= 5.10.1.57
|
||||
PORTREVISION= 5
|
||||
PORTVERSION= ${MONO_DEFAULT}
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= https://download.mono-project.com/sources/mono/
|
||||
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Open source implementation of .NET Development Framework
|
||||
WWW= https://www.mono-project.com/
|
||||
MAINTAINER= mono@FreeBSD.org
|
||||
COMMENT= Meta-port for the default version of the Mono framework
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
RUN_DEPENDS= mono${MONO_DEFAULT}>0:lang/mono${MONO_DEFAULT}
|
||||
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc powerpc64 powerpc64le
|
||||
|
||||
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= ${PY_PILLOW} \
|
||||
ca_root_nss>=0:security/ca_root_nss
|
||||
|
||||
CONFLICTS_INSTALL= certmgr coin-or-disco disco mono[0-9]*
|
||||
|
||||
OPTIONS_DEFINE= MONOLITE NLS X11
|
||||
OPTIONS_DEFAULT= MONOLITE X11
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
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
|
||||
MONOLITE_VERSION= 1051000004
|
||||
|
||||
NLS_CONFIGURE_OFF= --disable-nls
|
||||
NLS_USES= gettext
|
||||
|
||||
X11_USES= display:test
|
||||
|
||||
USES= autoreconf bison compiler:c11 cpe elfctl gmake iconv libtool \
|
||||
pathfix perl5 python shebangfix tar:bzip2
|
||||
USE_PERL5= build
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LDCONFIG= yes
|
||||
SHEBANG_FILES= scripts/mono-heapviz mono/mini/genmdesc.py mono/tests/test_lldb.py
|
||||
BINARY_ALIAS= python=${PYTHON_CMD}
|
||||
ELF_FEATURES= +wxneeded:mono/mini/mono-sgen
|
||||
|
||||
CONFIGURE_ARGS= --disable-dtrace
|
||||
CONFIGURE_ENV= ac_cv_header_sys_inotify_h=no
|
||||
|
||||
MAKE_ENV= MONO_SHARED_DIR="${WRKDIR}" \
|
||||
INSTALL_STRIP_FLAG="${STRIP}" \
|
||||
TZ=UTC
|
||||
|
||||
TEST_ARGS= -k
|
||||
TEST_TARGET= check
|
||||
|
||||
PORTSCOUT= limit:^\d+\.\d+\.[1-9]\d*
|
||||
|
||||
LOCALBASE?= /usr/local
|
||||
.if !exists(${LOCALBASE}/bin/mcs)
|
||||
OPTIONS_SLAVE= MONOLITE
|
||||
.endif
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${ARCH} == aarch64
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-aarch64-race-workaround
|
||||
PLIST= ${.CURDIR}/pkg-plist.aarch64
|
||||
.endif
|
||||
|
||||
.if ${ARCH:Mpowerpc*}
|
||||
PLIST+= ${.CURDIR}/pkg-plist.powerpc
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-btls
|
||||
.endif
|
||||
|
||||
post-extract-MONOLITE-on:
|
||||
${MKDIR} ${WRKSRC}/mcs/class/lib/monolite-linux
|
||||
${MV} ${WRKDIR}/monolite-linux-${MONOLITE_VERSION}-latest ${WRKSRC}/mcs/class/lib/monolite-linux/${MONOLITE_VERSION}
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|^#!/bin/bash|#!/usr/bin/env bash|g' \
|
||||
${WRKSRC}/scripts/mono-find-provides.in \
|
||||
${WRKSRC}/scripts/mono-find-requires.in \
|
||||
${WRKSRC}/scripts/mono-test-install
|
||||
${FIND} ${WRKSRC} -name '*.sh' | ${XARGS} ${REINPLACE_CMD} \
|
||||
-e 's|^#!/bin/bash|#!/bin/sh|g'
|
||||
${SED} 's/tarball/${PORTVERSION}/' ${WRKSRC}/mono/mini/Makefile.am.in \
|
||||
> ${WRKSRC}/mono/mini/Makefile.am
|
||||
${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}|g' \
|
||||
${WRKSRC}/mcs/class/corlib/System/Environment.cs \
|
||||
${WRKSRC}/external/corefx/src/System.Runtime.Extensions/src/System/Environment.Unix.cs
|
||||
${REINPLACE_CMD} -e 's|/usr/share/.mono|${PREFIX}/share/mono|g' \
|
||||
${WRKSRC}/man/mono-configuration-crypto.1 \
|
||||
${WRKSRC}/man/mono.1 \
|
||||
${WRKSRC}/man/mozroots.1
|
||||
|
||||
post-configure:
|
||||
${REINPLACE_CMD} -e 's|share\/man|man|g' \
|
||||
${WRKSRC}/mcs/jay/Makefile
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/mono
|
||||
USES= metaport
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
TIMESTAMP = 1535767329
|
||||
SHA256 (mono-5.10.1.57.tar.bz2) = 76cbd8545db6adc5a1738c343d957a7015c95e1439c461ea4f2bd56bd6337ab4
|
||||
SIZE (mono-5.10.1.57.tar.bz2) = 210896685
|
||||
SHA256 (monolite-linux-1051000004-latest.tar.gz) = 209804685ba87ecc5838addc8f089e858bfad4c7627c26d118f4f6889648e0cd
|
||||
SIZE (monolite-linux-1051000004-latest.tar.gz) = 4820712
|
|
@ -1,26 +0,0 @@
|
|||
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=195063&action=diff#i/lang/mono/files/extra-patch-aarch64-race-workaround_sec1
|
||||
|
||||
Workaround for Roslyn crash: https://github.com/mono/mono/issues/7017
|
||||
|
||||
--- mcs/build/profiles/basic.make.orig 2021-11-08 19:42:34.845483000 +0100
|
||||
+++ mcs/build/profiles/basic.make 2021-11-08 19:43:00.996003000 +0100
|
||||
@@ -47,7 +47,7 @@ LIBRARY_COMPILE = $(BOOT_COMPILE)
|
||||
#
|
||||
# Copy from rules.make because I don't know how to unset MCS_FLAGS
|
||||
#
|
||||
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
|
||||
.PHONY: profile-check do-profile-check
|
||||
profile-check:
|
||||
--- mcs/build/rules.make.orig 2021-11-08 19:43:05.777570000 +0100
|
||||
+++ mcs/build/rules.make 2021-11-08 19:43:20.886314000 +0100
|
||||
@@ -34,7 +34,7 @@ BUILD_TOOLS_PROFILE = build
|
||||
endif
|
||||
endif
|
||||
|
||||
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
|
||||
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
|
||||
CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
|
|
@ -1,76 +0,0 @@
|
|||
--- configure.ac.orig 2018-08-24 08:19:14.000000000 -0700
|
||||
+++ configure.ac 2021-12-09 07:38:57.727183000 -0800
|
||||
@@ -201,6 +201,12 @@
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
use_sigposix=yes
|
||||
+ case "$host" in
|
||||
+ aarch64-*)
|
||||
+ support_boehm=no
|
||||
+ with_gc=sgen
|
||||
+ ;;
|
||||
+ esac
|
||||
has_dtrace=yes
|
||||
with_sgen_default_concurrent=yes
|
||||
;;
|
||||
@@ -1668,7 +1674,8 @@
|
||||
dnl *** won't always indicate the interface sched_affinity has. ***
|
||||
dnl ****************************************************************
|
||||
AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
|
||||
- AC_TRY_COMPILE([#include <sched.h>], [
|
||||
+ AC_TRY_COMPILE([#define _WITH_CPU_SET_T
|
||||
+#include <sched.h>], [
|
||||
int mask = 1;
|
||||
sched_setaffinity(0, &mask);
|
||||
return 0;
|
||||
@@ -1680,8 +1687,9 @@
|
||||
# We have the new, three-parameter version
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
- AC_TRY_COMPILE([#include <sched.h>], [
|
||||
- CPU_COUNT((void *) 0);
|
||||
+ AC_TRY_COMPILE([#define _WITH_CPU_SET_T
|
||||
+#include <sched.h>], [
|
||||
+ CPU_COUNT((cpuset_t *) 0);
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(GLIBC_HAS_CPU_COUNT, 1, [GLIBC has CPU_COUNT macro in sched.h])
|
||||
@@ -3298,6 +3306,8 @@
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
+ BTLS_SUPPORTED=yes
|
||||
+ BTLS_PLATFORM=i386
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -3322,6 +3332,8 @@
|
||||
boehm_supported=false
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
+ BTLS_SUPPORTED=yes
|
||||
+ BTLS_PLATFORM=x86_64
|
||||
;;
|
||||
mingw*)
|
||||
;;
|
||||
@@ -3355,11 +3367,10 @@
|
||||
INTL="intl"
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
|
||||
- powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
|
||||
+ powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc*-*-freebsd* )
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=POWERPC64;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
|
||||
- CFLAGS="$CFLAGS -mminimal-toc"
|
||||
else
|
||||
TARGET=POWERPC;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
|
||||
@@ -4425,6 +4436,7 @@
|
||||
;;
|
||||
aarch64)
|
||||
btls_arch=aarch64
|
||||
+ btls_cflags="-march=armv8-a+crypto"
|
||||
;;
|
||||
android-armv5)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
|
|
@ -1,42 +0,0 @@
|
|||
--- external/boringssl/crypto/cpu-aarch64-linux.c.orig 2018-08-24 17:17:16 UTC
|
||||
+++ external/boringssl/crypto/cpu-aarch64-linux.c
|
||||
@@ -25,7 +25,32 @@
|
||||
|
||||
extern uint32_t OPENSSL_armcap_P;
|
||||
|
||||
+#if defined(__FreeBSD__)
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/armreg.h>
|
||||
+
|
||||
void OPENSSL_cpuid_setup(void) {
|
||||
+ uint64_t id_aa64isar0;
|
||||
+
|
||||
+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1);
|
||||
+
|
||||
+ OPENSSL_armcap_P |= ARMV7_NEON;
|
||||
+
|
||||
+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_AES;
|
||||
+ }
|
||||
+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_PMULL;
|
||||
+ }
|
||||
+ if (ID_AA64ISAR0_SHA1_VAL(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_SHA1;
|
||||
+ }
|
||||
+ if(ID_AA64ISAR0_SHA2_VAL(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) {
|
||||
+ OPENSSL_armcap_P |= ARMV8_SHA256;
|
||||
+ }
|
||||
+}
|
||||
+#else // linux
|
||||
+void OPENSSL_cpuid_setup(void) {
|
||||
unsigned long hwcap = getauxval(AT_HWCAP);
|
||||
|
||||
/* See /usr/include/asm/hwcap.h on an aarch64 installation for the source of
|
||||
@@ -57,5 +82,6 @@ void OPENSSL_cpuid_setup(void) {
|
||||
OPENSSL_armcap_P |= ARMV8_SHA256;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
#endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */
|
|
@ -1,11 +0,0 @@
|
|||
--- mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs.orig 2017-07-20 18:10:59 UTC
|
||||
+++ mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs
|
||||
@@ -244,7 +244,7 @@ namespace Mono.Security.Cryptography {
|
||||
if ((_machinePath == null) || (!_machinePathExists)) {
|
||||
_machinePath = Path.Combine (
|
||||
Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData),
|
||||
- ".mono");
|
||||
+ "mono");
|
||||
_machinePath = Path.Combine (_machinePath, "keypairs");
|
||||
|
||||
_machinePathExists = Directory.Exists (_machinePath);
|
|
@ -1,20 +0,0 @@
|
|||
--- mcs/class/Mono.Security/Mono.Security.X509/X509StoreManager.cs.orig 2017-07-20 18:10:59 UTC
|
||||
+++ mcs/class/Mono.Security/Mono.Security.X509/X509StoreManager.cs
|
||||
@@ -73,7 +73,7 @@ namespace Mono.Security.X509 {
|
||||
if (_localMachinePath == null) {
|
||||
_localMachinePath = Path.Combine (
|
||||
Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData),
|
||||
- ".mono");
|
||||
+ "mono");
|
||||
_localMachinePath = Path.Combine (_localMachinePath, "certs");
|
||||
}
|
||||
return _localMachinePath;
|
||||
@@ -97,7 +97,7 @@ namespace Mono.Security.X509 {
|
||||
if (_newLocalMachinePath == null) {
|
||||
_newLocalMachinePath = Path.Combine (
|
||||
Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData),
|
||||
- ".mono");
|
||||
+ "mono");
|
||||
_newLocalMachinePath = Path.Combine (_newLocalMachinePath, "new-certs");
|
||||
}
|
||||
return _newLocalMachinePath;
|
|
@ -1,11 +0,0 @@
|
|||
--- mcs/tools/mono-configuration-crypto/lib/Mono.Configuration.Crypto/KeyContainerCollection.cs.orig 2017-07-20 18:10:59 UTC
|
||||
+++ mcs/tools/mono-configuration-crypto/lib/Mono.Configuration.Crypto/KeyContainerCollection.cs
|
||||
@@ -32,7 +32,7 @@ namespace Mono.Configuration.Crypto
|
||||
string topPath;
|
||||
|
||||
if (machineStore)
|
||||
- topPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData), ".mono");
|
||||
+ topPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData), "mono");
|
||||
else
|
||||
topPath = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), ".mono");
|
||||
topPath = Path.Combine (topPath, "keypairs");
|
|
@ -1,25 +0,0 @@
|
|||
--- mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets.orig 2017-07-20 18:10:59 UTC
|
||||
+++ mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets
|
||||
@@ -20,6 +20,11 @@
|
||||
<NoCompilerStandardLib Condition="'$(NoCompilerStandardLib)'==''">true</NoCompilerStandardLib>
|
||||
</PropertyGroup>
|
||||
|
||||
+ <PropertyGroup >
|
||||
+ <SnToolExe>sn</SnToolExe>
|
||||
+ <SnToolPath>$(CscToolPath)</SnToolPath>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
<ItemGroup>
|
||||
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
|
||||
</ItemGroup>
|
||||
@@ -102,6 +107,10 @@
|
||||
ToolExe="$(CscToolExe)"
|
||||
ToolPath="$(CscToolPath)" />
|
||||
|
||||
+ <Exec
|
||||
+ Command="$(SnToolPath)$(SnToolExe) -R @(IntermediateAssembly) $(KeyOriginatorFile)"
|
||||
+ Condition="'$(DelaySign)' == '' and '$(KeyContainerName)' == '' and '$(KeyOriginatorFile)' != '' and ( $(CscToolExe.EndsWith('csc.exe')) or $(CscToolExe.EndsWith('csc')) or $(CscToolExe) == '' )" />
|
||||
+
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateManifestResourceNames">
|
|
@ -1,25 +0,0 @@
|
|||
--- mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets.orig 2017-07-20 18:10:59 UTC
|
||||
+++ mcs/tools/xbuild/data/14.0/Microsoft.CSharp.targets
|
||||
@@ -20,6 +20,11 @@
|
||||
<NoCompilerStandardLib Condition="'$(NoCompilerStandardLib)'==''">true</NoCompilerStandardLib>
|
||||
</PropertyGroup>
|
||||
|
||||
+ <PropertyGroup >
|
||||
+ <SnToolExe>sn</SnToolExe>
|
||||
+ <SnToolPath>$(CscToolPath)</SnToolPath>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
<ItemGroup>
|
||||
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
|
||||
</ItemGroup>
|
||||
@@ -102,6 +107,10 @@
|
||||
ToolExe="$(CscToolExe)"
|
||||
ToolPath="$(CscToolPath)" />
|
||||
|
||||
+ <Exec
|
||||
+ Command="$(SnToolPath)$(SnToolExe) -R @(IntermediateAssembly) $(KeyOriginatorFile)"
|
||||
+ Condition="'$(DelaySign)' == '' and '$(KeyContainerName)' == '' and '$(KeyOriginatorFile)' != '' and ( $(CscToolExe.EndsWith('csc.exe')) or $(CscToolExe.EndsWith('csc')) or $(CscToolExe) == '' )" />
|
||||
+
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateManifestResourceNames">
|
|
@ -1,11 +0,0 @@
|
|||
--- mono/eglib/gfile-posix.c.orig 2018-01-10 08:03:25 UTC
|
||||
+++ mono/eglib/gfile-posix.c
|
||||
@@ -161,7 +161,7 @@ g_get_current_dir (void)
|
||||
do {
|
||||
buffer = g_realloc (buffer, s);
|
||||
r = getcwd (buffer, s);
|
||||
- fail = (r == NULL && errno == ERANGE);
|
||||
+ fail = (r == NULL && (errno == ERANGE || errno == 0));
|
||||
if (fail) {
|
||||
s <<= 1;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
--- mono/mini/driver.c.orig 2018-08-24 08:17:13.000000000 -0700
|
||||
+++ mono/mini/driver.c 2021-11-27 20:03:33.006998000 -0800
|
||||
@@ -16,6 +16,8 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#if HAVE_SCHED_SETAFFINITY
|
||||
+#include <sys/param.h>
|
||||
+#define _WITH_CPU_SET_T
|
||||
#include <sched.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@@ -1652,6 +1654,9 @@
|
||||
#if HAVE_SCHED_SETAFFINITY
|
||||
if (!use_smp) {
|
||||
unsigned long proc_mask = 1;
|
||||
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 1400042
|
||||
+#undef GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY
|
||||
+#endif
|
||||
#ifdef GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY
|
||||
sched_setaffinity (getpid(), (gpointer)&proc_mask);
|
||||
#else
|
|
@ -1,11 +0,0 @@
|
|||
--- mono/mini/exceptions-ppc.c.orig 2023-03-18 12:46:51 UTC
|
||||
+++ mono/mini/exceptions-ppc.c
|
||||
@@ -809,7 +809,7 @@ mono_arch_setup_async_callback (MonoContext *ctx, void
|
||||
{
|
||||
uintptr_t sp = (uintptr_t) MONO_CONTEXT_GET_SP(ctx);
|
||||
sp -= PPC_MINIMAL_STACK_SIZE;
|
||||
- *(unsigned long *)sp = MONO_CONTEXT_GET_SP(ctx);
|
||||
+ *(unsigned long *)sp = (unsigned long)MONO_CONTEXT_GET_SP(ctx);
|
||||
MONO_CONTEXT_SET_BP(ctx, sp);
|
||||
MONO_CONTEXT_SET_IP(ctx, (unsigned long) async_cb);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
--- mono/mini/mini-ppc.c.orig 2018-08-24 15:17:13 UTC
|
||||
+++ mono/mini/mini-ppc.c
|
||||
@@ -4650,7 +4650,7 @@ mono_arch_register_lowlevel_calls (void)
|
||||
}
|
||||
|
||||
#ifdef __mono_ppc64__
|
||||
-#ifdef _LITTLE_ENDIAN
|
||||
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define patch_load_sequence(ip,val) do {\
|
||||
guint16 *__load = (guint16*)(ip); \
|
||||
g_assert (sizeof (val) == sizeof (gsize)); \
|
||||
@@ -4659,7 +4659,7 @@ mono_arch_register_lowlevel_calls (void)
|
||||
__load [6] = (((guint64)(gsize)(val)) >> 16) & 0xffff; \
|
||||
__load [8] = ((guint64)(gsize)(val)) & 0xffff; \
|
||||
} while (0)
|
||||
-#elif defined _BIG_ENDIAN
|
||||
+#elif G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define patch_load_sequence(ip,val) do {\
|
||||
guint16 *__load = (guint16*)(ip); \
|
||||
g_assert (sizeof (val) == sizeof (gsize)); \
|
|
@ -1,11 +0,0 @@
|
|||
--- mono/mini/mini-x86.h.orig 2018-08-24 15:17:13 UTC
|
||||
+++ mono/mini/mini-x86.h
|
||||
@@ -139,7 +139,7 @@ struct MonoLMF {
|
||||
* If the second lowest bit is set to 1, then this is a MonoLMFExt structure, and
|
||||
* the other fields are not valid.
|
||||
*/
|
||||
- guint32 previous_lmf;
|
||||
+ gpointer previous_lmf;
|
||||
gpointer lmf_addr;
|
||||
/* Only set in trampoline LMF frames */
|
||||
MonoMethod *method;
|
|
@ -1,26 +0,0 @@
|
|||
--- mono/mini/tramp-amd64.c.orig 2018-04-13 23:37:57 UTC
|
||||
+++ mono/mini/tramp-amd64.c
|
||||
@@ -363,7 +363,11 @@ mono_arch_create_generic_trampoline (Mon
|
||||
}
|
||||
for (i = 0; i < AMD64_XMM_NREG; ++i)
|
||||
if (AMD64_IS_ARGUMENT_XREG (i))
|
||||
+#if defined(MONO_HAVE_SIMD_REG)
|
||||
amd64_movdqu_membase_reg (code, AMD64_RBP, saved_fpregs_offset + (i * sizeof(MonoContextSimdReg)), i);
|
||||
+#else
|
||||
+ amd64_movsd_membase_reg (code, AMD64_RBP, saved_fpregs_offset + (i * sizeof(double)), i);
|
||||
+#endif
|
||||
|
||||
/* Check that the stack is aligned */
|
||||
amd64_mov_reg_reg (code, AMD64_R11, AMD64_RSP, sizeof (mgreg_t));
|
||||
@@ -540,7 +544,11 @@ mono_arch_create_generic_trampoline (Mon
|
||||
amd64_mov_reg_membase (code, i, AMD64_RBP, saved_regs_offset + (i * sizeof(mgreg_t)), sizeof(mgreg_t));
|
||||
for (i = 0; i < AMD64_XMM_NREG; ++i)
|
||||
if (AMD64_IS_ARGUMENT_XREG (i))
|
||||
+#if defined(MONO_HAVE_SIMD_REG)
|
||||
amd64_movdqu_reg_membase (code, i, AMD64_RBP, saved_fpregs_offset + (i * sizeof(MonoContextSimdReg)));
|
||||
+#else
|
||||
+ amd64_movsd_reg_membase (code, i, AMD64_RBP, saved_fpregs_offset + (i * sizeof(double)));
|
||||
+#endif
|
||||
|
||||
/* Restore stack */
|
||||
#if TARGET_WIN32
|
|
@ -1,11 +0,0 @@
|
|||
--- mono/sgen/sgen-archdep.h.orig 2018-07-11 23:55:34 UTC
|
||||
+++ mono/sgen/sgen-archdep.h
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#elif defined(TARGET_ARM64)
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#define REDZONE_SIZE 0
|
||||
#elif defined(__APPLE__)
|
||||
#define REDZONE_SIZE 128
|
|
@ -1,42 +0,0 @@
|
|||
--- mono/utils/mono-context.h.orig 2018-04-13 23:37:57 UTC
|
||||
+++ mono/utils/mono-context.h
|
||||
@@ -24,23 +24,30 @@
|
||||
|
||||
#if defined(TARGET_X86)
|
||||
#if defined(__APPLE__)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
typedef struct __darwin_xmm_reg MonoContextSimdReg;
|
||||
#endif
|
||||
#elif defined(TARGET_AMD64)
|
||||
#if defined(__APPLE__)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
typedef struct __darwin_xmm_reg MonoContextSimdReg;
|
||||
#elif defined(__linux__) && defined(__GLIBC__)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
typedef struct _libc_xmmreg MonoContextSimdReg;
|
||||
#elif defined(HOST_WIN32)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
#include <emmintrin.h>
|
||||
typedef __m128d MonoContextSimdReg;
|
||||
#elif defined(HOST_ANDROID)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
typedef struct _libc_xmmreg MonoContextSimdReg;
|
||||
#elif defined(__linux__)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
#include <emmintrin.h>
|
||||
typedef __m128d MonoContextSimdReg;
|
||||
#endif
|
||||
#elif defined(TARGET_ARM64)
|
||||
+#define MONO_HAVE_SIMD_REG
|
||||
typedef __uint128_t MonoContextSimdReg;
|
||||
#endif
|
||||
|
||||
@@ -255,7 +262,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
mgreg_t gregs [AMD64_NREG];
|
||||
-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || defined(HOST_WIN32)
|
||||
+#if defined(MONO_HAVE_SIMD_REG)
|
||||
MonoContextSimdReg fregs [AMD64_XMM_NREG];
|
||||
#else
|
||||
double fregs [AMD64_XMM_NREG];
|
|
@ -1,10 +0,0 @@
|
|||
--- mono/utils/mono-proclib.c.orig 2018-08-24 08:17:13.000000000 -0700
|
||||
+++ mono/utils/mono-proclib.c 2021-11-27 14:55:20.354869000 -0800
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SCHED_GETAFFINITY
|
||||
+#define _WITH_CPU_SET_T
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
--- mono/utils/mono-sigcontext.h.orig 2021-10-05 20:43:22.170433000 +0200
|
||||
+++ mono/utils/mono-sigcontext.h 2021-10-05 20:43:36.848022000 +0200
|
||||
@@ -363,10 +363,10 @@
|
||||
#elif defined(__FreeBSD__)
|
||||
typedef ucontext_t os_ucontext;
|
||||
|
||||
- #define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)])
|
||||
- #define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.mc_fpreg [(n)])
|
||||
- #define UCONTEXT_REG_NIP(ctx) ((ctx)->uc_mcontext.mc_srr0)
|
||||
- #define UCONTEXT_REG_LNK(ctx) ((ctx)->uc_mcontext.mc_lr)
|
||||
+ #define UCONTEXT_REG_Rn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.mc_gpr [(n)])
|
||||
+ #define UCONTEXT_REG_FPRn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.mc_fpreg [(n)])
|
||||
+ #define UCONTEXT_REG_NIP(ctx) (((os_ucontext*)(ctx))->uc_mcontext.mc_srr0)
|
||||
+ #define UCONTEXT_REG_LNK(ctx) (((os_ucontext*)(ctx))->uc_mcontext.mc_lr)
|
||||
#endif
|
||||
|
||||
#elif defined(TARGET_ARM)
|
||||
@@ -460,6 +460,13 @@ typedef struct ucontext {
|
||||
#define UCONTEXT_REG_SP(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__sp)
|
||||
#define UCONTEXT_REG_R0(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x [ARMREG_R0])
|
||||
#define UCONTEXT_GREGS(ctx) (&(((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x))
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#include <ucontext.h>
|
||||
+ /* https://lists.freebsd.org/pipermail/freebsd-arm/2017-February/015611.html */
|
||||
+ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_elr)
|
||||
+ #define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_sp)
|
||||
+ #define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x [ARMREG_R0])
|
||||
+ #define UCONTEXT_GREGS(ctx) (&(((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x))
|
||||
#else
|
||||
#include <ucontext.h>
|
||||
#define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.pc)
|
|
@ -1,20 +0,0 @@
|
|||
--- mono/utils/mono-threads.c.orig 2018-04-13 23:37:57 UTC
|
||||
+++ mono/utils/mono-threads.c
|
||||
@@ -1316,7 +1316,7 @@ mono_thread_info_sleep (guint32 ms, gboo
|
||||
} while (1);
|
||||
} else {
|
||||
int ret;
|
||||
-#if defined (__linux__) && !defined(HOST_ANDROID)
|
||||
+#if defined (HAVE_CLOCK_NANOSLEEP) && !defined(HOST_ANDROID)
|
||||
struct timespec start, target;
|
||||
|
||||
/* Use clock_nanosleep () to prevent time drifting problems when nanosleep () is interrupted by signals */
|
||||
@@ -1346,7 +1346,7 @@ mono_thread_info_sleep (guint32 ms, gboo
|
||||
memset (&rem, 0, sizeof (rem));
|
||||
ret = nanosleep (&req, &rem);
|
||||
} while (ret != 0);
|
||||
-#endif /* __linux__ */
|
||||
+#endif /* HAVE_CLOCK_NANOSLEEP */
|
||||
}
|
||||
|
||||
MONO_EXIT_GC_SAFE;
|
|
@ -1,11 +0,0 @@
|
|||
--- scripts/mono-heapviz.orig 2018-01-18 17:41:54 UTC
|
||||
+++ scripts/mono-heapviz
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, os
|
||||
-import Image, ImageDraw
|
||||
+from PIL import Image, ImageDraw
|
||||
from xml.sax import ContentHandler, make_parser
|
||||
from xml.sax.handler import feature_namespaces
|
||||
from optparse import OptionParser
|
|
@ -1,37 +0,0 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
If you have build/runtime errors with Mono and Gtk# apps please try the
|
||||
following first:
|
||||
|
||||
* Build Mono and gtk+ (x11-toolkits/gtk20) without CPUTYPE and with the
|
||||
default FreeBSD CFLAGS ('-O2 -fno-strict-aliasing -pipe') as Mono has
|
||||
been known to expose compiler bugs.
|
||||
|
||||
* Try building and running Mono with the GENERIC kernel.
|
||||
- Mono requires SYSVSHM, SYSVMSG, and SYSVSEM which are part of the
|
||||
GENERIC kernel.
|
||||
- Removing kernel options or changing defaults to use experimental
|
||||
options can adversely affect Mono's ability to build and run.
|
||||
|
||||
* Remove leftover semaphores / increase semaphore limits.
|
||||
- Close apps which use Mono and run `ipcs -sbt`. Remove the
|
||||
semaphores with MODE "--rw-------" and NSEMS "8" using ipcrm (1)
|
||||
- _OR_ simply reboot which is the safest method.
|
||||
- On multi-user systems the semaphore limits may need to be increased
|
||||
from the defaults. The following should comfortably support 30 users.
|
||||
|
||||
# echo "kern.ipc.semmni=40" >> /boot/loader.conf
|
||||
# echo "kern.ipc.semmns=300" >> /boot/loader.conf
|
||||
|
||||
* If you are in a jailed environment, ensure System V IPC are enabled.
|
||||
You can rely on the security.jail.sysvipc_allowed sysctl to check
|
||||
this status. The following enables this feature on the host system:
|
||||
# echo "jail_sysvipc_allow=\"YES\"" >> /etc/rc.conf
|
||||
|
||||
* Some process information are accessed through /proc (e.g. when using
|
||||
NUnit) and procfs(5) has to be mounted for these features to work:
|
||||
# echo "proc /proc procfs rw 0 0" >> /etc/fstab
|
||||
EOM
|
||||
}
|
||||
]
|
2984
lang/mono/pkg-plist
2984
lang/mono/pkg-plist
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue