Enable building of monotouch and xammac profiles without mono-extensions
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 29 Feb 2016 18:16:24 +0000 (19:16 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 1 Mar 2016 01:37:34 +0000 (02:37 +0100)
By using the <profile>_opt_<assembly>.sources file we can specify files
that are used when mono-extension is not enabled and add shims for the
classes or methods that are missing an implementation in that case.

This allows us to build the monotouch and xammac profiles on public Jenkins.

25 files changed:
mcs/class/Mono.Security/monotouch_tv_opt_Mono.Security.dll.sources [new file with mode: 0644]
mcs/class/Mono.Security/monotouch_watch_opt_Mono.Security.dll.sources [new file with mode: 0644]
mcs/class/Mono.Security/xammac_opt_Mono.Security.dll.sources [new file with mode: 0644]
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs [new file with mode: 0644]
mcs/class/System/monotouch_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/monotouch_runtime_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/monotouch_tv_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/monotouch_tv_runtime_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/monotouch_watch_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/monotouch_watch_runtime_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/xammac_net_4_5_opt_System.dll.sources [new file with mode: 0644]
mcs/class/System/xammac_opt_System.dll.sources [new file with mode: 0644]
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs [new file with mode: 0644]
mcs/class/corlib/System.Text/EncodingHelper.MonoTouch.opt.cs [new file with mode: 0644]
mcs/class/corlib/System/Environment.MonoTouch.opt.cs [new file with mode: 0644]
mcs/class/corlib/System/Guid.MonoTouch.cs [deleted file]
mcs/class/corlib/System/Guid.MonoTouch.opt.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources
mcs/class/corlib/monotouch_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/monotouch_runtime_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/monotouch_tv_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/monotouch_tv_runtime_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/monotouch_watch_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/monotouch_watch_runtime_opt_corlib.dll.sources [new file with mode: 0644]
mcs/class/corlib/xammac_opt_corlib.dll.sources [new file with mode: 0644]

diff --git a/mcs/class/Mono.Security/monotouch_tv_opt_Mono.Security.dll.sources b/mcs/class/Mono.Security/monotouch_tv_opt_Mono.Security.dll.sources
new file mode 100644 (file)
index 0000000..19d6a04
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_Mono.Security.dll.sources
diff --git a/mcs/class/Mono.Security/monotouch_watch_opt_Mono.Security.dll.sources b/mcs/class/Mono.Security/monotouch_watch_opt_Mono.Security.dll.sources
new file mode 100644 (file)
index 0000000..19d6a04
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_Mono.Security.dll.sources
diff --git a/mcs/class/Mono.Security/xammac_opt_Mono.Security.dll.sources b/mcs/class/Mono.Security/xammac_opt_Mono.Security.dll.sources
new file mode 100644 (file)
index 0000000..e8464be
--- /dev/null
@@ -0,0 +1,4 @@
+./Mono.Security.Cryptography/ARC4Managed.cs
+./Mono.Security.Cryptography/MD2Managed.cs
+./Mono.Security.Cryptography/MD4Managed.cs
+./Mono.Security.Cryptography/SHA224Managed.cs
diff --git a/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs b/mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs
new file mode 100644 (file)
index 0000000..b8c5d6d
--- /dev/null
@@ -0,0 +1,15 @@
+#if MONOTOUCH || XAMMAC
+
+// this file is a shim to enable compiling monotouch profiles without mono-extensions
+namespace Mono.Net.Security
+{
+       static partial class MonoTlsProviderFactory
+       {
+               static IMonoTlsProvider CreateDefaultProvider ()
+               {
+                       throw new System.NotSupportedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System/monotouch_opt_System.dll.sources b/mcs/class/System/monotouch_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..6877457
--- /dev/null
@@ -0,0 +1 @@
+Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs
diff --git a/mcs/class/System/monotouch_runtime_opt_System.dll.sources b/mcs/class/System/monotouch_runtime_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..54025c5
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_System.dll.sources
diff --git a/mcs/class/System/monotouch_tv_opt_System.dll.sources b/mcs/class/System/monotouch_tv_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..54025c5
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_System.dll.sources
diff --git a/mcs/class/System/monotouch_tv_runtime_opt_System.dll.sources b/mcs/class/System/monotouch_tv_runtime_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..54025c5
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_System.dll.sources
diff --git a/mcs/class/System/monotouch_watch_opt_System.dll.sources b/mcs/class/System/monotouch_watch_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..54025c5
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_System.dll.sources
diff --git a/mcs/class/System/monotouch_watch_runtime_opt_System.dll.sources b/mcs/class/System/monotouch_watch_runtime_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..54025c5
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_System.dll.sources
diff --git a/mcs/class/System/xammac_net_4_5_opt_System.dll.sources b/mcs/class/System/xammac_net_4_5_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..86ff246
--- /dev/null
@@ -0,0 +1 @@
+#include xammac_opt_System.dll.sources
diff --git a/mcs/class/System/xammac_opt_System.dll.sources b/mcs/class/System/xammac_opt_System.dll.sources
new file mode 100644 (file)
index 0000000..6877457
--- /dev/null
@@ -0,0 +1 @@
+Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs
new file mode 100644 (file)
index 0000000..19f1c4e
--- /dev/null
@@ -0,0 +1,20 @@
+#if MONOTOUCH || XAMMAC
+
+// this file is a shim to enable compiling monotouch profiles without mono-extensions
+namespace System.Security.Cryptography.X509Certificates
+{
+       static partial class X509Helper
+       {
+               public static X509CertificateImpl InitFromHandle (IntPtr handle)
+               {
+                       throw new NotSupportedException ();
+               }
+
+               public static X509CertificateImpl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
+               {
+                       throw new NotSupportedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Text/EncodingHelper.MonoTouch.opt.cs b/mcs/class/corlib/System.Text/EncodingHelper.MonoTouch.opt.cs
new file mode 100644 (file)
index 0000000..9aba0f6
--- /dev/null
@@ -0,0 +1,15 @@
+#if MONOTOUCH
+
+// this file is a shim to enable compiling monotouch profiles without mono-extensions
+namespace System.Text
+{
+       internal static partial class EncodingHelper
+       {
+               internal static Encoding GetDefaultEncoding ()
+               {
+                       throw new NotSupportedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System/Environment.MonoTouch.opt.cs b/mcs/class/corlib/System/Environment.MonoTouch.opt.cs
new file mode 100644 (file)
index 0000000..d45de30
--- /dev/null
@@ -0,0 +1,20 @@
+#if MONOTOUCH
+
+// this file is a shim to enable compiling monotouch profiles without mono-extensions
+namespace System
+{
+       public static partial class Environment
+       {
+               public static string GetFolderPath(SpecialFolder folder, SpecialFolderOption option)
+               {
+                       throw new NotSupportedException ();
+               }
+
+               internal static string UnixGetFolderPath (SpecialFolder folder, SpecialFolderOption option)
+               {
+                       throw new NotSupportedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System/Guid.MonoTouch.cs b/mcs/class/corlib/System/Guid.MonoTouch.cs
deleted file mode 100644 (file)
index 714bdb6..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#if MONOTOUCH && FULL_AOT_RUNTIME
-
-using Crimson.CommonCrypto;
-
-namespace System
-{
-       partial struct Guid
-       {
-               public static Guid NewGuid ()
-               {
-                       byte[] b = new byte [16];
-                       Cryptor.GetRandom (b);
-
-                       Guid res = new Guid (b);
-                       // Mask in Variant 1-0 in Bit[7..6]
-                       res._d = (byte) ((res._d & 0x3fu) | 0x80u);
-                       // Mask in Version 4 (random based Guid) in Bits[15..13]
-                       res._c = (short) ((res._c & 0x0fffu) | 0x4000u);
-
-                       return res;
-               }
-       }
-}
-
-#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System/Guid.MonoTouch.opt.cs b/mcs/class/corlib/System/Guid.MonoTouch.opt.cs
new file mode 100644 (file)
index 0000000..beb6a3a
--- /dev/null
@@ -0,0 +1,15 @@
+#if MONOTOUCH && FULL_AOT_RUNTIME
+
+// this file is a shim to enable compiling monotouch profiles without mono-extensions
+namespace System
+{
+       partial struct Guid
+       {
+               public static Guid NewGuid ()
+               {
+                       throw new NotSupportedException ();
+               }
+       }
+}
+
+#endif
index 00cccc2c0234a20685989fae9df9400f49680be9..412582e1a3b53f01ea2725da71fc886b14e080e7 100644 (file)
@@ -104,7 +104,6 @@ System/GC.cs
 System/GCCollectionMode.cs
 System/GCNotificationStatus.cs
 System/Guid.cs
-System/Guid.MonoTouch.cs
 System/IConsoleDriver.cs
 System/IntPtr.cs
 System/KnownTerminals.cs
diff --git a/mcs/class/corlib/monotouch_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..be231ef
--- /dev/null
@@ -0,0 +1,4 @@
+System/Environment.MonoTouch.opt.cs
+System/Guid.MonoTouch.opt.cs
+System.Text/EncodingHelper.MonoTouch.opt.cs
+System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs
diff --git a/mcs/class/corlib/monotouch_runtime_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_runtime_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..d32b506
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_corlib.dll.sources
diff --git a/mcs/class/corlib/monotouch_tv_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_tv_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..d32b506
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_corlib.dll.sources
diff --git a/mcs/class/corlib/monotouch_tv_runtime_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_tv_runtime_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..d32b506
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_corlib.dll.sources
diff --git a/mcs/class/corlib/monotouch_watch_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_watch_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..d32b506
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_corlib.dll.sources
diff --git a/mcs/class/corlib/monotouch_watch_runtime_opt_corlib.dll.sources b/mcs/class/corlib/monotouch_watch_runtime_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..d32b506
--- /dev/null
@@ -0,0 +1 @@
+#include monotouch_opt_corlib.dll.sources
diff --git a/mcs/class/corlib/xammac_opt_corlib.dll.sources b/mcs/class/corlib/xammac_opt_corlib.dll.sources
new file mode 100644 (file)
index 0000000..449e252
--- /dev/null
@@ -0,0 +1 @@
+System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs