pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mono: Partial update to 4.6.0.125



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Aug 10 02:51:45 2016 +0200
Changeset:	8bd71b4aa7d1e6335f4beb4d26e1f16fd3de1226

Modified Files:
	mono/Makefile
	mono/distinfo
	mono/patches/patch-ad
	mono/patches/patch-am
	mono/patches/patch-bd
	mono/patches/patch-configure
	mono/patches/patch-mono_metadata_mono-perfcounters.c
	mono/patches/patch-mono_mini_mini-arm.c
Removed Files:
	mono/patches/patch-aa
	mono/patches/patch-af
	mono/patches/patch-ai
	mono/patches/patch-bc
	mono/patches/patch-cc
	mono/patches/patch-data_mono-nunit.pc.in
	mono/patches/patch-db
	mono/patches/patch-mono_dis_Makefile.in
	mono/patches/patch-mono_metadata_icall.c
	mono/patches/patch-mono_unit-tests_Makefile.in
	mono/patches/patch-mono_utils_Makefile.in
	mono/patches/patch-mono_utils_mono-semaphore.c
	mono/patches/patch-mono_utils_mono-threads-posix.c

Log Message:
mono: Partial update to 4.6.0.125

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8bd71b4aa7d1e6335f4beb4d26e1f16fd3de1226

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mono/Makefile                                      |   5 +-
 mono/distinfo                                      |  33 +---
 mono/patches/patch-aa                              |  15 --
 mono/patches/patch-ad                              |  43 +----
 mono/patches/patch-af                              |  12 --
 mono/patches/patch-ai                              | 207 ---------------------
 mono/patches/patch-am                              |  13 +-
 mono/patches/patch-bc                              |  23 ---
 mono/patches/patch-bd                              |   6 +-
 mono/patches/patch-cc                              |  33 ----
 mono/patches/patch-configure                       | 121 +-----------
 mono/patches/patch-data_mono-nunit.pc.in           |  12 --
 mono/patches/patch-db                              |  37 ----
 mono/patches/patch-mono_dis_Makefile.in            |  13 --
 mono/patches/patch-mono_metadata_icall.c           |  22 ---
 .../patch-mono_metadata_mono-perfcounters.c        |  31 +--
 mono/patches/patch-mono_mini_mini-arm.c            |  41 +---
 mono/patches/patch-mono_unit-tests_Makefile.in     |  21 ---
 mono/patches/patch-mono_utils_Makefile.in          |  43 -----
 mono/patches/patch-mono_utils_mono-semaphore.c     |  55 ------
 mono/patches/patch-mono_utils_mono-threads-posix.c |  26 ---
 21 files changed, 32 insertions(+), 780 deletions(-)

diffs:
diff --git a/mono/Makefile b/mono/Makefile
index e6776ef..285ce42 100644
--- a/mono/Makefile
+++ b/mono/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.168 2016/02/24 16:48:09 jperkin Exp $
 
-DISTNAME=	mono-4.4.0.122
+DISTNAME=	mono-4.6.0.125
 CATEGORIES=	lang
 MASTER_SITES=	http://download.mono-project.com/sources/mono/
 EXTRACT_SUFX=	.tar.bz2
@@ -10,10 +10,11 @@ HOMEPAGE=	http://www.mono-project.com/
 COMMENT=	Open source implementation of the .NET Development Framework
 LICENSE=	mit AND gnu-gpl-v2 AND gnu-lgpl-v2 AND apache-2.0
 
+WRKSRC=		${WRKDIR}/${DISTNAME:R}
+
 BUILD_DEPENDS+=	p5-XML-Parser-[0-9]*:../../textproc/p5-XML-Parser
 CONFLICTS=	pnet-[0-9]* mcsim-[0-9]* lc-[0-9]*
 ALL_ENV+=	MONO_SHARED_DIR=${WRKDIR:Q} PLATFORM=
-WRKSRC=		${WRKDIR}/mono-4.0.4
 
 USE_TOOLS+=	bash:run bison gmake gtar msgfmt perl:run pkg-config
 USE_LIBTOOL=	yes
diff --git a/mono/distinfo b/mono/distinfo
index 57e0736..2fba52b 100644
--- a/mono/distinfo
+++ b/mono/distinfo
@@ -1,37 +1,30 @@
 $NetBSD: distinfo,v 1.107 2015/11/03 22:50:39 agc Exp $
 
-SHA1 (mono-4.4.0.122.tar.bz2) = 132a8e9aa422e82ccdb776c7cc1db89ce140b0b3
-RMD160 (mono-4.4.0.122.tar.bz2) = 41d58720d7cb4f510cad64c1dbecdd9a6c9d19a1
-SHA512 (mono-4.4.0.122.tar.bz2) = 264b3779fc94e40c44f8cc637169d7f3a6367ead75b932069bc0498d53c13ea62ef5711784d1bc0767b85e0cb04424b9eee0ce7ed10772076902b55210097a10
-Size (mono-4.4.0.122.tar.bz2) = 84904723 bytes
-SHA1 (patch-aa) = 84e5bca2b6d9715271c343f774c81186858d90c9
-SHA1 (patch-ad) = ebd47980f0141f7cbd0c6bbcfc15942cebc263f1
+SHA1 (mono-4.6.0.125.tar.bz2) = b207c6a3297bdf65af095de3e302b9a6f8d6fabc
+RMD160 (mono-4.6.0.125.tar.bz2) = 9dcad0eab1e7a90d3a3595ac53c100d6ef540a1f
+SHA512 (mono-4.6.0.125.tar.bz2) = 6f5df66021c472808a5c3c6b43dcb89c9f3616b95ded63cf6b5e69b39bfcbfaa673a3bae8ec62c1dd87629bbafa039177242730f79a18d8fd44f455325913e99
+Size (mono-4.6.0.125.tar.bz2) = 100227098 bytes
+SHA1 (patch-ad) = 7e3e11b7a519b7fef82f3de167ea63a4ee413de5
 SHA1 (patch-ae) = 25869b98f9197243aea799b75b238d92f58e8845
-SHA1 (patch-af) = 6a458a91dc34420d45238b5dad01ed63f0bd9e00
-SHA1 (patch-ai) = d06c382d188f4263a2a505ca3d3ee491baa3af28
 SHA1 (patch-aj) = 33b75ec2662cc442f602b21b03fee1e5c39e3a76
 SHA1 (patch-ak) = 262845edcf84cf5127b7e01963f0d433aad7682a
 SHA1 (patch-al) = 07462d3f9cf2aa08b1fb837400084d32a7062eee
-SHA1 (patch-am) = ff0af9c120ebeb59edcdb727c7d36aa5939c73af
+SHA1 (patch-am) = 450766a4951d6e9f5633dfd4ebd801606198b2fb
 SHA1 (patch-ap) = e0590d7014ae4ef74ee9f9c39f069411a66c8f76
 SHA1 (patch-aq) = 91f8384c62e4a7a1b2079038495a1a78364926c9
 SHA1 (patch-ar) = e225bfaa1a18aa5997a1a6472889da3a0ec533cc
 SHA1 (patch-as) = 101c0119f498a389613a3cd54497e85b3aece1c2
 SHA1 (patch-ba) = f501f1fa3e603660dc8f64ea6bc020b4f4c08a57
-SHA1 (patch-bc) = 1fbb3d78683dc29944eb69d2b033f34539da2b39
-SHA1 (patch-bd) = a6706236caae06c5defa5c8e2488380cc64f93ab
+SHA1 (patch-bd) = 55ce86203c1a1734354ead3e55083c5d997e78ad
 SHA1 (patch-be) = d1b603478ff8b1acdd2160efe2d88974f62ac20f
 SHA1 (patch-bf) = 550c198e41ccc33dd690950754af4557df9b1d1d
 SHA1 (patch-bi) = 4d2252c53facafeb8fc7f459759294da5f14dfeb
-SHA1 (patch-cc) = d26c9e04f04896f0e7b2edab61cd347d76e0fcaf
-SHA1 (patch-configure) = 20af37b1f87623504d8e70dd6b749eeb3bf0118a
+SHA1 (patch-configure) = 31556388f316ec2c050599a3d727a792a88dfbfa
 SHA1 (patch-da) = 08c7c78aa4c6f1a1de4d34aebe05cd2ed1e7dcfd
 SHA1 (patch-data_Makefile.in) = 0c54664b1a59714c6bec02547d70eaa7dee47928
-SHA1 (patch-data_mono-nunit.pc.in) = 59e0a932727b842ac90c2d0b702481d62f72cab8
 SHA1 (patch-data_net_4_0_Browsers_Makefile.in) = ab4baa45dd75b87786cbc7d942611915d5ae1f72
 SHA1 (patch-data_net_4_5_Browsers_Makefile.in) = e4cab08ffa040020684edb3a9fbc8e448d2faf35
 SHA1 (patch-data_net_4_5_Makefile.in) = 778be615f4f21f2561e47e082302c09f02c6f8f6
-SHA1 (patch-db) = 185ae2e5cbac9bca99443efbc5a8ae63423656cf
 SHA1 (patch-dc) = 725c82a9ac4ae9c01045149504a6df6a64d808a3
 SHA1 (patch-de) = 0c2a123868b20236fceb93d33fa3084a1afd004c
 SHA1 (patch-df) = b2780e809d681795a6bdd9039ec890cfc9362187
@@ -43,20 +36,14 @@ SHA1 (patch-dl) = dc63c1d3f6a1d78b2f5bb725cdff6824e2307dc5
 SHA1 (patch-do) = 0bda0d2e482be218fb502e0c4ea945a41d078d27
 SHA1 (patch-libgc_misc.c) = 52c68e7b6f1b58f480286bd135591f97a3e13125
 SHA1 (patch-man_mprof-report.1) = 0a80c164614cc9af5f01822005193d80f1d89946
-SHA1 (patch-mono_dis_Makefile.in) = f000112e2712faf29104489e45feae8d6fc45169
-SHA1 (patch-mono_metadata_icall.c) = 191a7fccb174855026cb11dd0f6ac450bb920ec7
-SHA1 (patch-mono_metadata_mono-perfcounters.c) = 8cfbfa62fe4201a20bc07645ccf6b13487a64fc3
+SHA1 (patch-mono_metadata_mono-perfcounters.c) = 3a156099e6ad26c7260326d2555037574db0323d
 SHA1 (patch-mono_metadata_mono-route.c) = 6eb741efca0a66fae894f7c49fa8f6393079e67f
-SHA1 (patch-mono_mini_mini-arm.c) = 1c4f85a6b2a49604a6b4299f65f0c93d0c01ffa3
+SHA1 (patch-mono_mini_mini-arm.c) = 6139e45a762c7707e3e177e81c65ff523148de0f
 SHA1 (patch-mono_profiler_proflog.c) = 060e8052aeedc1ee224d33644f39b8085a6c92a2
-SHA1 (patch-mono_unit-tests_Makefile.in) = 98cb082e2e0ad53c36b513a7bce9568c26e14f21
-SHA1 (patch-mono_utils_Makefile.in) = be9caeff6d687e8c686d7436db2f39f7803c231a
 SHA1 (patch-mono_utils_mono-compiler.h) = 210062c167c00500f6a9176ef94c8cd96d39c730
 SHA1 (patch-mono_utils_mono-mmap.c) = 869c24a57861fcfb1bdc8a04ed0e0d1fd5a0e0b5
-SHA1 (patch-mono_utils_mono-semaphore.c) = a47c7816445c7781e1cf0efc889dedfbf5b351f9
 SHA1 (patch-mono_utils_mono-threads-dragonfly.c) = d41c7735d5ba0224ff4a4cf70308fb835ec00bbe
 SHA1 (patch-mono_utils_mono-threads-netbsd.c) = 29d7bdb4906bca4e2f5a0a94b7e70e04570df8ee
-SHA1 (patch-mono_utils_mono-threads-posix.c) = d0cb2b1be62cbafe86a3efa817b8120af4ab1086
 SHA1 (patch-mono_utils_mono-threads-solaris.c) = 8781c9e09edfbbbc9940f02cce46a3ce5b6c10c3
 SHA1 (patch-po_Makefile.in) = 53f967c75ae028d991f118fb3bbc5b90bb4ceea7
 SHA1 (patch-support_signal.c) = 33e0c19c21955b105d78a05b2b10d00f479a60c2
diff --git a/mono/patches/patch-aa b/mono/patches/patch-aa
deleted file mode 100644
index 2a2f646..0000000
--- a/mono/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.18 2014/11/30 08:40:51 spz Exp $
---- mono/io-layer/collection.c.orig	2014-09-22 13:23:09.000000000 +0000
-+++ mono/io-layer/collection.c
-@@ -58,7 +58,11 @@ void _wapi_collection_init (void)
- 
- #if defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE)
-         if (set_stacksize == 0) {
-+#ifdef PTHREAD_STACK_MIN
- 			ret = pthread_attr_setstacksize (&attr, MAX (65536, PTHREAD_STACK_MIN));
-+#else
-+			ret = pthread_attr_setstacksize (&attr, 65536);
-+#endif
- 			g_assert (ret == 0);
-         } else if (set_stacksize == 1) {
- 			ret = pthread_attr_setstacksize (&attr, 131072);
diff --git a/mono/patches/patch-ad b/mono/patches/patch-ad
index 4f840bb..32efd20 100644
--- a/mono/patches/patch-ad
+++ b/mono/patches/patch-ad
@@ -1,19 +1,8 @@
 $NetBSD: patch-ad,v 1.27 2014/11/30 08:40:51 spz Exp $
 
---- mono/utils/mono-sigcontext.h.orig	2014-09-22 13:23:09.000000000 +0000
+--- mono/utils/mono-sigcontext.h.orig	2016-08-03 10:33:32.000000000 +0000
 +++ mono/utils/mono-sigcontext.h
-@@ -204,6 +204,10 @@ typedef struct ucontext {
- 	#define UCONTEXT_REG_RSI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RSI])
- 	#define UCONTEXT_REG_RDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RDI])
- 	#define UCONTEXT_REG_RIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RIP])
-+	#define UCONTEXT_REG_R8(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R8])
-+	#define UCONTEXT_REG_R9(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R9])
-+	#define UCONTEXT_REG_R10(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R10])
-+	#define UCONTEXT_REG_R11(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R11])
- 	#define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R12])
- 	#define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R13])
- 	#define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_R14])
-@@ -292,7 +296,7 @@ typedef struct ucontext {
+@@ -293,7 +293,7 @@ typedef struct ucontext {
  	#define UCONTEXT_REG_FPRn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.__fpregs.__fpu_regs [(n)])
  	#define UCONTEXT_REG_NIP(ctx)     _UC_MACHINE_PC(ctx)
  	#define UCONTEXT_REG_LNK(ctx)     (((os_ucontext*)(ctx))->uc_mcontext.__gregs [_REG_LR])
@@ -22,31 +11,3 @@ $NetBSD: patch-ad,v 1.27 2014/11/30 08:40:51 spz Exp $
  	typedef ucontext_t os_ucontext;
  
  	#define UCONTEXT_REG_Rn(ctx, n)   ((ctx)->uc_mcontext.mc_gpr [(n)])
-@@ -354,6 +358,27 @@ typedef struct ucontext {
- 	#define UCONTEXT_REG_R11(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_fp)
- 	#define UCONTEXT_REG_R12(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_ip)
- 	#define UCONTEXT_REG_CPSR(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_cpsr)
-+#elif defined(__NetBSD__)
-+	typedef ucontext_t arm_ucontext;
-+
-+	#define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_PC])
-+	#define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_SP])
-+	#define UCONTEXT_REG_LR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_LR])
-+	#define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R0])
-+	#define UCONTEXT_REG_R1(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R1])
-+	#define UCONTEXT_REG_R2(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R2])
-+	#define UCONTEXT_REG_R3(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R3])
-+	#define UCONTEXT_REG_R4(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R4])
-+	#define UCONTEXT_REG_R5(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R5])
-+	#define UCONTEXT_REG_R6(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R6])
-+	#define UCONTEXT_REG_R7(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R7])
-+	#define UCONTEXT_REG_R8(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R8])
-+	#define UCONTEXT_REG_R9(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R9])
-+	#define UCONTEXT_REG_R10(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R10])
-+	#define UCONTEXT_REG_R11(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R11])
-+	#define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R12])
-+	#define UCONTEXT_REG_CPSR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_CPSR])
-+	#define UCONTEXT_REG_VFPREGS(ctx) (double*)(&((ucontext_t*)(ctx))->uc_mcontext.__fpu)
- #endif
- 
- #elif defined(TARGET_ARM64)
diff --git a/mono/patches/patch-af b/mono/patches/patch-af
deleted file mode 100644
index 496a08a..0000000
--- a/mono/patches/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-af,v 1.14 2014/11/30 08:40:51 spz Exp $
---- mono/metadata/Makefile.in.orig	2014-10-04 09:29:00.000000000 +0000
-+++ mono/metadata/Makefile.in
-@@ -213,7 +213,7 @@ libmonoruntime_static_la_LINK = $(LIBTOO
- 	$(libmonoruntime_static_la_CFLAGS) $(CFLAGS) \
- 	$(libmonoruntime_static_la_LDFLAGS) $(LDFLAGS) -o $@
- @DISABLE_EXECUTABLES_FALSE@@SUPPORT_BOEHM_TRUE@am_libmonoruntime_static_la_rpath =
--libmonoruntime_la_LIBADD =
-+libmonoruntime_la_LIBADD = $(ICU_LIBS)
- am__libmonoruntime_la_SOURCES_DIST = console-unix.c console-win32.c \
- 	assembly.c attach.h attach.c char-conversions.h cil-coff.h \
- 	class.c class-internals.h cominterop.c cominterop.h \
diff --git a/mono/patches/patch-ai b/mono/patches/patch-ai
deleted file mode 100644
index b88445a..0000000
--- a/mono/patches/patch-ai
+++ /dev/null
@@ -1,207 +0,0 @@
-$NetBSD: patch-ai,v 1.10 2014/11/30 08:40:51 spz Exp $
-
---- mono/metadata/object.c.orig	2014-10-04 09:27:43.000000000 +0000
-+++ mono/metadata/object.c
-@@ -4122,6 +4122,135 @@ mono_install_runtime_invoke (MonoInvokeF
- 	default_mono_runtime_invoke = func ? func: dummy_mono_runtime_invoke;
- }
- 
-+/*
-+ * is_widen_compatible:
-+ * 
-+ * Tests if @candidate can be used in place of @type by means of a widening conversion.
-+ * This means, for example, that a byte can be widened to an int and be used as argument in
-+ * a reflection call. 
-+ * 
-+ * Returns true if @candidate can be widened to @type.
-+ */
-+static gboolean
-+is_widen_compatible (MonoType * type, MonoType *candidate)
-+{
-+	if (type->type == candidate->type)
-+		return TRUE;
-+
-+	switch (candidate->type) {
-+	case MONO_TYPE_U1:
-+		switch (type->type) {
-+		case MONO_TYPE_U2:
-+		case MONO_TYPE_I2:
-+		case MONO_TYPE_CHAR:
-+		case MONO_TYPE_U:
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_U4:
-+		case MONO_TYPE_I4:
-+		case MONO_TYPE_U8:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_I1:
-+		switch (type->type) {
-+		case MONO_TYPE_I2:
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_I4:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+	case MONO_TYPE_BOOLEAN:
-+		return type->type == MONO_TYPE_BOOLEAN;
-+	case MONO_TYPE_U2:
-+		switch (type->type) {
-+		case MONO_TYPE_U2:
-+		case MONO_TYPE_U:
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_U4:
-+		case MONO_TYPE_I4:
-+		case MONO_TYPE_U8:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_I2:
-+		switch (type->type) {
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_I4:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_CHAR:
-+		switch (type->type) {
-+		case MONO_TYPE_U2:
-+		case MONO_TYPE_U:
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_U4:
-+		case MONO_TYPE_I4:
-+		case MONO_TYPE_U8:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_U:
-+		switch (type->type) {
-+		case MONO_TYPE_U4:
-+		case MONO_TYPE_U8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_I:
-+		switch (type->type) {
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_U4:
-+		switch (type->type) {
-+		case MONO_TYPE_U:
-+		case MONO_TYPE_U8:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_I4:
-+		switch (type->type) {
-+		case MONO_TYPE_I:
-+		case MONO_TYPE_I8:
-+		case MONO_TYPE_R4:
-+		case MONO_TYPE_R8:
-+			return TRUE;
-+		}
-+		return FALSE;
-+	case MONO_TYPE_U8:
-+	case MONO_TYPE_I8:
-+		return type->type == MONO_TYPE_R4 || type->type == MONO_TYPE_R8;
-+	case MONO_TYPE_R4:
-+		return type->type == MONO_TYPE_R8;
-+	case MONO_TYPE_R8:
-+		break;
-+	}
-+	return FALSE;
-+}
- 
- /**
-  * mono_runtime_invoke_array:
-@@ -4174,6 +4303,8 @@ mono_runtime_invoke_array (MonoMethod *m
- 		pa = alloca (sizeof (gpointer) * mono_array_length (params));
- 		for (i = 0; i < mono_array_length (params); i++) {
- 			MonoType *t = sig->params [i];
-+			MonoClass *par_class = mono_class_from_mono_type (t);
-+			MonoObject *pao;
- 
- 		again:
- 			switch (t->type) {
-@@ -4198,9 +4329,16 @@ mono_runtime_invoke_array (MonoMethod *m
- 					if (t->byref)
- 						has_byref_nullables = TRUE;
- 				} else {
-+					pao = mono_array_get (params, MonoObject*, i);
- 					/* MS seems to create the objects if a null is passed in */
--					if (!mono_array_get (params, MonoObject*, i))
--						mono_array_setref (params, i, mono_object_new (mono_domain_get (), mono_class_from_mono_type (sig->params [i]))); 
-+					if (pao) {
-+						if ((t->type == MONO_TYPE_VALUETYPE && pao->vtable->klass != par_class) ||
-+							(t->type != MONO_TYPE_VALUETYPE && !is_widen_compatible (t, &pao->vtable->klass->byval_arg)))
-+							mono_raise_exception (mono_get_exception_argument ("", "Incompatible type passed"));
-+					} else {
-+						pao = mono_object_new (mono_domain_get (), par_class);
-+						mono_array_setref (params, i, pao);
-+					}
- 
- 					if (t->byref) {
- 						/*
-@@ -4210,12 +4348,13 @@ mono_runtime_invoke_array (MonoMethod *m
- 						 * object, pass that to the callee, and replace the original
- 						 * boxed object in the arg array with the copy.
- 						 */
--						MonoObject *orig = mono_array_get (params, MonoObject*, i);
-+						MonoObject *orig = pao;
- 						MonoObject *copy = mono_value_box (mono_domain_get (), orig->vtable->klass, mono_object_unbox (orig));
- 						mono_array_setref (params, i, copy);
-+						pao = copy;
- 					}
- 						
--					pa [i] = mono_object_unbox (mono_array_get (params, MonoObject*, i));
-+					pa [i] = mono_object_unbox (pao);
- 				}
- 				break;
- 			case MONO_TYPE_STRING:
-@@ -4223,11 +4362,19 @@ mono_runtime_invoke_array (MonoMethod *m
- 			case MONO_TYPE_CLASS:
- 			case MONO_TYPE_ARRAY:
- 			case MONO_TYPE_SZARRAY:
--				if (t->byref)
-+				if (t->byref) {
- 					pa [i] = mono_array_addr (params, MonoObject*, i);
- 					// FIXME: I need to check this code path
--				else
--					pa [i] = mono_array_get (params, MonoObject*, i);
-+				} else {
-+					pao = mono_array_get (params, MonoObject*, i);
-+					pa [i] = pao;
-+					
-+					if (pao != NULL && !mono_class_is_assignable_from (par_class, pao->vtable->klass) &&
-+						(pao->vtable->klass == mono_defaults.transparent_proxy_class &&
-+							!mono_class_is_assignable_from (par_class, ((MonoTransparentProxy*)pao)->remote_class->proxy_class))) {
-+						mono_raise_exception (mono_get_exception_argument ("", "Incompatible type passed"));
-+					}
-+				}
- 				break;
- 			case MONO_TYPE_GENERICINST:
- 				if (t->byref)
diff --git a/mono/patches/patch-am b/mono/patches/patch-am
index 7c519a6..70aab4e 100644
--- a/mono/patches/patch-am
+++ b/mono/patches/patch-am
@@ -1,17 +1,8 @@
 $NetBSD: patch-am,v 1.7 2014/11/30 08:40:51 spz Exp $
 
---- mono/io-layer/io.c.orig	2014-10-04 09:27:43.000000000 +0000
+--- mono/io-layer/io.c.orig	2016-08-03 10:33:31.000000000 +0000
 +++ mono/io-layer/io.c
-@@ -3463,7 +3463,7 @@ guint32 GetTempPath (guint32 len, gunich
- 	return(ret);
- }
- 
--#ifdef HAVE_GETFSSTAT
-+#if (defined(HAVE_GETFSSTAT) && defined(HAVE_SYS_STATFS_H))
- /* Darwin has getfsstat */
- gint32 GetLogicalDriveStrings (guint32 len, gunichar2 *buf)
- {
-@@ -4260,7 +4260,7 @@ guint32 GetDriveType(const gunichar2 *ro
+@@ -4241,7 +4241,7 @@ guint32 GetDriveType(const gunichar2 *ro
  	return (drive_type);
  }
  
diff --git a/mono/patches/patch-bc b/mono/patches/patch-bc
deleted file mode 100644
index 2fffbd4..0000000
--- a/mono/patches/patch-bc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-bc,v 1.8 2014/11/30 08:40:51 spz Exp $
-
---- mono/mini/Makefile.in.orig	2014-10-04 09:29:00.000000000 +0000
-+++ mono/mini/Makefile.in
-@@ -3018,15 +3018,15 @@ mbench: test.exe
- 
- stat1: mono bench.exe
- 	$(RUNTIME) --verbose --statfile stats.pl --regression bench.exe
--	perl viewstat.pl stats.pl
-+	$(PERL) viewstat.pl stats.pl
- 
- stat2: mono basic.exe
- 	$(RUNTIME) --verbose --statfile stats.pl --regression basic.exe
--	perl viewstat.pl -e stats.pl
-+	$(PERL) viewstat.pl -e stats.pl
- 
- stat3: mono bench.exe
- 	$(RUNTIME) --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe 
--	perl viewstat.pl stats.pl
-+	$(PERL) viewstat.pl stats.pl
- 
- docu: mini.sgm
- 	docbook2txt mini.sgm
diff --git a/mono/patches/patch-bd b/mono/patches/patch-bd
index 55206c0..966c1a8 100644
--- a/mono/patches/patch-bd
+++ b/mono/patches/patch-bd
@@ -2,16 +2,16 @@ $NetBSD: patch-bd,v 1.7 2015/06/04 17:16:20 jperkin Exp $
 
 Add MANDIR, but don't hardcode it (fixed in post-patch by SUBST_*).
 
---- mcs/build/config-default.make.orig	2014-09-22 13:23:05.000000000 +0000
+--- mcs/build/config-default.make.orig	2016-08-03 10:33:24.000000000 +0000
 +++ mcs/build/config-default.make
 @@ -17,8 +17,9 @@ LIBRARY_FLAGS = /noconfig
  ifndef CFLAGS
  CFLAGS = -g -O2
  endif
 -prefix = /usr/local
-+prefix = @PREFIX@
++prefix = /usr/pkg
  exec_prefix = $(prefix)
-+mandir = @PKGMANDIR@
++mandir = man
  mono_libdir = $(exec_prefix)/lib
  sysconfdir = $(prefix)/etc
  #RUNTIME = mono
diff --git a/mono/patches/patch-cc b/mono/patches/patch-cc
deleted file mode 100644
index 093c299..0000000
--- a/mono/patches/patch-cc
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-cc,v 1.6 2014/11/30 08:40:51 spz Exp $
-
-Currently mono is not copying the domain default context for some of
-the newly created threads. This leads to some problems with programs
-that use remoting stack, for example monodevelop that is unusable -
-it doesn't compile and run projects. The following hack fixes the
-issue until further investigations for pkgsrc-2010Q3 release.
-
-Bug tracking: https://bugzilla.novell.com/show_bug.cgi?id=599485
-
-
---- mono/metadata/domain.c.orig	2014-10-04 09:27:43.000000000 +0000
-+++ mono/metadata/domain.c
-@@ -2359,7 +2359,18 @@ mono_context_set (MonoAppContext * new_c
- MonoAppContext * 
- mono_context_get (void)
- {
--	return GET_APPCONTEXT ();
-+	MonoAppContext *retval = GET_APPCONTEXT();
-+#ifdef __NetBSD__
-+	/*
-+	 * We gotta find out why context is sometime NULL for newly threads
-+	 * Until then use default context if it's not set
-+	 */
-+	if(retval == NULL) {
-+		retval = ves_icall_System_AppDomain_InternalGetDefaultContext();
-+		mono_context_set(retval);
-+	}
-+#endif
-+	return retval;
- }
- 
- /* LOCKING: the caller holds the lock for this domain */
diff --git a/mono/patches/patch-configure b/mono/patches/patch-configure
index 0d7d309..ab22692 100644
--- a/mono/patches/patch-configure
+++ b/mono/patches/patch-configure
@@ -1,41 +1,8 @@
 $NetBSD: patch-configure,v 1.3 2015/08/25 12:23:00 wiz Exp $
 
---- configure.orig	2015-08-04 07:48:54.000000000 +0000
+--- configure.orig	2016-08-03 10:40:14.000000000 +0000
 +++ configure
-@@ -3983,7 +3983,7 @@ $as_echo "#define PLATFORM_NO_SYMLINKS 1
- 		mono_cv_clang=no
- 		if test "x$cross_compiling" = "xno"; then
- 			target_win32=yes
--			if test "x$host" == "x$build" -a "x$host" == "x$target"; then
-+			if test "x$host" = "x$build" -a "x$host" = "x$target"; then
- 
- $as_echo "#define TARGET_WIN32 1" >>confdefs.h
- 
-@@ -4020,10 +4020,13 @@ $as_echo "#define MINGW_CROSS_COMPILE 1"
- 		CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
- 		libmono_ldflags="-pthread"
- 		need_link_unlink=yes
--		libdl="-ldl"
-+		libdl="-ldl /libexec/ld.elf_so"
- 		libgc_threads=pthreads
- 		with_sigaltstack=no
- 		use_sigposix=yes
-+		cat >>confdefs.h <<\_ACEOF
-+#define PTHREAD_POINTER_ID 1
-+_ACEOF
- 		;;
- 	*-*-kfreebsd*-gnu)
- 		host_win32=no
-@@ -4036,7 +4039,7 @@ $as_echo "#define MINGW_CROSS_COMPILE 1"
- 		with_sigaltstack=no
- 		use_sigposix=yes
- 		;;
--	*-*-*freebsd*)
-+	*-*-*freebsd* | *-*-*dragonfly*)
- 		host_win32=no
- 		if test "x$PTHREAD_CFLAGS" = "x"; then
- 			CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
-@@ -4052,7 +4055,8 @@ $as_echo "#define MINGW_CROSS_COMPILE 1"
+@@ -4070,7 +4070,8 @@ $as_echo "#define PLATFORM_NO_SYMLINKS 1
  			LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
  			libmono_ldflags="$PTHREAD_LIBS"
  		fi
@@ -45,7 +12,7 @@ $NetBSD: patch-configure,v 1.3 2015/08/25 12:23:00 wiz Exp $
  		need_link_unlink=yes
  
  $as_echo "#define PTHREAD_POINTER_ID 1" >>confdefs.h
-@@ -21999,9 +22003,7 @@ done
+@@ -21740,9 +21741,7 @@ done
  			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris XPG4 support" >&5
  $as_echo_n "checking for Solaris XPG4 support... " >&6; }
  			if test -f /usr/lib/libxnet.so; then
@@ -55,25 +22,7 @@ $NetBSD: patch-configure,v 1.3 2015/08/25 12:23:00 wiz Exp $
             			LIBS="$LIBS -lxnet"
    	    			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  $as_echo "yes" >&6; }
-@@ -25084,7 +25086,7 @@ else
-   test_perf_events=no
- fi
- 
--if test "x$test_perf_events" == "xyes"; then
-+if test "x$test_perf_events" = "xyes"; then
- 
- $as_echo "#define ENABLE_PERF_EVENTS 1" >>confdefs.h
- 
-@@ -25422,7 +25424,7 @@ $as_echo_n "checking LLVM version... " >
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_version" >&5
- $as_echo "$llvm_version" >&6; }
-    if echo $llvm_version | grep -q 'mono'; then
--	  if test "x$enable_llvm_version_check" == "xyes"; then
-+	  if test "x$enable_llvm_version_check" = "xyes"; then
- 	  	 if test "$llvm_version" != "$expected_llvm_version"; then
- 	  	 	as_fn_error $? "Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version\"" "$LINENO" 5
- 	  	 fi
-@@ -25504,7 +25506,7 @@ LIBC="libc.so.6"
+@@ -25382,7 +25381,7 @@ LIBC="libc.so.6"
  INTL="libc.so.6"
  SQLITE="libsqlite.so.0"
  SQLITE3="libsqlite3.so.0"
@@ -82,38 +31,7 @@ $NetBSD: patch-configure,v 1.3 2015/08/25 12:23:00 wiz Exp $
  GDKX11="libgdk-x11-2.0.so.0"
  GTKX11="libgtk-x11-2.0.so.0"
  XINERAMA="libXinerama.so.1"
-@@ -25608,6 +25610,11 @@ $as_echo "#define __mono_ilp32__ 1" >>co
- 			sizeof_register=8
- 		fi
- 		case $host_os in
-+		  solaris*)
-+			LIBC="libc.so"
-+			INTL="libintl.so"
-+			have_visibility_hidden=no
-+			;;
- 		  linux*)
- 			sgen_supported=true
- 			AOT_SUPPORTED="yes"
-@@ -25739,12 +25746,15 @@ fi
- 		CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
- 		sgen_supported=true
- 		;;
--	arm*-linux*)
-+	arm*-linux* | arm*-netbsd* | earm*-netbsd*)
- 		TARGET=ARM;
- 		arch_target=arm;
- 		ACCESS_UNALIGNED="no"
--		sgen_supported=true
--		AOT_SUPPORTED="yes"
-+		case $host_os in
-+		  *linux)
-+			sgen_supported=true
-+			AOT_SUPPORTED="yes"
-+		esac
- 		CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
- 		;;
- # TODO: make proper support for NaCl host.
-@@ -25854,7 +25864,7 @@ $as_echo "#define TARGET_X86 1" >>confde
+@@ -25739,7 +25738,7 @@ $as_echo "#define TARGET_X86 1" >>confde
  
  		sizeof_register=4
  		;;
@@ -122,32 +40,3 @@ $NetBSD: patch-configure,v 1.3 2015/08/25 12:23:00 wiz Exp $
  		TARGET=ARM;
  		arch_target=arm;
  
-@@ -26198,15 +26208,17 @@ case "$host" in
- 	GTKX11="libgtk-x11-2.0.dylib"
- 	;;
-      *-*-*netbsd*)
--	LIBC="libc.so.12"
--	INTL="libintl.so.0"
-+	LIBC="libc.so"
-+	INTL="libintl.so"
-+	SQLITE="libsqlite.so"
-+	SQLITE3="libsqlite3.so"
- 	;;
-      *-*-kfreebsd*-gnu)
- 	LIBC="libc.so.0.1"
- 	INTL="libc.so.0.1"
- 	X11="libX11.so.6"
- 	;;
--    *-*-*freebsd*)
-+    *-*-*freebsd* | *-*-*dragonfly*)
-     	LIBC="libc.so"
- 	INTL="libintl.so"
- 	SQLITE="libsqlite.so"
-@@ -27193,7 +27205,6 @@ else
- fi
- 
- 
--ac_config_files="$ac_config_files po/mcs/Makefile.in"
- 
- 
- ac_config_files="$ac_config_files runtime/mono-wrapper"
diff --git a/mono/patches/patch-data_mono-nunit.pc.in b/mono/patches/patch-data_mono-nunit.pc.in
deleted file mode 100644
index aae04de..0000000
--- a/mono/patches/patch-data_mono-nunit.pc.in
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-data_mono-nunit.pc.in,v 1.1 2015/05/23 06:20:20 kefren Exp $
-
-Fix nunit pkg-config path
-
---- data/mono-nunit.pc.in.orig	2015-05-22 17:30:11.000000000 +0300
-+++ data/mono-nunit.pc.in	2015-05-22 17:30:49.000000000 +0300
-@@ -6,4 +6,4 @@
- Name: Mono NUnit
- Description: Mono's version of NUnit
- Version: @VERSION@
--Libs: -r:${libdir}/mono/2.0/nunit.core.dll -r:${libdir}/mono/2.0/nunit.core.interfaces.dll -r:${libdir}/mono/2.0/nunit.core.extensions.dll -r:${libdir}/mono/2.0/nunit.framework.dll -r:${libdir}/mono/2.0/nunit.framework.extensions.dll -r:${libdir}/mono/2.0/nunit.mocks.dll -r:${libdir}/mono/2.0/nunit.util.dll -r:${libdir}/mono/2.0/nunit-console-runner.dll 
-+Libs: -r:${libdir}/mono/4.5/nunit.core.dll -r:${libdir}/mono/4.5/nunit.core.interfaces.dll -r:${libdir}/mono/4.5/nunit.core.extensions.dll -r:${libdir}/mono/4.5/nunit.framework.dll -r:${libdir}/mono/4.5/nunit.framework.extensions.dll -r:${libdir}/mono/4.5/nunit.mocks.dll -r:${libdir}/mono/4.5/nunit.util.dll -r:${libdir}/mono/4.5/nunit-console-runner.dll 
diff --git a/mono/patches/patch-db b/mono/patches/patch-db
deleted file mode 100644
index 0ba84b5..0000000
--- a/mono/patches/patch-db
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-db,v 1.10 2015/05/21 14:38:08 kefren Exp $
-
---- mono/utils/mono-proclib.c.orig	2015-04-30 13:28:36.000000000 +0300
-+++ mono/utils/mono-proclib.c	2015-05-11 15:45:04.000000000 +0300
-@@ -19,24 +19,29 @@
- #include <process.h>
- #endif
- 
--#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
- #include <sys/errno.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <sys/sysctl.h>
-+#ifndef __DragonFly__
- #include <sys/proc.h>
-+#endif
- #if defined(__APPLE__)
- #include <mach/mach.h>
- #endif
- #ifdef HAVE_SYS_USER_H
- #include <sys/user.h>
- #endif
--#ifdef HAVE_STRUCT_KINFO_PROC_KP_PROC
-+#if defined(HAVE_STRUCT_KINFO_PROC_KP_PROC) && !defined(__NetBSD__)
- #    define kinfo_pid_member kp_proc.p_pid
- #    define kinfo_name_member kp_proc.p_comm
--#elif defined(__OpenBSD__)
-+#elif defined(__OpenBSD__) || defined(__NetBSD__)
- #    define kinfo_pid_member p_pid
- #    define kinfo_name_member p_comm
-+#elif defined(__DragonFly__)
-+#    define kinfo_pid_member kp_pid
-+#    define kinfo_name_member kp_comm
- #else
- #define kinfo_pid_member ki_pid
- #define kinfo_name_member ki_comm
diff --git a/mono/patches/patch-mono_dis_Makefile.in b/mono/patches/patch-mono_dis_Makefile.in
deleted file mode 100644
index 144a6f0..0000000
--- a/mono/patches/patch-mono_dis_Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-mono_dis_Makefile.in,v 1.1 2015/05/21 14:38:08 kefren Exp $
-
---- mono/dis/Makefile.in.orig	2015-05-11 16:34:26.000000000 +0300
-+++ mono/dis/Makefile.in	2015-05-11 16:34:57.000000000 +0300
-@@ -428,7 +428,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
--@SUPPORT_SGEN_FALSE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntime-static.a
-+@SUPPORT_SGEN_FALSE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntime-static.la
- @SUPPORT_SGEN_TRUE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntimesgen-static.la
- @SUPPORT_SGEN_FALSE@gc_lib = $(LIBGC_STATIC_LIBS)
- runtime_lib = \
diff --git a/mono/patches/patch-mono_metadata_icall.c b/mono/patches/patch-mono_metadata_icall.c
deleted file mode 100644
index 4730472..0000000
--- a/mono/patches/patch-mono_metadata_icall.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-mono_metadata_icall.c,v 1.1 2015/05/21 14:38:08 kefren Exp $
-
-strtod hack until someone has time to debug mono_strtod
-
---- mono/metadata/icall.c.orig	2015-05-21 14:20:36.000000000 +0300
-+++ mono/metadata/icall.c	2015-05-21 14:22:00.000000000 +0300
-@@ -127,10 +127,15 @@ mono_double_ParseImpl (char *ptr, double
- 	*result = 0.0;
- 
- 	if (*ptr){
-+#if defined(__NetBSD__)
-+		/* XXX WIP: mono_strtod spins 100% CPU on NetBSD */
-+		*result = strtod(ptr, &endptr);
-+#else
- 		/* mono_strtod () is not thread-safe */
- 		mono_mutex_lock (&mono_strtod_mutex);
- 		*result = mono_strtod (ptr, &endptr);
- 		mono_mutex_unlock (&mono_strtod_mutex);
-+#endif
- 	}
- 
- 	if (!*ptr || (endptr && *endptr))
diff --git a/mono/patches/patch-mono_metadata_mono-perfcounters.c b/mono/patches/patch-mono_metadata_mono-perfcounters.c
index ee7c6a1..79fe4fe 100644
--- a/mono/patches/patch-mono_metadata_mono-perfcounters.c
+++ b/mono/patches/patch-mono_metadata_mono-perfcounters.c
@@ -2,9 +2,9 @@ $NetBSD: patch-mono_metadata_mono-perfcounters.c,v 1.2 2015/05/22 06:55:40 kefre
 
 Correct mibs initialization for NetBSD
 
---- mono/metadata/mono-perfcounters.c.orig	2015-04-26 19:28:39.000000000 +0300
-+++ mono/metadata/mono-perfcounters.c	2015-05-14 19:07:18.000000000 +0300
-@@ -33,6 +33,9 @@
+--- mono/metadata/mono-perfcounters.c.orig	2016-08-03 10:33:31.000000000 +0000
++++ mono/metadata/mono-perfcounters.c
+@@ -34,6 +34,9 @@
  #if defined (__NetBSD__) || defined (__APPLE__)
  #include <sys/sysctl.h>
  #endif
@@ -14,7 +14,7 @@ Correct mibs initialization for NetBSD
  #include "metadata/mono-perfcounters.h"
  #include "metadata/appdomain.h"
  #include "metadata/object-internals.h"
-@@ -473,11 +476,7 @@ mono_determine_physical_ram_available_si
+@@ -474,11 +477,7 @@ mono_determine_physical_ram_available_si
  #elif defined (__NetBSD__)
  	struct vmtotal vm_total;
  	guint64 page_size;
@@ -27,26 +27,3 @@ Correct mibs initialization for NetBSD
  		CTL_VM,
  #if defined (VM_METER)
  		VM_METER
-@@ -485,17 +484,15 @@ mono_determine_physical_ram_available_si
- 		VM_TOTAL
- #endif
- 	};
--	len = sizeof (vm_total);
-+	size_t len = sizeof (vm_total);
- 	sysctl (mib, 2, &vm_total, &len, NULL, 0);
- 
--	mib = {
--		CTL_HW,
--		HW_PAGESIZE
--	};
-+	mib[0] = CTL_HW;
-+	mib[1] = HW_PAGESIZE;
- 	len = sizeof (page_size);
--	sysctl (mib, 2, &page_size, &len, NULL, 0
-+	sysctl (mib, 2, &page_size, &len, NULL, 0);
- 
--	return ((guint64) value.t_free * page_size) / 1024;
-+	return ((guint64) vm_total.t_free * page_size) / 1024;
- #elif defined (__APPLE__)
- 	mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
- 	vm_statistics_data_t vmstat;
diff --git a/mono/patches/patch-mono_mini_mini-arm.c b/mono/patches/patch-mono_mini_mini-arm.c
index acc8503..7e4ef38 100644
--- a/mono/patches/patch-mono_mini_mini-arm.c
+++ b/mono/patches/patch-mono_mini_mini-arm.c
@@ -1,31 +1,8 @@
 $NetBSD: patch-mono_mini_mini-arm.c,v 1.5 2015/05/21 14:38:08 kefren Exp $
 
---- mono/mini/mini-arm.c.orig	2015-04-30 13:27:46.000000000 +0300
-+++ mono/mini/mini-arm.c	2015-05-11 15:55:15.000000000 +0300
-@@ -56,6 +56,11 @@
- #define IS_VFP (TRUE)
- #endif
- 
-+#ifdef __NetBSD__
-+#include <machine/sysarch.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #if defined(__ARM_EABI__) && defined(__linux__) && !defined(PLATFORM_ANDROID) && !defined(__native_client__)
- #define HAVE_AEABI_READ_TP 1
- #endif
-@@ -922,6 +927,10 @@ void
- mono_arch_init (void)
- {
- 	const char *cpu_arch;
-+#if defined(__NetBSD__)
-+	char *s = NULL;
-+	size_t len;
-+#endif
- 
- 	mono_mutex_init_recursive (&mini_arch_mutex);
- #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
-@@ -986,6 +995,32 @@ mono_arch_init (void)
+--- mono/mini/mini-arm.c.orig	2016-08-03 10:33:31.000000000 +0000
++++ mono/mini/mini-arm.c
+@@ -900,6 +900,32 @@ mono_arch_init (void)
  	   have a way to properly detect CPU features on it. */
  	thumb_supported = TRUE;
  	iphone_abi = TRUE;
@@ -58,15 +35,3 @@ $NetBSD: patch-mono_mini_mini-arm.c,v 1.5 2015/05/21 14:38:08 kefren Exp $
  #else
  	thumb_supported = mono_hwcap_arm_has_thumb;
  	thumb2_supported = mono_hwcap_arm_has_thumb2;
-@@ -1196,6 +1231,11 @@ mono_arch_flush_icache (guint8 *code, gi
- #ifdef MONO_CROSS_COMPILE
- #elif __APPLE__
- 	sys_icache_invalidate (code, size);
-+#elif defined(__NetBSD__)
-+	struct arm_sync_icache_args args;
-+	args.addr = (uintptr_t)code;
-+	args.len = (size_t)size;
-+	sysarch(ARM_SYNC_ICACHE, &args);
- #elif __GNUC_PREREQ(4, 3)
-     __builtin___clear_cache (code, code + size);
- #elif __GNUC_PREREQ(4, 1)
diff --git a/mono/patches/patch-mono_unit-tests_Makefile.in b/mono/patches/patch-mono_unit-tests_Makefile.in
deleted file mode 100644
index 2b13c53..0000000
--- a/mono/patches/patch-mono_unit-tests_Makefile.in
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-mono_unit-tests_Makefile.in,v 1.2 2014/11/30 08:40:51 spz Exp $
-
---- mono/unit-tests/Makefile.in.orig	2014-10-04 09:29:01.000000000 +0000
-+++ mono/unit-tests/Makefile.in
-@@ -79,14 +79,8 @@ POST_UNINSTALL = :
- build_triplet = @build@
- host_triplet = @host@
- target_triplet = @target@
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@noinst_PROGRAMS = test-sgen-qsort$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-gc-memfuncs$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-mono-linked-list-set$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-conc-hashtable$(EXEEXT)
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@TESTS = test-sgen-qsort$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-gc-memfuncs$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-mono-linked-list-set$(EXEEXT) \
--@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@	test-conc-hashtable$(EXEEXT)
-+@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@noinst_PROGRAMS =
-+@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_GNU_FALSE@@SUPPORT_BOEHM_TRUE@TESTS =
- subdir = mono/unit-tests
- DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- 	$(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \
diff --git a/mono/patches/patch-mono_utils_Makefile.in b/mono/patches/patch-mono_utils_Makefile.in
deleted file mode 100644
index ab75c1f..0000000
--- a/mono/patches/patch-mono_utils_Makefile.in
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-mono_utils_Makefile.in,v 1.3 2015/05/26 12:19:46 jperkin Exp $
-
-Add NetBSD and Solaris threads
-
---- mono/utils/Makefile.in.orig	2015-04-26 16:29:35.000000000 +0000
-+++ mono/utils/Makefile.in
-@@ -146,6 +146,7 @@ am__libmonoutils_la_SOURCES_DIST = mono-
- 	mono-threads-mach.c mono-threads-mach-helper.c \
- 	mono-threads-windows.c mono-threads-linux.c \
- 	mono-threads-freebsd.c mono-threads-openbsd.c \
-+	mono-threads-netbsd.c mono-threads-dragonfly.c mono-threads-solaris.c \
- 	mono-threads-android.c mono-threads.h mono-tls.h mono-tls.c \
- 	linux_magic.h mono-memory-model.h atomic.h atomic.c \
- 	mono-hwcap.h mono-hwcap.c bsearch.h bsearch.c \
-@@ -174,7 +175,7 @@ am__objects_1 = mono-md5.lo mono-sha1.lo
- 	mono-linked-list-set.lo mono-threads.lo mono-threads-posix.lo \
- 	mono-threads-mach.lo mono-threads-mach-helper.lo \
- 	mono-threads-windows.lo mono-threads-linux.lo \
--	mono-threads-freebsd.lo mono-threads-openbsd.lo \
-+	mono-threads-freebsd.lo mono-threads-openbsd.lo mono-threads-netbsd.lo mono-threads-solaris.lo \
- 	mono-threads-android.lo mono-tls.lo atomic.lo mono-hwcap.lo \
- 	bsearch.lo mono-conc-hashtable.lo sha1.lo json.lo \
- 	networking.lo networking-posix.lo networking-fallback.lo \
-@@ -600,6 +601,9 @@ monoutils_sources = \
- 	mono-threads-linux.c	\
- 	mono-threads-freebsd.c	\
- 	mono-threads-openbsd.c	\
-+	mono-threads-solaris.c	\
-+	mono-threads-netbsd.c	\
-+	mono-threads-dragonfly.c	\
- 	mono-threads-android.c	\
- 	mono-threads.h	\
- 	mono-tls.h	\
-@@ -753,6 +757,9 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-mach-helper.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-mach.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-openbsd.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-solaris.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-netbsd.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-dragonfly.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-posix.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads-windows.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-threads.Plo@am__quote@
diff --git a/mono/patches/patch-mono_utils_mono-semaphore.c b/mono/patches/patch-mono_utils_mono-semaphore.c
deleted file mode 100644
index 77d5427..0000000
--- a/mono/patches/patch-mono_utils_mono-semaphore.c
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD: patch-mono_utils_mono-semaphore.c,v 1.1 2015/05/21 14:38:08 kefren Exp $
-
-A grotty implementation of sem_timedwait for NetBSD
-
---- mono/utils/mono-semaphore.c.orig	2015-04-24 04:26:18.000000000 +0300
-+++ mono/utils/mono-semaphore.c	2015-05-21 16:19:49.000000000 +0300
-@@ -25,6 +25,9 @@
- #  elif defined(__native_client__) && defined(USE_NEWLIB)
- #    define TIMESPEC struct timespec
- #    define WAIT_BLOCK(a, b) sem_trywait(a)
-+#  elif defined(__NetBSD__)
-+#    define TIMESPEC struct timespec
-+#    define WAIT_BLOCK(a, b) netbsd_sem_timedwait(a, b)
- #  else
- #    define TIMESPEC struct timespec
- #    define WAIT_BLOCK(a,b) sem_timedwait (a, b)
-@@ -34,6 +37,38 @@
- #define NSEC_PER_SEC 1000000000
- #endif
- 
-+#if defined(__NetBSD__)
-+
-+/* XXX: Actually I think NetBSD-current has sem_timedwait */
-+int netbsd_sem_timedwait(sem_t *sem, TIMESPEC *tv);
-+
-+int
-+netbsd_sem_timedwait(sem_t *sem, TIMESPEC *tv)
-+{
-+	struct timeval tval;
-+
-+	TIMESPEC_TO_TIMEVAL(&tval, tv);
-+
-+	while(sem_trywait(sem) == -1) {
-+		struct timeval t;
-+
-+		if (errno == EINVAL)
-+			return -1;
-+
-+		usleep(1000);
-+		gettimeofday(&t, NULL);
-+		if (t.tv_sec > tval.tv_sec ||
-+		    (t.tv_sec == tval.tv_sec && t.tv_usec > tval.tv_usec)) {
-+			errno = ETIMEDOUT;
-+			return -1;
-+		}
-+	}
-+
-+	return 0;
-+}
-+
-+#endif
-+
- int
- mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
- {
diff --git a/mono/patches/patch-mono_utils_mono-threads-posix.c b/mono/patches/patch-mono_utils_mono-threads-posix.c
deleted file mode 100644
index 321fb81..0000000
--- a/mono/patches/patch-mono_utils_mono-threads-posix.c
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-mono_utils_mono-threads-posix.c,v 1.2 2014/11/30 08:40:51 spz Exp $
-
---- mono/utils/mono-threads-posix.c.orig	2014-10-04 09:27:43.000000000 +0000
-+++ mono/utils/mono-threads-posix.c
-@@ -420,13 +420,21 @@ mono_threads_core_set_name (MonoNativeTh
- {
- #ifdef HAVE_PTHREAD_SETNAME_NP
- 	if (!name) {
-+#ifdef linux
- 		pthread_setname_np (tid, "");
-+#else
-+		pthread_setname_np (tid, "%s", "");
-+#endif
- 	} else {
- 		char n [16];
- 
- 		strncpy (n, name, 16);
- 		n [15] = '\0';
-+#ifdef linux
- 		pthread_setname_np (tid, n);
-+#else
-+		pthread_setname_np (tid, "%s", n);
-+#endif
- 	}
- #endif
- }



Home | Main Index | Thread Index | Old Index