View | Details | Raw Unified | Return to bug 262637 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/Makefile (-1 / +1 lines)
Lines 199-205 Link Here
199
    SUBDIR += mono-basic
199
    SUBDIR += mono-basic
200
    SUBDIR += mono5.10
200
    SUBDIR += mono5.10
201
    SUBDIR += mono5.20
201
    SUBDIR += mono5.20
202
    SUBDIR += mono6.8
202
    SUBDIR += mono6.12
203
    SUBDIR += mosh
203
    SUBDIR += mosh
204
    SUBDIR += mosml
204
    SUBDIR += mosml
205
    SUBDIR += mtasc
205
    SUBDIR += mtasc
(-)b/lang/mono6.12/Makefile (+108 lines)
Added Link Here
1
PORTNAME=	mono
2
DISTVERSION=	6.12.0.199
3
CATEGORIES=	lang
4
MASTER_SITES=	https://download.mono-project.com/sources/mono/
5
PKGNAMESUFFIX=	6.12
6
DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
7
8
MAINTAINER=	ports@FreeBSD.org
9
COMMENT=	Open source implementation of .NET Development Framework
10
WWW=		https://www.mono-project.com/
11
12
LICENSE=	MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
15
NOT_FOR_ARCHS=	riscv64 riscv64sf sparc64
16
17
BUILD_DEPENDS=	bash:shells/bash \
18
		cmake-core>0:devel/cmake-core \
19
		p5-XML-Parser>=0:textproc/p5-XML-Parser
20
LIB_DEPENDS=	libinotify.so:devel/libinotify
21
RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss \
22
		sqlite3>0:databases/sqlite3 \
23
		zip>=0:archivers/zip
24
25
USES=		autoreconf:2.69 bison compiler:c11 cpe gmake iconv libtool localbase \
26
		pathfix perl5 python shebangfix tar:xz
27
USE_LDCONFIG=	yes
28
USE_PERL5=	build
29
30
SHEBANG_FILES=	scripts/mono-find-provides.in scripts/mono-find-requires.in \
31
		scripts/mono-heapviz scripts/mono-package-runtime
32
33
GNU_CONFIGURE=		yes
34
CONFIGURE_ARGS_aarch64=	--with-csc=mcs
35
CONFIGURE_ARGS=		${CONFIGURE_ARGS_${ARCH}} \
36
			--disable-dtrace
37
# Do not remove - this is needed to work around automake's lack of hinting
38
CONFIGURE_ENV+=		ac_cv_header_sys_inotify_h=yes
39
40
MAKE_ENV=	INSTALL_STRIP_FLAG="${STRIP}" \
41
		MONO_SHARED_DIR="${WRKDIR}"
42
43
TEST_ARGS=	-k
44
TEST_TARGET=	check
45
46
CONFLICTS_INSTALL=	certmgr coin-or-disco disco mono mono[0-9]*
47
48
BINARY_ALIAS=	python=${PYTHON_CMD}
49
PORTSCOUT=	limit:^\d+\.\d+\.[1-9]\d*
50
51
# XXX MCL mat says: no. Options must not change themselves depending on what is installed.
52
# XXX MCL just leave this out for now to try to get *something* done.
53
# .if !exists(${LOCALBASE}/bin/mcs)
54
# OPTIONS_SLAVE=	MONOLITE
55
# .endif
56
57
OPTIONS_DEFINE=		BIGARRAY MONODEV MONOLITE NINJA NLS ODBC SPECTRE X11
58
OPTIONS_DEFAULT=	MONOLITE NLS X11
59
OPTIONS_SUB=		yes
60
61
BIGARRAY_DESC=	allocating arrays Enable greater Int32.MaxValue than
62
MONODEV_DESC=	(disables Build crash development for Mono privacy)
63
MONOLITE_DESC=	Use monolite to bootstrap mcs (otherwise use installed mcs)
64
NINJA_DESC=	Use ninja to build wherever possible
65
NLS_DESC=	NLS Localization Support
66
ODBC_DESC=	System.Data: support for unixODBC
67
SPECTRE_DESC=	Enable internal Mono Spectre mitigations
68
69
BIGARRAY_CONFIGURE_ENABLE=	big-arrays
70
MONODEV_CONFIGURE_ON=		--enable-icall-export \
71
				--enable-icall-symbol-map \
72
				--with-crash_privacy=no
73
MONOLITE_MASTER_SITES=		http://download.mono-project.com/monolite/:monolite
74
MONOLITE_DISTFILES=		monolite-linux-${MONOLITE_VERSION}-latest.tar.gz:monolite
75
# DO NOT ALTER OR REMOVE. DANGER, CASE-SENSITIVE!
76
# monolite 2020-01-13 @ 1798d23b
77
MONOLITE_VERSION=		1798d23b-3dbc-4161-b3f4-6bb00134ee4e
78
NINJA_CONFIGURE_ENABLE=		ninja
79
NINJA_USES=			ninja:build
80
NLS_CONFIGURE_OFF=		--disable-nls
81
NLS_USES=			gettext
82
ODBC_BUILD_DEPENDS=		unixODBC>0:databases/unixODBC
83
ODBC_LIB_DEPENDS=		libodbc.so:databases/unixODBC
84
SPECTRE_CONFIGURE_ON=		--with-spectre-mitigation=yes
85
X11_CONFIGURE_WITH=		x
86
X11_RUN_DEPENDS=		libgdiplus>0:x11-toolkits/libgdiplus \
87
				pango>0:x11-toolkits/pango
88
X11_USES=			display:test
89
90
.include <bsd.port.options.mk>
91
92
.if ${ARCH:Mpowerpc*}
93
PLIST+=		${.CURDIR}/pkg-plist.powerpc
94
.endif
95
96
.if defined(QEMU_EMULATING) && "${QEMU_EMULATING}" == "1"
97
BROKEN=		fails to build under qemu: Roslyn requires more functional POSIX implementation
98
.endif
99
100
post-patch:
101
# Needed to force regeneration due to tarball packaging
102
	${RM} ${WRKSRC}/configure ${WRKSRC}/Makefile ${WRKSRC}/mono/Makefile \
103
		${WRKSRC}/mono/native/Makefile
104
105
post-install:
106
	${MKDIR} ${STAGEDIR}${PREFIX}/mono
107
108
.include <bsd.port.mk>
(-)b/lang/mono6.12/distinfo (-3 / +3 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1589939235
1
TIMESTAMP = 1691289411
2
SHA256 (mono-6.8.0.123.tar.xz) = e2e42d36e19f083fc0d82f6c02f7db80611d69767112af353df2f279744a2ac5
2
SHA256 (mono-6.12.0.199.tar.xz) = c0850d545353a6ba2238d45f0914490c6a14a0017f151d3905b558f033478ef5
3
SIZE (mono-6.8.0.123.tar.xz) = 243827664
3
SIZE (mono-6.12.0.199.tar.xz) = 304146664
4
SHA256 (monolite-linux-1798d23b-3dbc-4161-b3f4-6bb00134ee4e-latest.tar.gz) = c8baa24750315156144586a416c9ae7ee0613a9472519b360f0fa75ffd66e825
4
SHA256 (monolite-linux-1798d23b-3dbc-4161-b3f4-6bb00134ee4e-latest.tar.gz) = c8baa24750315156144586a416c9ae7ee0613a9472519b360f0fa75ffd66e825
5
SIZE (monolite-linux-1798d23b-3dbc-4161-b3f4-6bb00134ee4e-latest.tar.gz) = 5359646
5
SIZE (monolite-linux-1798d23b-3dbc-4161-b3f4-6bb00134ee4e-latest.tar.gz) = 5359646
(-)b/lang/mono6.12/files/patch-configure.ac (+66 lines)
Added Link Here
1
--- configure.ac.orig	2023-06-14 15:18:39 UTC
2
+++ configure.ac
3
@@ -2296,7 +2296,8 @@ if test x$host_win32 = xno; then
4
 	dnl *** won't always indicate the interface sched_affinity has.  ***
5
 	dnl ****************************************************************
6
 	AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
7
-	AC_TRY_COMPILE([#include <sched.h>], [
8
+	AC_TRY_COMPILE([#define _WITH_CPU_SET_T
9
+	    #include <sched.h>], [
10
             int mask = 1; 
11
             sched_setaffinity(0, &mask);
12
 	], [
13
@@ -2307,8 +2308,9 @@ if test x$host_win32 = xno; then
14
 		# We have the new, three-parameter version
15
 		AC_MSG_RESULT(no)
16
 	])
17
-	AC_TRY_COMPILE([#include <sched.h>], [
18
-	     CPU_COUNT((void *) 0);
19
+	AC_TRY_COMPILE([#define _WITH_CPU_SET_T
20
+	     #include <sched.h>], [
21
+	     CPU_COUNT((cpuset_t *) 0);
22
 	], [
23
 		AC_MSG_RESULT(yes)
24
 		AC_DEFINE(GLIBC_HAS_CPU_COUNT, 1, [GLIBC has CPU_COUNT macro in sched.h])
25
@@ -2369,6 +2371,29 @@ if test x$host_win32 = xno; then
26
 			dnl *** Checks for libinotify ***
27
 			dnl *****************************
28
 			AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
29
+			AC_MSG_CHECKING(for METADATA_CFLAGS)
30
+			if test "x$ac_cv_lib_inotify_inotify_init" = "xyes" ; then
31
+				AC_DEFINE(HAVE_LIBINOTIFY, 1, [FreeBSD libinotify kqueue shim])
32
+				dnl Needs to be done this way to avoid collision with various
33
+				dnl ports including glib and llvm*
34
+				METADATA_CFLAGS="-I/usr/local/include"
35
+				AC_SUBST(METADATA_CFLAGS)
36
+			fi
37
+			dnl Workaround due to inotify_rm_watch check failing without -I
38
+			AC_MSG_CHECKING(for inotify_rm_watch with unsigned wd in libinotify)
39
+			AC_TRY_LINK([
40
+				#include </usr/local/include/sys/inotify.h>
41
+			], [
42
+				intptr_t fd;
43
+				uint32_t wd;
44
+				int result = inotify_rm_watch(fd, wd);
45
+			],[
46
+			   AC_MSG_RESULT(yes)
47
+			   AC_DEFINE(INOTIFY_RM_WATCH_WD_UNSIGNED, 1, [inotify_rm_watch with unsigned wd])
48
+			], [
49
+				AC_MSG_RESULT(no)
50
+			])
51
+			;;
52
 	esac
53
 
54
 	dnl *****************************
55
@@ -6577,9 +6602,9 @@ elif case $host_os in freebsd*) true;; *) false;; esac
56
 	mono_native_text="FreeBSD"
57
 	MONO_NATIVE_CC=$CC
58
 	MONO_NATIVE_CXX=$CXX
59
-	MONO_NATIVE_CPPFLAGS=$CPPFLAGS
60
+	MONO_NATIVE_CPPFLAGS="$CPPFLAGS -I/usr/local/include"
61
 	MONO_NATIVE_CXXFLAGS=$CXXFLAGS
62
-	MONO_NATIVE_CFLAGS=$CFLAGS
63
+	MONO_NATIVE_CFLAGS="$CFLAGS -I/usr/local/include"
64
 	MONO_NATIVE_LDFLAGS=$LDFLAGS
65
 
66
 	mono_native=yes
(-)b/lang/mono6.12/files/patch-mono_metadata_Makefile.am (-6 / +6 lines)
Lines 1-11 Link Here
1
--- mono/metadata/Makefile.am.orig    2020-05-20 16:09:20.183060000 +0000
1
--- mono/metadata/Makefile.am.orig	2023-08-07 01:58:02 UTC
2
+++ mono/metadata/Makefile.am 2020-05-20 16:10:38.992083000 +0000
2
+++ mono/metadata/Makefile.am
3
@@ -143,7 +143,7 @@
3
@@ -107,7 +107,7 @@ lib_LTLIBRARIES = $(icall_table_libraries) $(ilgen_lib
4
4
 
5
 lib_LTLIBRARIES = $(icall_table_libraries) $(ilgen_libraries)
5
 lib_LTLIBRARIES = $(icall_table_libraries) $(ilgen_libraries)
6
6
 
7
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS)
7
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS)
8
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) $(METADATA_CFLAGS)
8
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) $(SHARED_CFLAGS) $(METADATA_CFLAGS)
9
9
 
10
 #
10
 #
11
 # Make sure any prefix changes are updated in the binaries too.
11
 # Make sure any prefix changes are updated in the binaries too.
(-)b/lang/mono6.12/files/patch-mono_mini_driver.c (-5 / +5 lines)
Lines 1-15 Link Here
1
--- mono/mini/driver.c.orig	2018-08-24 08:17:13.000000000 -0700
1
--- mono/mini/driver.c.orig	2023-08-07 03:46:30 UTC
2
+++ mono/mini/driver.c	2021-11-27 20:03:33.006998000 -0800
2
+++ mono/mini/driver.c
3
@@ -16,6 +16,8 @@
3
@@ -14,6 +14,8 @@
4
 #include <config.h>
4
 #include <signal.h>
5
 #include <signal.h>
5
 #endif
6
 #if HAVE_SCHED_SETAFFINITY
6
 #if HAVE_SCHED_SETAFFINITY
7
+#include <sys/param.h>
7
+#include <sys/param.h>
8
+#define _WITH_CPU_SET_T
8
+#define _WITH_CPU_SET_T
9
 #include <sched.h>
9
 #include <sched.h>
10
 #endif
10
 #endif
11
 #ifdef HAVE_UNISTD_H
11
 #ifdef HAVE_UNISTD_H
12
@@ -1652,6 +1654,9 @@
12
@@ -1881,6 +1883,9 @@ mono_set_use_smp (int use_smp)
13
 #if HAVE_SCHED_SETAFFINITY
13
 #if HAVE_SCHED_SETAFFINITY
14
 	if (!use_smp) {
14
 	if (!use_smp) {
15
 		unsigned long proc_mask = 1;
15
 		unsigned long proc_mask = 1;
(-)b/lang/mono6.12/files/patch-mono_native_Makefile.am (+10 lines)
Added Link Here
1
--- mono/native/Makefile.am.orig	2023-08-06 11:47:42 UTC
2
+++ mono/native/Makefile.am
3
@@ -168,6 +168,7 @@ common_cflags = \
4
 	-I$(abs_top_srcdir)/external/corefx/src/Native/AnyOS/brotli/include \
5
 	$(GLIB_CFLAGS) \
6
 	$(SHARED_CFLAGS) \
7
+	$(METADATA_CFLAGS) \
8
 	-DBROTLI_BUILD_NO_RBIT \
9
 	-Wno-typedef-redefinition
10
 
(-)b/lang/mono6.12/files/patch-mono_utils_mono-proclib.c (+10 lines)
Added Link Here
1
--- mono/utils/mono-proclib.c.orig	2023-08-06 11:48:25 UTC
2
+++ mono/utils/mono-proclib.c
3
@@ -18,6 +18,7 @@
4
 #include <unistd.h>
5
 #endif
6
 #ifdef HAVE_SCHED_GETAFFINITY
7
+#define _WITH_CPUT_SET_T
8
 #include <sched.h>
9
 #endif
10
 
(-)b/lang/mono6.12/pkg-descr (-7 lines)
Lines 5-14 Microsoft that have now been submitted to the ECMA for standardization. Link Here
5
5
6
Mono provides the necessary software to develop and run .NET client and
6
Mono provides the necessary software to develop and run .NET client and
7
server applications on BSD, Linux, Solaris, Mac OS X, Windows, and Unix.
7
server applications on BSD, Linux, Solaris, Mac OS X, Windows, and Unix.
8
9
SPECTRE MITIGATION: Mono 6.4+ introduces additional internal changes to
10
better protect against Spectre and Meltdown attacks for both compiled and
11
interpreted code during runtime. This can cause severe performance impacts
12
to applications in a number of scenarios, and is not enabled by default for
13
that reason. When used in high risk environments such as shared hosting,
14
it is strongly recommended to enable this option.
(-)b/lang/mono6.12/pkg-help (+6 lines)
Added Link Here
1
SPECTRE MITIGATION: Mono 6.4+ introduces additional internal changes to
2
better protect against Spectre and Meltdown attacks for both compiled and
3
interpreted code during runtime. This can cause severe performance impacts
4
to applications in a number of scenarios, and is not enabled by default for
5
that reason. When used in high risk environments such as shared hosting,
6
it is strongly recommended to enable this option.
(-)b/lang/mono6.12/pkg-plist (-34 / +2 lines)
Lines 2953-2960 lib/mono/gac/Mono.CSharp/4.0.0.0__0738eb9f132ed756/Mono.CSharp.dll Link Here
2953
lib/mono/gac/Mono.CSharp/4.0.0.0__0738eb9f132ed756/Mono.CSharp.pdb
2953
lib/mono/gac/Mono.CSharp/4.0.0.0__0738eb9f132ed756/Mono.CSharp.pdb
2954
lib/mono/gac/Mono.Cairo/4.0.0.0__0738eb9f132ed756/Mono.Cairo.dll
2954
lib/mono/gac/Mono.Cairo/4.0.0.0__0738eb9f132ed756/Mono.Cairo.dll
2955
lib/mono/gac/Mono.Cairo/4.0.0.0__0738eb9f132ed756/Mono.Cairo.pdb
2955
lib/mono/gac/Mono.Cairo/4.0.0.0__0738eb9f132ed756/Mono.Cairo.pdb
2956
lib/mono/gac/Mono.Cecil/0.11.0.0__0738eb9f132ed756/Mono.Cecil.dll
2956
lib/mono/gac/Mono.Cecil/0.11.1.0__0738eb9f132ed756/Mono.Cecil.dll
2957
lib/mono/gac/Mono.Cecil/0.11.0.0__0738eb9f132ed756/Mono.Cecil.pdb
2957
lib/mono/gac/Mono.Cecil/0.11.1.0__0738eb9f132ed756/Mono.Cecil.pdb
2958
lib/mono/gac/Mono.Cecil/0.9.5.0__0738eb9f132ed756/Mono.Cecil.dll
2958
lib/mono/gac/Mono.Cecil/0.9.5.0__0738eb9f132ed756/Mono.Cecil.dll
2959
lib/mono/gac/Mono.Cecil/0.9.5.0__0738eb9f132ed756/Mono.Cecil.pdb
2959
lib/mono/gac/Mono.Cecil/0.9.5.0__0738eb9f132ed756/Mono.Cecil.pdb
2960
lib/mono/gac/Mono.CodeContracts/4.0.0.0__0738eb9f132ed756/Mono.CodeContracts.dll
2960
lib/mono/gac/Mono.CodeContracts/4.0.0.0__0738eb9f132ed756/Mono.CodeContracts.dll
Lines 3416-3453 man/man1/xbuild.1.gz Link Here
3416
man/man1/xsd.1.gz
3416
man/man1/xsd.1.gz
3417
man/man5/mdoc.5.gz
3417
man/man5/mdoc.5.gz
3418
man/man5/mono-config.5.gz
3418
man/man5/mono-config.5.gz
3419
share/libgc-mono/README
3420
share/libgc-mono/README.DGUX386
3421
share/libgc-mono/README.Mac
3422
share/libgc-mono/README.MacOSX
3423
share/libgc-mono/README.OS2
3424
share/libgc-mono/README.amiga
3425
share/libgc-mono/README.arm.cross
3426
share/libgc-mono/README.autoconf
3427
share/libgc-mono/README.changes
3428
share/libgc-mono/README.contributors
3429
share/libgc-mono/README.cords
3430
share/libgc-mono/README.darwin
3431
share/libgc-mono/README.dj
3432
share/libgc-mono/README.environment
3433
share/libgc-mono/README.ews4800
3434
share/libgc-mono/README.hp
3435
share/libgc-mono/README.linux
3436
share/libgc-mono/README.macros
3437
share/libgc-mono/README.rs6000
3438
share/libgc-mono/README.sgi
3439
share/libgc-mono/README.solaris2
3440
share/libgc-mono/README.uts
3441
share/libgc-mono/README.win32
3442
share/libgc-mono/barrett_diagram
3443
share/libgc-mono/debugging.html
3444
share/libgc-mono/gc.man
3445
share/libgc-mono/gcdescr.html
3446
share/libgc-mono/gcinterface.html
3447
share/libgc-mono/leak.html
3448
share/libgc-mono/scale.html
3449
share/libgc-mono/simple_example.html
3450
share/libgc-mono/tree.html
3451
%%NLS%%share/locale/de/LC_MESSAGES/mcs.mo
3419
%%NLS%%share/locale/de/LC_MESSAGES/mcs.mo
3452
%%NLS%%share/locale/es/LC_MESSAGES/mcs.mo
3420
%%NLS%%share/locale/es/LC_MESSAGES/mcs.mo
3453
%%NLS%%share/locale/ja/LC_MESSAGES/mcs.mo
3421
%%NLS%%share/locale/ja/LC_MESSAGES/mcs.mo
(-)b/lang/mono6.12/pkg-plist.powerpc (-4 / +4 lines)
Lines 3425-3434 share/libgc-mono/leak.html Link Here
3425
share/libgc-mono/scale.html
3425
share/libgc-mono/scale.html
3426
share/libgc-mono/simple_example.html
3426
share/libgc-mono/simple_example.html
3427
share/libgc-mono/tree.html
3427
share/libgc-mono/tree.html
3428
share/locale/de/LC_MESSAGES/mcs.mo
3428
%%NLS%%share/locale/de/LC_MESSAGES/mcs.mo
3429
share/locale/es/LC_MESSAGES/mcs.mo
3429
%%NLS%%share/locale/es/LC_MESSAGES/mcs.mo
3430
share/locale/ja/LC_MESSAGES/mcs.mo
3430
%%NLS%%share/locale/ja/LC_MESSAGES/mcs.mo
3431
share/locale/pt_BR/LC_MESSAGES/mcs.mo
3431
%%NLS%%share/locale/pt_BR/LC_MESSAGES/mcs.mo
3432
%%DATADIR%%-2.0/mono/cil/cil-opcodes.xml
3432
%%DATADIR%%-2.0/mono/cil/cil-opcodes.xml
3433
%%DATADIR%%-2.0/mono/eglib/eglib-config.h
3433
%%DATADIR%%-2.0/mono/eglib/eglib-config.h
3434
%%DATADIR%%-2.0/mono/profiler/mono-profiler-coverage.suppression
3434
%%DATADIR%%-2.0/mono/profiler/mono-profiler-coverage.suppression
(-)a/lang/mono6.8/Makefile (-123 lines)
Removed Link Here
1
PORTNAME=	mono
2
PORTVERSION=	6.8.0.123
3
PORTREVISION=	1
4
CATEGORIES=	lang
5
MASTER_SITES=	https://download.mono-project.com/sources/mono/
6
PKGNAMESUFFIX=	6.8
7
DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
8
9
MAINTAINER=	ports@FreeBSD.org
10
COMMENT=	Open source implementation of .NET Development Framework
11
WWW=		https://www.mono-project.com/
12
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
16
NOT_FOR_ARCHS=	riscv64 riscv64sf sparc64
17
18
BUILD_DEPENDS=	p5-XML-Parser>=0:textproc/p5-XML-Parser \
19
		bash:shells/bash \
20
		cmake-core>0:devel/cmake-core
21
LIB_DEPENDS=	libinotify.so:devel/libinotify
22
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \
23
		ca_root_nss>=0:security/ca_root_nss \
24
		sqlite3>0:databases/sqlite3 \
25
		zip>=0:archivers/zip
26
27
CONFLICTS_INSTALL=	certmgr coin-or-disco disco mono mono[0-9]*
28
29
USES=	autoreconf bison compiler:c11 cpe gmake iconv libtool localbase \
30
	pathfix perl5 python shebangfix tar:xz
31
USE_PERL5=	build
32
33
CONFIGURE_SCRIPT=	autogen.sh
34
GNU_CONFIGURE=	yes
35
USE_LDCONFIG=	yes
36
37
SHEBANG_FILES=	mono/mini/genmdesc.py \
38
		mono/tests/gc-descriptors/gen-descriptor-tests.py \
39
		mono/tests/test_lldb.py scripts/mono-find-provides.in \
40
		scripts/mono-find-requires.in scripts/mono-heapviz \
41
		scripts/mono-package-runtime
42
BINARY_ALIAS=	python=${PYTHON_CMD}
43
44
CONFIGURE_ARGS_aarch64=	--with-csc=mcs
45
CONFIGURE_ARGS=	${CONFIGURE_ARGS_${ARCH}} --disable-dtrace
46
# Do not remove - this is needed to work around automake's lack of hinting
47
CONFIGURE_ENV+=	ac_cv_header_sys_inotify_h=yes
48
49
MAKE_ENV=	MONO_SHARED_DIR="${WRKDIR}" \
50
		INSTALL_STRIP_FLAG="${STRIP}"
51
52
TEST_ARGS=	-k
53
TEST_TARGET=	check
54
55
PORTSCOUT=	limit:^\d+\.\d+\.[1-9]\d*
56
57
# XXX MCL mat says: no. Options must not change themselves depending on what is installed.
58
# XXX MCL just leave this out for now to try to get *something* done.
59
# .if !exists(${LOCALBASE}/bin/mcs)
60
# OPTIONS_SLAVE=	MONOLITE
61
# .endif
62
63
# intentionally sorted alpha, then SPECTRE and MONODEV at the end
64
# because they have performance and security implications
65
OPTIONS_DEFINE=		BIGARRAY MONOLITE NINJA NLS ODBC X11 SPECTRE MONODEV
66
OPTIONS_DEFAULT=	MONOLITE NLS X11
67
OPTIONS_SUB=	yes
68
69
BIGARRAY_DESC=	Enable allocating arrays greater than Int32.MaxValue
70
BIGARRAY_CONFIGURE_ENABLE=	big-arrays
71
72
MONOLITE_DESC=		Use monolite to bootstrap mcs (otherwise use installed mcs)
73
MONOLITE_DISTFILES=	monolite-linux-${MONOLITE_VERSION}-latest.tar.gz:monolite
74
MONOLITE_MASTER_SITES=	http://download.mono-project.com/monolite/:monolite
75
# DO NOT ALTER OR REMOVE. DANGER, CASE-SENSITIVE!
76
# monolite 2020-01-13 @ 1798d23b
77
MONOLITE_VERSION=	1798d23b-3dbc-4161-b3f4-6bb00134ee4e
78
79
MONODEV_DESC=	Build for Mono development (disables crash privacy)
80
MONODEV_CONFIGURE_ON=	--enable-icall-symbol-map --enable-icall-export --with-crash_privacy=no
81
82
NINJA_DESC=	Use ninja to build wherever possible
83
NINJA_CONFIGURE_ON=	ninja
84
NINJA_USES=	ninja:build
85
86
NLS_DESC=	NLS Localization Support
87
NLS_CONFIGURE_OFF=	--disable-nls
88
NLS_USES=	gettext
89
90
ODBC_DESC=	System.Data: support for unixODBC
91
ODBC_BUILD_DEPENDS=	unixODBC>0:databases/unixODBC
92
ODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
93
94
SPECTRE_DESC=	Enable internal Mono Spectre mitigations (SEE pkg-descr)
95
SPECTRE_CONFIGURE_ON=	--with-spectre-mitigation=yes
96
97
X11_USES=	display:test
98
X11_CONFIGURE_WITH=	x
99
X11_RUN_DEPENDS=	pango>0:x11-toolkits/pango \
100
	libgdiplus>0:x11-toolkits/libgdiplus
101
102
.include <bsd.port.options.mk>
103
104
.if ${ARCH:Mpowerpc*}
105
PLIST+=		${.CURDIR}/pkg-plist.powerpc
106
.endif
107
108
.include <bsd.port.pre.mk>
109
110
.if defined(QEMU_EMULATING) && "${QEMU_EMULATING}" == "1"
111
BROKEN=		fails to build under qemu: Roslyn requires more functional POSIX implementation
112
.endif
113
114
post-patch:
115
	# Needed to force regeneration due to tarball packaging
116
	${RM} ${WRKSRC}/configure ${WRKSRC}/Makefile \
117
		${WRKSRC}/mono/Makefile \
118
		${WRKSRC}/mono/native/Makefile
119
120
post-install:
121
	${MKDIR} ${STAGEDIR}${PREFIX}/mono
122
123
.include <bsd.port.post.mk>
(-)a/lang/mono6.8/files/patch-boringssl (-138 lines)
Removed Link Here
1
diff --git a/CODE-OF-CONDUCT.md external/boringssl/CODE-OF-CONDUCT.md
2
new file mode 100644
3
index 00000000..775f221c
4
--- /dev/null
5
+++ external/boringssl/CODE-OF-CONDUCT.md
6
@@ -0,0 +1,6 @@
7
+# Code of Conduct
8
+
9
+This project has adopted the code of conduct defined by the Contributor Covenant
10
+to clarify expected behavior in our community.
11
+
12
+For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
13
diff --git a/THIRD-PARTY-NOTICES.TXT external/boringssl/THIRD-PARTY-NOTICES.TXT
14
new file mode 100644
15
index 00000000..069ac8f2
16
--- /dev/null
17
+++ external/boringssl/THIRD-PARTY-NOTICES.TXT
18
@@ -0,0 +1,20 @@
19
+Mono uses third-party libraries or other resources that may be
20
+distributed under licenses different than the .NET Core software.
21
+
22
+ Attributions and license notices for test cases originally authored by
23
+third parties can be found in the respective test directories.
24
+
25
+ In the event that we accidentally failed to list a required notice, please
26
+bring it to our attention. Post an issue or email us:
27
+
28
+            dotnet@microsoft.com
29
+
30
+ The attached notices are provided for information only.
31
+
32
+ License notice for Code Project
33
+--------------------------------
34
+
35
+Title: Thread Local Storage - The C++ Way
36
+Content: https://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way
37
+Reference: https://github.com/mono/boringssl/bloexternal/boringssl/eec2ca7e76c04ca41ef5bfc875ee3b0374cb7a94/crypto/thread_win.c#L138-L148
38
+License: https://www.codeproject.com/info/EULA.aspx
39
diff --git a/crypto/aes/asm/aesv8-armx.pl external/boringssl/crypto/aes/asm/aesv8-armx.pl
40
index 89e6f874..c41175a6 100644
41
--- a/crypto/aes/asm/aesv8-armx.pl
42
+++ external/boringssl/crypto/aes/asm/aesv8-armx.pl
43
@@ -51,15 +51,7 @@ $code=<<___;
44
 .text
45
 ___
46
 $code.=<<___ if ($flavour =~ /64/);
47
-#if !defined(__clang__)
48
 .arch   armv8-a+crypto
49
-#elif defined(ANDROID) && defined(__clang__) 
50
-#if __clang_major__ > 3
51
-.arch   armv8-a+crypto
52
-#else
53
-.arch   armv8-a+crypto,+neon
54
-#endif
55
-#endif
56
 ___
57
 $code.=".arch	armv7-a\n.fpu	neon\n.code	32\n"	if ($flavour !~ /64/);
58
 		#^^^^^^ this is done to simplify adoption by not depending
59
diff --git a/crypto/cpu-aarch64-linux.c external/boringssl/crypto/cpu-aarch64-linux.c
60
index 1b0f3955..93d12237 100644
61
--- a/crypto/cpu-aarch64-linux.c
62
+++ external/boringssl/crypto/cpu-aarch64-linux.c
63
@@ -25,6 +25,48 @@
64
 
65
 extern uint32_t OPENSSL_armcap_P;
66
 
67
+#if defined(__FreeBSD__)
68
+
69
+#include <stdlib.h>
70
+#include <sys/types.h>
71
+#include <machine/armreg.h>
72
+
73
+// Support for older version of armreg.h
74
+#ifndef ID_AA64ISAR0_AES_VAL
75
+#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES
76
+#endif
77
+#ifndef ID_AA64ISAR0_SHA1_VAL
78
+#define ID_AA64ISAR0_SHA1_VAL ID_AA64ISAR0_SHA1
79
+#endif
80
+#ifndef ID_AA64ISAR0_SHA2_VAL
81
+#define ID_AA64ISAR0_SHA2_VAL ID_AA64ISAR0_SHA2
82
+#endif
83
+
84
+void OPENSSL_cpuid_setup(void) {
85
+  if (getenv("QEMU_EMULATING") != NULL) {
86
+    return;
87
+  }
88
+
89
+  uint64_t isar0_val = READ_SPECIALREG(id_aa64isar0_el1);
90
+
91
+  OPENSSL_armcap_P |= ARMV7_NEON;
92
+
93
+  if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_BASE) {
94
+    OPENSSL_armcap_P |= ARMV8_PMULL;
95
+  }
96
+  if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_PMULL) {
97
+    OPENSSL_armcap_P |= ARMV8_PMULL;
98
+  }
99
+  if (ID_AA64ISAR0_SHA1_VAL(isar0_val) >= ID_AA64ISAR0_SHA1_BASE) {
100
+    OPENSSL_armcap_P |= ARMV8_SHA1;
101
+  }
102
+  if (ID_AA64ISAR0_SHA2_VAL(isar0_val) >= ID_AA64ISAR0_SHA2_BASE) {
103
+    OPENSSL_armcap_P |= ARMV8_SHA256;
104
+  }
105
+}
106
+
107
+#else // linux
108
+
109
 void OPENSSL_cpuid_setup(void) {
110
   unsigned long hwcap = getauxval(AT_HWCAP);
111
 
112
@@ -58,4 +100,6 @@ void OPENSSL_cpuid_setup(void) {
113
   }
114
 }
115
 
116
+#endif
117
+
118
 #endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */
119
diff --git a/crypto/modes/asm/ghashv8-armx.pl external/boringssl/crypto/modes/asm/ghashv8-armx.pl
120
index 73421405..eabef0cb 100644
121
--- a/crypto/modes/asm/ghashv8-armx.pl
122
+++ external/boringssl/crypto/modes/asm/ghashv8-armx.pl
123
@@ -59,15 +59,7 @@ $code=<<___;
124
 .text
125
 ___
126
 $code.=<<___ if ($flavour =~ /64/);
127
-#if !defined(__clang__)
128
 .arch   armv8-a+crypto
129
-#elif defined(ANDROID) && defined(__clang__) 
130
-#if __clang_major__ > 3
131
-.arch   armv8-a+crypto
132
-#else
133
-.arch   armv8-a+crypto,+neon
134
-#endif
135
-#endif
136
 ___
137
 $code.=".fpu	neon\n.code	32\n"	if ($flavour !~ /64/);
138
 
(-)a/lang/mono6.8/files/patch-mono_configure.ac (-121 lines)
Removed Link Here
1
--- configure.ac.orig	2020-05-11 11:05:34.000000000 -0700
2
+++ configure.ac	2021-12-09 11:17:20.499137000 -0800
3
@@ -2279,7 +2279,8 @@
4
 	dnl *** won't always indicate the interface sched_affinity has.  ***
5
 	dnl ****************************************************************
6
 	AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
7
-	AC_TRY_COMPILE([#include <sched.h>], [
8
+	AC_TRY_COMPILE([#define _WITH_CPU_SET_T
9
+#include <sched.h>], [
10
             int mask = 1; 
11
             sched_setaffinity(0, &mask);
12
 	], [
13
@@ -2290,8 +2291,9 @@
14
 		# We have the new, three-parameter version
15
 		AC_MSG_RESULT(no)
16
 	])
17
-	AC_TRY_COMPILE([#include <sched.h>], [
18
-	     CPU_COUNT((void *) 0);
19
+	AC_TRY_COMPILE([#define _WITH_CPU_SET_T
20
+#include <sched.h>], [
21
+	     CPU_COUNT((cpuset_t *) 0);
22
 	], [
23
 		AC_MSG_RESULT(yes)
24
 		AC_DEFINE(GLIBC_HAS_CPU_COUNT, 1, [GLIBC has CPU_COUNT macro in sched.h])
25
@@ -2346,14 +2348,6 @@
26
 	dnl *****************************
27
 	AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
28
 
29
-	case "$host" in
30
-		*-*-*freebsd*)
31
-			dnl *****************************
32
-			dnl *** Checks for libinotify ***
33
-			dnl *****************************
34
-			AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
35
-	esac
36
-
37
 	dnl *******************************
38
 	dnl *** Checks for MSG_NOSIGNAL ***
39
 	dnl *******************************
40
@@ -3619,6 +3613,37 @@
41
 	], [
42
 		AC_MSG_RESULT(no)
43
 	])
44
+	
45
+	case "$host" in
46
+		*-*-*freebsd*)
47
+			dnl *****************************
48
+			dnl *** Checks for libinotify ***
49
+			dnl *****************************
50
+			AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
51
+			AC_MSG_CHECKING(for METADATA_CFLAGS)
52
+			if test "x$ac_cv_lib_inotify_inotify_init" = "xyes" ; then
53
+				AC_DEFINE(HAVE_LIBINOTIFY, 1, [FreeBSD libinotify kqueue shim])
54
+				dnl Needs to be done this way to avoid collision with various
55
+				dnl ports includign glib and llvm*
56
+				METADATA_CFLAGS="-I/usr/local/include"
57
+				AC_SUBST(METADATA_CFLAGS)
58
+			fi
59
+			dnl Workaround due to inotify_rm_watch check failing without -I
60
+			AC_MSG_CHECKING(for inotify_rm_watch with unsigned wd in libinotify)
61
+			AC_TRY_LINK([
62
+				#include </usr/local/include/sys/inotify.h>
63
+			], [
64
+				intptr_t fd;
65
+				uint32_t wd;
66
+				int result = inotify_rm_watch(fd, wd);
67
+			],[
68
+			   AC_MSG_RESULT(yes)
69
+			   AC_DEFINE(INOTIFY_RM_WATCH_WD_UNSIGNED, 1, [inotify_rm_watch with unsigned wd])
70
+			], [
71
+				AC_MSG_RESULT(no)
72
+			])
73
+			;;
74
+	esac
75
 
76
 	CFLAGS="$ORIG_CFLAGS"
77
 
78
@@ -4465,13 +4490,27 @@
79
 		;;
80
 	macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
81
         powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
82
-        powerpc-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
83
+        powerpc*-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
84
 		if test "x$ac_cv_sizeof_void_p" = "x8"; then
85
 			TARGET=POWERPC64;
86
 			CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
87
-			if ! (echo $CC | grep -q -- 'clang'); then
88
-				CFLAGS="$CFLAGS -mminimal-toc"
89
-			fi
90
+			AC_MSG_NOTICE([Checking for PowerPC ISA -mminimal-toc support])
91
+			AX_CHECK_COMPILE_FLAG(
92
+				[-mminimal-toc],
93
+				[CFLAGS="$CFLAGS -mminimal-toc"],
94
+				[CFLAGS="$CFLAGS"]
95
+			)
96
+			case "$host" in
97
+				powerpc*-*-freebsd*)
98
+					# We need to be aware if we are ELFv1 or v2 here
99
+					AC_MSG_NOTICE([Checking FreeBSD ELF version])
100
+					if ! ( echo | cc -dM -E - | awk '/_CALL_ELF/ {print $NF}'); then
101
+						AC_DEFINE([POWERPC_ELF], 1, [PowerPC ELFv1])
102
+					else
103
+						AC_DEFINE([POWERPC_ELFV2], 1, [PowerPC ELFv2])
104
+					fi
105
+					;;
106
+			esac
107
 		else
108
 			TARGET=POWERPC;
109
 			CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
110
@@ -6488,9 +6527,9 @@
111
 	mono_native_text="FreeBSD"
112
 	MONO_NATIVE_CC=$CC
113
 	MONO_NATIVE_CXX=$CXX
114
-	MONO_NATIVE_CPPFLAGS=$CPPFLAGS
115
+	MONO_NATIVE_CPPFLAGS="$CPPFLAGS -I/usr/local/include"
116
 	MONO_NATIVE_CXXFLAGS=$CXXFLAGS
117
-	MONO_NATIVE_CFLAGS=$CFLAGS
118
+	MONO_NATIVE_CFLAGS="$CFLAGS -I/usr/local/include"
119
 	MONO_NATIVE_LDFLAGS=$LDFLAGS
120
 
121
 	mono_native=yes
(-)a/lang/mono6.8/files/patch-mono_native_Makefile.am (-15 lines)
Removed Link Here
1
# Upstreamed for next release
2
# PR#19234
3
--- mono/native/Makefile.am.orig	2020-03-16 13:42:24.386278000 -0400
4
+++ mono/native/Makefile.am	2020-03-16 13:42:43.715070000 -0400
5
@@ -159,10 +159,11 @@
6
 	-I$(abs_top_srcdir)/external/corefx/src/Native/Unix/Common \
7
 	-I$(abs_top_srcdir)/external/corefx/src/Native/Unix/System.Native \
8
 	-I$(abs_top_srcdir)/external/corefx/src/Native/AnyOS/brotli/include \
9
 	$(GLIB_CFLAGS) \
10
 	$(SHARED_CFLAGS) \
11
+	$(METADATA_CFLAGS) \
12
 	-DBROTLI_BUILD_NO_RBIT \
13
 	-Wno-typedef-redefinition
14
 
15
 endif # !ENABLE_MSVC_ONLY
(-)a/lang/mono6.8/files/patch-mono_utils_mono-proclib.c (-10 lines)
Removed Link Here
1
--- mono/utils/mono-proclib.c.orig	2018-08-24 08:17:13.000000000 -0700
2
+++ mono/utils/mono-proclib.c	2021-11-27 14:55:20.354869000 -0800
3
@@ -17,6 +17,7 @@
4
 #include <unistd.h>
5
 #endif
6
 #ifdef HAVE_SCHED_GETAFFINITY
7
+#define _WITH_CPU_SET_T
8
 #include <sched.h>
9
 #endif
10
 

Return to bug 262637