fixing various build issues
This commit is contained in:
parent
8a074b5d8e
commit
d6ec6a408b
@ -1,15 +0,0 @@
|
||||
diff -up mono-4.8.0/mono/utils/mono-context.c.than mono-4.8.0/mono/utils/mono-context.c
|
||||
--- mono-4.8.0/mono/utils/mono-context.c.than 2017-09-20 20:58:53.854625078 +0200
|
||||
+++ mono-4.8.0/mono/utils/mono-context.c 2017-09-20 22:53:40.863538894 +0200
|
||||
@@ -387,7 +387,11 @@ mono_sigctx_to_monoctx (void *sigctx, Mo
|
||||
mctx->pc = UCONTEXT_REG_PC (sigctx);
|
||||
mctx->regs [ARMREG_SP] = UCONTEXT_REG_SP (sigctx);
|
||||
#ifdef __linux__
|
||||
+#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 26)))
|
||||
+ struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__glibc_reserved1;
|
||||
+#else
|
||||
struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__reserved;
|
||||
+#endif
|
||||
int i;
|
||||
|
||||
g_assert (fpctx->head.magic == FPSIMD_MAGIC);
|
10
mono-4.8.0-sysmacros.patch
Normal file
10
mono-4.8.0-sysmacros.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/mono/io-layer/processes.c 2017-03-15 09:36:22.000000000 +0000
|
||||
+++ b/mono/io-layer/processes.c 2018-06-05 19:58:57.657838748 +0000
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
139
mono-4.8.0-terminfo.patch
Normal file
139
mono-4.8.0-terminfo.patch
Normal file
@ -0,0 +1,139 @@
|
||||
diff --git a/mcs/class/corlib/System/TermInfoReader.cs b/mcs/class/corlib/System/TermInfoReader.cs
|
||||
index a171706add61..2be4627e7910 100644
|
||||
--- a/mcs/class/corlib/System/TermInfoReader.cs
|
||||
+++ b/mcs/class/corlib/System/TermInfoReader.cs
|
||||
@@ -32,7 +32,8 @@
|
||||
using System.Text;
|
||||
namespace System {
|
||||
// This class reads data from a byte array or file containing the terminfo capabilities
|
||||
- // information for any given terminal. The maximum allowed size is 4096 bytes.
|
||||
+ // information for any given terminal. The maximum allowed size is 4096 (or
|
||||
+ // 32768 for terminfo2) bytes.
|
||||
//
|
||||
// Terminfo database files are divided in the following sections:
|
||||
//
|
||||
@@ -45,7 +46,7 @@ namespace System {
|
||||
//
|
||||
// The header is as follows:
|
||||
//
|
||||
- // Magic number (0x1 and 0x1A)
|
||||
+ // Magic number (0x11A/0432 or 0x21e/01036 for terminfo2)
|
||||
// Terminal names size
|
||||
// Boolean section size
|
||||
// Numeric section size
|
||||
@@ -58,8 +59,9 @@ namespace System {
|
||||
// The boolean capabilities section has bytes that are set to 1 if the capability is supported
|
||||
// and 0 otherwise. If the index of a capability is greater than the section size, 0 is assumed.
|
||||
//
|
||||
- // The numeric capabilities section holds 2-byte integers in little endian format. No negative
|
||||
- // values are allowed and the absence of a capability is marked as two 0xFF.
|
||||
+ // The numeric capabilities section holds 2-byte integers (4-byte integers for terminfo2) in
|
||||
+ // little endian format. No negative values are allowed and the absence of a capability is marked
|
||||
+ // as two 0xFF (four 0xFF for terminfo2).
|
||||
//
|
||||
// The string offsets section contains 2-byte integer offsets into the string capabilies section.
|
||||
// If the capability is not supported, the index will be two 0xFF bytes.
|
||||
@@ -72,17 +74,17 @@ namespace System {
|
||||
//
|
||||
|
||||
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)
|
||||
{
|
||||
using (FileStream st = File.OpenRead (filename)) {
|
||||
@@ -114,12 +116,21 @@ public TermInfoReader (string term, byte [] buffer)
|
||||
// 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 +172,8 @@ public int Get (TermInfoNumbers number)
|
||||
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 +186,7 @@ public string Get (TermInfoStrings tstr)
|
||||
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 +204,7 @@ public string Get (TermInfoStrings tstr)
|
||||
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 +222,27 @@ short GetInt16 (byte [] buffer, int offset)
|
||||
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;
|
15
mono.spec
15
mono.spec
@ -16,7 +16,7 @@
|
||||
|
||||
Name: mono
|
||||
Version: 4.8.0
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Summary: Cross-platform, Open Source, .NET development framework
|
||||
|
||||
Group: Development/Languages
|
||||
@ -37,7 +37,12 @@ Patch5: mono-4.6.1-aarch64.patch
|
||||
# fix bz#1484151, bz#1484149 due to new glibc which
|
||||
# drops the struct ucontext
|
||||
Patch6: mono-4.8.0.520-glibc-ucontext.patch
|
||||
Patch7: mono-4.8.0-aarch64-glibc-2.26.patch
|
||||
# fix bz#1580447, due to new file format terminfo2 introduced with ncurses6.1
|
||||
Patch7: mono-4.8.0-terminfo.patch
|
||||
# glibc change: The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. This
|
||||
# means that in a future release, the macros “major”, “minor”, and “makedev”
|
||||
# will only be available from <sys/sysmacros.h>.
|
||||
Patch8: mono-4.8.0-sysmacros.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
@ -282,6 +287,7 @@ Development file for monodoc
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
|
||||
# Add undeclared Arg
|
||||
sed -i "61a #define ARG_MAX _POSIX_ARG_MAX" mono/io-layer/wapi_glob.h
|
||||
@ -796,6 +802,11 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
|
||||
%{_libdir}/pkgconfig/monodoc.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jun 05 2018 Timotheus Pokorra <tp@tbits.net> - 4.8.0-14
|
||||
- backport a patch for new file format terminfo2 introduced with ncurses6.1
|
||||
- dropping patch for glibc on aarch64 because it now breaks the build on Fedora 28
|
||||
- adding patch for glibc change regarding sysmacros, for Fedora 29
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user