diff options
author | kefren <kefren@pkgsrc.org> | 2009-10-11 07:49:49 +0000 |
---|---|---|
committer | kefren <kefren@pkgsrc.org> | 2009-10-11 07:49:49 +0000 |
commit | 7157b5a50eab491c82c311e56a41742623278b19 (patch) | |
tree | 8a53a2785406d64d6c8cdfeafbc2d519a07f62c0 /lang/mono | |
parent | c9485db1d69eb9a1fedff5d6f0b8c8dcd1a097ea (diff) | |
download | pkgsrc-7157b5a50eab491c82c311e56a41742623278b19.tar.gz |
delete pkgsrc generated code from patch-ab
add fix for #348522 from upstream
pkgrevision++
Diffstat (limited to 'lang/mono')
-rw-r--r-- | lang/mono/Makefile | 3 | ||||
-rw-r--r-- | lang/mono/distinfo | 5 | ||||
-rw-r--r-- | lang/mono/patches/patch-ab | 11 | ||||
-rw-r--r-- | lang/mono/patches/patch-ai | 207 |
4 files changed, 213 insertions, 13 deletions
diff --git a/lang/mono/Makefile b/lang/mono/Makefile index 4b48c1acd33..607e40e1245 100644 --- a/lang/mono/Makefile +++ b/lang/mono/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.93 2009/09/02 12:09:01 wiz Exp $ +# $NetBSD: Makefile,v 1.94 2009/10/11 07:49:49 kefren Exp $ DISTNAME= mono-${MONO_VERSION} CATEGORIES= lang +PKGREVISION= 1 MASTER_SITES= http://ftp.novell.com/pub/mono/sources/mono/ EXTRACT_SUFX= .tar.bz2 diff --git a/lang/mono/distinfo b/lang/mono/distinfo index 2d827eabedb..dd8b99f96e2 100644 --- a/lang/mono/distinfo +++ b/lang/mono/distinfo @@ -1,14 +1,15 @@ -$NetBSD: distinfo,v 1.55 2009/09/02 12:09:01 wiz Exp $ +$NetBSD: distinfo,v 1.56 2009/10/11 07:49:49 kefren Exp $ SHA1 (mono-2.4.2.3.tar.bz2) = c0e7c2992ef6c1ea3d1fd48ef581aa1ff6ec29cb RMD160 (mono-2.4.2.3.tar.bz2) = f52bf6e281b076b859a567c17917577710522684 Size (mono-2.4.2.3.tar.bz2) = 24815426 bytes -SHA1 (patch-ab) = cd21ae3674ff3c19343a60556a20198ead2d0e16 +SHA1 (patch-ab) = 3c0b2f81692394102376eedc4bed516b8bff70cd SHA1 (patch-ac) = f88e1a034063a7f14e73d2e314e362d950c65e05 SHA1 (patch-ae) = 0280993f1565ebd6fb552d12cfe12d105421de53 SHA1 (patch-af) = abe2bc406e8f58c00f4d1226bda3c5fb9d4ea36f SHA1 (patch-ag) = 93775d9350fac57f58f20a7f5a512b8f4a3bd1ca SHA1 (patch-ah) = 1642287318add6d255426aeac5eec47720621ca0 +SHA1 (patch-ai) = dd3f3f3132f5760f760f3350b8e5a7e12c8b9eed SHA1 (patch-ak) = 034d260926fb31aa6b94faf5942f6ec7c7b461df SHA1 (patch-ap) = db62ab3c1adc9f8a0b6051c4cbb76aef61a5c7dc SHA1 (patch-aq) = 2279dc6b46eded6f5a67b04e79779c1c7117fbc5 diff --git a/lang/mono/patches/patch-ab b/lang/mono/patches/patch-ab index aef4acaedce..af0aef8ffe1 100644 --- a/lang/mono/patches/patch-ab +++ b/lang/mono/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.19 2009/06/21 21:37:48 ahoka Exp $ +$NetBSD: patch-ab,v 1.20 2009/10/11 07:49:49 kefren Exp $ --- configure.orig 2009-03-13 15:51:11.000000000 +0100 +++ configure @@ -69,12 +69,3 @@ $NetBSD: patch-ab,v 1.19 2009/06/21 21:37:48 ahoka Exp $ LIBC="libc.so" INTL="libintl.so" ;; -@@ -41778,6 +41785,8 @@ do - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) -+ : Avoid regenerating within pkgsrc -+ exit 0 - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; diff --git a/lang/mono/patches/patch-ai b/lang/mono/patches/patch-ai new file mode 100644 index 00000000000..4db01a7b7de --- /dev/null +++ b/lang/mono/patches/patch-ai @@ -0,0 +1,207 @@ +$NetBSD: patch-ai,v 1.7 2009/10/11 07:49:49 kefren Exp $ + +--- mono/metadata/object.c.orig 2009-07-15 21:49:47.000000000 +0300 ++++ mono/metadata/object.c 2009-10-09 15:53:07.000000000 +0300 +@@ -3337,6 +3337,135 @@ + 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: +@@ -3387,6 +3516,8 @@ + 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) { +@@ -3409,9 +3540,16 @@ + /* The runtime invoke wrapper needs the original boxed vtype, it does handle byref values as well. */ + pa [i] = mono_array_get (params, MonoObject*, i); + } 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) { + /* +@@ -3421,12 +3559,13 @@ + * 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: +@@ -3434,11 +3573,19 @@ + 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) |