Gentoo Archives: gentoo-commits

From: Heather Cynede <cynede@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-lang/mono/files/, dev-lang/mono/
Date: Sat, 01 Aug 2015 13:22:05
Message-Id: 1438422500.5e0c9066fc07252bc3286338af2951dfc03ff213.cynede@gentoo
1 commit: 5e0c9066fc07252bc3286338af2951dfc03ff213
2 Author: Ron MacNeil <macro <AT> hotmail <DOT> com>
3 AuthorDate: Sat Aug 1 09:48:20 2015 +0000
4 Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 09:48:20 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=5e0c9066
7
8 mono-4.0.2.5: Add patch to fix build on big-endian machines
9
10 ...mono-4.0.2.5-fix-decimal-ms-on-big-endian.patch | 22 ++++++++++++++++++++++
11 dev-lang/mono/mono-4.0.2.5.ebuild | 4 ++++
12 2 files changed, 26 insertions(+)
13
14 diff --git a/dev-lang/mono/files/mono-4.0.2.5-fix-decimal-ms-on-big-endian.patch b/dev-lang/mono/files/mono-4.0.2.5-fix-decimal-ms-on-big-endian.patch
15 new file mode 100644
16 index 0000000..c6349fe
17 --- /dev/null
18 +++ b/dev-lang/mono/files/mono-4.0.2.5-fix-decimal-ms-on-big-endian.patch
19 @@ -0,0 +1,22 @@
20 +diff -up mono/metadata/decimal-ms.c.than
21 +mono/metadata/decimal-ms.c
22 +--- mono/metadata/decimal-ms.c.than 2015-07-06 08:21:27.524461795
23 +-0400
24 ++++ mono/metadata/decimal-ms.c 2015-07-06 08:30:26.954461795
25 +-0400
26 +@@ -55,8 +55,13 @@ static const uint32_t ten_to_ten_div_4 =
27 + #define DECIMAL_LO32(dec) ((dec).v.v.Lo32)
28 + #define DECIMAL_MID32(dec) ((dec).v.v.Mid32)
29 + #define DECIMAL_HI32(dec) ((dec).Hi32)
30 +-#define DECIMAL_LO64_GET(dec) ((dec).v.Lo64)
31 +-#define DECIMAL_LO64_SET(dec,value) {(dec).v.Lo64 = value; }
32 ++#if G_BYTE_ORDER != G_LITTLE_ENDIAN
33 ++# define DECIMAL_LO64_GET(dec) (((uint64_t)((dec).v.v.Mid32) << 32) | (dec).v.v.Lo32)
34 ++# define DECIMAL_LO64_SET(dec,value) {(dec).v.v.Lo32 = (value); (dec).v.v.Mid32 = ((value) >> 32); }
35 ++#else
36 ++# define DECIMAL_LO64_GET(dec) ((dec).v.Lo64)
37 ++# define DECIMAL_LO64_SET(dec,value) {(dec).v.Lo64 = value; }
38 ++#endif
39 +
40 + #define DECIMAL_SETZERO(dec) {DECIMAL_LO32(dec) = 0; DECIMAL_MID32(dec) = 0; DECIMAL_HI32(dec) = 0; DECIMAL_SIGNSCALE(dec) = 0;}
41 + #define COPYDEC(dest, src) {DECIMAL_SIGNSCALE(dest) = DECIMAL_SIGNSCALE(src); DECIMAL_HI32(dest) = DECIMAL_HI32(src); \
42
43 diff --git a/dev-lang/mono/mono-4.0.2.5.ebuild b/dev-lang/mono/mono-4.0.2.5.ebuild
44 index b5aa9c9..3257f07 100644
45 --- a/dev-lang/mono/mono-4.0.2.5.ebuild
46 +++ b/dev-lang/mono/mono-4.0.2.5.ebuild
47 @@ -67,6 +67,10 @@ src_prepare() {
48 #fix vb targets http://osdir.com/ml/general/2015-05/msg20808.html
49 epatch "${FILESDIR}/add_missing_vb_portable_targets.patch"
50
51 + # Fix build on big-endian machines
52 + # https://bugzilla.xamarin.com/show_bug.cgi?id=31779
53 + epatch "${FILESDIR}/${P}-fix-decimal-ms-on-big-endian.patch"
54 +
55 autotools-utils_src_prepare
56 epatch "${FILESDIR}/systemweb3.patch"
57 }