1 |
commit: bc6bb6ffcb35cc40990250d1f5d1888803ca2172 |
2 |
Author: Heather Cynede <cynede <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 28 07:56:08 2015 +0000 |
4 |
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 07:56:49 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc6bb6ff |
7 |
|
8 |
dev-lang/mono: mono 4.2.2.10 patch corrections |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
...tExtensions-issue-2710-another-resolution.patch | 48 +++++++++ |
13 |
dev-lang/mono/mono-4.2.2.10-r1.ebuild | 116 +++++++++++++++++++++ |
14 |
2 files changed, 164 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch b/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch |
17 |
new file mode 100644 |
18 |
index 0000000..b306b69 |
19 |
--- /dev/null |
20 |
+++ b/dev-lang/mono/files/fix-for-GitExtensions-issue-2710-another-resolution.patch |
21 |
@@ -0,0 +1,48 @@ |
22 |
+diff --git a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs |
23 |
+index 4b69010..1bb6195 100644 |
24 |
+--- a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs |
25 |
++++ b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs |
26 |
+@@ -578,6 +578,34 @@ namespace System.Configuration |
27 |
+ private ExeConfigurationFileMap exeMapPrev = null; |
28 |
+ private SettingsPropertyValueCollection values = null; |
29 |
+ |
30 |
++ /// <remarks> |
31 |
++ /// Hack to remove the XmlDeclaration that the XmlSerializer adds. |
32 |
++ /// <br /> |
33 |
++ /// see <a href="https://github.com/mono/mono/pull/2273">Issue 2273</a> for details |
34 |
++ /// </remarks> |
35 |
++ private string StripXmlHeader(string serializedValue) |
36 |
++ { |
37 |
++ if (serializedValue == null) |
38 |
++ { |
39 |
++ return string.Empty; |
40 |
++ } |
41 |
++ |
42 |
++ XmlDocument doc = new XmlDocument(); |
43 |
++ XmlElement valueXml = doc.CreateElement("value"); |
44 |
++ valueXml.InnerXml = serializedValue; |
45 |
++ |
46 |
++ foreach (XmlNode child in valueXml.ChildNodes) { |
47 |
++ if (child.NodeType == XmlNodeType.XmlDeclaration) { |
48 |
++ valueXml.RemoveChild(child); |
49 |
++ break; |
50 |
++ } |
51 |
++ } |
52 |
++ |
53 |
++ // InnerXml will give you well-formed XML that you could save as a separate document, and |
54 |
++ // InnerText will immediately give you a pure-text representation of this inner XML. |
55 |
++ return valueXml.InnerXml; |
56 |
++ } |
57 |
++ |
58 |
+ private void SaveProperties (ExeConfigurationFileMap exeMap, SettingsPropertyValueCollection collection, ConfigurationUserLevel level, SettingsContext context, bool checkUserLevel) |
59 |
+ { |
60 |
+ Configuration config = ConfigurationManager.OpenMappedExeConfiguration (exeMap, level); |
61 |
+@@ -623,7 +651,7 @@ namespace System.Configuration |
62 |
+ element.Value.ValueXml = new XmlDocument ().CreateElement ("value"); |
63 |
+ switch (value.Property.SerializeAs) { |
64 |
+ case SettingsSerializeAs.Xml: |
65 |
+- element.Value.ValueXml.InnerXml = (value.SerializedValue as string) ?? string.Empty; |
66 |
++ element.Value.ValueXml.InnerXml = StripXmlHeader(value.SerializedValue as string); |
67 |
+ break; |
68 |
+ case SettingsSerializeAs.String: |
69 |
+ element.Value.ValueXml.InnerText = value.SerializedValue as string; |
70 |
|
71 |
diff --git a/dev-lang/mono/mono-4.2.2.10-r1.ebuild b/dev-lang/mono/mono-4.2.2.10-r1.ebuild |
72 |
new file mode 100644 |
73 |
index 0000000..677210a |
74 |
--- /dev/null |
75 |
+++ b/dev-lang/mono/mono-4.2.2.10-r1.ebuild |
76 |
@@ -0,0 +1,116 @@ |
77 |
+# Copyright 1999-2015 Gentoo Foundation |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+# $Id$ |
80 |
+ |
81 |
+EAPI=5 |
82 |
+AUTOTOOLS_PRUNE_LIBTOOL_FILES="all" |
83 |
+AUTOTOOLS_AUTORECONF=1 |
84 |
+ |
85 |
+inherit eutils linux-info mono-env flag-o-matic pax-utils autotools-utils versionator |
86 |
+ |
87 |
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter" |
88 |
+HOMEPAGE="http://www.mono-project.com/Main_Page" |
89 |
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2" |
90 |
+ |
91 |
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL" |
92 |
+SLOT="0" |
93 |
+ |
94 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux" |
95 |
+ |
96 |
+IUSE="nls minimal pax_kernel xen doc" |
97 |
+ |
98 |
+COMMONDEPEND=" |
99 |
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 ) |
100 |
+ ia64? ( sys-libs/libunwind ) |
101 |
+ nls? ( sys-devel/gettext ) |
102 |
+" |
103 |
+RDEPEND="${COMMONDEPEND} |
104 |
+ || ( www-client/links www-client/lynx ) |
105 |
+" |
106 |
+DEPEND="${COMMONDEPEND} |
107 |
+ sys-devel/bc |
108 |
+ virtual/yacc |
109 |
+ pax_kernel? ( sys-apps/elfix ) |
110 |
+ !dev-lang/mono-basic |
111 |
+" |
112 |
+ |
113 |
+MAKEOPTS="${MAKEOPTS} -j1" #nowarn |
114 |
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)" |
115 |
+ |
116 |
+pkg_pretend() { |
117 |
+ # If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling. |
118 |
+ # See http://bugs.gentoo.org/261869 for more info." |
119 |
+ CONFIG_CHECK="SYSVIPC" |
120 |
+ use kernel_linux && check_extra_config |
121 |
+} |
122 |
+ |
123 |
+pkg_setup() { |
124 |
+ linux-info_pkg_setup |
125 |
+ mono-env_pkg_setup |
126 |
+} |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't |
130 |
+ # get killed in the build proces when MPROTECT is enable. #286280 |
131 |
+ # RANDMMAP kill the build proces to #347365 |
132 |
+ # use paxmark.sh to get PT/XT logic #532244 |
133 |
+ if use pax_kernel ; then |
134 |
+ ewarn "We are disabling MPROTECT on the mono binary." |
135 |
+ |
136 |
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9 |
137 |
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in" |
138 |
+ fi |
139 |
+ |
140 |
+ # mono build system can fail otherwise |
141 |
+ strip-flags |
142 |
+ |
143 |
+ # Fix VB targets |
144 |
+ # http://osdir.com/ml/general/2015-05/msg20808.html |
145 |
+ epatch "${FILESDIR}/add_missing_vb_portable_targets.patch" |
146 |
+ |
147 |
+ # Fix build when sgen disabled |
148 |
+ # https://bugzilla.xamarin.com/show_bug.cgi?id=32015 |
149 |
+ epatch "${FILESDIR}/${PN}-4.0.2.5-fix-mono-dis-makefile-am-when-without-sgen.patch" |
150 |
+ |
151 |
+ # Fix atomic_add_i4 support for 32-bit ppc |
152 |
+ # https://github.com/mono/mono/compare/f967c79926900343f399c75624deedaba460e544^...8f379f0c8f98493180b508b9e68b9aa76c0c5bdf |
153 |
+ epatch "${FILESDIR}/${PN}-4.0.2.5-fix-ppc-atomic-add-i4.patch" |
154 |
+ |
155 |
+ epatch "${FILESDIR}/systemweb3.patch" |
156 |
+ epatch "${FILESDIR}/fix-for-GitExtensions-issue-2710-another-resolution.patch" |
157 |
+ epatch "${FILESDIR}/fix-for-bug36724.patch" |
158 |
+ |
159 |
+ autotools-utils_src_prepare |
160 |
+} |
161 |
+ |
162 |
+src_configure() { |
163 |
+ local myeconfargs=( |
164 |
+ --disable-silent-rules |
165 |
+ $(use_with xen xen_opt) |
166 |
+ --without-ikvm-native |
167 |
+ --disable-dtrace |
168 |
+ $(use_with doc mcs-docs) |
169 |
+ $(use_enable nls) |
170 |
+ ) |
171 |
+ |
172 |
+ autotools-utils_src_configure |
173 |
+} |
174 |
+ |
175 |
+src_compile() { |
176 |
+ autotools-utils_src_compile |
177 |
+} |
178 |
+ |
179 |
+src_test() { |
180 |
+ cd mcs/tests || die |
181 |
+ emake check |
182 |
+} |
183 |
+ |
184 |
+src_install() { |
185 |
+ autotools-utils_src_install |
186 |
+ |
187 |
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora |
188 |
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@××××××××××××.com/msg24870.html |
189 |
+ # for reference. |
190 |
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die |
191 |
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die |
192 |
+} |