diff --git a/mono-4.6.2.7.tar.bz2 b/mono-4.6.2.7.tar.bz2
deleted file mode 100644
index 50441b3..0000000
--- a/mono-4.6.2.7.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b69ead7db7590277630685f3fcad84a5ac2f83e40563f0dc8cf139b10cbe6b31
-size 83271441
diff --git a/mono-5.0.0.100.tar.bz2 b/mono-5.0.0.100.tar.bz2
new file mode 100644
index 0000000..a2af2e0
--- /dev/null
+++ b/mono-5.0.0.100.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:368da3ff9f42592920cd8cf6fa15c6c16558e967144c4d3df873352e5d2bb6df
+size 154086441
diff --git a/mono-config-fix-monoposixhelper-libdir.patch b/mono-config-fix-monoposixhelper-libdir.patch
deleted file mode 100644
index 57a4f1e..0000000
--- a/mono-config-fix-monoposixhelper-libdir.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -uprN mono-4.4.0.old/data/config.in mono-4.4.0.new/data/config.in
---- mono-4.4.0.old/data/config.in 2016-06-09 18:01:54.000000000 +0300
-+++ mono-4.4.0.new/data/config.in 2016-03-15 14:31:53.000000000 +0300
-@@ -10,7 +10,7 @@
-
-
-
--
-+
-
-
-
diff --git a/mono-core.changes b/mono-core.changes
index f38a9c6..da89acd 100644
--- a/mono-core.changes
+++ b/mono-core.changes
@@ -1,3 +1,199 @@
+-------------------------------------------------------------------
+Tue May 16 13:27:46 UTC 2017 - idonmez@suse.com
+
+- Disable rosyln on ppc64le
+
+-------------------------------------------------------------------
+Thu May 11 23:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net
+
+- Update to version 5.0.0.100 (5.0 Stable)
+- New features and changes:
+ * Shipping Roslyn C# compiler to enable C#7 support
+ * Support for msbuild and deprecating xbuild
+ (msbuild currently not included, xbuild deprecated but still maintained)
+ * Enabling concurrent SGen garbage collector to reduce time spent in GC
+ * Continued Progress on .NET Class Library convergence
+- Packaging changes:
+ * Do not package roslyn csc compiler on platforms that do not support it
+ * Add xbuild-revert-to-mcs.patch: revert xbuild to use old mcs compiler on platforms that do not support roslyn
+
+-------------------------------------------------------------------
+Tue May 4 12:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net
+
+- Enable external BTLS library build only on supported platforms (x86 and x86_64 right now):
+ * Fix build for arm, arm64, ppc64, ppc64le.
+- Enable pedump binary packaging for arm64 builds.
+
+-------------------------------------------------------------------
+Fri Apr 28 15:00:00 UTC 2017 - fwdsbs.to.11df@xoxy.net
+
+- Update to version 4.8.1.0 (4.8 Service Release 1)
+- Remove patch mono-config-fix-monoposixhelper-libdir.patch:
+ * Instead, use fix from official spec file
+- New features (see http://www.mono-project.com/docs/about-mono/releases/4.8.0 for more info):
+ * Some API additions for .NET Standard 2.0
+ * Mono now ships with TLS 1.2, powered by Google’s BoringSSL project
+ * The MKBundle tool has been updated to easily support cross-compilation
+ * Runtime Logging: the new MONO_LOG_DEST environment variable can set to instruct the runtime where to write the tracing messages to
+ * Concurrent SGen mode improved
+ * More code have been adopted from Reference Source
+- Bugfixes:
+ * bxc#3323: Assertion when deleting global namespace inside method
+ * bxc#3399: [PATCH] pending_exception support is incomplete
+ * bxc#3434: Mono Compiler crashes when using a DelegateType as a method call
+ * bxc#3706: generics aot jit problem
+ * bxc#3735: Attempting to JIT compile method: using Linq’s “Any” fails on the device
+ * bxc#3767: Unit test UI table cell extends beyond cell bounds for failed test
+ * bxc#3811: DataContractJsonSerializer deserialization fails with subclass of List as known type
+ * bxc#3850: ScrollEventArgs in Form_Scroll method has invalid values
+ * bxc#3960: DismissModalViewControllerAnimated() crashes on 5.2.9
+ * bxc#4006: MonoDevelop fails to start with no warning if Gtk# is not installed on windows
+ * bxc#5644: Mono allows to access not accessible method
+ * bxc#7467: DefaultNonPersistentConnectionLimit is to low
+ * bxc#12571: Usage of XElement with XmlAnyElementAttribute is not supported by XmlSerializer
+ * bxc#19594: WebException.Response is null when https request needs proxy authentication
+ * bxc#29189: Compiling class referencing corefx facade/contract assemblies raises error “Reference to type System.SByte claims it is defined assembly mscorlib,.. but couldn’t be found”
+ * bxc#30686: ZipArchive ctor throws InvalidDataException for WebConnectionStream
+ * bxc#30821: Compilation generates CS1701 warning
+ * bxc#32374: WebRequest::BeginGetRequestStream incorrectly sets IAsyncResult::CompletedSynchronously to always true
+ * bxc#33571: Mono crashes when marshalling fixed arrays
+ * bxc#34802: Debugger crash on break-all, step into sequence.
+ * bxc#35536: Dns.GetHostEntry no longer supports IPv6
+ * bxc#35662: Type System.ServiceModel.Security.Tokens.BinarySecretSecurityToken is missing in assembly System.IdentityModel
+ * bxc#39282: [System.IO.Compression] issues with ZipArchiveEntry streams
+ * bxc#39859: Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL
+ * bxc#40603: Mono can’t parse Date in DB wich is in format: “2016-02-04 10:39:11Z”
+ * bxc#40916: [System.IO.Compression] ZipArchive can create an ZipArchiveEntry that has a modified time of DateTime.MinValue
+ * bxc#41035: DataViewTest2.DataView_ListChangedEventTest occasionally fails with llvm+sgen
+ * bxc#41349: System.TimeZoneInfo.IsDaylightSavingTime (DateTimeOffset dateTimeOffset) Not Implemented Exception
+ * bxc#41393: [WatchOS 2] Incorrect calling convention for P/Invokes taking structures
+ * bxc#41431: [aot] Build fails due to ‘Sgen STW requires a working mono-context’ error
+ * bxc#41466: mono_class_is_subclass_of return incorrect value by assuming mono_class_init has been called on parameters
+ * bxc#41477: SafeSocketHandle ObjectDisposedException ‘handle’ exception with linked CancellationTokenSource
+ * bxc#41492: DateTimeOffset.ToLocalTime() throwing erroneous error
+ * bxc#41509: DLR crashes when trying to convert a object to null.
+ * bxc#41530: [iOS]TimerTest failing randomly on devices,
+ * bxc#41552: HttpResponseMessage does not support multiple Links header entries
+ * bxc#41575: A Method That Accepts a FormattableString Object Is Not Called
+ * bxc#3323: Assertion when deleting global namespace inside method
+ * bxc#3399: [PATCH] pending_exception support is incomplete
+ * bxc#3434: Mono Compiler crashes when using a DelegateType as a method call
+ * bxc#3706: generics aot jit problem
+ * bxc#3735: Attempting to JIT compile method: using Linq’s “Any” fails on the device
+ * bxc#3767: Unit test UI table cell extends beyond cell bounds for failed test
+ * bxc#3811: DataContractJsonSerializer deserialization fails with subclass of List as known type
+ * bxc#3850: ScrollEventArgs in Form_Scroll method has invalid values
+ * bxc#3960: DismissModalViewControllerAnimated() crashes on 5.2.9
+ * bxc#4006: MonoDevelop fails to start with no warning if Gtk# is not installed on windows
+ * bxc#5644: Mono allows to access not accessible method
+ * bxc#7467: DefaultNonPersistentConnectionLimit is to low
+ * bxc#12571: Usage of XElement with XmlAnyElementAttribute is not supported by XmlSerializer
+ * bxc#19594: WebException.Response is null when https request needs proxy authentication
+ * bxc#29189: Compiling class referencing corefx facade/contract assemblies raises error “Reference to type ‘System.SByte’ claims it is defined assembly ‘mscorlib,..’ but couldn’t be found”
+ * bxc#30686: ZipArchive ctor throws InvalidDataException for WebConnectionStream
+ * bxc#30821: Compilation generates CS1701 warning
+ * bxc#32374: WebRequest::BeginGetRequestStream incorrectly sets IAsyncResult::CompletedSynchronously to always true
+ * bxc#33571: Mono crashes when marshalling fixed arrays
+ * bxc#34802: Debugger crash on break-all, step into sequence.
+ * bxc#35536: Dns.GetHostEntry no longer supports IPv6
+ * bxc#35662: Type System.ServiceModel.Security.Tokens.BinarySecretSecurityToken is missing in assembly System.IdentityModel
+ * bxc#39282: [System.IO.Compression] issues with ZipArchiveEntry streams
+ * bxc#39859: Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL
+ * bxc#40603: Mono can’t parse Date in DB wich is in format: “2016-02-04 10:39:11Z”
+ * bxc#40916: [System.IO.Compression] ZipArchive can create an ZipArchiveEntry that has a modified time of DateTime.MinValue
+ * bxc#41035: DataViewTest2.DataView_ListChangedEventTest occasionally fails with llvm+sgen
+ * bxc#41349: System.TimeZoneInfo.IsDaylightSavingTime (DateTimeOffset dateTimeOffset) Not Implemented Exception
+ * bxc#41393: [WatchOS 2] Incorrect calling convention for P/Invokes taking structures
+ * bxc#41431: [aot] Build fails due to ‘Sgen STW requires a working mono-context’ error
+ * bxc#41466: mono_class_is_subclass_of return incorrect value by assuming mono_class_init has been called on parameters
+ * bxc#41477: SafeSocketHandle ObjectDisposedException ‘handle’ exception with linked CancellationTokenSource
+ * bxc#41492: DateTimeOffset.ToLocalTime() throwing erroneous error
+ * bxc#41509: DLR crashes when trying to convert a object to null.
+ * bxc#41530: [iOS]TimerTest failing randomly on devices,
+ * bxc#41552: HttpResponseMessage does not support multiple Links header entries
+ * bxc#41575: A Method That Accepts a FormattableString Object Is Not Called
+ * bxc#41602: Compiler fails to recognize Indexer
+ * bxc#41616: Mono 4.4.0 crashes when using Socket.ConnectAsync to a unix domain socket if the path doesn’t exist
+ * bxc#41667: new DateTime().ToLocalTime() results in an exception
+ * bxc#41705: MonoTests.System.Threading.MonitorTest.Enter_Null crashes test runtime with assertion
+ * bxc#41775: Zip version needed to extract not correct in System.IO.Compression
+ * bxc#41782: [Cycle 7] “System.Net.WebException: Error: NameResolutionFailure” when attempting web requests with certain raw IP addresses
+ * bxc#41874: Reflection throws AmbiguousMatchException when calling GetProperty on a class that inherits from a generic base class.
+ * bxc#41897: NotSupportedException thrown from IPInterfaceProperties.UnicastAddresses
+ * bxc#41937: invoke.exe test asserts on bitcode
+ * bxc#41955: Bitcode “missing image did not probe corlib” exception thrown
+ * bxc#41979: CodeDom cannot call mcs because of invalid encoding configuration
+ * bxc#42057: error CS0121: The call is ambiguous
+ * bxc#42169: (managed_alloc) Fatal: Managed allocator missing for (mkbundle) in Mono 4.4.X
+ * bxc#42191: sdb deadlocks all the time while XS debugs XS
+ * bxc#42198: error CS0529: Inherited interface causes a cycle in the interface hierarchy.
+ * bxc#42219: [System.IO.Compression] Cannot create ZipArchive with duplicate entries with same name
+ * bxc#42224: Compiler crashed with code: 1, “Await yields with non-empty stack” from AssertEmptyStack ()
+ * bxc#42226: WCF client Expecting FaultException raising NotImplemented Exception instead When element is provided.
+ * bxc#42271: COOP: gc unsafe mode when printing native backtrace causes crash if GC is triggered
+ * bxc#42274: System.IO.Compression.ZipArchive vs System.Xml.XmlReader
+ * bxc#42395: Build runs indefinitely and never finishes
+ * bxc#42408: WebClient.DownloadString returns 401 Unauthorized when using Basic authentication
+ * bxc#42410: String Interpolation available even when langversion < 6
+ * bxc#42413: Volatile fields don’t enforce acquire - release semantics like Volatile.Read() and Volatile.Write()
+ * bxc#42584: InternalError / Crash when using System.Net.Http and PCL library
+ * bxc#42585: Switch fall-through not rejected
+ * bxc#42611: wrong compiler error when using IEnumerable.Sum
+ * bxc#42625: coop: crash with watchos system tests
+ * bxc#42688: Can’t wait for more than 429496 ms (429s)
+ * bxc#42702: Unnecessary dependency checks
+ * bxc#42750: Deploying an iOS app to iPhone 6S crashes when a breakpoint is set
+ * bxc#42843: XmlSerializer does not deserialize UTC Time values on Xamarin.Android but works well on windows.
+ * bxc#42864: [Cycle 7] “System.Net.WebException: Error: NameResolutionFailure” on second web request to certain raw IP addresses with HttpClient
+ * bxc#42887: Encoding iso-8859-1 throws IndexOutOfRangeException for Unicode surrogate pairs
+ * bxc#43022: ZipArchive.Entries is not updated when ZipArchiveEntry is deleted
+ * bxc#43032: System.Uri cannot parse url with underscore at start
+ * bxc#43099: [watchOS] Cannot enter GC safe region if the thread is not attached
+ * bxc#43193: Keep CurrentCulture in async/await
+ * bxc#43265: Inconsistency in Compilation of Async Code Compared to MSFT Compilers
+ * bxc#43291: Runtime crash at reflection.c:mono_custom_attrs_construct_by_type while calling GetCustomAttributes for a proxy class
+ * bxc#43320: Thread aborts in the middle of .cctor and hell break loose
+ * bxc#43357: WCSessionReplyHandler crashes WatchKit app
+ * bxc#43400: “using static” dependent on compile order
+ * bxc#43471: pragma warning disable still shows warnings in “Errors” pad
+ * bxc#43512: TimeZoneInfo.ConvertTimeBySystemTimeZoneId ArgumentException
+ * bxc#43636: [Cycle 8] “Index was out of range. Must be non-negative and less than the size of the collection” in System.Collections.Generic.List1[T].set_Item() when attempting to compile certain C# code involving tasks, async/await, and try/catch/finally
+ * bxc#43695: Nuget resolves .netstandard <= 1.3 when Xamarin.IOS does not support it
+ * bxc#43696: Delegate caching can invoke unrelated implementation leading to strange results
+ * bxc#43718: mcs crashes when unable to resolve type inside lambda using the ‘as’ operator
+ * bxc#43786: peverify is broken again
+ * bxc#43921: System.Threading.ThreadHelper.ThreadStart_Context tries to allocate, crashes
+ * bxc#44025: FTP download issue with IPv6
+ * bxc#44109: NetworkCredential does not convert SecureString
+ * bxc#44164: gosharp-regexp benchmark triggers unwinding crash when profiling
+ * bxc#44168: Can use non-accessible member with nameof
+ * bxc#44381: Debugger crash with domain unloading and VSTU
+ * bxc#44402: Array doesn’t implement non-generic IEnumerable
+ * bxc#44406: Xamarin.Mac.Socket exception:An address incompatible with the requested protocol was used
+ * bxc#44413: HttpHeaders.TryAddWithoutValidation behaves differently from .NET
+ * bxc#44440: Attempting to JIT error in function with pointer arithmetic
+ * bxc#44549: Ide Shuts down: System.ArgumentException: Item has already been added. Key in dictionary: ‘XamlG’ Key being added: ‘XamlG’
+ * bxc#44624: Connecting to SQL Server using IPv4 exception.
+ * bxc#44707: RemotingConfiguration.Configure() Throws RemotingException Because it Cannot Load ‘machine.config’
+ * bxc#44729: Type.GetType(“blah”,true,false) throws TypeLoadException without message
+ * bxc#44751: Incorrect code flow analysis with goto and out parameter causes CS0177
+ * bxc#44843: SqlCommand.ExecuteReaderAsync throws NotImplementedException
+ * bxc#44937: System.Diagnostics.StartProcess does not detect dotnetcore compiled assemblies as managed
+ * bxc#44978: HttpClientHandler.SendAsync should throw HttpRequestException for proxy auth failure
+ * bxc#44994: DeflateStream decompression is incomplete if reading byte-by-byte
+ * bxc#45129: Uri.IsWellFormedUriString returns incorrect result for relative uris beginning with slash
+ * bxc#45137: Seeing new AAPT0000 errors when building certain projects against master
+ * bxc#45270: Cannot add System.Reactive to watchOS Extension project
+ * bxc#45286: C# string interpolation line does not compile on OSX but does on MSBuild
+ * bxc#45774: Wrong scopes in .mdb in case of foreach loop
+ * bxc#45788: Marshaling a native NULL pointer to a managed array creates a new zero sized array
+ * bxc#46175: If the RSA will be used by multiple threads, it has a variety of exceptions.
+ * bxc#46190: Overload resolution fails in a case where methods use a named parameter in different positions
+ * bxc#46250: Type.GetType with throwOnError true doesn’t throw for a generic instance type with too few generic arguments
+ * bxc#47205: Uri.TryCreate throws exception
+ * bxc#42414: Run path_helper in OSX postinstall script to make Mono commands available in same shell session
+ * bxc#42365: Mono 4.4.1 OSX package doesn’t clean up old symlinks from /usr/local/bin
+
-------------------------------------------------------------------
Thu Nov 17 06:33:02 UTC 2016 - mailaender@opensuse.org
diff --git a/mono-core.spec b/mono-core.spec
index c37da93..fecf6c6 100644
--- a/mono-core.spec
+++ b/mono-core.spec
@@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# norootforbuild
%{!?ext_man: %define ext_man .gz}
%define llvm no
@@ -25,22 +26,35 @@
%define boehm yes
%endif
+%ifarch %ix86 x86_64
+%define btls yes
+%else
+%define btls no
+%endif
+
+%ifarch %ix86 x86_64 armv7l armv7hl aarch64
+%define roslyn yes
+%else
+%define roslyn no
+%endif
+
Name: mono-core
-Version: 4.6.2
+Version: 5.0.0
Release: 0
Summary: Cross-platform, Open Source, .NET development framework
License: LGPL-2.1 and MIT and MS-PL
Group: Development/Languages/Mono
Url: http://www.mono-project.com
-Source0: http://download.mono-project.com/sources/mono/mono-%{version}.7.tar.bz2
+Source0: http://download.mono-project.com/sources/mono/mono-%{version}.100.tar.bz2
Source1: mono-core.rpmlintrc
Source2: gmcs
# ppc build segfault so exclude it
ExcludeArch: ppc
# PATCH-FIX-OPENSUSE remove checks for libmono in mono-find-provides and mono-find-requires scripts
Patch14: find-deps-fix.patch
-# PATCH-FIX-OPENSUSE fix incorrect $mono_libdir substitution for libMonoPosixHelper.so library when native library dir (/usr/lib64 on x86_64) is different from mono lib dir (/usr/lib)
-Patch15: mono-config-fix-monoposixhelper-libdir.patch
+# PATCH-FIX-OPENSUSE revert Microsoft.Build.Tasks library to use old mcs compiler. This will make xbuild to use old mcs instead of csc - patch is used when roslyn is unavailable for current platform (big-endian systems).
+Patch15: xbuild-revert-to-mcs.patch
+BuildRequires: cmake
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
@@ -160,8 +174,12 @@ Provides: mono(Mono.Configuration.Crypto) = 4.0.0.0
Requires: timezone
%define _use_internal_dependency_generator 0
-%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-provides ; } | sort | uniq'
-%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-requires ; } | sort | uniq'
+# mono now ships with precompiled roslyn components that will lead us to broken requires\provides
+# instead of filtering bigger list of broken requires\provides, filter initial filelist and disable precompiled binaries from evaluation
+%define roslyn_prefix %{buildroot}%{_prefix}/lib/mono/4.5
+%define filtered_filelist printf "%s\\n" "${filelist[@]}" | grep -v "%{roslyn_prefix}/Microsoft.CodeAnalysis.CSharp.dll" | grep -v "%{roslyn_prefix}/Microsoft.CodeAnalysis.dll" | grep -v "%{roslyn_prefix}/System.Collections.Immutable.dll" | grep -v "%{roslyn_prefix}/System.Reflection.Metadata.dll" | grep -v "%{roslyn_prefix}/csc.exe" | cat -
+%define __find_provides env sh -c 'filelist=($(cat)) && { %{filtered_filelist} | /usr/lib/rpm/find-provides && %{filtered_filelist} | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-provides ; } | sort | uniq'
+%define __find_requires env sh -c 'filelist=($(cat)) && { %{filtered_filelist} | /usr/lib/rpm/find-requires && %{filtered_filelist} | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-requires ; } | sort | uniq'
%description
The Mono Project is an open development initiative that is working to
@@ -173,14 +191,35 @@ technologies that have been submitted to the ECMA for standardization.
%prep
%setup -q -n mono-%{version}
%patch14 -p1
+%if %roslyn == no
%patch15 -p1
+%endif
%build
-NOCONFIGURE="yes" ./autogen.sh
-# These are only needed if there are patches to the runtime
-#rm -f libgc/libtool.m4
-#autoreconf --force --install
-#autoreconf --force --install libgc
+# autogen.sh seems broken: it is not processing libgs subdirectory leaving old stuff there untouched.
+# so, remove gnu-build-system files manually
+find . \( \
+-name "Makefile.in" \
+-o -name "missing" \
+-o -name "ltmain.sh" \
+-o -name "install-sh" \
+-o -name "depcomp" \
+-o -name "configure" \
+-o -name "compile" \
+-o -name "config.guess" \
+-o -name "config.sub" \
+-o -name "config.h.in" \
+-o -name "aclocal.m4" \
+-o -name "test-driver" \
+-o -name "libtool.m4" \
+-o -name "ltoptions.m4" \
+-o -name "ltsugar.m4" \
+-o -name "ltversion.m4" \
+-o -name "lt~obsolete.m4" \
+\) -a -not -path "./external/*" \
+-exec rm -v {} \;
+# and recreate them with autoreconf
+autoreconf -fvi
export CFLAGS=" %{optflags} -fno-strict-aliasing"
%ifarch armv7l armv7hl
export MONO_CPU_ARCH="armv7l-thumb"
@@ -203,17 +242,22 @@ export PATH=/opt/novell/llvm-mono/bin:$PATH
%endif
%ifnarch %ix86 x86_64
--disable-system-aot \
+%endif
+%if %btls == yes
+ --enable-dynamic-btls \
+%endif
+%if %roslyn == no
+ --with-csc=mcs \
%endif
--with-ikvm=yes \
--with-moonlight=no
-
make
%install
%make_install
# Remove hardcoded lib directory from the config
-sed -i s,%{_prefix}/lib/,,g %{buildroot}%{_sysconfdir}/mono/config
+sed -i 's,\$mono_libdir/,,g' %{buildroot}%{_sysconfdir}/mono/config
# remove .la files (they are generally bad news)
rm -f %{buildroot}%{_libdir}/*.la
@@ -236,8 +280,9 @@ rm -rf %{buildroot}%{_datadir}/libgc-mono
# remove stuff that we don't package
rm -f %{buildroot}%{_bindir}/cilc
rm -f %{buildroot}%{_mandir}/man1/cilc.1*
-rm -f %{buildroot}%{_prefix}/lib/mono/*/browsercaps-updater.exe*
-rm -f %{buildroot}%{_prefix}/lib/mono/*/culevel.exe*
+rm -f %{buildroot}%{_mandir}/man1/mdb2ppdb.1*
+rm -f %{buildroot}%{_prefix}/lib/mono/*/browsercaps-updater.*
+rm -f %{buildroot}%{_prefix}/lib/mono/*/culevel.*
# brp-compress doesn't search _mandir
# so we cheat it
@@ -260,6 +305,19 @@ rm -rf %{buildroot}%{_prefix}/lib/mono/xbuild/12.0/bin/Microsoft.Build.Utilities
# Fake the deprecated binary to build legacy packages.
install -D -m 0755 %{S:2} %{buildroot}%{_bindir}/gmcs
+# remove roslyn components, if it is disabled from build.
+# this trick is needed to fix build for some packages (gnome-keyring-sharp for example),
+# that incorrectly detect CSC precense when it is actually not usable for current platform.
+# mono still package roslyn components even if it is disabled from build
+%if %roslyn == no
+rm -v %{buildroot}%{_prefix}/lib/mono/4.5/Microsoft.CodeAnalysis.CSharp.dll*
+rm -v %{buildroot}%{_prefix}/lib/mono/4.5/Microsoft.CodeAnalysis.dll*
+rm -v %{buildroot}%{_prefix}/lib/mono/4.5/System.Collections.Immutable.dll*
+rm -v %{buildroot}%{_prefix}/lib/mono/4.5/System.Reflection.Metadata.dll*
+rm -v %{buildroot}%{_prefix}/lib/mono/4.5/csc.*
+rm -v %{buildroot}%{_bindir}/csc
+%endif
+
%fdupes %{buildroot}%{_prefix}
%find_lang mcs
@@ -315,6 +373,7 @@ rm %{buildroot}%{_bindir}/mono-sgen-gdb.py
%{_bindir}/sn
%{_libdir}/libMonoPosixHelper.so*
%{_libdir}/libikvm-native.so
+%{_mandir}/man1/cert-sync.1%ext_man
%{_mandir}/man1/certmgr.1%ext_man
%{_mandir}/man1/chktrust.1%ext_man
%{_mandir}/man1/crlupdate.1%ext_man
@@ -355,10 +414,6 @@ rm %{buildroot}%{_bindir}/mono-sgen-gdb.py
%{_prefix}/lib/mono/4.5/Mono.Parallel.dll
%{_prefix}/lib/mono/4.5/Mono.Posix.dll
%{_prefix}/lib/mono/4.5/Mono.Security.dll
-%{_prefix}/lib/mono/4.5/Mono.Security.Providers.DotNet.dll
-%{_prefix}/lib/mono/4.5/Mono.Security.Providers.NewSystemSource.dll
-%{_prefix}/lib/mono/4.5/Mono.Security.Providers.NewTls.dll
-%{_prefix}/lib/mono/4.5/Mono.Security.Providers.OldTls.dll
%{_prefix}/lib/mono/4.5/Mono.Simd.dll
%{_prefix}/lib/mono/4.5/Mono.Tasklets.dll
%{_prefix}/lib/mono/4.5/System.Configuration.dll
@@ -405,10 +460,6 @@ rm %{buildroot}%{_bindir}/mono-sgen-gdb.py
%{_prefix}/lib/mono/gac/Mono.Parallel
%{_prefix}/lib/mono/gac/Mono.Posix
%{_prefix}/lib/mono/gac/Mono.Security
-%{_prefix}/lib/mono/gac/Mono.Security.Providers.DotNet
-%{_prefix}/lib/mono/gac/Mono.Security.Providers.NewSystemSource
-%{_prefix}/lib/mono/gac/Mono.Security.Providers.NewTls
-%{_prefix}/lib/mono/gac/Mono.Security.Providers.OldTls
%{_prefix}/lib/mono/gac/Mono.Simd
%{_prefix}/lib/mono/gac/Mono.Tasklets
%{_prefix}/lib/mono/gac/System
@@ -440,6 +491,32 @@ rm %{buildroot}%{_bindir}/mono-sgen-gdb.py
%{_prefix}/lib/mono/gac/System.IO.Compression
%{_prefix}/lib/mono/gac/cscompmgd
%{_prefix}/lib/mono/mono-configuration-crypto
+%if %btls == yes
+%{_libdir}/libmono-btls-shared.so*
+%{_prefix}/lib/mono/4.5/Mono.Btls.Interface.dll
+%{_prefix}/lib/mono/gac/Mono.Btls.Interface
+%endif
+%if %roslyn == yes
+%{_bindir}/csc
+%{_prefix}/lib/mono/4.5/csc.*
+%{_prefix}/lib/mono/4.5/System.Collections.Immutable.dll*
+%{_prefix}/lib/mono/4.5/Microsoft.CodeAnalysis.dll*
+%{_prefix}/lib/mono/4.5/Microsoft.CodeAnalysis.CSharp.dll*
+%{_prefix}/lib/mono/4.5/System.Reflection.Metadata.dll*
+%{_prefix}/lib/mono/4.5/al.pdb
+%{_prefix}/lib/mono/4.5/cert-sync.pdb
+%{_prefix}/lib/mono/4.5/certmgr.pdb
+%{_prefix}/lib/mono/4.5/chktrust.pdb
+%{_prefix}/lib/mono/4.5/crlupdate.pdb
+%{_prefix}/lib/mono/4.5/csharp.pdb
+%{_prefix}/lib/mono/4.5/gacutil.pdb
+%{_prefix}/lib/mono/4.5/ikdasm.pdb
+%{_prefix}/lib/mono/4.5/mcs.pdb
+%{_prefix}/lib/mono/4.5/mozroots.pdb
+%{_prefix}/lib/mono/4.5/setreg.pdb
+%{_prefix}/lib/mono/4.5/sn.pdb
+%{_prefix}/lib/mono/4.5/mscorlib.pdb
+%endif
%post
cert-sync /etc/ssl/ca-bundle.pem
@@ -710,6 +787,10 @@ Database connectivity for Mono.
%{_prefix}/lib/mono/gac/System.Runtime.Serialization
%{_prefix}/lib/mono/gac/System.Transactions
%{_prefix}/lib/mono/gac/WebMatrix.Data
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/sqlmetal.pdb
+%{_prefix}/lib/mono/4.5/sqlsharp.pdb
+%endif
%package -n mono-winforms
Summary: Mono's Windows Forms implementation
@@ -831,6 +912,11 @@ Extra packages.
%{_prefix}/lib/mono/gac/System.ServiceProcess
%{_prefix}/lib/mono/gac/System.Xaml
%{_prefix}/lib/mono/gac/mono-service
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/installutil.pdb
+%{_prefix}/lib/mono/4.5/mono-service.pdb
+%{_prefix}/lib/mono/4.5/RabbitMQ.Client.Apigen.pdb
+%endif
%package -n mono-data-sqlite
Summary: Database connectivity for Mono
@@ -897,6 +983,9 @@ Mono implementation of WCF, Windows Communication Foundation
%{_prefix}/lib/mono/gac/System.ServiceModel.Routing
%{_prefix}/lib/mono/gac/System.ServiceModel.Web
%{_prefix}/lib/mono/gac/SMDiagnostics
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/svcutil.pdb
+%endif
%package -n mono-winfxcore
Summary: Mono implementation of core WinFX APIs
@@ -1022,6 +1111,13 @@ Mono implementation of ASP.NET, Remoting and Web Services.
%{_prefix}/lib/mono/gac/System.Web.WebPages.Deployment
%{_prefix}/lib/mono/gac/System.Web.WebPages.Razor
%{_prefix}/lib/mono/gac/System.Web.WebPages
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/disco.pdb
+%{_prefix}/lib/mono/4.5/mconfig.pdb
+%{_prefix}/lib/mono/4.5/soapsuds.pdb
+%{_prefix}/lib/mono/4.5/wsdl.pdb
+%{_prefix}/lib/mono/4.5/xsd.pdb
+%endif
%package -n mono-mvc
Summary: Mono implementation of ASP
@@ -1116,6 +1212,9 @@ NUnit brings xUnit to all .NET languages.
%{_prefix}/lib/mono/gac/nunit.framework.extensions
%{_prefix}/lib/mono/gac/nunit.mocks
%{_prefix}/lib/mono/gac/nunit.util
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/nunit-console.pdb
+%endif
%package -n mono-devel
Summary: Mono development tools
@@ -1182,24 +1281,25 @@ Mono development tools.
%{_bindir}/mono-find-provides
%{_bindir}/mono-find-requires
%{_bindir}/mono-heapviz
+%{_bindir}/mono-package-runtime
%{_bindir}/mono-shlib-cop
%{_bindir}/mono-symbolicate
%{_bindir}/mono-xmltool
%{_bindir}/monodis
%{_bindir}/monolinker
+%{_bindir}/monograph
%{_bindir}/monop
%{_bindir}/monop2
%{_bindir}/mprof-report
%{_bindir}/pdb2mdb
-%if %boehm == yes
%{_bindir}/pedump
-%endif
%{_bindir}/permview
%{_bindir}/prj2make
%{_bindir}/resgen
%{_bindir}/resgen2
%{_bindir}/secutil
%{_bindir}/sgen
+%{_bindir}/sgen-grep-binprot
%{_bindir}/signcode
%{_bindir}/xbuild
%dir %{_datadir}/mono-2.0
@@ -1240,7 +1340,6 @@ Mono development tools.
%{_mandir}/man1/mprof-report.1%ext_man
%{_mandir}/man1/pdb2mdb.1%ext_man
%{_mandir}/man1/permview.1%ext_man
-%{_mandir}/man1/prj2make.1%ext_man
%{_mandir}/man1/resgen.1%ext_man
%{_mandir}/man1/secutil.1%ext_man
%{_mandir}/man1/sgen.1%ext_man
@@ -1248,6 +1347,11 @@ Mono development tools.
%{_mandir}/man1/xbuild.1%ext_man
%{_prefix}/lib/mono-source-libs
%{_prefix}/lib/mono/4.0
+%{_prefix}/lib/mono/4.6.2-api
+%{_prefix}/lib/mono/4.6.1-api
+%{_prefix}/lib/mono/4.6-api
+%{_prefix}/lib/mono/4.5.2-api
+%{_prefix}/lib/mono/4.5.1-api
%{_prefix}/lib/mono/4.5-api
%{_prefix}/lib/mono/4.0-api
%{_prefix}/lib/mono/3.5-api
@@ -1317,6 +1421,39 @@ Mono development tools.
%{_prefix}/lib/mono/xbuild-frameworks
%dir %{_libdir}/mono/
%{_libdir}/mono/lldb
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/caspol.pdb
+%{_prefix}/lib/mono/4.5/cccheck.pdb
+%{_prefix}/lib/mono/4.5/ccrewrite.pdb
+%{_prefix}/lib/mono/4.5/cert2spc.pdb
+%{_prefix}/lib/mono/4.5/dtd2rng.pdb
+%{_prefix}/lib/mono/4.5/dtd2xsd.pdb
+%{_prefix}/lib/mono/4.5/genxs.pdb
+%{_prefix}/lib/mono/4.5/httpcfg.pdb
+%{_prefix}/lib/mono/4.5/ictool.pdb
+%{_prefix}/lib/mono/4.5/ilasm.pdb
+%{_prefix}/lib/mono/4.5/installvst.pdb
+%{_prefix}/lib/mono/4.5/lc.pdb
+%{_prefix}/lib/mono/4.5/linkeranalyzer.pdb
+%{_prefix}/lib/mono/4.5/macpack.pdb
+%{_prefix}/lib/mono/4.5/makecert.pdb
+%{_prefix}/lib/mono/4.5/mdbrebase.pdb
+%{_prefix}/lib/mono/4.5/mkbundle.pdb
+%{_prefix}/lib/mono/4.5/mono-api-info.pdb
+%{_prefix}/lib/mono/4.5/mono-api-html.pdb
+%{_prefix}/lib/mono/4.5/mono-cil-strip.pdb
+%{_prefix}/lib/mono/4.5/mono-shlib-cop.pdb
+%{_prefix}/lib/mono/4.5/mono-xmltool.pdb
+%{_prefix}/lib/mono/4.5/monop.pdb
+%{_prefix}/lib/mono/4.5/pdb2mdb.pdb
+%{_prefix}/lib/mono/4.5/permview.pdb
+%{_prefix}/lib/mono/4.5/resgen.pdb
+%{_prefix}/lib/mono/4.5/secutil.pdb
+%{_prefix}/lib/mono/4.5/sgen.pdb
+%{_prefix}/lib/mono/4.5/signcode.pdb
+%{_prefix}/lib/mono/4.5/*symbolicate.pdb
+%{_prefix}/lib/mono/4.5/xbuild.pdb
+%endif
%package -n mono-reactive
Summary: Reactive Extensions
@@ -1403,6 +1540,10 @@ Monodoc-core contains documentation tools for C#.
%{_prefix}/lib/mono/gac/monodoc
%{_prefix}/lib/mono/monodoc
%{_prefix}/lib/monodoc
+%if %roslyn == yes
+%{_prefix}/lib/mono/4.5/mdoc.pdb
+%{_prefix}/lib/mono/4.5/mod.pdb
+%endif
%package -n mono-complete
Summary: Install everything built from the mono source tree
diff --git a/xbuild-revert-to-mcs.patch b/xbuild-revert-to-mcs.patch
new file mode 100644
index 0000000..12b56a2
--- /dev/null
+++ b/xbuild-revert-to-mcs.patch
@@ -0,0 +1,12 @@
+diff -uprN mono-5.0.0.old/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs mono-5.0.0/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+--- mono-5.0.0.old/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs 2017-05-03 18:45:38.000000000 +0300
++++ mono-5.0.0/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs 2017-05-05 05:05:48.901776264 +0300
+@@ -219,7 +219,7 @@ namespace Microsoft.Build.Tasks {
+
+ protected override string ToolName {
+ get {
+- return MSBuildUtils.RunningOnWindows ? "csc.bat" : "csc.exe";
++ return MSBuildUtils.RunningOnWindows ? "mcs.bat" : "mcs.exe";
+ }
+ }
+