From: "Mikhail Pukhlikov" <cynede@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-lang/mono/, dev-lang/mono/files/
Date: Mon, 26 Mar 2018 06:35:16 +0000 (UTC) [thread overview]
Message-ID: <1522011852.83f842d2f4ff6632396577fa77b7ade1ad7f4506.cynede@gentoo> (raw)
commit: 83f842d2f4ff6632396577fa77b7ade1ad7f4506
Author: grbd <garlicbready <AT> googlemail <DOT> com>
AuthorDate: Sun Mar 25 21:04:12 2018 +0000
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Sun Mar 25 21:04:12 2018 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=83f842d2
Added fix for latest mono when using ncurses 6.1
.../mono/files/mono-5.10.0.179-ncurses61.patch | 106 +++++++++++++++++++++
dev-lang/mono/mono-5.10.0.179.ebuild | 4 +
2 files changed, 110 insertions(+)
diff --git a/dev-lang/mono/files/mono-5.10.0.179-ncurses61.patch b/dev-lang/mono/files/mono-5.10.0.179-ncurses61.patch
new file mode 100644
index 0000000..93a1f8f
--- /dev/null
+++ b/dev-lang/mono/files/mono-5.10.0.179-ncurses61.patch
@@ -0,0 +1,106 @@
+diff -Naur mono-5.10.0.179.orig/mcs/class/corlib/System/TermInfoReader.cs mono-5.10.0.179/mcs/class/corlib/System/TermInfoReader.cs
+--- mono-5.10.0.179.orig/mcs/class/corlib/System/TermInfoReader.cs 2018-03-19 07:46:31.000000000 +0000
++++ mono-5.10.0.179/mcs/class/corlib/System/TermInfoReader.cs 2018-03-25 20:57:57.721279733 +0100
+@@ -72,16 +72,16 @@
+ //
+
+ class TermInfoReader {
+- //short nameSize;
+- short boolSize;
+- short numSize;
+- short strOffsets;
+- //short strSize;
++ int boolSize;
++ int numSize;
++ int strOffsets;
+
+ //string [] names; // Last one is the description
+ byte [] buffer;
+ int booleansOffset;
+ //string term;
++
++ int intOffset;
+
+ public TermInfoReader (string term, string filename)
+ {
+@@ -114,12 +114,21 @@
+ // get { return term; }
+ // }
+
++ void DetermineVersion (short magic)
++ {
++ if (magic == 0x11a)
++ intOffset = 2;
++ else if (magic == 0x21e)
++ intOffset = 4;
++ else
++ throw new Exception (String.Format ("Magic number is unexpected: {0}", magic));
++ }
++
+ void ReadHeader (byte [] buffer, ref int position)
+ {
+ short magic = GetInt16 (buffer, position);
+ position += 2;
+- if (magic != 282)
+- throw new Exception (String.Format ("Magic number is wrong: {0}", magic));
++ DetermineVersion (magic);
+
+ /*nameSize =*/ GetInt16 (buffer, position);
+ position += 2;
+@@ -161,8 +170,8 @@
+ if ((offset % 2) == 1)
+ offset++;
+
+- offset += ((int) number) * 2;
+- return GetInt16 (buffer, offset);
++ offset += ((int) number) * intOffset;
++ return GetInteger (buffer, offset);
+ }
+
+ public string Get (TermInfoStrings tstr)
+@@ -175,7 +184,7 @@
+ if ((offset % 2) == 1)
+ offset++;
+
+- offset += numSize * 2;
++ offset += numSize * intOffset;
+ int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
+ if (off2 == -1)
+ return null;
+@@ -193,7 +202,7 @@
+ if ((offset % 2) == 1)
+ offset++;
+
+- offset += numSize * 2;
++ offset += numSize * intOffset;
+ int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
+ if (off2 == -1)
+ return null;
+@@ -211,6 +220,27 @@
+ return (short) (uno + dos * 256);
+ }
+
++ int GetInt32 (byte [] buffer, int offset)
++ {
++ int b1 = (int) buffer [offset];
++ int b2 = (int) buffer [offset + 1];
++ int b3 = (int) buffer [offset + 2];
++ int b4 = (int) buffer [offset + 3];
++ if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
++ return -1;
++
++ return b1 + b2 << 8 + b3 << 16 + b4 << 24;
++ }
++
++ int GetInteger (byte [] buffer, int offset)
++ {
++ if (intOffset == 2)
++ return GetInt16 (buffer, offset);
++ else
++ // intOffset == 4
++ return GetInt32 (buffer, offset);
++ }
++
+ string GetString (byte [] buffer, int offset)
+ {
+ int length = 0;
diff --git a/dev-lang/mono/mono-5.10.0.179.ebuild b/dev-lang/mono/mono-5.10.0.179.ebuild
index f25dd8d..f709724 100644
--- a/dev-lang/mono/mono-5.10.0.179.ebuild
+++ b/dev-lang/mono/mono-5.10.0.179.ebuild
@@ -32,8 +32,12 @@ DEPEND="${COMMONDEPEND}
!dev-lang/mono-basic
"
+# Patch added for ncurses 6.1
+# https://github.com/mono/mono/issues/6752
+
PATCHES=(
"${FILESDIR}"/${PN}-5.0.1.1-x86_32.patch
+ "${FILESDIR}"/${PN}-5.10.0.179-ncurses61.patch
)
#S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
next reply other threads:[~2018-03-26 6:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 6:35 Mikhail Pukhlikov [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-12-10 7:44 [gentoo-commits] proj/dotnet:master commit in: dev-lang/mono/, dev-lang/mono/files/ Heather Cynede
2015-08-05 16:26 Heather Cynede
2015-08-01 13:21 Heather Cynede
2015-07-17 11:41 Heather Cynede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522011852.83f842d2f4ff6632396577fa77b7ade1ad7f4506.cynede@gentoo \
--to=cynede@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox