[packages/mono-tools] Fix build against mono 6.14; rel 4

arekm arekm at pld-linux.org
Sun Aug 16 23:15:09 CEST 2026


commit 907688a232fc1b8a30481435d53de8d295a2e83e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Aug 16 22:53:40 2026 +0200

    Fix build against mono 6.14; rel 4

 mono-tools-nunit.patch       | 41 ++++++++++++++++++++++++++
 mono-tools-sharpziplib.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++
 mono-tools.spec              | 31 +++++++++++++-------
 3 files changed, 131 insertions(+), 11 deletions(-)
---
diff --git a/mono-tools.spec b/mono-tools.spec
index 8d8dd50..0266efa 100644
--- a/mono-tools.spec
+++ b/mono-tools.spec
@@ -1,12 +1,16 @@
 #
+# managed dotnet code, no native debug sources
+%undefine	_debugsource_packages
+#
 # Conditional build:
 %bcond_with	gecko		# gecko html renderer
+%bcond_with	webkit		# WebKit html renderer (needs WebKitGTK 1.x)
 #
 Summary:	Mono Tools
 Summary(pl.UTF-8):	Narzędzia do mono
 Name:		mono-tools
 Version:	4.2
-Release:	3
+Release:	4
 License:	GPL v2+
 Group:		Development/Tools
 # also available on github
@@ -15,6 +19,8 @@ Source0:	http://download.mono-project.com/sources/mono-tools/%{name}-%{version}.
 # Source0-md5:	d4b7c711ff8295173766c44973c6c10e
 Patch0:		%{name}-pwd.patch
 Patch1:		%{name}-configure.patch
+Patch2:		%{name}-nunit.patch
+Patch3:		%{name}-sharpziplib.patch
 URL:		http://www.mono-project.com/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -23,7 +29,7 @@ BuildRequires:	dotnet-gconf-sharp-devel >= 2.16.0
 BuildRequires:	dotnet-gnome-sharp-devel >= 2.16.0
 # gtk-sharp-2.0, glade-sharp-2.0
 BuildRequires:	dotnet-gtk-sharp2-devel
-BuildRequires:	dotnet-webkit-sharp-devel >= 0.2-1
+%{?with_webkit:BuildRequires:	dotnet-webkit-sharp-devel >= 0.2-1}
 BuildRequires:	gettext-tools
 BuildRequires:	glib2-devel >= 2.0
 BuildRequires:	libgdiplus
@@ -158,6 +164,8 @@ zawartości.
 %setup -q
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
 
 # as expected by ilcontrast script
 %{__sed} -i -e 's,\$(libdir)/ilcontrast,$(prefix)/lib/ilcontrast,' ilcontrast/Makefile.am
@@ -202,7 +210,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/emveepee
 %attr(755,root,root) %{_bindir}/gasnview
 %attr(755,root,root) %{_bindir}/gsharp
-%attr(755,root,root) %{_bindir}/ilcontrast
 %attr(755,root,root) %{_bindir}/minvoke
 %attr(755,root,root) %{_bindir}/monodoc
 %attr(755,root,root) %{_bindir}/mperfmon
@@ -211,8 +218,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_prefix}/lib/gsharp/gsharp.exe.config
 %attr(755,root,root) %{_prefix}/lib/mono/4.5/gasnview.exe
 %{_prefix}/lib/create-native-map
-%dir %{_prefix}/lib/ilcontrast
-%attr(755,root,root) %{_prefix}/lib/ilcontrast/ilcontrast.exe
 %dir %{_prefix}/lib/minvoke
 %attr(755,root,root) %{_prefix}/lib/minvoke/minvoke.exe
 %dir %{_prefix}/lib/mperfmon
@@ -224,28 +229,32 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_prefix}/lib/monodoc/browser.exe
 %{_prefix}/lib/monodoc/web
 %{_desktopdir}/gsharp.desktop
-%{_desktopdir}/ilcontrast.desktop
 %{_desktopdir}/monodoc.desktop
-%{_pixmapsdir}/ilcontrast.png
 %{_pixmapsdir}/monodoc.png
 %{_iconsdir}/hicolor/*x*/apps/monodoc.png
 %{_pkgconfigdir}/create-native-map.pc
 %{_mandir}/man1/create-native-map.1*
+%if %{with gecko} || %{with webkit}
+# only built when an embedded HTML renderer is available
+%attr(755,root,root) %{_bindir}/ilcontrast
+%dir %{_prefix}/lib/ilcontrast
+%attr(755,root,root) %{_prefix}/lib/ilcontrast/ilcontrast.exe
+%{_desktopdir}/ilcontrast.desktop
+%{_pixmapsdir}/ilcontrast.png
+%endif
 %{_mandir}/man1/mperfmon.1*
 
 %if %{with gecko}
 %files gecko
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/ilcontrast
-%{_prefix}/lib/ilcontrast
 %{_prefix}/lib/monodoc/GeckoHtmlRender.dll
-%{_desktopdir}/ilcontrast.desktop
-%{_pixmapsdir}/ilcontrast.png
 %endif
 
+%if %{with webkit}
 %files webkit
 %defattr(644,root,root,755)
 %{_prefix}/lib/monodoc/WebKitHtmlRender.dll
+%endif
 
 %files monowebbrowser
 %defattr(644,root,root,755)
diff --git a/mono-tools-nunit.patch b/mono-tools-nunit.patch
new file mode 100644
index 0000000..a6388c3
--- /dev/null
+++ b/mono-tools-nunit.patch
@@ -0,0 +1,41 @@
+Drop the nunit build dependency.
+
+mono 6.x no longer bundles nunit, so mono-nunit.pc is gone and configure
+aborts.  Nothing that gets installed needs it: upstream hangs Test.Rules.dll
+(test-only scaffolding, never installed) off "all" instead of "test", and
+asn1view passes NUNIT_LIBS despite containing no NUnit code.  Test.Framework.dll
+is already test-only and stays that way.
+
+--- mono-tools-4.2/configure.in
++++ mono-tools-4.2/configure.in
+@@ -42,8 +42,6 @@
+ AC_SUBST(GACUTIL)
+ 
+ 
+-PKG_CHECK_MODULES(NUNIT, mono-nunit)
+-AC_SUBST(NUNIT_LIBS)
+ 
+ PKG_CHECK_MODULES(MONODOC, monodoc)
+ AC_SUBST(MONODOC_LIBS)
+--- mono-tools-4.2/asn1view/gtk/Makefile.am
++++ mono-tools-4.2/asn1view/gtk/Makefile.am
+@@ -5,7 +5,7 @@
+ #   Gonzalo Paniagua Javier (gonzalo at ximian.com)
+ #   Martin Willemoes Hansen (mwh at sysrq.dk>
+ #
+-local_flags = -debug+ -debug:full -nologo $(NUNIT_LIBS)
++local_flags = -debug+ -debug:full -nologo
+ 
+ local_flags += $(MCSFLAGS) $(GTK_SHARP_LIBS) $(GNOME_SHARP_LIBS)
+ 
+--- mono-tools-4.2/gendarme/rules/Test.Rules/Makefile.am
++++ mono-tools-4.2/gendarme/rules/Test.Rules/Makefile.am
+@@ -27,7 +27,7 @@
+ $(common_tests): $(test_build_sources) $(framework)
+ 	$(MCS) -target:library $(TESTS_OPTIONS) -pkg:mono-nunit -r:$(CECIL_ASM) -r:$(framework) -out:$@ $(test_build_sources)
+ 
+-all: $(common_tests)
++all:
+ 
+ test: $(common_tests)
+ 
diff --git a/mono-tools-sharpziplib.patch b/mono-tools-sharpziplib.patch
new file mode 100644
index 0000000..719ea8d
--- /dev/null
+++ b/mono-tools-sharpziplib.patch
@@ -0,0 +1,70 @@
+Read the definitions zip with System.IO.Compression instead of SharpZipLib.
+
+mono 6 marks its bundled ICSharpCode.SharpZipLib [Obsolete], and gendarme
+builds with -warnaserror+, so the three uses here break the build.  The
+framework's own ZipArchive is supported and does the same job; entries get
+their own stream rather than sharing the sequential one.
+
+--- mono-tools-4.2/gendarme/rules/Gendarme.Rules.Portability/MonoCompatibilityReviewRule.cs
++++ mono-tools-4.2/gendarme/rules/Gendarme.Rules.Portability/MonoCompatibilityReviewRule.cs
+@@ -43,7 +43,7 @@
+ using Gendarme.Framework.Helpers;
+ using Gendarme.Framework.Rocks;
+ 
+-using ICSharpCode.SharpZipLib.Zip;
++using System.IO.Compression;
+ 
+ using MoMA.Analyzer.MoMAWebService;
+ 
+@@ -175,23 +175,24 @@
+ 			if (!File.Exists (filename))
+ 				return;
+ 
+-			using (FileStream fs = File.OpenRead (filename)) 
+-			using (ZipInputStream zs = new ZipInputStream (fs))
+-			using (StreamLineReader sr = new StreamLineReader (zs)) {
+-				ZipEntry ze;
+-				while ((ze = zs.GetNextEntry ()) != null) {
+-					switch (ze.Name) {
+-					case "exception.txt":
+-						NotImplementedInternal = Read (sr);
+-						break;
+-					case "missing.txt":
+-						MissingInternal = Read (sr);
+-						break;
+-					case "monotodo.txt":
+-						TodoInternal = ReadWithComments (sr);
+-						break;
+-					default:
+-						break;
++			using (FileStream fs = File.OpenRead (filename))
++			using (ZipArchive za = new ZipArchive (fs, ZipArchiveMode.Read)) {
++				foreach (ZipArchiveEntry ze in za.Entries) {
++					using (Stream es = ze.Open ())
++					using (StreamLineReader sr = new StreamLineReader (es)) {
++						switch (ze.Name) {
++						case "exception.txt":
++							NotImplementedInternal = Read (sr);
++							break;
++						case "missing.txt":
++							MissingInternal = Read (sr);
++							break;
++						case "monotodo.txt":
++							TodoInternal = ReadWithComments (sr);
++							break;
++						default:
++							break;
++						}
+ 					}
+ 				}
+ 			}
+--- mono-tools-4.2/gendarme/rules/Gendarme.Rules.Portability/Makefile.am
++++ mono-tools-4.2/gendarme/rules/Gendarme.Rules.Portability/Makefile.am
+@@ -1,6 +1,6 @@
+ include ../common.make
+ 
+-EXTRA_RULES_OPTIONS += -r:ICSharpCode.SharpZipLib.dll -r:System.Web.Services.dll
++EXTRA_RULES_OPTIONS += -r:System.IO.Compression.dll -r:System.Web.Services.dll
+ 
+ rules_sources =  \
+ 	DoNotHardcodePathsRule.cs \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mono-tools.git/commitdiff/907688a232fc1b8a30481435d53de8d295a2e83e



More information about the pld-cvs-commit mailing list