Import mono-3.0.2 as wip/mono.
This is a clone of lang/mono, but the development branch, 3.x. The patches have been updated to work with this version; however, it still doesn't successfully build. Fails here: Making all in support gmake[2]: Entering directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2/support' CC sys-mman.lo libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I../eglib/src -Ifuck -I/usr/pkgsrc/wip/mono/work/.buildlink/include -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE -DPLATFORM_BSD -D__default_codegen__ -DUSE_COMPILER_TLS -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -mno-tls-direct-seg-refs -Werror-implicit-function-declaration -MT sys-mman.lo -MD -MP -MF .deps/sys-mman.Tpo -c sys-mman.c -fPIC -DPIC -o .libs/sys-mman.o sys-mman.c: In function 'Mono_Posix_Syscall_mremap': sys-mman.c:109:2: error: implicit declaration of function 'mremap' sys-mman.c:109:2: warning: nested extern declaration of 'mremap' sys-mman.c:109:2: warning: return makes pointer from integer without a cast sys-mman.c: In function 'Mono_Posix_Syscall_mincore': sys-mman.c:123:2: error: implicit declaration of function 'mincore' sys-mman.c:123:2: warning: nested extern declaration of 'mincore' gmake[2]: *** [sys-mman.lo] Error 1 gmake[2]: Leaving directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2/support' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2' gmake: *** [all] Error 2 *** Error code 2
This commit is contained in:
parent
2efc3e85ba
commit
5af322c5ab
51 changed files with 2427 additions and 0 deletions
6
mono/DESCR
Normal file
6
mono/DESCR
Normal file
|
@ -0,0 +1,6 @@
|
|||
The Mono Project is an open development initiative sponsored by Ximian
|
||||
that is working to develop an open source, Unix version of the Microsoft
|
||||
.NET development platform. Its objective is to enable Unix developers to
|
||||
build and deploy cross-platform .NET Applications. The project will
|
||||
implement various technologies developed by Microsoft that have now been
|
||||
submitted to the ECMA for standardization.
|
8
mono/MESSAGE
Normal file
8
mono/MESSAGE
Normal file
|
@ -0,0 +1,8 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
To enable using System.Drawing or Windows.Forms, the following packages
|
||||
will need to be installed:
|
||||
|
||||
libgdiplus Implementation of the GDI+ API
|
||||
===========================================================================
|
122
mono/Makefile
Normal file
122
mono/Makefile
Normal file
|
@ -0,0 +1,122 @@
|
|||
# $NetBSD: Makefile,v 1.9 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
DISTNAME= mono-3.0.2
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://download.mono-project.com/sources/mono/
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
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
|
||||
|
||||
MAKE_JOBS_SAFE= no
|
||||
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}
|
||||
|
||||
USE_TOOLS+= bash:run bison gmake gtar msgfmt perl:run pkg-config
|
||||
USE_LIBTOOL= yes
|
||||
USE_LANGUAGES+= c c++
|
||||
EXTRACT_USING= gtar
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} --with-icu=yes
|
||||
CONFIGURE_ARGS+= --with-preview=yes --with-libgdiplus=installed
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
MAKE_FLAGS+= PERL=${PERL5:Q} mandir=${PREFIX}/${PKGMANDIR}
|
||||
UNLIMIT_RESOURCES= datasize stacksize memorysize
|
||||
|
||||
PKGCONFIG_OVERRIDE+= mono-uninstalled.pc.in data/cecil.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/dotnet.pc.in data/dotnet35.pc.in data/mint.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/mono.web.pc.in data/monodoc.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/mono-cairo.pc.in data/mono-lineeditor.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/mono-nunit.pc.in data/mono-options.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/mono.pc.in data/system.web.extensions_1.0.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/system.web.extensions.design_1.0.pc.in
|
||||
PKGCONFIG_OVERRIDE+= data/system.web.mvc.pc.in data/wcf.pc.in
|
||||
|
||||
REPLACE_PERL+= mcs/errors/do-tests.pl mcs/tools/scan-tests.pl
|
||||
REPLACE_PERL+= msvc/create-windef.pl mono/benchmark/test-driver
|
||||
REPLACE_PERL+= mono/cil/make-opcodes-def.pl mono/metadata/make-bundle.pl
|
||||
REPLACE_PERL+= mono/mini/genmdesc.pl mono/tests/stress-runner.pl
|
||||
|
||||
REPLACE_PYTHON+= scripts/mono-heapviz
|
||||
|
||||
REPLACE_BASH+= build-mingw32.sh mono/arch/arm/dpiops.sh mono/arch/arm/fpaops.sh
|
||||
REPLACE_BASH+= mono/arch/arm/vfpops.sh mono/tests/make_imt_test.sh
|
||||
REPLACE_BASH+= scripts/mono-find-provides.in scripts/mono-find-requires.in
|
||||
REPLACE_BASH+= scripts/mono-test-install web/mono-build-w32.sh
|
||||
REPLACE_BASH+= mcs/class/Mono.WebBrowser/build-csproj2k5
|
||||
REPLACE_BASH+= mcs/class/Managed.Windows.Forms/build-csproj
|
||||
REPLACE_BASH+= mcs/class/Managed.Windows.Forms/build-csproj2k5
|
||||
REPLACE_BASH+= mcs/class/Mono.Cairo/Samples/gtk/compile.sh
|
||||
REPLACE_BASH+= mcs/class/Mono.Cairo/Samples/png/compile.sh
|
||||
REPLACE_BASH+= mcs/class/Mono.Cairo/Samples/win32/compile.sh
|
||||
REPLACE_BASH+= mcs/class/Mono.Cairo/Samples/x11/compile.sh
|
||||
REPLACE_BASH+= mcs/tools/tinderbox/tinderbox.sh libgc/mkinstalldirs
|
||||
REPLACE_BASH+= mcs/mkinstalldirs mkinstalldirs
|
||||
|
||||
EGDIR= ${PREFIX}/share/examples/mono
|
||||
CONF_FILES= ${EGDIR}/config ${PKG_SYSCONFDIR}/mono/config
|
||||
CONF_FILES+= ${EGDIR}/browscap.ini ${PKG_SYSCONFDIR}/mono/browscap.ini
|
||||
CONF_FILES+= ${EGDIR}/4.0/DefaultWsdlHelpGenerator.aspx \
|
||||
${PKG_SYSCONFDIR}/mono/4.0/DefaultWsdlHelpGenerator.aspx
|
||||
CONF_FILES+= ${EGDIR}/4.0/machine.config \
|
||||
${PKG_SYSCONFDIR}/mono/4.0/machine.config
|
||||
CONF_FILES+= ${EGDIR}/4.0/settings.map \
|
||||
${PKG_SYSCONFDIR}/mono/4.0/settings.map
|
||||
CONF_FILES+= ${EGDIR}/4.0/web.config \
|
||||
${PKG_SYSCONFDIR}/mono/4.0/web.config
|
||||
CONF_FILES+= ${EGDIR}/2.0/DefaultWsdlHelpGenerator.aspx \
|
||||
${PKG_SYSCONFDIR}/mono/2.0/DefaultWsdlHelpGenerator.aspx
|
||||
CONF_FILES+= ${EGDIR}/2.0/machine.config \
|
||||
${PKG_SYSCONFDIR}/mono/2.0/machine.config
|
||||
CONF_FILES+= ${EGDIR}/mconfig/config.xml \
|
||||
${PKG_SYSCONFDIR}/mono/mconfig/config.xml
|
||||
CONF_FILES+= ${EGDIR}/2.0/settings.map \
|
||||
${PKG_SYSCONFDIR}/mono/2.0/settings.map
|
||||
CONF_FILES+= ${EGDIR}/2.0/web.config \
|
||||
${PKG_SYSCONFDIR}/mono/2.0/web.config
|
||||
CONF_FILES+= ${EGDIR}/2.0/Browsers/Compat.browser \
|
||||
${PKG_SYSCONFDIR}/mono/2.0/Browsers/Compat.browser
|
||||
|
||||
MAKE_DIRS+= ${PKG_SYSCONFDIR}/mono/2.0
|
||||
MAKE_DIRS+= ${PKG_SYSCONFDIR}/mono/2.0/Browsers
|
||||
MAKE_DIRS+= ${PKG_SYSCONFDIR}/mono/4.0
|
||||
MAKE_DIRS+= ${PKG_SYSCONFDIR}/mono/mconfig
|
||||
|
||||
TEST_TARGET= check
|
||||
|
||||
SUBST_CLASSES+= fix-prefix
|
||||
SUBST_STAGE.fix-prefix= post-patch
|
||||
SUBST_MESSAGE.fix-prefix= Fixing relative prefix
|
||||
SUBST_FILES.fix-prefix= ${PKGCONFIG_OVERRIDE}
|
||||
SUBST_SED.fix-prefix= -e 's,$${pcfiledir}/../..,\@prefix\@,g'
|
||||
|
||||
SUBST_CLASSES+= fix-mcs
|
||||
SUBST_STAGE.fix-mcs= post-patch
|
||||
SUBST_MESSAGE.fix-mcs= Fixing mcs default prefix
|
||||
SUBST_FILES.fix-mcs= mcs/build/config-default.make
|
||||
SUBST_SED.fix-mcs= -e 's,/usr/local,${PREFIX},g'
|
||||
|
||||
SUBST_CLASSES+= fix-cfgdir
|
||||
SUBST_STAGE.fix-cfgdir= post-patch
|
||||
SUBST_MESSAGE.fix-cfgdir= Fixing configuration files install dir
|
||||
SUBST_FILES.fix-cfgdir= mcs/tools/mconfig/Makefile
|
||||
SUBST_SED.fix-cfgdir= -e 's,$$(sysconfdir)/mono,${EGDIR},g'
|
||||
|
||||
SUBST_CLASSES+= fix-libx11
|
||||
SUBST_STAGE.fix-libx11= pre-configure
|
||||
SUBST_MESSAGE.fix-libx11= Fixing libX11 search path configuration
|
||||
SUBST_FILES.fix-libx11= configure
|
||||
SUBST_SED.fix-libx11= -e 's,@X11BASE@,${X11BASE},g'
|
||||
|
||||
.include "../../devel/gettext-lib/buildlink3.mk"
|
||||
.include "../../lang/python/application.mk"
|
||||
.include "../../textproc/icu/buildlink3.mk"
|
||||
.include "../../textproc/libxml2/buildlink3.mk"
|
||||
.include "../../textproc/libxslt/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
7
mono/PLIST.Linux
Normal file
7
mono/PLIST.Linux
Normal file
|
@ -0,0 +1,7 @@
|
|||
@comment $NetBSD: PLIST.Linux,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
bin/mono-sgen
|
||||
bin/mono-sgen-gdb.py
|
||||
lib/libmonosgen-2.0.la
|
||||
lib/mono/2.0/mcs.exe.so
|
||||
lib/mono/2.0/mscorlib.dll.so
|
||||
lib/pkgconfig/monosgen-2.pc
|
1046
mono/PLIST.common
Normal file
1046
mono/PLIST.common
Normal file
File diff suppressed because it is too large
Load diff
20
mono/TODO
Normal file
20
mono/TODO
Normal file
|
@ -0,0 +1,20 @@
|
|||
Making all in support
|
||||
gmake[2]: Entering directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2/support'
|
||||
CC sys-mman.lo
|
||||
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I../eglib/src -Ifuck -I/usr/pkgsrc/wip/mono/work/.buildlink/include -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE -DPLATFORM_BSD -D__default_codegen__ -DUSE_COMPILER_TLS -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -mno-tls-direct-seg-refs -Werror-implicit-function-declaration -MT sys-mman.lo -MD -MP -MF .deps/sys-mman.Tpo -c sys-mman.c -fPIC -DPIC -o .libs/sys-mman.o
|
||||
sys-mman.c: In function 'Mono_Posix_Syscall_mremap':
|
||||
sys-mman.c:109:2: error: implicit declaration of function 'mremap'
|
||||
sys-mman.c:109:2: warning: nested extern declaration of 'mremap'
|
||||
sys-mman.c:109:2: warning: return makes pointer from integer without a cast
|
||||
sys-mman.c: In function 'Mono_Posix_Syscall_mincore':
|
||||
sys-mman.c:123:2: error: implicit declaration of function 'mincore'
|
||||
sys-mman.c:123:2: warning: nested extern declaration of 'mincore'
|
||||
gmake[2]: *** [sys-mman.lo] Error 1
|
||||
gmake[2]: Leaving directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2/support'
|
||||
gmake[1]: *** [all-recursive] Error 1
|
||||
gmake[1]: Leaving directory `/usr/pkgsrc/wip/mono/work/mono-3.0.2'
|
||||
gmake: *** [all] Error 2
|
||||
*** Error code 2
|
||||
|
||||
Stop.
|
||||
bmake: stopped in /usr/pkgsrc/wip/mono
|
17
mono/buildlink3.mk
Normal file
17
mono/buildlink3.mk
Normal file
|
@ -0,0 +1,17 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.6 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
BUILDLINK_TREE+= mono
|
||||
|
||||
.if !defined(MONO_BUILDLINK3_MK)
|
||||
MONO_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.mono+= mono>=2.8
|
||||
BUILDLINK_ABI_DEPENDS.mono+= mono>=2.10.6nb3
|
||||
BUILDLINK_PKGSRCDIR.mono?= ../../lang/mono
|
||||
ALL_ENV+= MONO_SHARED_DIR=${WRKDIR:Q}
|
||||
BUILDLINK_CONTENTS_FILTER.mono= ${EGREP} '(^include/|^lib/)'
|
||||
|
||||
.include "../../textproc/icu/buildlink3.mk"
|
||||
.endif # MONO_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -mono
|
47
mono/distinfo
Normal file
47
mono/distinfo
Normal file
|
@ -0,0 +1,47 @@
|
|||
$NetBSD: distinfo,v 1.12 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
SHA1 (mono-3.0.2.tar.bz2) = 165aa3f21189b83923fdf84400b527c7c4c4545a
|
||||
RMD160 (mono-3.0.2.tar.bz2) = deb3ac31cb4a245b807aac0af8801fe49a2501d1
|
||||
Size (mono-3.0.2.tar.bz2) = 67323152 bytes
|
||||
SHA1 (patch-aa) = 688e02cd43716476f3f1baae9116a6aa7e186b2b
|
||||
SHA1 (patch-ab) = 93683155ecdf41daaf9d07e1a36d1afbbf41abbf
|
||||
SHA1 (patch-ac) = 9666a8e30aedacf46d4817161cc0036fa59b12d8
|
||||
SHA1 (patch-ad) = 27a75f7f4a8db6ecfd6bea420dacd911d123a1ae
|
||||
SHA1 (patch-ae) = 6431e119a26f89c691c27858d64c8ccc7f8c0e31
|
||||
SHA1 (patch-af) = 1a7d763836dd4c6abfdd31d7072e77352e23df7d
|
||||
SHA1 (patch-ah) = 88a42b5482c8eca562178c0cb575fa56cb1aae60
|
||||
SHA1 (patch-ai) = 43cd820c3c683ba5990776ecaf8ce1cca531d03f
|
||||
SHA1 (patch-aj) = b4d65a823849e3e94457a5e361b53b49038fdd04
|
||||
SHA1 (patch-ak) = 84a5e72adcea99f12e027c57cbceaa0ce42427fa
|
||||
SHA1 (patch-al) = 40f8616bd0d4152ab21573d1647ef44018228908
|
||||
SHA1 (patch-am) = 0c535d2034a1141ab0ad2f860b587813540b1071
|
||||
SHA1 (patch-ap) = c0ac836a4d0bc09895b262ff2b455fb172532e7a
|
||||
SHA1 (patch-aq) = 6465c4d1076d96b43f985580fdcf8b608bc29da1
|
||||
SHA1 (patch-ar) = 03a0542582f05da5b3d0193aa7124aae7c14e1ef
|
||||
SHA1 (patch-as) = 20104c1898c6335a1cecd9331413dbd1eef7b257
|
||||
SHA1 (patch-ba) = c967b7d01c872cacdf2557623674eb6e1954a44a
|
||||
SHA1 (patch-bc) = e1adbcd8ad1b9ddbe94774e4a59c5c4aab3a2a37
|
||||
SHA1 (patch-bd) = 33d25a9c3ee17456e4e92d4fd417ee4febb80425
|
||||
SHA1 (patch-be) = c2714e233225c5683a9f3c168344df56312dc382
|
||||
SHA1 (patch-bf) = 4dec79a18ee77d29c1eac6a556939478912a3f45
|
||||
SHA1 (patch-bg) = 019f20c4a916569a0ef31d4c44f87eaac26e253b
|
||||
SHA1 (patch-bh) = 82747732a771783d5368672810684eefba1a8ee3
|
||||
SHA1 (patch-bi) = 67e916a7cd93fc2e327f14beda1e75333d25daf2
|
||||
SHA1 (patch-cc) = 86cc1590c3f59d90fa24c58355712089c0e2adff
|
||||
SHA1 (patch-da) = 2861808ce53de77ca2ec2ae4c405cc578763578d
|
||||
SHA1 (patch-db) = 515fdc97e5d70b5ecb2fdb6e4a1693df1b67f1a0
|
||||
SHA1 (patch-dc) = c3f7763d019226473b3b6b22d4ab2511b6a65fa4
|
||||
SHA1 (patch-de) = 7e74a64c6be7fe38fe870a1c56d13825500d421c
|
||||
SHA1 (patch-df) = 2a74937a5bd5f70b337aa216c31cb9cd30623023
|
||||
SHA1 (patch-dg) = 499e92b825f8de33d2b5470440ef37eba8201eca
|
||||
SHA1 (patch-dh) = d0f32afdeecefbd12df00d41809b405fdb56cbe0
|
||||
SHA1 (patch-di) = 2e590f0491edf6ab8d253f99a23c6b9644ac3bc5
|
||||
SHA1 (patch-dj) = 2a3b4ab8b8eaf2aa0a10c867596ba3eb8d12a1b9
|
||||
SHA1 (patch-dk) = 9173254d4de1dc138a1b6559f7319473581c6dc4
|
||||
SHA1 (patch-dl) = 306d2af8933997e35637bb6d305450f6b9224d71
|
||||
SHA1 (patch-dm) = bbdb71d2554f19ed7c0b390f78fa0fd82c68a5c5
|
||||
SHA1 (patch-dn) = e451f01452869be5a42fafe9b547fa298a1c4b3b
|
||||
SHA1 (patch-do) = 6cd2e8c6d9321243a1fd9462aef992e1f33daef9
|
||||
SHA1 (patch-man_mprof-report.1) = fccadd7c284a3ce50919534b6dacb2da002edef8
|
||||
SHA1 (patch-mono_io-layer_sockets.c) = 8c4f5fbc3469831a1c03680ed493b96c3b50199c
|
||||
SHA1 (patch-mono_utils_mono-compiler.h) = 76822de9dde03bac11a16c4cc687728566d98235
|
16
mono/options.mk
Normal file
16
mono/options.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
# $NetBSD: options.mk,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.mono
|
||||
PKG_SUPPORTED_OPTIONS= moonlight
|
||||
# PKG_SUGGESTED_OPTIONS= moonlight
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= moon
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mmoonlight)
|
||||
PLIST.moon= yes
|
||||
CONFIGURE_ARGS+= --with-moonlight=yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --with-moonlight=no
|
||||
.endif
|
15
mono/patches/patch-aa
Normal file
15
mono/patches/patch-aa
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-aa,v 1.3 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/io-layer/collection.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/io-layer/collection.c
|
||||
@@ -57,7 +57,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);
|
65
mono/patches/patch-ab
Normal file
65
mono/patches/patch-ab
Normal file
|
@ -0,0 +1,65 @@
|
|||
$NetBSD: patch-ab,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- configure.orig 2012-12-05 17:50:37.000000000 +0000
|
||||
+++ configure
|
||||
@@ -3909,7 +3909,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
|
||||
|
||||
@@ -3961,12 +3961,15 @@ $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
|
||||
;;
|
||||
- *-*-*freebsd*)
|
||||
+ *-*-*freebsd* | *-*-*dragonfly*)
|
||||
host_win32=no
|
||||
if test "x$PTHREAD_CFLAGS" = "x"; then
|
||||
CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
|
||||
@@ -3982,7 +3985,8 @@ $as_echo "#define MINGW_CROSS_COMPILE 1"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
- CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
|
||||
+ CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6 -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
|
||||
+ libmono_cflags="$libmono_cflags -D_REENTRANT"
|
||||
need_link_unlink=yes
|
||||
|
||||
$as_echo "#define PTHREAD_POINTER_ID 1" >>confdefs.h
|
||||
@@ -24047,7 +24051,7 @@ LIBC="libc.so.6"
|
||||
INTL="libc.so.6"
|
||||
SQLITE="libsqlite.so.0"
|
||||
SQLITE3="libsqlite3.so.0"
|
||||
-X11="libX11.so"
|
||||
+X11="@X11BASE@/lib/libX11.so"
|
||||
|
||||
sizeof_register="SIZEOF_VOID_P"
|
||||
|
||||
@@ -24629,10 +24633,12 @@ case "$host" in
|
||||
X11="libX11.dylib"
|
||||
;;
|
||||
*-*-*netbsd*)
|
||||
- LIBC="libc.so.12"
|
||||
- INTL="libintl.so.0"
|
||||
+ LIBC="libc.so"
|
||||
+ INTL="libintl.so"
|
||||
+ SQLITE="libsqlite.so"
|
||||
+ SQLITE3="libsqlite3.so"
|
||||
;;
|
||||
- *-*-*freebsd*)
|
||||
+ *-*-*freebsd* | *-*-*dragonfly*)
|
||||
LIBC="libc.so"
|
||||
INTL="libintl.so"
|
||||
SQLITE="libsqlite.so"
|
12
mono/patches/patch-ac
Normal file
12
mono/patches/patch-ac
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-ac,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- data/Makefile.in.orig 2012-12-05 17:50:23.000000000 +0000
|
||||
+++ data/Makefile.in
|
||||
@@ -341,7 +341,7 @@ top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = net_2_0 $(am__append_1)
|
||||
-monodir = $(sysconfdir)/mono
|
||||
+monodir = $(datadir)/examples/mono
|
||||
EXTRA_DIST = \
|
||||
config.in \
|
||||
browscap.ini mono.supp mono.d README ChangeLog \
|
23
mono/patches/patch-ad
Normal file
23
mono/patches/patch-ad
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-ad,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/utils/mono-sigcontext.h.orig 2012-12-05 17:44:35.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 {
|
||||
#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])
|
||||
-#elif defined(__FreeBSD__)
|
||||
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
typedef ucontext_t os_ucontext;
|
||||
|
||||
#define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)])
|
21
mono/patches/patch-ae
Normal file
21
mono/patches/patch-ae
Normal file
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-ae,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- libgc/configure.orig 2012-12-05 17:50:43.000000000 +0000
|
||||
+++ libgc/configure
|
||||
@@ -4939,7 +4939,7 @@ $as_echo "$as_me: WARNING: \"Only HP/UX
|
||||
|
||||
THREADDLLIBS="-lpthread -lrt"
|
||||
;;
|
||||
- *-*-freebsd*)
|
||||
+ *-*-freebsd* | *-*-*dragonfly*)
|
||||
$as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
|
||||
|
||||
if test "x$PTHREAD_CFLAGS" != "x"; then
|
||||
@@ -4980,6 +4980,8 @@ $as_echo "$as_me: WARNING: \"Only HP/UX
|
||||
*-*-netbsd*)
|
||||
$as_echo "#define GC_NETBSD_THREADS 1" >>confdefs.h
|
||||
|
||||
+ $as_echo "#define _REENTRANT 1" >>confdefs.h
|
||||
+
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
$as_echo "#define PARALLEL_MARK 1" >>confdefs.h
|
||||
|
12
mono/patches/patch-af
Normal file
12
mono/patches/patch-af
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-af,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/metadata/Makefile.in.orig 2012-12-05 17:50:29.000000000 +0000
|
||||
+++ mono/metadata/Makefile.in
|
||||
@@ -159,7 +159,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 \
|
69
mono/patches/patch-ah
Normal file
69
mono/patches/patch-ah
Normal file
|
@ -0,0 +1,69 @@
|
|||
$NetBSD: patch-ah,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/utils/mono-semaphore.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/utils/mono-semaphore.c
|
||||
@@ -22,7 +22,7 @@
|
||||
# ifdef USE_MACH_SEMA
|
||||
# define TIMESPEC mach_timespec_t
|
||||
# define WAIT_BLOCK(a,b) semaphore_timedwait (*(a), *(b))
|
||||
-# elif defined(__OpenBSD__)
|
||||
+# elif (defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__))
|
||||
# define TIMESPEC struct timespec
|
||||
# define WAIT_BLOCK(a) sem_trywait(a)
|
||||
# else
|
||||
@@ -34,12 +34,13 @@
|
||||
int
|
||||
mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
|
||||
{
|
||||
+#if (defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
|
||||
+ uint32_t timeout = timeout_ms;
|
||||
+#else
|
||||
TIMESPEC ts, copy;
|
||||
struct timeval t;
|
||||
- int res = 0;
|
||||
-#if defined(__OpenBSD__)
|
||||
- int timeout;
|
||||
#endif
|
||||
+ int res = 0;
|
||||
|
||||
#ifndef USE_MACH_SEMA
|
||||
if (timeout_ms == 0)
|
||||
@@ -48,6 +49,19 @@ mono_sem_timedwait (MonoSemType *sem, gu
|
||||
if (timeout_ms == (guint32) 0xFFFFFFFF)
|
||||
return mono_sem_wait (sem, alertable);
|
||||
|
||||
+#if (defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
|
||||
+ if (timeout < 50)
|
||||
+ timeout += 50;
|
||||
+ do {
|
||||
+ if ((res = WAIT_BLOCK(sem)) == 0)
|
||||
+ break;
|
||||
+ usleep(50000);
|
||||
+ timeout -= 50;
|
||||
+ if (alertable) /* XXX: Not on EINTR */
|
||||
+ return -1;
|
||||
+ } while (timeout > 50);
|
||||
+#else
|
||||
+
|
||||
#ifdef USE_MACH_SEMA
|
||||
memset (&t, 0, sizeof (TIMESPEC));
|
||||
#else
|
||||
@@ -59,19 +73,6 @@ mono_sem_timedwait (MonoSemType *sem, gu
|
||||
ts.tv_nsec -= NSEC_PER_SEC;
|
||||
ts.tv_sec++;
|
||||
}
|
||||
-#if defined(__OpenBSD__)
|
||||
- timeout = ts.tv_sec;
|
||||
- while (timeout) {
|
||||
- if ((res = WAIT_BLOCK (sem)) == 0)
|
||||
- return res;
|
||||
-
|
||||
- if (alertable)
|
||||
- return -1;
|
||||
-
|
||||
- usleep (ts.tv_nsec / 1000);
|
||||
- timeout--;
|
||||
- }
|
||||
-#else
|
||||
copy = ts;
|
||||
while ((res = WAIT_BLOCK (sem, &ts)) == -1 && errno == EINTR) {
|
||||
struct timeval current;
|
207
mono/patches/patch-ai
Normal file
207
mono/patches/patch-ai
Normal file
|
@ -0,0 +1,207 @@
|
|||
$NetBSD: patch-ai,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
--- mono/metadata/object.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/metadata/object.c
|
||||
@@ -4042,6 +4042,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:
|
||||
@@ -4094,6 +4223,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) {
|
||||
@@ -4118,9 +4249,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) {
|
||||
/*
|
||||
@@ -4130,12 +4268,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:
|
||||
@@ -4143,11 +4282,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)
|
12
mono/patches/patch-aj
Normal file
12
mono/patches/patch-aj
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-aj,v 1.3 2013/01/01 01:46:24 othyro Exp $
|
||||
--- data/net_2_0/Browsers/Makefile.in.orig 2012-12-05 17:50:24.000000000 +0000
|
||||
+++ data/net_2_0/Browsers/Makefile.in
|
||||
@@ -281,7 +281,7 @@ target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-monodir = $(sysconfdir)/mono/2.0/Browsers
|
||||
+monodir = $(datadir)/examples/mono/2.0/Browsers
|
||||
EXTRA_DIST = Compat.browser
|
||||
mono_DATA = Compat.browser
|
||||
all: all-am
|
37
mono/patches/patch-ak
Normal file
37
mono/patches/patch-ak
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: patch-ak,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- libgc/pthread_support.c.orig 2012-12-05 17:44:36.000000000 +0000
|
||||
+++ libgc/pthread_support.c
|
||||
@@ -70,8 +70,8 @@
|
||||
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
|
||||
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
|
||||
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
|
||||
- defined(GC_FREEBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
|
||||
- defined(GC_OPENBSD_THREADS)
|
||||
+ defined(GC_FREEBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \
|
||||
+ !defined(USE_COMPILER_TLS) || defined(GC_OPENBSD_THREADS)
|
||||
# define USE_PTHREAD_SPECIFIC
|
||||
# endif
|
||||
#endif
|
||||
@@ -1280,6 +1280,22 @@ void GC_end_blocking(void) {
|
||||
#define __d10_sleep sleep
|
||||
#endif /* GC_DGUX386_THREADS */
|
||||
|
||||
+#undef nanosleep
|
||||
+#undef usleep
|
||||
+#undef sleep
|
||||
+
|
||||
+/* A wrapper for the standard C nanosleep function */
|
||||
+int WRAP_FUNC(nanosleep) (const struct timespec *rqtp, struct timespec *rmtp)
|
||||
+{
|
||||
+ int result;
|
||||
+
|
||||
+ GC_start_blocking();
|
||||
+ result = REAL_FUNC(nanosleep)(rqtp, rmtp);
|
||||
+ GC_end_blocking();
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
/* A wrapper for the standard C sleep function */
|
||||
int WRAP_FUNC(sleep) (unsigned int seconds)
|
||||
{
|
12
mono/patches/patch-al
Normal file
12
mono/patches/patch-al
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-al,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
--- data/config.in.orig 2012-12-05 17:44:37.000000000 +0000
|
||||
+++ data/config.in
|
||||
@@ -18,7 +18,7 @@
|
||||
<dllmap dll="libX11" target="@X11@" os="!windows" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
|
||||
- <dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
|
||||
+ <dllmap dll="libcups" target="libcups.so" os="!windows"/>
|
||||
<dllmap dll="libcups" target="libcups.dylib" os="osx"/>
|
||||
<dllmap dll="i:kernel32.dll">
|
||||
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
|
12
mono/patches/patch-am
Normal file
12
mono/patches/patch-am
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-am,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/io-layer/io.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/io-layer/io.c
|
||||
@@ -3376,7 +3376,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)
|
||||
{
|
26
mono/patches/patch-ap
Normal file
26
mono/patches/patch-ap
Normal file
|
@ -0,0 +1,26 @@
|
|||
$NetBSD: patch-ap,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mcs/jay/Makefile.orig 2012-12-05 17:45:59.000000000 +0000
|
||||
+++ mcs/jay/Makefile
|
||||
@@ -21,19 +21,19 @@ ifndef NO_INSTALL
|
||||
install-local:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/jay
|
||||
- $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/man/man1
|
||||
+ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
|
||||
$(INSTALL_BIN) jay $(DESTDIR)$(prefix)/bin
|
||||
for datafile in $(datafiles) ; do \
|
||||
$(INSTALL_DATA) $$datafile $(DESTDIR)$(prefix)/share/jay ; \
|
||||
done
|
||||
- $(INSTALL_DATA) jay.1 $(DESTDIR)$(prefix)/share/man/man1
|
||||
+ $(INSTALL_DATA) jay.1 $(DESTDIR)$(mandir)/man1
|
||||
|
||||
uninstall-local:
|
||||
-rm -f $(DESTDIR)$(prefix)/bin/jay
|
||||
for datafile in $(datafiles) ; do \
|
||||
rm -f $(DESTDIR)$(prefix)/share/jay/$$datafile || : ; \
|
||||
done
|
||||
- -rm -f $(DESTDIR)$(prefix)/share/man/man1/jay.1
|
||||
+ -rm -f $(DESTDIR)$(mandir)/man1/jay.1
|
||||
endif
|
||||
|
||||
csproj-local:
|
12
mono/patches/patch-aq
Normal file
12
mono/patches/patch-aq
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-aq,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- data/net_4_0/Makefile.in.orig 2012-12-05 17:50:24.000000000 +0000
|
||||
+++ data/net_4_0/Makefile.in
|
||||
@@ -322,7 +322,7 @@ top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS =
|
||||
-monodir = $(sysconfdir)/mono/4.0
|
||||
+monodir = $(datadir)/examples/mono/4.0
|
||||
EXTRA_DIST = machine.config \
|
||||
web.config \
|
||||
DefaultWsdlHelpGenerator.aspx \
|
12
mono/patches/patch-ar
Normal file
12
mono/patches/patch-ar
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-ar,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- data/net_2_0/Makefile.in.orig 2012-12-05 17:50:24.000000000 +0000
|
||||
+++ data/net_2_0/Makefile.in
|
||||
@@ -322,7 +322,7 @@ top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = Browsers
|
||||
-monodir = $(sysconfdir)/mono/2.0
|
||||
+monodir = $(datadir)/examples/mono/2.0
|
||||
EXTRA_DIST = machine.config \
|
||||
web.config \
|
||||
DefaultWsdlHelpGenerator.aspx \
|
18
mono/patches/patch-as
Normal file
18
mono/patches/patch-as
Normal file
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-as,v 1.1 2013/01/01 01:46:24 othyro Exp $
|
||||
|
||||
From FreeBSD: https://bugzilla.novell.com/show_bug.cgi?id=528830
|
||||
|
||||
--- mono/metadata/appdomain.c.orig 2012-12-05 17:44:33.000000000 +0000
|
||||
+++ mono/metadata/appdomain.c
|
||||
@@ -2452,6 +2452,11 @@ mono_domain_try_unload (MonoDomain *doma
|
||||
/* The icall wrapper will execute the abort */
|
||||
CloseHandle (thread_handle);
|
||||
return;
|
||||
+ } else if (!mono_thread_has_appdomain_ref (mono_thread_current (), domain) && !(mono_thread_interruption_requested ())) {
|
||||
+ if (!domain->friendly_name) {
|
||||
+ CloseHandle (thread_handle);
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
CloseHandle (thread_handle);
|
12
mono/patches/patch-ba
Normal file
12
mono/patches/patch-ba
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-ba,v 1.5 2013/01/01 01:46:24 othyro Exp $
|
||||
--- mono/cil/Makefile.in.orig 2012-12-05 17:50:27.000000000 +0000
|
||||
+++ mono/cil/Makefile.in
|
||||
@@ -517,7 +517,7 @@ uninstall-am: uninstall-defDATA uninstal
|
||||
uninstall-xmlDATA
|
||||
|
||||
opcode.def: make-opcodes-def.pl cil-opcodes.xml
|
||||
- perl $(srcdir)/make-opcodes-def.pl $(srcdir)/cil-opcodes.xml $@.tmp
|
||||
+ $(PERL) $(srcdir)/make-opcodes-def.pl $(srcdir)/cil-opcodes.xml $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
23
mono/patches/patch-bc
Normal file
23
mono/patches/patch-bc
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-bc,v 1.5 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- mono/mini/Makefile.in.orig 2012-12-05 17:50:32.000000000 +0000
|
||||
+++ mono/mini/Makefile.in
|
||||
@@ -3915,15 +3915,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
|
14
mono/patches/patch-bd
Normal file
14
mono/patches/patch-bd
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-bd,v 1.5 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mcs/build/config-default.make.orig 2012-12-05 17:47:52.000000000 +0000
|
||||
+++ mcs/build/config-default.make
|
||||
@@ -17,8 +17,9 @@ LIBRARY_FLAGS = /noconfig
|
||||
ifndef CFLAGS
|
||||
CFLAGS = -g -O2
|
||||
endif
|
||||
-prefix = /usr/local
|
||||
+prefix = /usr/pkg
|
||||
exec_prefix = $(prefix)
|
||||
+mandir = $(prefix)/man
|
||||
mono_libdir = $(exec_prefix)/lib
|
||||
sysconfdir = $(prefix)/etc
|
||||
#RUNTIME = mono
|
18
mono/patches/patch-be
Normal file
18
mono/patches/patch-be
Normal file
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-be,v 1.5 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- support/sys-mman.c.orig 2012-12-05 17:44:30.000000000 +0000
|
||||
+++ support/sys-mman.c
|
||||
@@ -105,8 +105,13 @@ Mono_Posix_Syscall_mremap (void *old_add
|
||||
if (Mono_Posix_FromMremapFlags (flags, &_flags) == -1)
|
||||
return MAP_FAILED;
|
||||
|
||||
+#if defined(__NetBSD__)
|
||||
+ return mremap (old_address, (size_t) old_size, old_address, (size_t) new_size,
|
||||
+ (unsigned long) _flags);
|
||||
+#else
|
||||
return mremap (old_address, (size_t) old_size, (size_t) new_size,
|
||||
(unsigned long) _flags);
|
||||
+#endif
|
||||
}
|
||||
#endif /* def HAVE_MREMAP */
|
||||
|
25
mono/patches/patch-bf
Normal file
25
mono/patches/patch-bf
Normal file
|
@ -0,0 +1,25 @@
|
|||
$NetBSD: patch-bf,v 1.5 2013/01/01 01:46:25 othyro Exp $
|
||||
--- support/map.c.orig 2012-12-05 17:44:30.000000000 +0000
|
||||
+++ support/map.c
|
||||
@@ -3282,13 +3282,21 @@ int Mono_Posix_ToMountFlags (guint64 x,
|
||||
|
||||
int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r)
|
||||
{
|
||||
+#ifdef __NetBSD__
|
||||
+ *r = MAP_FIXED;
|
||||
+#else
|
||||
*r = 0;
|
||||
+#endif
|
||||
if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE)
|
||||
+#ifdef __NetBSD__
|
||||
+ *r &= ~MAP_FIXED;
|
||||
+#else
|
||||
#ifdef MREMAP_MAYMOVE
|
||||
*r |= MREMAP_MAYMOVE;
|
||||
#else /* def MREMAP_MAYMOVE */
|
||||
{errno = EINVAL; return -1;}
|
||||
#endif /* ndef MREMAP_MAYMOVE */
|
||||
+#endif /* __NetBSD__ */
|
||||
if (x == 0)
|
||||
return 0;
|
||||
return 0;
|
12
mono/patches/patch-bg
Normal file
12
mono/patches/patch-bg
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-bg,v 1.6 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/metadata/socket-io.c.orig 2012-12-05 17:44:34.000000000 +0000
|
||||
+++ mono/metadata/socket-io.c
|
||||
@@ -3133,7 +3133,7 @@ extern MonoBoolean ves_icall_System_Net_
|
||||
struct sockaddr_in6 saddr6;
|
||||
struct addrinfo *info = NULL, hints;
|
||||
gint32 family;
|
||||
- char hostname[1024] = {0};
|
||||
+ char hostname[NI_MAXHOST] = {0};
|
||||
int flags = 0;
|
||||
#else
|
||||
struct in_addr inaddr;
|
12
mono/patches/patch-bh
Normal file
12
mono/patches/patch-bh
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-bh,v 1.6 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mcs/class/Managed.Windows.Forms/build-csproj.orig 2012-12-05 17:46:25.000000000 +0000
|
||||
+++ mcs/class/Managed.Windows.Forms/build-csproj
|
||||
@@ -177,7 +177,7 @@ SWFresourcelist()
|
||||
{
|
||||
cat $Resource | while read SRC; do
|
||||
SRC=`echo $SRC | $tr '/' '\\\\'`
|
||||
-SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
|
||||
+SRC=`echo $SRC | sed 's/-resource://' | awk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
|
||||
|
||||
cat << EOT
|
||||
<File
|
37
mono/patches/patch-bi
Normal file
37
mono/patches/patch-bi
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: patch-bi,v 1.7 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/metadata/filewatcher.c.orig 2012-12-05 17:44:34.000000000 +0000
|
||||
+++ mono/metadata/filewatcher.c
|
||||
@@ -45,9 +45,6 @@ static int (*FAMNextEvent) (gpointer, gp
|
||||
gint
|
||||
ves_icall_System_IO_FSW_SupportsFSW (void)
|
||||
{
|
||||
-#if HAVE_KQUEUE
|
||||
- return 3;
|
||||
-#else
|
||||
MonoDl *fam_module;
|
||||
int lib_used = 4; /* gamin */
|
||||
int inotify_instance;
|
||||
@@ -71,15 +68,22 @@ ves_icall_System_IO_FSW_SupportsFSW (voi
|
||||
}
|
||||
|
||||
if (fam_module == NULL)
|
||||
+#if HAVE_KQUEUE
|
||||
+ return 3;
|
||||
+#else
|
||||
return 0;
|
||||
+#endif
|
||||
|
||||
err = mono_dl_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
|
||||
g_free (err);
|
||||
if (FAMNextEvent == NULL)
|
||||
+#if HAVE_KQUEUE
|
||||
+ return 3;
|
||||
+#else
|
||||
return 0;
|
||||
+#endif
|
||||
|
||||
return lib_used;
|
||||
-#endif
|
||||
}
|
||||
|
||||
/* Almost copied from fam.h. Weird, I know */
|
33
mono/patches/patch-cc
Normal file
33
mono/patches/patch-cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-cc,v 1.6 2013/01/01 01:46:25 othyro 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 2012-12-05 17:44:34.000000000 +0000
|
||||
+++ mono/metadata/domain.c
|
||||
@@ -2305,7 +2305,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 */
|
113
mono/patches/patch-da
Normal file
113
mono/patches/patch-da
Normal file
|
@ -0,0 +1,113 @@
|
|||
$NetBSD: patch-da,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- libgc/include/private/gcconfig.h.orig 2012-12-05 17:44:36.000000000 +0000
|
||||
+++ libgc/include/private/gcconfig.h
|
||||
@@ -366,6 +366,9 @@
|
||||
# define OPENBSD
|
||||
# define mach_type_known
|
||||
# endif
|
||||
+# if defined(__DragonFly__)
|
||||
+# define FREEBSD
|
||||
+# endif
|
||||
# if defined(FREEBSD) && (defined(i386) || defined(__i386__))
|
||||
# define I386
|
||||
# define mach_type_known
|
||||
@@ -705,6 +708,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# ifdef __ELF__
|
||||
# define DATASTART GC_data_start
|
||||
@@ -896,6 +903,10 @@
|
||||
# ifdef NETBSD
|
||||
# define ALIGNMENT 4
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
extern char etext[];
|
||||
# define DATASTART GC_data_start
|
||||
@@ -1067,6 +1078,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# ifdef __ELF__
|
||||
# define DATASTART GC_data_start
|
||||
@@ -1380,6 +1395,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# ifdef __ELF__
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
||||
@@ -1541,6 +1560,10 @@
|
||||
# if defined(NETBSD)
|
||||
# define ALIGNMENT 4
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# define USE_GENERIC_PUSH_REGS
|
||||
# ifdef __ELF__
|
||||
@@ -1667,6 +1690,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# define DATASTART GC_data_start
|
||||
# define ELFCLASS32 32
|
||||
@@ -1930,6 +1957,10 @@
|
||||
# define ALIGNMENT 4
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# ifdef __ELF__
|
||||
# define DATASTART GC_data_start
|
||||
@@ -2027,6 +2058,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# define HEURISTIC2
|
||||
# define DATASTART GC_data_start
|
||||
# define USE_GENERIC_PUSH_REGS
|
||||
@@ -2138,6 +2173,10 @@
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
+# ifndef USE_MMAP
|
||||
+# define USE_MMAP
|
||||
+# endif
|
||||
+# define USE_MMAP_ANON
|
||||
# ifdef __ELF__
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
35
mono/patches/patch-db
Normal file
35
mono/patches/patch-db
Normal file
|
@ -0,0 +1,35 @@
|
|||
$NetBSD: patch-db,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/utils/mono-proclib.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/utils/mono-proclib.c
|
||||
@@ -18,23 +18,28 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#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
|
12
mono/patches/patch-dc
Normal file
12
mono/patches/patch-dc
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-dc,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/mini/mini-x86.h.orig 2012-12-05 17:44:33.000000000 +0000
|
||||
+++ mono/mini/mini-x86.h
|
||||
@@ -48,7 +48,7 @@ struct sigcontext {
|
||||
#endif /* __HAIKU__ */
|
||||
|
||||
#if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
|
||||
- defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
+ defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#define MONO_ARCH_USE_SIGACTION
|
||||
#endif
|
||||
|
12
mono/patches/patch-de
Normal file
12
mono/patches/patch-de
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-de,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- ikvm-native/jni.c.orig 2012-12-05 17:44:37.000000000 +0000
|
||||
+++ ikvm-native/jni.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <malloc.h>
|
||||
#define ALLOCA _alloca
|
||||
#else
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <alloca.h>
|
12
mono/patches/patch-df
Normal file
12
mono/patches/patch-df
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-df,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- support/mph.h.orig 2012-12-05 17:44:30.000000000 +0000
|
||||
+++ support/mph.h
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <stdint.h> /* for SIZE_MAX */
|
||||
#endif
|
||||
|
||||
-#if __APPLE__ || __BSD__ || __FreeBSD__ || __OpenBSD__
|
||||
+#if __APPLE__ || __BSD__ || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __DragonFly__
|
||||
#define MPH_ON_BSD
|
||||
#endif
|
||||
|
20
mono/patches/patch-dg
Normal file
20
mono/patches/patch-dg
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-dg,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/metadata/threads.c.orig 2012-12-05 17:44:34.000000000 +0000
|
||||
+++ mono/metadata/threads.c
|
||||
@@ -826,8 +826,16 @@ mono_thread_get_stack_bounds (guint8 **s
|
||||
# if !defined(__OpenBSD__)
|
||||
pthread_attr_getstack (&attr, (void**)staddr, stsize);
|
||||
# endif
|
||||
+ /*
|
||||
+ * he@NetBSD.org: For some reason, this test fails on NetBSD/powerpc,
|
||||
+ * so just avoid it.
|
||||
+ * kefren@: as a hint if somebody want to take a closer look: this
|
||||
+ * triggers also when building in a i386 chroot on amd64
|
||||
+ */
|
||||
+# if !(defined(__NetBSD__) && defined(__powerpc__))
|
||||
if (*staddr)
|
||||
g_assert ((current > *staddr) && (current < *staddr + *stsize));
|
||||
+# endif
|
||||
# endif
|
||||
|
||||
pthread_attr_destroy (&attr);
|
12
mono/patches/patch-dh
Normal file
12
mono/patches/patch-dh
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-dh,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/mini/mini-x86.c.orig 2012-12-05 17:44:33.000000000 +0000
|
||||
+++ mono/mini/mini-x86.c
|
||||
@@ -231,7 +231,7 @@ typedef struct {
|
||||
|
||||
static X86_Reg_No param_regs [] = { 0 };
|
||||
|
||||
-#if defined(TARGET_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||
+#if defined(TARGET_WIN32) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#define SMALL_STRUCTS_IN_REGS
|
||||
static X86_Reg_No return_regs [] = { X86_EAX, X86_EDX };
|
||||
#endif
|
12
mono/patches/patch-di
Normal file
12
mono/patches/patch-di
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-di,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
--- mono/tests/libtest.c.orig 2012-12-05 17:44:31.000000000 +0000
|
||||
+++ mono/tests/libtest.c
|
||||
@@ -3297,7 +3297,7 @@ mono_test_marshal_ccw_itest (MonoComObje
|
||||
* mono_method_get_unmanaged_thunk tests
|
||||
*/
|
||||
|
||||
-#if defined(__GNUC__) && ((defined(__i386__) && (defined(__linux__) || defined (__APPLE__)) || defined (__FreeBSD__) || defined(__OpenBSD__)) || (defined(__ppc__) && defined(__APPLE__)))
|
||||
+#if defined(__GNUC__) && ((defined(__i386__) && (defined(__linux__) || defined (__APPLE__)) || defined (__NetBSD__) || defined (__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)) || (defined(__ppc__) && defined(__APPLE__)))
|
||||
#define ALIGN(size) __attribute__ ((aligned(size)))
|
||||
#else
|
||||
#define ALIGN(size)
|
16
mono/patches/patch-dj
Normal file
16
mono/patches/patch-dj
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-dj,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
Although DragonFly has a POSIX.1e implementation, it's too old at the
|
||||
moment to be usable here.
|
||||
|
||||
--- support/sys-xattr.c.orig 2012-12-05 17:44:30.000000000 +0000
|
||||
+++ support/sys-xattr.c
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_ATTR_H) || defined(HAVE_SYS_EXTATTR_H)
|
||||
+#if defined(HAVE_SYS_XATTR_H) || defined(HAVE_ATTR_ATTR_H) || (defined(HAVE_SYS_EXTATTR_H) && !defined(__DragonFly__))
|
||||
|
||||
#include <sys/types.h>
|
||||
|
12
mono/patches/patch-dk
Normal file
12
mono/patches/patch-dk
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-dk,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- libgc/include/gc.h.orig 2012-12-05 17:44:36.000000000 +0000
|
||||
+++ libgc/include/gc.h
|
||||
@@ -521,6 +521,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_of
|
||||
/* This may also be desirable if it is possible but expensive to */
|
||||
/* retrieve the call chain. */
|
||||
#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
|
||||
+ || defined(__DragonFly__) \
|
||||
|| defined(__FreeBSD__)) & !defined(GC_CAN_SAVE_CALL_STACKS)
|
||||
# define GC_ADD_CALLER
|
||||
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
13
mono/patches/patch-dl
Normal file
13
mono/patches/patch-dl
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-dl,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- mono/utils/dlmalloc.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/utils/dlmalloc.c
|
||||
@@ -1207,7 +1207,7 @@ int mspace_mallopt(int, int);
|
||||
#ifndef LACKS_UNISTD_H
|
||||
#include <unistd.h> /* for sbrk */
|
||||
#else /* LACKS_UNISTD_H */
|
||||
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) || !defined(__DragonFly__)
|
||||
extern void* sbrk(ptrdiff_t);
|
||||
#endif /* FreeBSD etc */
|
||||
#endif /* LACKS_UNISTD_H */
|
22
mono/patches/patch-dm
Normal file
22
mono/patches/patch-dm
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-dm,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- mono/utils/mono-time.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/utils/mono-time.c
|
||||
@@ -65,7 +65,7 @@ mono_100ns_datetime (void)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -80,7 +80,7 @@ mono_100ns_datetime (void)
|
||||
static gint64
|
||||
get_boot_time (void)
|
||||
{
|
||||
-#if defined(PLATFORM_MACOSX) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
+#if defined(PLATFORM_MACOSX) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
int mib [2];
|
||||
size_t size;
|
||||
time_t now;
|
17
mono/patches/patch-dn
Normal file
17
mono/patches/patch-dn
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-dn,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
http://gnats.netbsd.org/45201
|
||||
|
||||
--- mono/mini/mini-amd64.h.orig 2012-12-05 17:44:32.000000000 +0000
|
||||
+++ mono/mini/mini-amd64.h
|
||||
@@ -252,6 +252,10 @@ typedef struct MonoCompileArch {
|
||||
|
||||
#define MONO_ARCH_NOMAP32BIT
|
||||
|
||||
+#elif defined (__DragonFly__)
|
||||
+
|
||||
+#define MONO_ARCH_NOMAP32BIT
|
||||
+
|
||||
#elif defined (__NetBSD__)
|
||||
|
||||
#define REG_RAX 14
|
13
mono/patches/patch-do
Normal file
13
mono/patches/patch-do
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-do,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
--- libgc/headers.c.orig 2012-12-05 17:44:36.000000000 +0000
|
||||
+++ libgc/headers.c
|
||||
@@ -139,6 +139,8 @@ void GC_init_headers()
|
||||
register unsigned i;
|
||||
|
||||
GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index));
|
||||
+ if (GC_all_nils == NULL)
|
||||
+ ABORT("out of memory");
|
||||
BZERO(GC_all_nils, sizeof(bottom_index));
|
||||
for (i = 0; i < TOP_SZ; i++) {
|
||||
GC_top_index[i] = GC_all_nils;
|
12
mono/patches/patch-man_mprof-report.1
Normal file
12
mono/patches/patch-man_mprof-report.1
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-man_mprof-report.1,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
Fix mandoc -Tlint warnings.
|
||||
|
||||
--- man/mprof-report.1.orig 2012-12-05 17:44:37.000000000 +0000
|
||||
+++ man/mprof-report.1
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH mprof-report 1 ""
|
||||
+.TH MPROF-REPORT 1 ""
|
||||
.SH The Mono log profiler
|
||||
.PP
|
||||
The Mono \f[I]log\f[] profiler can be used to collect a lot of
|
16
mono/patches/patch-mono_io-layer_sockets.c
Normal file
16
mono/patches/patch-mono_io-layer_sockets.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-mono_io-layer_sockets.c,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
Use getprotoent() instead of hardcoding SOL_TCP on NetBSD.
|
||||
|
||||
--- mono/io-layer/sockets.c.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/io-layer/sockets.c
|
||||
@@ -46,6 +46,9 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
+#if defined(__NetBSD__)
|
||||
+#define SOL_TCP getprotoent()
|
||||
+#endif
|
||||
#include <arpa/inet.h>
|
||||
#ifdef HAVE_SYS_SENDFILE_H
|
||||
#include <sys/sendfile.h>
|
38
mono/patches/patch-mono_utils_mono-compiler.h
Normal file
38
mono/patches/patch-mono_utils_mono-compiler.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
$NetBSD: patch-mono_utils_mono-compiler.h,v 1.1 2013/01/01 01:46:25 othyro Exp $
|
||||
|
||||
Make sure that TLS variables are actually emitted, since the compiler
|
||||
doesn't see all references.
|
||||
|
||||
--- mono/utils/mono-compiler.h.orig 2012-12-05 17:44:35.000000000 +0000
|
||||
+++ mono/utils/mono-compiler.h
|
||||
@@ -36,7 +36,7 @@
|
||||
#if defined(PIC)
|
||||
|
||||
#ifdef PIC_INITIAL_EXEC
|
||||
-#define MONO_TLS_FAST __attribute__((tls_model("initial-exec")))
|
||||
+#define MONO_TLS_FAST __attribute__((tls_model("initial-exec"), used))
|
||||
#else
|
||||
#if defined (__powerpc__)
|
||||
/* local dynamic requires a call to __tls_get_addr to look up the
|
||||
@@ -48,18 +48,18 @@
|
||||
For now we will disable this. */
|
||||
#define MONO_TLS_FAST
|
||||
#else
|
||||
-#define MONO_TLS_FAST __attribute__((tls_model("local-dynamic")))
|
||||
+#define MONO_TLS_FAST __attribute__((tls_model("local-dynamic"), used))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
-#define MONO_TLS_FAST __attribute__((tls_model("local-exec")))
|
||||
+#define MONO_TLS_FAST __attribute__((tls_model("local-exec"), used))
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
-#define MONO_TLS_FAST
|
||||
+#define MONO_TLS_FAST
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
Loading…
Reference in a new issue