[PATCH] Adding a fully-bootstrapped mono

  • Done
  • quality assurance status badge
Details
7 participants
  • Aaron Covrig
  • Adam Faiz
  • Efraim Flashner
  • Janneke Nieuwenhuizen
  • Ludovic Courtès
  • Richard Sent
  • unmush
Owner
unassigned
Submitted by
unmush
Severity
normal
Merged with
U
U
unmush wrote on 29 Nov 2024 16:05
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me
We used to have a mono package, but it was removed due to includingbootstrap binaries (among others).  This patch series introduces a full,
17-mono-package sequence that takes us from a mono-1.2.6 built fully
from source to mono-6.12.0 built fully from source, using only packages
that already have full bootstrap paths.  I make no promise that this is
the shortest or most optimal path, but it exists and I have verified it
works.

As I've spent what is probably an unreasonable amount of time working
toward this, I thought I'd share some of my thoughts, experiences, and
commentary.  Sorry in advance if it gets a bit rambly or lecture-ish.

* Prologue

I started down this road because someone I'm working on a project with
decided to depend on a C# package that requires C# 12.0 features, and my
personal mono package based on the tarball releases (which include
bootstrap binaries) only went up to C# 7.0.  This meant that the C#
package in question de facto required strictly Microsoft's (er, I mean,
"the .NET foundation"'s) .NET implementation - hereafter referred to as
"dotnet" - and a very recent version no less.  The bootstrapping story
with dotnet is very bad:
untangle it would probably require a relatively modern C# compiler, and
something that at least sort of understands msbuild.  And there's not
much point to "bootstrapping" dotnet from something that isn't
bootstrapped itself.  So I figured I may as well start with mono.

* History

While mono is today probably the most well-known alternative to
Microsoft's .NET offerings, it is not the only one.  Indeed, in the
early 2000s there were at least 2 competing free software
implementations: Mono, and DotGNU's Portable.NET (abbreviated pnet).
They differed in goals, licenses, and methods: Portable.NET was a GNU
project concerned with, among other things, limiting the ability of
Microsoft to impose vendor lock-in via its proprietary .NET
implementation and software patents.  As a GNU project, it used the GPL
for its runtime and compiler, and the GPL with a linking exception for
its standard library, pnetlib.  Mono, on the other hand, used a mix of
many copyleft and permissive licenses: X11 for the standard library, GPL
for the compiler (later dual-licensed to add an X11 option), and LGPL
for the runtime, with GPL and LGPL code also offered "under commercial
terms for when the GPL and the LGPL are not suitable".  In 2016 after
its acquisition by Microsoft, the runtime was relicensed to use the
Expat (MIT) license.

But perhaps most importantly to us, while Mono opted to write its C#
compiler, mcs, in... C#, Portable.NET's runtime and C# compiler were
both written in C.  Portable.NET along with the entire DotGNU project
was decommissioned in 2012, but the source is still available, and it
still works fine (with a few modifications for compatibility with newer
versions of its dependencies).  In https://issues.guix.gnu.org/57625
Adam Faiz submitted patches to package pnet and pnetlib, along with one
of their dependencies named treecc.  These packages were based on the
last release of Portable.NET, version 0.8.0, released in 2007.  I
initially used these packages as the basis for my bootstrap efforts, and
even managed to get mono-1.2.6 built using them, but later discovered
that using a more recent version from git made it much easier.  For
example, while pnet-0.8.0 can do pointer arithmetic inside unsafe code
blocks, it doesn't support the += or -= operators specifically, which
requires lots of patching (after all, who would use x = x + y when you
could do x+= y?).  There are many other similar improvements in the git
version, so for this patch series I've decided to go with pnet-git.

* The start

After building mono-1.2.6, I tried a few later versions, and the third
or fourth one would always fail with errors about missing methods.  It
turns out that the reason for this is that, contrary to what their
marketing suggests, C# and Java are not "write once, run everywhere".
This is because their compilers rely on the details of the libraries
that the program will be run with at compile-time.  This is used, for
example, to do overload resolution.  Suppose, for example, that a
certain implementation of the "==" operator is present in version 1.0 of
a library, and then in version 2.0 of a library a more specific
implementation is introduced.  Now code that is compiled against version
2.0 may instead automatically reference the more-specific
implementation, as is in accordance with the rules of C#.  But when it
is run with version 1.0, it will fail because that implementation
doesn't exist.  In my case, for some reason the initial mcs and core
libraries being built to compile the rest of mono were being compiled
against a 2.0 library and then run with a 1.0 library.  It turns out
that this was because mcs uses mono's code for producing assemblies
(.NET dlls and exes), and mono decides which version to put in an
assembly it writes based on "which runtime version" is being used, and
that version is decided at startup based on... the version that was put
in the assembly it is running.  So for example, mono-1.9.1 would produce
2.0 assemblies because mono-1.2.6 produced 2.0 assemblies because pnet
produced 2.0 assemblies.  So I modified mono's runtime in mono-1.9.1 to
allow for this version to be overridden via environment variable, and
set it to "v1.1.4322", and things went a lot more smoothly after that.

From there on it was mostly the usual trial-and-error process of
identifying where things had bitrotted.  I made sure to unvendor libgc
wherever possible, though eventually by mono-4.9.0 they explicitly
dropped support in their configure script for using any libgc other than
what was bundled, so at that point I switched to using their homebrewed
sgen garbage collector.

* A concerning development

Once I got to mono-2.11.4, though, things took a turn for the
interesting: mono started using git submodules, and the (recursive? #t)
clones were all failing.  It turns out that this is because their
submodules reference github.com using the git:// protocol.

This is notable for a few reasons.

First, github dropped support for the git:// protocol in 2021, so
recursive clones won't work now.  This means I have to explicitly list
out every submodule, its commit, and its sha256 hash, for every mono
version until they switched to using http or https.  mono-2.11.4 has
only 4 submodules, but that doesn't last for long: by mono-4.9.0 it has
14 submodules.  A significant portion of these patches is just listing
these submodules and their hashes.  It's a bit annoying.

The more concerning reason, though, is *why* github dropped support for
the git:// protocol: it is unencrypted and unauthenticated.  This is
mitigated somewhat by the use of sha-1 hashes to identify commits in the
referenced submodules, putting a significant computational burden on
anyone who would try to alter what was fetched corresponding to a given
submodule.  Significantly more risky, though, is the process of
*updating* submodules that use git:// URLs.  It is quite unlikely that a
developer is going to independently clone one of the submodules over
https, navigate to a desirable commit, copy the sha-1 hash, and manually
update the submodule reference's commit.  They're far more likely to run
'cd submodule; git pull; cd ..; git add submodule; git commit ...' or an
equivalent.

Of course, any changes a network man-in-the-middle might try to make
here would still be reflected in the commit history, so even if a
developer did that, they or any of their fellow committers could spot
anything strange or malicious and point it out.  Also, the changes
couldn't be propagated to others trying to pull them who weren't on a
path containing the MITM because the potentially-malicious commit
wouldn't be present in the real submodule's repository.  So the
transparency of git clearly showing changes to text files, combined with
the fact that surely no git hosting platform would just allow arbitrary
entities to make whatever commits they want accessible under any
arbitrary repository URL, rather mitigate this security issue.

This usage of git:// URLs lasted all the way until September 28, 2021,
when github's removal of support for it forced the developers to change
them to https.

* Meanwhile, in reality

On November 28, 2016, mono added a submodule named roslyn-binaries.
Unsurprisingly, it included binary blobs for Microsoft's Roslyn compiler
(which I believe had been open-sourced shortly prior).  From here on,
mono's build system would default to using these binaries for building
on little-endian systems (though another compiler could be specified
with the --with-csc configure flag).  I happen to know that it is
extremely unlikely that many mono developers used this configure flag.
I know this because the 5.0 series is an absolute pain in the neck to
build from source, because they consistently depend on new C# features
*before* they implement them.

To go on a brief tangent: does anyone remember back when youtube-dl was
temporarily taken down from github due to the RIAA's DMCA request?  Many
were unhappy about that.  One such unhappy person made news when they
made the full contents of youtube-dl's repository available to access
through the DMCA request repository:
turns out that there are many actions that one can take on github that
will make arbitrary commits available under arbitrary repository URLs.

So, in reality, for the span of time from November 28, 2016 to
September 28, 2021, anybody sitting on the network path between github
and any mono developer updating the roslyn-binaries submodule could
decide on any arbitrary new commit to be used.  Of course, merely
inspecting the diff for the commit will reveal nothing of use, because
the contents are binary blobs.  And not only are these blobs those of a
compiler, they are the blobs of a compiler that is sure to be used to
compile another compiler, which will then be redistributed as an opaque,
non-bootstrappable binary blob to be used for compiling other compilers.

You would be hard-pressed to find a more fertile breeding ground for Ken
Thompson / Trusting Trust attacks.  If every agent of the NSA (and
whatever other agencies, including those of other countries, had access
to the appropriate network traffic) somehow failed to capitalize on 6
years of opportunity to compromise an entire software ecosystem using
only a basic MITM of unencrypted traffic, they deserve to be sacked.
Whether such an attack actually occurred or not, this is a case study in
carelessness and why bootstrappability is so important; discovering all
this made me quite worried about having used a mono version built from
blobs previously, and has convinced me that, as time-wasting and tedious
as this project has been, it is nevertheless probably an important one.

* Another note on roslyn-binaries

If you're going to write a self-hosting compiler, the least you can do
is keep it self-hosting.  Deciding to write a self-hosting compiler is a
valid choice, of course, with its own merits and demerits, but there is
something bitterly poetic about mono starting out requiring specifically
Microsoft's C# compiler in order to build (mono did its initial
bootstrapping using Microsoft's proprietary csc), achieving independence
through self-hosting, being acquired by Microsoft, and thereafter coming
crawling back to Microsoft's C# compiler once more before eventually
dying.

The funny thing is that it's not even necessary.  The dependencies on
new C# features are all in mono's standard library (which increasingly
borrowed code from Microsoft's corefx library), not in mono's compiler.

* More binary submodules?

Even before roslyn-binaries, there was binary-reference-assemblies,
which contained prebuilt "reference" blobs for the various versions of
the standard libraries.  These exist, I assume, precisely because of the
library incompatibility problems regarding overloading that I mentioned
earlier.  While later versions of mono included sources and a build
system for producing these reference binaries, mono-4.9.0 and earlier
did not.  Mono's build system still demanded /something/ to install,
though, so I told it to use the real standard library of the input mono
version.  When I did get to a mono version that at least claimed to
support regenerating the reference binaries, I found that it didn't work
with mcs due to differences in which libraries had to be referenced, so
I had to patch it to add a bunch of references determined through trial
and error.

The xunit-binaries submodule was also added sometime before mono-5.1.0.
This dependency makes it impossible to run the full test suite without
binary blobs.  Presumably for this reason, Debian elects to only run
tests within the mono/mini/ and mono/tests/ subdirectories.  For my
part, I've disabled all tests except for those of mono-6.12.0, the final
version, limited to the two aforementioned subdirectories.  This is
because it would take extra time for the builds, because several of the
tests depend on binary blobs bundled into the mono repository itself
(which my thorough cleaning of all dlls and exes from the sources
removes), because a large chunk of the tests depend on binary blobs in
xunit-binaries in later versions, and because "expect some test
failures" is part of the mono documentation and I don't have the
time to figure out for the mono developers every reason why each of 17
versions of their test suite is broken.

* The long march through the 5.0s

The 5.0 series was when Microsoft acquired Mono, and it shows.  You'll
notice I needed to introduce "pre-" packages for various versions
because in several cases a tagged release could not build the following
tagged release.  For that matter, they couldn't build the pre- package
either, but it at least took fewer patches to get them working.  The
reason for this is that Mono added a dependency on Microsoft's corefx
library source code, and it usually started using C# features well
before mcs was able to compile them.  Because of this, despite taking 8
versions to get from 1.2.6 to 4.9.0, it took another 8 versions to get
through the 5.0 series, and 5 of them required nontrivial patching to
massage the source into a form compilable by mcs.

* The final stretch

Eventually I realized that the dependencies on new features were all
coming from corefx, not from mono's compiler.  Consequently, the only
reason for this particular bootstrap-hostile ordering of builds is that
it happened to be the order the mono devs committed things.  So I just
cherry-picked every commit I could find touching mcs/mcs (magit was
quite useful for this) and applied it to 5.10.0 to produce what is
essentially the 6.12.0 compiler, then used it to jump straight to
building 6.12.0.

Use of this technique earlier on in the bootstrap process may be
of interest to anyone looking to shorten the chain of packages.

* The finishing touches

My initial goal was to package dotnet, and I had tried to progress
toward that from mono-4.9.0 for a period, but with no success.  During
that time, though, I did encounter a bug in mono's xbuild condition
parser, which I wrote a patch for, and included in mono-6.12.0.

I also discovered that xbuild would wrongly complain about missing
references even when the proper assemblies were in MONO_PATH or
MONO_GAC_PREFIX, because xbuild would erroneously only consider the path
/gnu/store/...mono-6.12.0/lib/mono/gac when looking for global assembly
caches, completely ignoring MONO_GAC_PREFIX.  So I wrote a patch to fix
that, and included it in mono-6.12.0.

Having witnessed how much nicer it is to package things that use rpath /
runpath than things that use environment variables (like python) and
therefore require constant wrapping of executables and use of
propagated-inputs, I devised a patch that would extend mono's
per-assembly config files to support a <runpath> element.  For example,
if you have a file /tmp/dir2/test2.exe, and there is also a file
/tmp/dir2/test2.exe.config, and its contents are

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runpath path="/tmp/dir1"/>
</configuration>

and it references test1.dll, it will first look for it at
/tmp/dir1/test1.dll.  Note that, of course, test1.dll still needs to be
accessible to the compiler at compile-time through MONO_PATH or an
explicitly-specified path passed on the mcs command line.

It is my hope that this feature will be of use to anybody interested in
developing a build system.

* Future work

Mono had several difficult points in bootstrapping and packaging, but at
the end of the day it still met the basic description of a software
package: well-defined environment-supplied inputs and sources, a
user-supplied install prefix, and files installed under that prefix.

The dotnet world is an entirely different beast.  The first step of most
build systems I have encountered from that realm is downloading an
entire toolchain, among other dependencies, as a binary blob.  They
heavily depend on the exact packages they specify being available
exactly where they say to install them.  There is no "install", there
are no "install directories" to my knowledge.  A build that doesn't
contact nuget.org is an abberation.  I am at a loss how to build these
things, much less package them.  I badly need help.

* Closing thoughts

"You wish now that our places had been exchanged.  That I had died, and
DotGNU had lived?"

"... Yes.  I wish that."

Maintenance of Mono was recently transferred over to WineHQ.  With that
announcement this statement was placed at https://www.mono-project.com:

"We want to recognize that the Mono Project was the first .NET
implementation on Android, iOS, Linux, and other operating systems. The
Mono Project was a trailblazer for the .NET platform across many
operating systems. It helped make cross-platform .NET a reality and
enabled .NET in many new places and we appreciate the work of those who
came before us."

I would like to clarify that, according to Miguel de Icaza himself
"started working on the system about the same time".  According to
https://lwn.net/2002/0103/a/dotgnu.php3Portable.NET began "in January
2001".  While it's unclear exactly when Portable.NET reached various
milestones, and the significance of the various milestones varies
somewhat (for example, mono probably does not care that Portable.NET
also includes a Java and C compiler), I think that there is cause to
dispute the claim that Mono was "the first" .NET implementation on
Linux.

On a related note, if we haven't looked at the possibility of using
Portable.NET in the Java bootstrap process, it may be worth visiting at
some point.

Thank you for your time, I think I need to get some rest now.

- unmush
From 3f8af65f72871d61fa85e6939f46cb8dac185c70 Mon Sep 17 00:00:00 2001
Message-ID: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 12:13:32
Subject: [PATCH 01/21] gnu: add treecc.

* gnu/packages/dotnet.scm: new module.
(treecc): new package.
* gnu/local.mk (GNU_SYSTEM_MODULES): add new module.

Change-Id: If3f36615774c872f3015510eb08ec53657e4edfb
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 62 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 gnu/packages/dotnet.scm

Toggle diff (82 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index bd0f850d53..0a1617448c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -249,6 +249,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/docbook.scm \
%D%/packages/docker.scm \
%D%/packages/documentation.scm \
+ %D%/packages/dotnet.scm \
%D%/packages/dvtm.scm \
%D%/packages/easyrpg.scm \
%D%/packages/ebook.scm \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
new file mode 100644
index 0000000000..3084e1cf3a
--- /dev/null
+++ b/gnu/packages/dotnet.scm
@@ -0,0 +1,62 @@
+(define-module (gnu packages dotnet)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages assembly)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bdw-gc)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages icu4c)
+ #:use-module (gnu packages instrumentation)
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages version-control)
+ #:use-module (gnu packages)
+ #:use-module (guix modules)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (ice-9 match))
+
+(define-public treecc
+ (package
+ (name "treecc")
+ (version "0.3.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+ (build-system gnu-build-system)
+ (home-page "https://www.gnu.org/software/dotgnu")
+ (synopsis "Tree Compiler-Compiler.")
+ (description "The treecc program is designed to assist in the development
+of compilers and other language-based tools. It manages the generation of
+code to handle abstract syntax trees and operations upon the trees.")
+ (license license:gpl2+)))
--
2.45.2
From a3e96eea7693a554bd4cab2f531bd9f63eee850b Mon Sep 17 00:00:00 2001
Message-ID: <a3e96eea7693a554bd4cab2f531bd9f63eee850b.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 12:53:23
Subject: [PATCH 03/21] gnu: Add pnetlib-git.

* gnu/packages/dotnet.scm (pnetlib-git): New variable.

Change-Id: I3a041de181d96bfe9e447d72ddd9578e12db8014
---
gnu/packages/dotnet.scm | 57 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index e11daff48c..90ccfd2d54 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -160,3 +160,60 @@ (define-public pnet-git
to build and execute .NET applications, including a C# compiler,
assembler, disassembler, and runtime engine.")
(license license:gpl2+))))
+
+(define-public pnetlib-git
+ (let ((version "0.8.0")
+ (commit "c3c12b8b0c65f5482d03d6a4865f7670e98baf4c")
+ (revision "0"))
+ (package
+ (name "pnetlib-git")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://git.savannah.gnu.org/git/dotgnu-pnet/pnetlib.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04dikki3lr3m1cacirld90rpi95656b2y2mc5rkycb7s0yfdz1nk"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each delete-file (filter file-exists?
+ '("configure"
+ "config.guess"
+ "config.sub"
+ "install-sh"
+ "ltmain.sh")))
+ (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
+ (substitute* (find-files "tests" "^Makefile\\.am$")
+ (("TESTS_ENVIRONMENT.*")
+ (string-append
+ "LOG_COMPILER = $(SHELL)\n"
+ "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
+ " $(top_builddir)")))
+ (substitute* "tools/run_test.sh.in"
+ (("en_US") "en_US.utf8"))
+ (substitute* "tools/wrapper.sh.in"
+ (("exec .LN_S clrwrap ..1." all)
+ (string-append
+ "echo '#!@SHELL@' >> $1\n"
+ "echo exec $CLRWRAP"
+ " $(dirname $(dirname $1))"
+ "/lib/cscc/lib/$(basename $1).exe >> $1\n"
+ "chmod +x $1")))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast")))
+ (native-inputs
+ (list autoconf automake libtool treecc))
+ (inputs
+ (list pnet-git))
+ (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+ (synopsis "Libraries for the C# programming language")
+ (description
+ "DotGNU Portable.NET Library contains an implementation of the C# library,
+for use with .NET-capable runtime engines and applications.")
+ (license license:gpl2+))))
--
2.45.2
From fad6fc35e76caad5a729c7e21afd4af337b47d8f Mon Sep 17 00:00:00 2001
Message-ID: <fad6fc35e76caad5a729c7e21afd4af337b47d8f.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:13:40
Subject: [PATCH 09/21] gnu: Add mono-3.0.

* gnu/packages/dotnet.scm
(mono-3.0.12-external-repo-specs, mono-3.0): New variables.

Change-Id: I1f30041187c7d0cf6e45d56f6da9bb4a705202cf
---
gnu/packages/dotnet.scm | 63 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 7a6214746f..3335fc58b1 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -593,3 +593,66 @@ (define-public mono-2.11.4
license:bsd-4
;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
license:asl2.0))))
+
+(define mono-3.0.12-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ ;; if reponame starts with https:// it is treated as the repository url,
+ ;; otherwise the name of a repository under https://github.com/mono/
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705"
+ "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ (("ikvm-fork" "ikvm") "10b8312c8024111780ee382688cd4c8754b1f1ac"
+ "025wf9gjgfvrq42vgw91ahy3cmzcw094vx783dsp7gjdyd8q09nm")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "17e8477b2cb8dd018d49a567526fe99fd2897857"
+ "0fyyy4jf0mma6kff6fvbvdcs5ra1bz4s063nvjjva9xlnv7sjvh4")))
+
+(define-public mono-3.0
+ (package
+ (inherit mono-2.11.4)
+ (version "3.0.12")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.0.12"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "110f3hcfikk6bxbrgjas5dqldci9f24gvm3vdgn4j9j7xhlcx1lj"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.0.12-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.11.4)
+ (replace "mono" mono-2.11.4)))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib, mono/metadata/sgen*,
+ ;; mono/arch/*/XXX-codegen.h
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ ;; mono/support (note: directory doesn't exist, probably meant
+ ;; ./support, but that contains a copy of zlib?)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4
+ ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+ license:asl2.0
+ ;; ./support, contains a copy of zlib
+ license:zlib))))
--
2.45.2
From eb73e35288f55fd7e3b91aa05ec3931ffbe6f2dc Mon Sep 17 00:00:00 2001
Message-ID: <eb73e35288f55fd7e3b91aa05ec3931ffbe6f2dc.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:29:31
Subject: [PATCH 13/21] gnu: Add mono-5.1.0.

* gnu/packages/dotnet.scm
(mono-5.1.0-external-repo-specs, mono-5.1.0): New variables.

Change-Id: Ie58e20f75920ee0492e977c82a2e302311793946
---
gnu/packages/dotnet.scm | 68 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 33b717b0ed..da2961bff4 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -970,3 +970,71 @@ (define-public mono-5.0.1
" "
top "/mcs/class/lib/build/mcs.exe")
make-flags)))))))))))
+
+(define mono-5.1.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "febc100f0313f0dc9d75dd1bcea45e87134b5b55"
+ "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4")
+ ("bockbuild" "fd1d6c404d763c98b6f0e64e98ab65f92e808245"
+ "0l2n9863j5y20lp3fjcpbb0a9jcfk0kqmnzlsw20qchd05rjgyb0")
+ ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998"
+ "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "44bc86223530a07fa74ab87007cf264e53d63400"
+ "0smsa8i4709y1nky3hshj7ayxhjcc17wlnfdvhfay7ly5dxml84g")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "63c51e726292149b4868db71baa883e5ad173766"
+ "1406rbra83k6gw2dnnsfqcfwiy1h89y6lq64ma5rckmb5drb0ng9")
+ ("corert" "31eda261991f9f6c1add1686b6d3799f835b2978"
+ "0s0pd4m9070xlx238fdhqf2b3iyd2vzff3f0sxlyi8s0lhsrl8zv")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615"
+ "1xx6s8dcgcz803yvqgzhcgmj16c9s8vrvvl8k4y0xma5w51kn23k")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "04bdab55d8de9edcf628694cfd2001561e8f8e60"
+ "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.1.0
+ (package
+ (inherit mono-5.0.1)
+ (version "5.1.0")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit
+ "6fafd08b507c56f11a2eb6570703a39e5bdc0a81")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sxq40nay5ghhmfbdln98iri19y0h7q36r3pqnxmxnm94livx2k5"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.1.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
+ (replace "mono" mono-5.0.1)))))
--
2.45.2
From 86df1cbc189df38bdf0617381a2cb99af99c959f Mon Sep 17 00:00:00 2001
Message-ID: <86df1cbc189df38bdf0617381a2cb99af99c959f.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:04:13
Subject: [PATCH 07/21] gnu: Add mono-2.6.4.

* gnu/dotnet.scm (mono-2.6.4): New variable.
* gnu/packages/patches/mono-2.6.4-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I66e9bb2e12ca6f47b4cd827822db5bee93b64dfe
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 23 ++++++++++
gnu/packages/patches/mono-2.6.4-fixes.patch | 49 +++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 gnu/packages/patches/mono-2.6.4-fixes.patch

Toggle diff (100 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d08c03a689..a4611d0016 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1764,6 +1764,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \
%D%/packages/patches/mono-1.9.1-fixes.patch \
%D%/packages/patches/mono-2.4.2.3-fixes.patch \
+ %D%/packages/patches/mono-2.6.4-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 241157cdce..4af642b9f3 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -475,3 +475,26 @@ (define-public mono-2.4.2
license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
;; mcs/jay
license:bsd-4))))
+
+(define-public mono-2.6.4
+ (package
+ (inherit mono-2.4.2)
+ (version "2.6.4")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "2.6.4"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17977w45qh8jmfsl4bhi83si4fxd8s3x8b0pxnwdzjv3bqr54c85"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet prepare-mono-source)
+ (patches
+ (search-patches "mono-2.6.4-fixes.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.4.2)
+ (replace "mono" mono-2.4.2)))))
diff --git a/gnu/packages/patches/mono-2.6.4-fixes.patch b/gnu/packages/patches/mono-2.6.4-fixes.patch
new file mode 100644
index 0000000000..e802c8bb7e
--- /dev/null
+++ b/gnu/packages/patches/mono-2.6.4-fixes.patch
@@ -0,0 +1,49 @@
+diff --git a/data/mono.pc.in b/data/mono.pc.in
+index 01e0a9e5d41..d43bb187218 100644
+--- a/data/mono.pc.in
++++ b/data/mono.pc.in
+@@ -7,8 +7,6 @@ sysconfdir=@sysconfdir@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-## Commented out because SLE hides devel files in the SLE SDK,
+-## which not all customers will have.
+-#Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I${includedir} @libmono_cflags@
+diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in
+index 7fa3f12dc91..2a0734362fd 100644
+--- a/mono-uninstalled.pc.in
++++ b/mono-uninstalled.pc.in
+@@ -1,6 +1,6 @@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@
+diff --git a/mono/mini/driver.c b/mono/mini/driver.c
+index c4e7f4ccdb3..bb705c0d1fc 100644
+--- a/mono/mini/driver.c
++++ b/mono/mini/driver.c
+@@ -1302,6 +1302,7 @@ mono_main (int argc, char* argv[])
+ #endif
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
++ GC_allow_register_threads();
+
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index da0c0e8671d..9d0deaf182f 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper
--
2.45.2
From 9ddd93628a17df1db7af5fed7b2d9c7f18169c56 Mon Sep 17 00:00:00 2001
Message-ID: <9ddd93628a17df1db7af5fed7b2d9c7f18169c56.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:14:35
Subject: [PATCH 10/21] gnu: Add mono-3.12.1.

* gnu/packages/dotnet.scm
(mono-3.12.1-external-repo-specs, mono-3.12.1): New variables.

Change-Id: Id5d13492163aabb845c47609f52287c5565497a4
---
gnu/packages/dotnet.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 3335fc58b1..e1f1272088 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -656,3 +656,55 @@ (define-public mono-3.0
license:asl2.0
;; ./support, contains a copy of zlib
license:zlib))))
+
+(define mono-3.12.1-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ ("ikdasm" "7ded4decb9c39446be634d42a575fda9bc3d945c"
+ "0f3mbfizxmvr5njj123w0wn7sz85v5q2mzwijjql8w1095i0916l")
+ (("ikvm-fork" "ikvm") "22534de2098acbcf208f6b06836d122dab799e4b"
+ "1ivywy5sc594sl3bs9xrkna1dbhkp7v1mv79n96ydgq6zcs0698l")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "00c1aadf149334c694d2a5096983a84cf46221b8"
+ "0ndam0qrnkb4gj21lapqgcy0mqw7s18viswsjyjyaaa4fgqw8kmq")))
+
+(define-public mono-3.12.1
+ (package
+ (inherit mono-3.0)
+ (version "3.12.1")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.12.1"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01sxrnfch61k8v7av7ccbmy3v37ky8yp8460j6ycnbyfa3305y0f"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.12.1-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-3.0)
+ (replace "mono" mono-3.0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-3.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-TZ
+ (lambda _
+ ;; for some reason a default is only used if this is empty, not
+ ;; if it is unset.
+ (setenv "TZ" "")))))))))
--
2.45.2
From 0a795aa683f41673756b46acb5ec29a528c65469 Mon Sep 17 00:00:00 2001
Message-ID: <0a795aa683f41673756b46acb5ec29a528c65469.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:33:38
Subject: [PATCH 14/21] gnu: Add mono-5.2.0.

* gnu/packages/dotnet.scm
(mono-5.2.0-external-repo-specs, mono-5.2.0): New variables.

Change-Id: I089850bfd50f229af5a236bbc39ee9ae4787ef9f
---
gnu/packages/dotnet.scm | 67 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (77 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index da2961bff4..fb136d09c2 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1038,3 +1038,70 @@ (define-public mono-5.1.0
#$@prepare-mono-source-0))))
(native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
(replace "mono" mono-5.0.1)))))
+
+(define mono-5.2.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2"
+ "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9")
+ ("bockbuild" "45aa142fa322f5b41051e7f40008f03346a1e119"
+ "1sjlgzh3hq251k729a1px707c1q2gnfayghgx1z5qyddnyaxna20")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "362e2bb00fa693d04c2d140a4cd313eb82c78d95"
+ "0bvaavlnldrja8ixb66bg33kz05950vm5sk4pz0k0zjgspfgpcvd")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "78360b22e71b70de1d8cc9588cb4ef0040449c31"
+ "1wrszafyar7q1cdfba68xd6b4d54p3iim2czmxblms1yw19ycqm7")
+ ("corert" "ed6296dfbb88d66f08601c013caee30c88c41afa"
+ "179q1aiq44bzdckg1xqm6iwyx835cp6161w5vgsfrgbw0p3kidxr")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "c7450ca2669becddffdea7dcdcc06692e57989e1"
+ "0vd1vw6hqm1p127m6079p9n4xrckrf4iakvj41hnqfwws94w5mv1")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "8d307472ea214f2b59636431f771894dbcba7258"
+ "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "dcb0a0534d5104eaf945d3d1f319dc33044b7bbe"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.2.0
+ (package
+ (inherit mono-5.1.0)
+ (version "5.2.0.224")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.2.0.224")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zsgfqyjkpix05gvgvhqyyqcwcjp5xlvcyv471q32qf307dccbfa"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.2.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.1.0)
+ (replace "mono" mono-5.1.0)))))
--
2.45.2
From 4dbd59cbcedafb401a938a37c745223d661a8d63 Mon Sep 17 00:00:00 2001
Message-ID: <4dbd59cbcedafb401a938a37c745223d661a8d63.1732707288.git.unmush@hashbang.sh>
In-Reply-To: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
References: <3f8af65f72871d61fa85e6939f46cb8dac185c70.1732707288.git.unmush@hashbang.sh>
From: unmush <unmush@hashbang.sh>
Date: Wed, 27 Nov 2024 00:56:00
Subject: [PATCH 20/21] gnu: Add libgdiplus.

* gnu/packages/dotnet.scm (libgdiplus): New variable.

Change-Id: I492254c09fd6c9c8b0bc633e1f95665bfa9fe96a
---
gnu/packages/dotnet.scm | 44 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 3309cec3f5..3e2eca1871 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1591,3 +1591,47 @@ (define-public mono-5.10.0
(("Facades/System\\.Data\\.Common_REFS := " all)
(string-append all "System System.Xml ")))
(apply invoke "make" "CSC=mcs" make-flags)))))))))))
+
+(define-public libgdiplus
+ (package
+ (name "libgdiplus")
+ (version "6.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mono/libgdiplus.git")
+ (commit "94a49875487e296376f209fe64b921c6020f74c0")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gwmhrddr8kdlfprjqcd6gqiy8p5v8sl9215dbd949j1l76szl9v"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "./Makefile.am"
+ (("\\./update_submodules\\.sh")
+ ":")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list automake
+ autoconf
+ googletest-1.8
+ libtool
+ pkg-config
+ which))
+ (inputs (list cairo
+ freetype
+ fontconfig
+ gettext-minimal
+ giflib
+ glib
+ libexif
+ libjpeg-turbo
+ libpng
+ libtiff
+ libx11))
+ (synopsis "Open Source implementation of the GDI+ API")
+ (description "Libgdiplus is the Mono library that provides a
+GDI+-compatible API on non-Windows operating systems. It uses Cairo to do
+most of the heavy lifting.")
+ (home-page "https://github.com/mono/libgdiplus")
+ (license license:expat)))
--
2.45.2
A
A
Aaron Covrig wrote on 5 Dec 2024 07:21
(address . 74609@debbugs.gnu.org)
CAK7qAcSawQ5-FZmi9v5aOo_Bw9Q0-XbfiU1rk3WfQetYsjMU4A@mail.gmail.com
Thank you for this unmush, that is quite the achievement. The whole C# and
dotnet tooling flabbergasts me, but this definitely could help. I was a bit
disappointed with the previous removal (but totally understand), hopefully
this can be merged in as there are a few nice programs that are written in
C# (but they also require dotnet...).

v/r,

Aaron
Attachment: file
R
R
Richard Sent wrote on 5 Dec 2024 23:07
(name . unmush)(address . unmush@proton.me)(address . 74609@debbugs.gnu.org)
8734j1yeax.fsf@freakingpenguin.com
Congratulations on the achievement! I want to thank you for your
writeup. I found it very interesting!

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
L
L
Ludovic Courtès wrote on 13 Dec 2024 08:47
(name . unmush)(address . unmush@proton.me)(address . 74609@debbugs.gnu.org)
87ttb83tzc.fsf@gnu.org
Hi,

unmush <unmush@proton.me> skribis:

Toggle quote (11 lines)
> We used to have a mono package, but it was removed due to includingbootstrap binaries (among others).  This patch series introduces a full,
> 17-mono-package sequence that takes us from a mono-1.2.6 built fully
> from source to mono-6.12.0 built fully from source, using only packages
> that already have full bootstrap paths.  I make no promise that this is
> the shortest or most optimal path, but it exists and I have verified it
> works.
>
> As I've spent what is probably an unreasonable amount of time working
> toward this, I thought I'd share some of my thoughts, experiences, and
> commentary.  Sorry in advance if it gets a bit rambly or lecture-ish.

I join others in congratulating you! This is very impressive, and a
great step forward.

I’ll make time to review and apply those patches if nobody beats me at it.

Thank you!

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 13 Dec 2024 13:13
(name . unmush)(address . unmush@proton.me)(address . 74609@debbugs.gnu.org)
87cyhvixwq.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (18 lines)
> unmush <unmush@proton.me> skribis:
>
>> We used to have a mono package, but it was removed due to
>> includingbootstrap binaries (among others).  This patch series
>> introduces a full,
>> 17-mono-package sequence that takes us from a mono-1.2.6 built fully
>> from source to mono-6.12.0 built fully from source, using only packages
>> that already have full bootstrap paths.  I make no promise that this is
>> the shortest or most optimal path, but it exists and I have verified it
>> works.
>>
>> As I've spent what is probably an unreasonable amount of time working
>> toward this, I thought I'd share some of my thoughts, experiences, and
>> commentary.  Sorry in advance if it gets a bit rambly or lecture-ish.
>
> I join others in congratulating you! This is very impressive, and a
> great step forward.

+1

Impressive, thank you!

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 13 Dec 2024 22:22
(name . unmush)(address . unmush@proton.me)(address . 74609@debbugs.gnu.org)
87wmg3z3a1.fsf@gnu.org
unmush <unmush@proton.me> skribis:

Toggle quote (8 lines)
> First, github dropped support for the git:// protocol in 2021, so
> recursive clones won't work now.  This means I have to explicitly list
> out every submodule, its commit, and its sha256 hash, for every mono
> version until they switched to using http or https.  mono-2.11.4 has
> only 4 submodules, but that doesn't last for long: by mono-4.9.0 it has
> 14 submodules.  A significant portion of these patches is just listing
> these submodules and their hashes.  It's a bit annoying.

As I read this, I realize that ‘git-fetch-with-fallback’ (used by
‘git-fetch’ for origins) won’t actually fall back to Software Heritage
for just submodules. It’s all or nothing.

So the SWH fallback didn’t help you at all, right?

In an ideal world, it would have kicked in automatically.

Ludo’.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 01/21] gnu: Add treecc.
(address . 74609@debbugs.gnu.org)
75f990af622e4b5452923c0fc0d6fabf918dbb72.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm: New module.
(treecc): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new module.

Change-Id: If3f36615774c872f3015510eb08ec53657e4edfb
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 62 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 gnu/packages/dotnet.scm

Toggle diff (84 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ffb8eb6d297..94331c6064b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -257,6 +257,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/docbook.scm \
%D%/packages/docker.scm \
%D%/packages/documentation.scm \
+ %D%/packages/dotnet.scm \
%D%/packages/dpdk.scm \
%D%/packages/dvtm.scm \
%D%/packages/easyrpg.scm \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
new file mode 100644
index 00000000000..e085b364e29
--- /dev/null
+++ b/gnu/packages/dotnet.scm
@@ -0,0 +1,62 @@
+(define-module (gnu packages dotnet)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages assembly)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bdw-gc)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages icu4c)
+ #:use-module (gnu packages instrumentation)
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages version-control)
+ #:use-module (gnu packages)
+ #:use-module (guix modules)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (ice-9 match))
+
+(define-public treecc
+ (package
+ (name "treecc")
+ (version "0.3.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+ (build-system gnu-build-system)
+ (home-page "https://www.gnu.org/software/dotgnu")
+ (synopsis "Tree Compiler-Compiler")
+ (description "The treecc program is designed to assist in the development
+of compilers and other language-based tools. It manages the generation of
+code to handle abstract syntax trees and operations upon the trees.")
+ (license license:gpl2+)))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 00/21] mono bootstrap
(address . 74609@debbugs.gnu.org)
cover.1734369314.git.efraim@flashner.co.il
It turns out the first 2 patches didn't apply cleanly, so I fixed that
up and I'm sending them back to the list.

A couple of things that I noticed:

* mono-5.something doesn't have its patches apply cleanly
* I was only able to build to mono-3.12 before I got a build failure on
x86_64
* mono-1.2.6 doesn't have support for aarch64 or riscv64, and will
probably need some patches (later) to add support.
* libjit FTBFS on powerpc64le. I tried working around it but wasn't
successful in when it came to using libjit.
* The assembly included in libjit targets a too-early version of arm, so
it is just broken completely on armhf and would probably do best with it
being ripped out.


unmush (21):
gnu: Add treecc.
gnu: Add pnet-git.
gnu: Add pnetlib-git.
gnu: Add mono-1.2.6.
gnu: Add mono-1.9.1.
gnu: Add mono-2.4.2.
gnu: Add mono-2.6.4.
gnu: Add mono-2.11.4.
gnu: Add mono-3.0.
gnu: Add mono-3.12.1.
gnu: Add mono-4.9.0.
gnu: Add mono-5.0.1.
gnu: Add mono-5.1.0.
gnu: Add mono-5.2.0.
gnu: Add mono-5.4.0.
gnu: Add mono-pre-5.8.0.
gnu: Add mono-5.8.0.
gnu: Add mono-pre-5.10.0.
gnu: Add mono-5.10.0.
gnu: Add libgdiplus.
gnu: Add mono-6.12.0.

gnu/local.mk | 21 +
gnu/packages/dotnet.scm | 1830 +++++++
.../patches/corefx-mono-5.4.0-patches.patch | 915 ++++
.../corefx-mono-pre-5.8.0-patches.patch | 1349 +++++
.../patches/mono-1.2.6-bootstrap.patch | 585 +++
...-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch | 14 +
gnu/packages/patches/mono-1.9.1-fixes.patch | 59 +
gnu/packages/patches/mono-2.11.4-fixes.patch | 36 +
gnu/packages/patches/mono-2.4.2.3-fixes.patch | 59 +
gnu/packages/patches/mono-2.6.4-fixes.patch | 49 +
...ono-4.9.0-fix-runtimemetadataversion.patch | 13 +
.../mono-5.10.0-later-mcs-changes.patch | 4601 +++++++++++++++++
gnu/packages/patches/mono-5.4.0-patches.patch | 100 +
gnu/packages/patches/mono-5.8.0-patches.patch | 60 +
.../patches/mono-6.12.0-add-runpath.patch | 185 +
.../mono-6.12.0-fix-AssemblyResolver.patch | 236 +
.../mono-6.12.0-fix-ConditionParser.patch | 46 +
.../mono-mcs-patches-from-5.10.0.patch | 4218 +++++++++++++++
.../patches/pnet-fix-line-number-info.patch | 13 +
.../patches/pnet-fix-off-by-one.patch | 13 +
.../patches/pnet-newer-libgc-fix.patch | 45 +
.../patches/pnet-newer-texinfo-fix.patch | 13 +
22 files changed, 14460 insertions(+)
create mode 100644 gnu/packages/dotnet.scm
create mode 100644 gnu/packages/patches/corefx-mono-5.4.0-patches.patch
create mode 100644 gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch
create mode 100644 gnu/packages/patches/mono-1.2.6-bootstrap.patch
create mode 100644 gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch
create mode 100644 gnu/packages/patches/mono-1.9.1-fixes.patch
create mode 100644 gnu/packages/patches/mono-2.11.4-fixes.patch
create mode 100644 gnu/packages/patches/mono-2.4.2.3-fixes.patch
create mode 100644 gnu/packages/patches/mono-2.6.4-fixes.patch
create mode 100644 gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch
create mode 100644 gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch
create mode 100644 gnu/packages/patches/mono-5.4.0-patches.patch
create mode 100644 gnu/packages/patches/mono-5.8.0-patches.patch
create mode 100644 gnu/packages/patches/mono-6.12.0-add-runpath.patch
create mode 100644 gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch
create mode 100644 gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
create mode 100644 gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch
create mode 100644 gnu/packages/patches/pnet-fix-line-number-info.patch
create mode 100644 gnu/packages/patches/pnet-fix-off-by-one.patch
create mode 100644 gnu/packages/patches/pnet-newer-libgc-fix.patch
create mode 100644 gnu/packages/patches/pnet-newer-texinfo-fix.patch


base-commit: 6774c9e75a835e91e9b0e415c749e48e4f724e24
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 05/21] gnu: Add mono-1.9.1.
(address . 74609@debbugs.gnu.org)
c4249b1c34c50dcf9c7a963c9a28261b2a8a53b7.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (mono-1.9.1): New variable.
* gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch:
New patch.
* gnu/packages/patches/mono-1.9.1-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): register new patches.

Change-Id: I19c16041fa4419a7c31ca510da6f33a03785f584
---
gnu/local.mk | 2 +
gnu/packages/dotnet.scm | 60 +++++++++++++++++++
...-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch | 14 +++++
gnu/packages/patches/mono-1.9.1-fixes.patch | 59 ++++++++++++++++++
4 files changed, 135 insertions(+)
create mode 100644 gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch
create mode 100644 gnu/packages/patches/mono-1.9.1-fixes.patch

Toggle diff (170 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index bd2d3e61df4..38e98386d20 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1819,6 +1819,8 @@ dist_patch_DATA = \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/monero-use-system-miniupnpc.patch \
%D%/packages/patches/mono-1.2.6-bootstrap.patch \
+ %D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \
+ %D%/packages/patches/mono-1.9.1-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 2f93d4bbd00..3a3bcb3c940 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -361,3 +361,63 @@ (define-public mono-1.2.6
license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
;; mcs/jay
license:bsd-4))))
+
+(define-public mono-1.9.1
+ (package
+ (inherit mono-1.2.6)
+ (version "1.9.1")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "1.9.1.1"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0s1n3zdhc2alk9smxfdl1kjz7lz2p19gs0ks4hgr864jlmf13bws"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet prepare-mono-source)
+ (patches
+ (search-patches
+ "mono-1.9.1-fixes.patch"
+ "mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch"))))
+ (native-inputs
+ (modify-inputs (package-native-inputs mono-1.2.6)
+ (delete "pnet-git")
+ (delete "pnetlib-git")
+ (prepend mono-1.2.6)
+ (append which)
+ ;; needed for tests
+ (append perl)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-1.2.6)
+ ((#:make-flags _ #f)
+ #~(list "CC=gcc" "V=1"))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'configure 'set-cflags
+ (lambda _
+ ;; apparently can't be set via make flags in this version
+ (let ((original (getenv "CFLAGS")))
+ (setenv "CFLAGS" (string-append (or original "")
+ (if original " " "")
+ "-DARG_MAX=500")))))
+ (add-before 'configure 'set-create-image-version
+ (lambda _
+ ;; pnet produces v2.x assemblies. Mono does this weird thing
+ ;; where it always produces assemblies of the same version as
+ ;; the runtime that is running it, which is based on the
+ ;; version of the assembly that it loaded, which is based on
+ ;; what it decided for the previous compiler... on and on all
+ ;; the way back to pnet. This breaks that chain, because
+ ;; otherwise it ends up compiling the initial mcs against .NET
+ ;; 2.0 libraries and then running with .NET 1.0 libraries.
+ (setenv "MONO_CREATE_IMAGE_VERSION" "v1.1.4322")))
+ (add-after 'unpack 'patch-test-driver-shebang
+ (lambda _
+ (patch-shebang "mono/tests/test-driver")))))
+ ((#:tests? _ #f) #f)
+ ((#:parallel-tests? _ #f) #f)))))
diff --git a/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch b/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch
new file mode 100644
index 00000000000..1eef0548ca1
--- /dev/null
+++ b/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch
@@ -0,0 +1,14 @@
+diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
+index ce053b0ef49..7c51f20c4cf 100644
+--- a/mono/metadata/reflection.c
++++ b/mono/metadata/reflection.c
+@@ -4336,6 +4336,9 @@ create_dynamic_mono_image (MonoDynamicAssembly *assembly, char *assembly_name, c
+
+ const char *version = mono_get_runtime_info ()->runtime_version;
+
++ char *env_ver = getenv("MONO_CREATE_IMAGE_VERSION");
++ if (env_ver) version = env_ver;
++
+ #if HAVE_BOEHM_GC
+ image = GC_MALLOC (sizeof (MonoDynamicImage));
+ #else
diff --git a/gnu/packages/patches/mono-1.9.1-fixes.patch b/gnu/packages/patches/mono-1.9.1-fixes.patch
new file mode 100644
index 00000000000..16353ea741e
--- /dev/null
+++ b/gnu/packages/patches/mono-1.9.1-fixes.patch
@@ -0,0 +1,59 @@
+diff --git a/data/mono.pc.in b/data/mono.pc.in
+index 6da0960db2d..d43bb187218 100644
+--- a/data/mono.pc.in
++++ b/data/mono.pc.in
+@@ -7,6 +7,6 @@ sysconfdir=@sysconfdir@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I${includedir} @libmono_cflags@
+diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in
+index 7fa3f12dc91..2a0734362fd 100644
+--- a/mono-uninstalled.pc.in
++++ b/mono-uninstalled.pc.in
+@@ -1,6 +1,6 @@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@
+diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am
+index 2e480190c8c..90d0f619959 100644
+--- a/mono/metadata/Makefile.am
++++ b/mono/metadata/Makefile.am
+@@ -157,7 +157,6 @@ libmonoruntimeinclude_HEADERS = \
+ object.h \
+ exception.h \
+ profiler.h \
+- appdomain.h \
+ mono-config.h \
+ debug-helpers.h \
+ mempool.h
+diff --git a/mono/mini/driver.c b/mono/mini/driver.c
+index ffa4b5e5e69..85a954960eb 100644
+--- a/mono/mini/driver.c
++++ b/mono/mini/driver.c
+@@ -1033,6 +1033,7 @@ mono_main (int argc, char* argv[])
+ #endif
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
++ GC_allow_register_threads();
+
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index e3a8a21e9e2..587b9f4aa79 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 02/21] gnu: Add pnet-git.
(address . 74609@debbugs.gnu.org)
cc87b692472570311e155b361d01975fb1bae193.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (pnet-git): New variable.
* gnu/packages/patches/pnet-fix-line-number-info.patch: New patch.
* gnu/packages/patches/pnet-fix-off-by-one.patch: New patch.
* gnu/packages/patches/pnet-newer-libgc-fix.patch: New patch.
* gnu/packages/patches/pnet-newer-texinfo-fix.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patches.

Change-Id: I751e97088e2b848078889b2033ebb4356d3cfe4b
---
gnu/local.mk | 4 +
gnu/packages/dotnet.scm | 99 +++++++++++++++++++
.../patches/pnet-fix-line-number-info.patch | 13 +++
.../patches/pnet-fix-off-by-one.patch | 13 +++
.../patches/pnet-newer-libgc-fix.patch | 45 +++++++++
.../patches/pnet-newer-texinfo-fix.patch | 13 +++
6 files changed, 187 insertions(+)
create mode 100644 gnu/packages/patches/pnet-fix-line-number-info.patch
create mode 100644 gnu/packages/patches/pnet-fix-off-by-one.patch
create mode 100644 gnu/packages/patches/pnet-newer-libgc-fix.patch
create mode 100644 gnu/packages/patches/pnet-newer-texinfo-fix.patch

Toggle diff (234 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 94331c6064b..8fc98c8fd22 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1929,6 +1929,10 @@ dist_patch_DATA = \
%D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
%D%/packages/patches/plasp-fix-normalization.patch \
%D%/packages/patches/plasp-include-iostream.patch \
+ %D%/packages/patches/pnet-fix-line-number-info.patch \
+ %D%/packages/patches/pnet-fix-off-by-one.patch \
+ %D%/packages/patches/pnet-newer-libgc-fix.patch \
+ %D%/packages/patches/pnet-newer-texinfo-fix.patch \
%D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch \
%D%/packages/patches/pokerth-boost.patch \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index e085b364e29..cd8886c8398 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -60,3 +60,102 @@ (define-public treecc
of compilers and other language-based tools. It manages the generation of
code to handle abstract syntax trees and operations upon the trees.")
(license license:gpl2+)))
+
+;; several improvements occurred past the 0.8.0 release that make it easier to
+;; bootstrap mono
+(define-public pnet-git
+ (let ((commit "3baf94734d8dc3fdabba68a8891e67a43ed6c4bd")
+ (version "0.8.0")
+ (revision "0"))
+ (package
+ (name "pnet-git")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/dotgnu-pnet/pnet.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vznvrgz8l0mpib1rz5v3clr7cn570vyp80f7f1jvzivnc1imzn6"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each delete-file-recursively '("libffi" "libgc"))
+ (for-each delete-file (filter file-exists?
+ '("compile"
+ "configure"
+ "config.guess"
+ "config.sub"
+ "depcomp"
+ "install-sh"
+ "ltconfig"
+ "ltcf-c.sh"
+ "ltmain.sh")))
+ (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
+ (for-each delete-file (find-files "." "_grammar\\.(c|h)$"))
+ (for-each delete-file (find-files "." "_scanner\\.(c|h)$"))
+ ;; Fix to not require bundled dependencies
+ (substitute* "configure.in"
+ (("GCLIBS='.*libgc.a'") "GCLIBS='-lgc'")
+ ;; AC_SEARCH_LIBJIT checks hardcoded header locations
+ (("search_libjit=true")
+ (string-append "search_libjit=false\n"
+ "JIT_LIBS=-ljit")))
+ (substitute* "Makefile.am"
+ (("OPT_SUBDIRS \\+= lib.*") ""))
+ (substitute* "support/hb_gc.c"
+ (("#include .*/libgc/include/gc.h.")
+ "#include <gc.h>")
+ (("#include .*/libgc/include/gc_typed.h.")
+ "#include <gc/gc_typed.h>"))
+ (substitute* (list "codegen/Makefile.am"
+ "cscc/bf/Makefile.am"
+ "cscc/csharp/Makefile.am"
+ "cscc/c/Makefile.am"
+ "cscc/java/Makefile.am")
+ ;; Generated files aren't prerequisites
+ (("TREECC_OUTPUT =.*") ""))
+ (substitute* "cscc/csharp/cs_grammar.y"
+ (("YYLEX") "yylex()"))
+ (substitute* "cscc/common/cc_main.h"
+ (("CCPreProc CCPreProcessorStream;" all)
+ (string-append "extern " all)))
+ (substitute* "csdoc/scanner.c"
+ (("int\ttoken;" all)
+ (string-append "extern " all)))
+ (substitute* "doc/cvmdoc.py"
+ (("python1.5") "python"))))
+ (patches
+ (search-patches "pnet-newer-libgc-fix.patch"
+ "pnet-newer-texinfo-fix.patch"
+ "pnet-fix-line-number-info.patch"
+ "pnet-fix-off-by-one.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list autoconf
+ automake
+ bison
+ flex
+ libtool
+ libatomic-ops
+ python ; for cvmdoc.py
+ texinfo
+ treecc))
+ (inputs
+ (list libgc libjit))
+ (arguments
+ (list #:configure-flags #~(list "--with-jit")
+ #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast")))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "CSCC_LIB_PATH")
+ (files (list "lib/cscc/lib")))))
+ (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+ (synopsis "Compiler for the C# programming language")
+ (description
+ "The goal of this project is to build a suite of free software tools
+to build and execute .NET applications, including a C# compiler,
+assembler, disassembler, and runtime engine.")
+ (license license:gpl2+))))
diff --git a/gnu/packages/patches/pnet-fix-line-number-info.patch b/gnu/packages/patches/pnet-fix-line-number-info.patch
new file mode 100644
index 00000000000..9e5af849413
--- /dev/null
+++ b/gnu/packages/patches/pnet-fix-line-number-info.patch
@@ -0,0 +1,13 @@
+diff --git a/codegen/cg_coerce.c b/codegen/cg_coerce.c
+index 92d2f59a..c90ad5e2 100644
+--- a/codegen/cg_coerce.c
++++ b/codegen/cg_coerce.c
+@@ -1203,6 +1203,8 @@ int ILCoerce(ILGenInfo *info, ILNode *node, ILNode **parent,
+ != ILMachineType_Void)
+ {
+ *parent = ILNode_CastSimple_create(node, constType);
++ yysetfilename(*parent, yygetfilename(node));
++ yysetlinenum(*parent, yygetlinenum(node));
+ return 1;
+ }
+ else if(indirect && GetIndirectConvertRules(info,fromType,toType,0,
diff --git a/gnu/packages/patches/pnet-fix-off-by-one.patch b/gnu/packages/patches/pnet-fix-off-by-one.patch
new file mode 100644
index 00000000000..858d2266976
--- /dev/null
+++ b/gnu/packages/patches/pnet-fix-off-by-one.patch
@@ -0,0 +1,13 @@
+diff --git a/codegen/cg_genattr.c b/codegen/cg_genattr.c
+index 535852da..c3acc0dc 100644
+--- a/codegen/cg_genattr.c
++++ b/codegen/cg_genattr.c
+@@ -1532,7 +1532,7 @@ static int MarshalAsAttribute(ILGenInfo *info,
+ else
+ {
+ sizeParamIndex = attributeInfo->namedArgs[currentNamedArg].evalValue.un.i4Value;
+- if(sizeParamIndex <= 0)
++ if(sizeParamIndex < 0)
+ {
+ CGErrorForNode(info, attributeInfo->namedArgs[currentNamedArg].node,
+ _("The size parameter index must be >= 0"));
diff --git a/gnu/packages/patches/pnet-newer-libgc-fix.patch b/gnu/packages/patches/pnet-newer-libgc-fix.patch
new file mode 100644
index 00000000000..1084b5a5bec
--- /dev/null
+++ b/gnu/packages/patches/pnet-newer-libgc-fix.patch
@@ -0,0 +1,45 @@
+diff --git a/support/hb_gc.c b/support/hb_gc.c
+index a5addb2d..41126963 100644
+--- a/support/hb_gc.c
++++ b/support/hb_gc.c
+@@ -104,12 +104,6 @@ static volatile int _FinalizersRunningSynchronously = 0;
+ #define GC_TRACE(a, b)
+ #endif
+
+-/*
+- * This is a internal global variable with the number of reclaimed bytes
+- * after a garbage collection.
+- */
+-extern GC_signed_word GC_bytes_found;
+-
+ /*
+ * Main entry point for the finalizer thread.
+ */
+@@ -432,6 +426,7 @@ int ILGCFullCollection(int timeout)
+ {
+ int lastFinalizingCount;
+ int hasThreads;
++ struct GC_prof_stats_s stats;
+
+ hasThreads = _ILHasThreads();
+
+@@ -462,7 +457,8 @@ int ILGCFullCollection(int timeout)
+ GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
+
+ GC_gcollect();
+- bytesCollected = GC_bytes_found;
++ GC_get_prof_stats(&stats, sizeof(stats));
++ bytesCollected = stats.bytes_reclaimed_since_gc;
+
+ GC_TRACE("GC: bytes collected = %i\n", bytesCollected);
+
+@@ -516,7 +512,8 @@ int ILGCFullCollection(int timeout)
+ GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
+
+ GC_gcollect();
+- bytesCollected = GC_bytes_found;
++ GC_get_prof_stats(&stats, sizeof(stats));
++ bytesCollected = stats.bytes_reclaimed_since_gc;
+
+ GC_TRACE("GC: bytes collected = %i\n", bytesCollected);
+
diff --git a/gnu/packages/patches/pnet-newer-texinfo-fix.patch b/gnu/packages/patches/pnet-newer-texinfo-fix.patch
new file mode 100644
index 00000000000..b57052eeeaa
--- /dev/null
+++ b/gnu/packages/patches/pnet-newer-texinfo-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/doc/pnettools.texi b/doc/pnettools.texi
+index 916d90bb..cdbe05cf 100644
+--- a/doc/pnettools.texi
++++ b/doc/pnettools.texi
+@@ -59,7 +59,7 @@ Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd
+ @center @titlefont{Portable.NET Development Tools}
+
+ @vskip 0pt plus 1fill
+-@center{Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd}
++@center Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd
+ @end titlepage
+
+ @c -----------------------------------------------------------------------
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 03/21] gnu: Add pnetlib-git.
(address . 74609@debbugs.gnu.org)
9b24a9d4637274ec109c82eec483f56bb97a8fa9.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (pnetlib-git): New variable.

Change-Id: I3a041de181d96bfe9e447d72ddd9578e12db8014
---
gnu/packages/dotnet.scm | 57 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index cd8886c8398..1a027854ced 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -159,3 +159,60 @@ (define-public pnet-git
to build and execute .NET applications, including a C# compiler,
assembler, disassembler, and runtime engine.")
(license license:gpl2+))))
+
+(define-public pnetlib-git
+ (let ((version "0.8.0")
+ (commit "c3c12b8b0c65f5482d03d6a4865f7670e98baf4c")
+ (revision "0"))
+ (package
+ (name "pnetlib-git")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://git.savannah.gnu.org/git/dotgnu-pnet/pnetlib.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04dikki3lr3m1cacirld90rpi95656b2y2mc5rkycb7s0yfdz1nk"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each delete-file (filter file-exists?
+ '("configure"
+ "config.guess"
+ "config.sub"
+ "install-sh"
+ "ltmain.sh")))
+ (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
+ (substitute* (find-files "tests" "^Makefile\\.am$")
+ (("TESTS_ENVIRONMENT.*")
+ (string-append
+ "LOG_COMPILER = $(SHELL)\n"
+ "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
+ " $(top_builddir)")))
+ (substitute* "tools/run_test.sh.in"
+ (("en_US") "en_US.utf8"))
+ (substitute* "tools/wrapper.sh.in"
+ (("exec .LN_S clrwrap ..1." all)
+ (string-append
+ "echo '#!@SHELL@' >> $1\n"
+ "echo exec $CLRWRAP"
+ " $(dirname $(dirname $1))"
+ "/lib/cscc/lib/$(basename $1).exe >> $1\n"
+ "chmod +x $1")))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast")))
+ (native-inputs
+ (list autoconf automake libtool treecc))
+ (inputs
+ (list pnet-git))
+ (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+ (synopsis "Libraries for the C# programming language")
+ (description
+ "DotGNU Portable.NET Library contains an implementation of the C# library,
+for use with .NET-capable runtime engines and applications.")
+ (license license:gpl2+))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 04/21] gnu: Add mono-1.2.6.
(address . 74609@debbugs.gnu.org)
6a867624b7826756425f2fce8b8d77628b3d9fd4.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (mono-1.2.6): New variable.
* gnu/packages/patches/mono-1.2.6-bootstrap.patch: New patch.
* gnu/local.mk (dist_patch_DATA): register it.

Change-Id: I73765d921c28c473271a2038dfaa53cc7fdad3c5
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 145 +++++
.../patches/mono-1.2.6-bootstrap.patch | 585 ++++++++++++++++++
3 files changed, 731 insertions(+)
create mode 100644 gnu/packages/patches/mono-1.2.6-bootstrap.patch

Toggle diff (519 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8fc98c8fd22..bd2d3e61df4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1818,6 +1818,7 @@ dist_patch_DATA = \
%D%/packages/patches/mpg321-gcc-10.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/monero-use-system-miniupnpc.patch \
+ %D%/packages/patches/mono-1.2.6-bootstrap.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 1a027854ced..2f93d4bbd00 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -216,3 +216,148 @@ (define-public pnetlib-git
"DotGNU Portable.NET Library contains an implementation of the C# library,
for use with .NET-capable runtime engines and applications.")
(license license:gpl2+))))
+
+(define prepare-mono-source-0
+ #~((false-if-exception
+ (delete-file "./configure"))
+ (false-if-exception
+ (delete-file-recursively "./libgc"))
+ ;; just to be sure
+ (for-each delete-file
+ (find-files "."
+ "\\.(dll|exe|DLL|EXE|so)$"))
+ ;; We deleted docs/AgilityPack.dll earlier (if it existed), and it's
+ ;; required for building the documentation, so skip building the
+ ;; documentation. According to docs/README, "the sources to this DLL
+ ;; live in GNOME CVS module beagle/Filters/AgilityPack".
+ (substitute* "./Makefile.am"
+ (("^(|DIST_|MOONLIGHT_|MONOTOUCH_)SUBDIRS =.*" all)
+ (string-replace-substring
+ (string-replace-substring
+ (string-replace-substring all " docs" "")
+ " $(libgc_dir)" "")
+ " libgc" "")))))
+
+;; A lot of the fixes are shared between many versions, and it doesn't hurt to
+;; apply them to versions before or after they are necessary, so just include
+;; them all.
+(define prepare-mono-source
+ #~(begin
+ #$@prepare-mono-source-0
+ (substitute* (filter file-exists?
+ '("./configure.in"
+ "./configure.ac"))
+ (("int f = isinf \\(1\\);")
+ "int f = isinf (1.0);"))
+ ;; makedev is in <sys/sysmacros.h> now. Include
+ ;; it.
+ (substitute* "mono/io-layer/processes.c"
+ (("#ifdef HAVE_SYS_MKDEV_H") "#if 1")
+ (("sys/mkdev.h") "sys/sysmacros.h"))
+ (substitute* (filter file-exists? '("./mono/metadata/boehm-gc.c"))
+ (("GC_set_finalizer_notify_proc")
+ "GC_set_await_finalize_proc")
+ (("GC_toggleref_register_callback")
+ "GC_set_toggleref_func"))
+ (substitute* (filter file-exists? '("./mono/utils/mono-compiler.h"))
+ (("static __thread gpointer x MONO_TLS_FAST")
+ (string-append
+ "static __thread gpointer x"
+ " __attribute__((used))")))
+ ;; Since the time the old mono versions were written at, gcc has started
+ ;; removing more things it thinks are unused (for example because they
+ ;; are only referenced in inline assembly of some sort).
+ (substitute* (filter file-exists? '("./mono/metadata/sgen-alloc.c"))
+ (("static __thread char \\*\\*tlab_next_addr")
+ (string-append
+ "static __thread char **tlab_next_addr"
+ " __attribute__((used))")))
+ (substitute* (filter file-exists? '("mono/utils/mono-compiler.h"))
+ (("#define MONO_TLS_FAST ")
+ "#define MONO_TLS_FAST __attribute__((used)) "))))
+
+(define-public mono-1.2.6
+ (package
+ (version "1.2.6")
+ (name "mono")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://download.mono-project.com/sources/mono/"
+ "mono" "-" version ".tar.bz2"))
+ (sha256
+ (base32 "03sn7wyvrjkkkbrqajpmqifxfn83p30qprizpb3m6c5cdhwlzk14"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$prepare-mono-source
+ (delete-file
+ "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs")
+ ;; Can't patch a file with different line endings,
+ ;; so the patch creates a new one, and we overwrite
+ ;; the old one here.
+ (rename-file
+ "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2"
+ "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs")))
+ (patches
+ (search-patches "mono-1.2.6-bootstrap.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list autoconf
+ automake
+ bison
+ libtool
+ pnet-git
+ pnetlib-git
+ pkg-config))
+ (inputs
+ (list glib
+ libgc
+ libx11
+ zlib))
+ (arguments
+ (list
+ #:configure-flags #~(list "--with-gc=boehm")
+ #:make-flags #~(list (string-append "EXTERNAL_MCS="
+ #+(this-package-native-input "pnet-git")
+ "/bin/cscc")
+ (string-append "EXTERNAL_RUNTIME="
+ #+(this-package-native-input "pnet-git")
+ "/bin/ilrun")
+ "CFLAGS+=-DARG_MAX=500"
+ "CC=gcc"
+ "V=1")
+ ;; build fails nondeterministically without this
+ #:parallel-build? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-env
+ (lambda _ ;;* (#:key inputs #:allow-other-keys)
+ ;; all tests under mcs/class fail trying to access $HOME
+ (setenv "HOME" "/tmp")
+ ;; ZIP files have "DOS time" which starts in Jan 1980.
+ (setenv "SOURCE_DATE_EPOCH" "315532800"))))
+ ;; System.Object isn't marked as serializable because it causes issues
+ ;; with compiling with pnet (circular class reference between Object and
+ ;; SerializableAttribute), and this causes tests to fail
+ #:tests? #f))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "MONO_PATH")
+ (files (list "lib/mono")))))
+ (synopsis "Compiler and libraries for the C# programming language")
+ (description "Mono is a compiler, vm, debugger and set of libraries for
+C#, a C-style programming language from Microsoft that is very similar to
+Java.")
+ (home-page "https://www.mono-project.com/")
+ ;; See ./LICENSE
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib
+ license:x11
+ ;; mcs/mcs, mcs/gmcs, some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4))))
diff --git a/gnu/packages/patches/mono-1.2.6-bootstrap.patch b/gnu/packages/patches/mono-1.2.6-bootstrap.patch
new file mode 100644
index 00000000000..0f6efd4a034
--- /dev/null
+++ b/gnu/packages/patches/mono-1.2.6-bootstrap.patch
@@ -0,0 +1,585 @@
+diff --git a/mcs/class/System/System.Diagnostics/ICollectData.cs b/mcs/class/System/System.Diagnostics/ICollectData.cs
+index c52f9871589..c66c1936d3d 100644
+--- a/mcs/class/System/System.Diagnostics/ICollectData.cs
++++ b/mcs/class/System/System.Diagnostics/ICollectData.cs
+@@ -41,7 +41,7 @@ namespace System.Diagnostics
+ #endif
+ public interface ICollectData {
+ void CloseData ();
+- [return: MarshalAs(UnmanagedType.I4)]
++ //[return: MarshalAs(UnmanagedType.I4)]
+ void CollectData (
+ [In] [MarshalAs(UnmanagedType.I4)] int id,
+ [In] [MarshalAs(UnmanagedType.SysInt)] IntPtr valueName,
+diff --git a/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs b/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
+index 280e6a97227..c41816dca24 100644
+--- a/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
++++ b/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
+@@ -140,6 +140,30 @@ namespace System.Diagnostics
+ file_watcher.EnableRaisingEvents = false;
+ }
+
++ void FileCreationWatcher(object o, FileSystemEventArgs e)
++ {
++ lock (this) {
++ if (_notifying)
++ return;
++ _notifying = true;
++ }
++
++ // Process every new entry in one notification event.
++ try {
++ while (GetLatestIndex () > last_notification_index) {
++ try {
++ CoreEventLog.OnEntryWritten (GetEntry (last_notification_index++));
++ } catch (Exception ex) {
++ // FIXME: find some proper way to output this error
++ Debug.WriteLine (ex);
++ }
++ }
++ } finally {
++ lock (this)
++ _notifying = false;
++ }
++ }
++
+ public override void EnableNotification ()
+ {
+ if (file_watcher == null) {
+@@ -149,28 +173,7 @@ namespace System.Diagnostics
+
+ file_watcher = new FileSystemWatcher ();
+ file_watcher.Path = logDir;
+- file_watcher.Created += delegate (object o, FileSystemEventArgs e) {
+- lock (this) {
+- if (_notifying)
+- return;
+- _notifying = true;
+- }
+-
+- // Process every new entry in one notification event.
+- try {
+- while (GetLatestIndex () > last_notification_index) {
+- try {
+- CoreEventLog.OnEntryWritten (GetEntry (last_notification_index++));
+- } catch (Exception ex) {
+- // FIXME: find some proper way to output this error
+- Debug.WriteLine (ex);
+- }
+- }
+- } finally {
+- lock (this)
+- _notifying = false;
+- }
+- };
++ file_watcher.Created += new FileSystemEventHandler(FileCreationWatcher);
+ }
+ last_notification_index = GetLatestIndex ();
+ file_watcher.EnableRaisingEvents = true;
+diff --git a/mcs/class/System/System.IO/InotifyWatcher.cs b/mcs/class/System/System.IO/InotifyWatcher.cs
+index d8e7acce3a7..7b0907eebc1 100644
+--- a/mcs/class/System/System.IO/InotifyWatcher.cs
++++ b/mcs/class/System/System.IO/InotifyWatcher.cs
+@@ -423,19 +423,36 @@ namespace System.IO {
+ return 16 + len;
+ }
+
++ class ThingEnumerator : IEnumerator, IEnumerable
++ {
++ object thing;
++ int j;
++ public ThingEnumerator(object thing)
++ { this.thing = thing; j = -1; }
++
++ public IEnumerator GetEnumerator() { return this; }
++ public bool MoveNext()
++ {
++ if(thing == null) { return false; }
++ if(thing is ArrayList)
++ {
++ ArrayList list = (ArrayList) thing;
++ if(j+1 >= list.Count) { return false; }
++ j++;
++ return true;
++ }
++ if(j == -1) { j = 0; return true; }
++ return false;
++ }
++ public void Reset() { j = -1; }
++ public object Current
++ { get { if(thing is ArrayList) return ((ArrayList)thing)[j];
++ return thing; }}
++ }
++
+ static IEnumerable GetEnumerator (object source)
+ {
+- if (source == null)
+- yield break;
+-
+- if (source is InotifyData)
+- yield return source;
+-
+- if (source is ArrayList) {
+- ArrayList list = (ArrayList) source;
+- for (int i = 0; i < list.Count; i++)
+- yield return list [i];
+- }
++ return new ThingEnumerator(source);
+ }
+
+ /* Interesting events:
+diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs
+index a884d90f507..e1c73b098c2 100644
+--- a/mcs/class/System/System.Net/ServicePoint.cs
++++ b/mcs/class/System/System.Net/ServicePoint.cs
+@@ -137,7 +137,7 @@ namespace System.Net
+ get {
+ return idleSince;
+ }
+- internal set {
++ set {
+ lock (locker)
+ idleSince = value;
+ }
+diff --git a/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2 b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2
+new file mode 100644
+index 00000000000..a685e2679b7
+--- /dev/null
++++ b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2
+@@ -0,0 +1,168 @@
++//
++// BaseMachine.jvm.cs
++//
++// Author:
++// author: Dan Lewis (dlewis@gmx.co.uk)
++// (c) 2002
++// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++using System.Collections;
++using System.Collections.Specialized;
++
++namespace System.Text.RegularExpressions
++{
++ abstract class BaseMachine : IMachine
++ {
++ internal delegate void MatchAppendEvaluator (Match match, StringBuilder sb);
++
++ public virtual string Replace (Regex regex, string input, string replacement, int count, int startat)
++ {
++ ReplacementEvaluator ev = new ReplacementEvaluator (regex, replacement);
++ if (regex.RightToLeft)
++ return RTLReplace (regex, input, new MatchEvaluator (ev.Evaluate), count, startat);
++ else
++ return LTRReplace (regex, input, new MatchAppendEvaluator (ev.EvaluateAppend), count, startat);
++ }
++
++ virtual public string [] Split (Regex regex, string input, int count, int startat)
++ {
++ ArrayList splits = new ArrayList ();
++ if (count == 0)
++ count = Int32.MaxValue;
++
++ int ptr = startat;
++ Match m = null;
++ while (--count > 0) {
++ if (m != null)
++ m = m.NextMatch ();
++ else
++ m = regex.Match (input, ptr);
++
++ if (!m.Success)
++ break;
++
++ if (regex.RightToLeft)
++ splits.Add (input.Substring (m.Index + m.Length, ptr - m.Index - m.Length));
++ else
++ splits.Add (input.Substring (ptr, m.Index - ptr));
++
++ int gcount = m.Groups.Count;
++ for (int gindex = 1; gindex < gcount; gindex++) {
++ Group grp = m.Groups [gindex];
++ splits.Add (input.Substring (grp.Index, grp.Length));
++ }
++
++ if (regex.RightToLeft)
++ ptr = m.Index;
++ else
++ ptr = m.Index + m.Length;
++
++ }
++
++ if (regex.RightToLeft && ptr >= 0)
++ splits.Add (input.Substring (0, ptr));
++ if (!regex.RightToLeft && ptr <= input.Length)
++ splits.Add (input.Substring (ptr));
++
++ return (string []) splits.ToArray (typeof (string));
++ }
++
++ virtual public Match Scan (Regex regex, string text, int start, int end)
++ {
++ throw new NotImplementedException ("Scan method must be implemented in derived classes");
++ }
++
++ virtual public string Result (string replacement, Match match)
++ {
++ return ReplacementEvaluator.Evaluate (replacement, match);
++ }
++
++ internal static string LTRReplace (Regex regex, string input, MatchAppendEvaluator evaluator, int count, int startat)
++ {
++ Match m = regex.Match (input, startat);
++ if (!m.Success)
++ return input;
++
++ StringBuilder result = new StringBuilder ();
++ int ptr = startat;
++ int counter = count;
++
++ result.Append (input, 0, ptr);
++
++ do {
++ if (count != -1)
++ if (counter-- <= 0)
++ break;
++ if (m.Index < ptr)
++ throw new SystemException ("how");
++ result.Append (input, ptr, m.Index - ptr);
++ evaluator (m, result);
++
++ ptr = m.Index + m.Length;
++ m = m.NextMatch ();
++ } while (m.Success);
++
++ result.Append (input, ptr, input.Length - ptr);
++
++ return result.ToString ();
++ }
++
++ internal static string RTLReplace (Regex regex, string input, MatchEvaluator evaluator, int count, int startat)
++ {
++ Match m = regex.Match (input, startat);
++ if (!m.Success)
++ return input;
++
++ int ptr = startat;
++ int counter = count;
++ StringCollection pieces = new StringCollection ();
++ pieces.Add (input.Substring (ptr));
++
++ do {
++ if (count != -1)
++ if (counter-- <= 0)
++ break;
++ if (m.Index + m.Length > ptr)
++ throw new SystemException ("how");
++ pieces.Add (input.Substring (m.Index + m.Length, ptr - m.Index - m.Length));
++ pieces.Add (evaluator (m));
++
++ ptr = m.Index;
++ m = m.NextMatch ();
++ } while (m.Success);
++
++ StringBuilder result = new StringBuilder ();
++
++ result.Append (input, 0, ptr);
++ for (int i = pieces.Count; i > 0; )
++ result.Append (pieces [--i]);
++
++ pieces.Clear ();
++
++ return result.ToString ();
++ }
++ }
++}
+diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
+index 94069d1727e..042574178fa 100644
+--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
++++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs
+@@ -272,6 +272,10 @@ namespace System.Runtime.Remoting.Messaging {
+ set { _uri = value; }
+ }
+
++ string IMethodMessage.Uri {
++ get { return Uri; }
++ }
++
+ string IInternalMessage.Uri {
+ get { return Uri; }
+ set { Uri = value; }
+diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs
+index 1b1eab014b3..575e7e37dee 100644
+--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs
++++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs
+@@ -272,6 +272,10 @@ namespace System.Runtime.Remoting.Messaging {
+ }
+ }
+
++ string IMethodMessage.Uri {
++ get { return Uri; }
++ }
++
+ string IInternalMessage.Uri {
+ get { return Uri; }
+ set { Uri = value; }
+diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 06/21] gnu: Add mono-2.4.2.
(address . 74609@debbugs.gnu.org)
8a4501f8b0ab760662cac843d78c9975b8040b82.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (mono-2.4.2): New variable.
* gnu/packages/patches/mono-2.4.2.3-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I14ff01d5fb3c3f23c83f8518990a79329490d3b9
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 53 +++++++++++++++++
gnu/packages/patches/mono-2.4.2.3-fixes.patch | 59 +++++++++++++++++++
3 files changed, 113 insertions(+)
create mode 100644 gnu/packages/patches/mono-2.4.2.3-fixes.patch

Toggle diff (142 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 38e98386d20..a46dd1d1999 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1821,6 +1821,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-1.2.6-bootstrap.patch \
%D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \
%D%/packages/patches/mono-1.9.1-fixes.patch \
+ %D%/packages/patches/mono-2.4.2.3-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 3a3bcb3c940..ab91f590992 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -421,3 +421,56 @@ (define-public mono-1.9.1
(patch-shebang "mono/tests/test-driver")))))
((#:tests? _ #f) #f)
((#:parallel-tests? _ #f) #f)))))
+
+(define-public mono-2.4.2
+ (package
+ (inherit mono-1.9.1)
+ (version "2.4.2.3")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "2-4-2-3"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mnrk17rd9c5rh30dh82a39c9ak1ns998b41ivprvy7m068skpda"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet prepare-mono-source)
+ (patches
+ (search-patches "mono-2.4.2.3-fixes.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-1.9.1)
+ (replace "mono" mono-1.9.1)))
+ (inputs (modify-inputs (package-inputs mono-1.9.1)
+ (append gettext-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-1.9.1)
+ ((#:tests? _ #f)
+ ;; When it tries building iltests.il in mono/mini, it gets: error
+ ;; CS0006: cannot find metadata file `TestDriver.dll'. It builds fine
+ ;; outside of the build environment, but later tests fail, and I can't
+ ;; be bothered to figure out what's causing ilasm to not find
+ ;; TestDriver.dll.
+ #f)
+ ((#:parallel-build? _) #t)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'bootstrap 'patch-sub-autogen.sh-shebang
+ (lambda _
+ (patch-shebang "./eglib/autogen.sh")))))))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4))))
diff --git a/gnu/packages/patches/mono-2.4.2.3-fixes.patch b/gnu/packages/patches/mono-2.4.2.3-fixes.patch
new file mode 100644
index 00000000000..13cff774506
--- /dev/null
+++ b/gnu/packages/patches/mono-2.4.2.3-fixes.patch
@@ -0,0 +1,59 @@
+diff --git a/data/mono.pc.in b/data/mono.pc.in
+index 6da0960db2d..d43bb187218 100644
+--- a/data/mono.pc.in
++++ b/data/mono.pc.in
+@@ -7,6 +7,6 @@ sysconfdir=@sysconfdir@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I${includedir} @libmono_cflags@
+diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in
+index 7fa3f12dc91..2a0734362fd 100644
+--- a/mono-uninstalled.pc.in
++++ b/mono-uninstalled.pc.in
+@@ -1,6 +1,6 @@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@
+diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am
+index 83f8532369b..3fca7fc13b9 100644
+--- a/mono/metadata/Makefile.am
++++ b/mono/metadata/Makefile.am
+@@ -171,7 +171,6 @@ libmonoruntimeinclude_HEADERS = \
+ object.h \
+ exception.h \
+ profiler.h \
+- appdomain.h \
+ mono-config.h \
+ debug-helpers.h \
+ mempool.h
+diff --git a/mono/mini/driver.c b/mono/mini/driver.c
+index 48ca2d96899..9fb3512200b 100644
+--- a/mono/mini/driver.c
++++ b/mono/mini/driver.c
+@@ -1236,6 +1236,7 @@ mono_main (int argc, char* argv[])
+ #endif
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
++ GC_allow_register_threads();
+
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index 0e876e2a491..b9cd0a99d9e 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 07/21] gnu: Add mono-2.6.4.
(address . 74609@debbugs.gnu.org)
1c712f7b2f262a06526dedffec28dbb2362c31de.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/dotnet.scm (mono-2.6.4): New variable.
* gnu/packages/patches/mono-2.6.4-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I66e9bb2e12ca6f47b4cd827822db5bee93b64dfe
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 23 ++++++++++
gnu/packages/patches/mono-2.6.4-fixes.patch | 49 +++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 gnu/packages/patches/mono-2.6.4-fixes.patch

Toggle diff (102 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a46dd1d1999..43ccab199dc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1822,6 +1822,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \
%D%/packages/patches/mono-1.9.1-fixes.patch \
%D%/packages/patches/mono-2.4.2.3-fixes.patch \
+ %D%/packages/patches/mono-2.6.4-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index ab91f590992..6304a38bb74 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -474,3 +474,26 @@ (define-public mono-2.4.2
license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
;; mcs/jay
license:bsd-4))))
+
+(define-public mono-2.6.4
+ (package
+ (inherit mono-2.4.2)
+ (version "2.6.4")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "2.6.4"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17977w45qh8jmfsl4bhi83si4fxd8s3x8b0pxnwdzjv3bqr54c85"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet prepare-mono-source)
+ (patches
+ (search-patches "mono-2.6.4-fixes.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.4.2)
+ (replace "mono" mono-2.4.2)))))
diff --git a/gnu/packages/patches/mono-2.6.4-fixes.patch b/gnu/packages/patches/mono-2.6.4-fixes.patch
new file mode 100644
index 00000000000..e802c8bb7e4
--- /dev/null
+++ b/gnu/packages/patches/mono-2.6.4-fixes.patch
@@ -0,0 +1,49 @@
+diff --git a/data/mono.pc.in b/data/mono.pc.in
+index 01e0a9e5d41..d43bb187218 100644
+--- a/data/mono.pc.in
++++ b/data/mono.pc.in
+@@ -7,8 +7,6 @@ sysconfdir=@sysconfdir@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-## Commented out because SLE hides devel files in the SLE SDK,
+-## which not all customers will have.
+-#Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I${includedir} @libmono_cflags@
+diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in
+index 7fa3f12dc91..2a0734362fd 100644
+--- a/mono-uninstalled.pc.in
++++ b/mono-uninstalled.pc.in
+@@ -1,6 +1,6 @@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@
+diff --git a/mono/mini/driver.c b/mono/mini/driver.c
+index c4e7f4ccdb3..bb705c0d1fc 100644
+--- a/mono/mini/driver.c
++++ b/mono/mini/driver.c
+@@ -1302,6 +1302,7 @@ mono_main (int argc, char* argv[])
+ #endif
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
++ GC_allow_register_threads();
+
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index da0c0e8671d..9d0deaf182f 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 10/21] gnu: Add mono-3.12.1.
(address . 74609@debbugs.gnu.org)
ff82988c48a06e2172f3711dde5aad4cd06c8147.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-3.12.1-external-repo-specs, mono-3.12.1): New variables.

Change-Id: Id5d13492163aabb845c47609f52287c5565497a4
---
gnu/packages/dotnet.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index df40169dd37..4d79740d7bd 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -655,3 +655,55 @@ (define-public mono-3.0
license:asl2.0
;; ./support, contains a copy of zlib
license:zlib))))
+
+(define mono-3.12.1-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ ("ikdasm" "7ded4decb9c39446be634d42a575fda9bc3d945c"
+ "0f3mbfizxmvr5njj123w0wn7sz85v5q2mzwijjql8w1095i0916l")
+ (("ikvm-fork" "ikvm") "22534de2098acbcf208f6b06836d122dab799e4b"
+ "1ivywy5sc594sl3bs9xrkna1dbhkp7v1mv79n96ydgq6zcs0698l")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "00c1aadf149334c694d2a5096983a84cf46221b8"
+ "0ndam0qrnkb4gj21lapqgcy0mqw7s18viswsjyjyaaa4fgqw8kmq")))
+
+(define-public mono-3.12.1
+ (package
+ (inherit mono-3.0)
+ (version "3.12.1")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.12.1"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01sxrnfch61k8v7av7ccbmy3v37ky8yp8460j6ycnbyfa3305y0f"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.12.1-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-3.0)
+ (replace "mono" mono-3.0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-3.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-TZ
+ (lambda _
+ ;; for some reason a default is only used if this is empty, not
+ ;; if it is unset.
+ (setenv "TZ" "")))))))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 08/21] gnu: Add mono-2.11.4.
(address . 74609@debbugs.gnu.org)
1ef3a73521e6f4b2eb400d6f5a4801cde1e203c9.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-2.11.4-external-repo-specs, mono-2.11.4): New variables.
(add-external-repos): New procedure.
* gnu/packages/patches/mono-2.11.4-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I7cb96af8b05a625cfe9ca9ab0f1132608c02ed31
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 95 ++++++++++++++++++++
gnu/packages/patches/mono-2.11.4-fixes.patch | 36 ++++++++
3 files changed, 132 insertions(+)
create mode 100644 gnu/packages/patches/mono-2.11.4-fixes.patch

Toggle diff (161 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 43ccab199dc..8007ff19a7e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1823,6 +1823,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-1.9.1-fixes.patch \
%D%/packages/patches/mono-2.4.2.3-fixes.patch \
%D%/packages/patches/mono-2.6.4-fixes.patch \
+ %D%/packages/patches/mono-2.11.4-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 6304a38bb74..b7940d24706 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -497,3 +497,98 @@ (define-public mono-2.6.4
(search-patches "mono-2.6.4-fixes.patch"))))
(native-inputs (modify-inputs (package-native-inputs mono-2.4.2)
(replace "mono" mono-2.4.2)))))
+
+;; submodule checkouts use git://, which isn't supported by github anymore, so
+;; we need to manually provide them instead of being able to use (recursive?
+;; #t). Also try not to think too hard about the fact that some of these
+;; submodules in later versions contain binary compiler blobs which mono
+;; maintainers presumably used when creating the bootstrap binaries they
+;; published. All fetched and updated over unauthenticated git://.
+
+(define mono-2.11.4-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit-hash origin-sha256) ...
+ ;; if reponame starts with https:// it is treated as the repository url,
+ ;; otherwise the name of a repository under https://github.com/mono/
+ '(("aspnetwebstack" "1836deff6a2683b8a5b7dd78f2b591a10b47573e"
+ "0vqq45i8k6jylljarr09hqqiwjs8wn0lgjrl6bz72vxqpp0j344k")
+ ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705"
+ "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk")
+ ("entityframework" "9baca562ee3a747a41870f45e749e4436b6aca26"
+ "0l8k04bykbrbk5q2pz8hzh8xy8y4ayz7j97fw0kyk3lrai89v5da")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")))
+
+(define (add-external-repos specs)
+ (define (reponame->url reponame)
+ (if (string-prefix? "https://" reponame)
+ reponame
+ (string-append "https://github.com/mono/" reponame)))
+
+ (define* (external-repo-gexp reponame commit hash
+ #:key recursive? (patches '()))
+ (let ((short-commit (string-take commit 6))
+ (reponame (if (pair? reponame) (car reponame)
+ reponame))
+ (dir-name (if (pair? reponame) (cadr reponame)
+ reponame)))
+ #~(copy-recursively #+(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (reponame->url reponame))
+ (commit commit)
+ (recursive? recursive?)))
+ (file-name
+ (git-file-name dir-name
+ short-commit))
+ (sha256 (base32 hash))
+ (patches (map search-patch patches)))
+ #$(string-append "./external/" dir-name))))
+
+ (define (spec->gexp spec)
+ (apply external-repo-gexp spec))
+
+ #~(begin
+ #+@(map spec->gexp specs)))
+
+(define-public mono-2.11.4
+ (package
+ (inherit mono-2.6.4)
+ (version "2.11.4")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "2.11.4"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0y2bifi2avbjmfp80hjga2dyqip4b46zkvx6yfr9pa2hhm940rpx"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-2.11.4-external-repo-specs)
+ #$prepare-mono-source))
+ (patches
+ (search-patches "mono-2.11.4-fixes.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs (modify-inputs (package-native-inputs mono-2.6.4)
+ (replace "mono" mono-2.6.4)))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib, mono/metadata/sgen*,
+ ;; mono/arch/*/XXX-codegen.h
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4
+ ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+ license:asl2.0))))
diff --git a/gnu/packages/patches/mono-2.11.4-fixes.patch b/gnu/packages/patches/mono-2.11.4-fixes.patch
new file mode 100644
index 00000000000..02a05f7977a
--- /dev/null
+++ b/gnu/packages/patches/mono-2.11.4-fixes.patch
@@ -0,0 +1,36 @@
+diff --git a/configure.in b/configure.in
+index 38cc6dc2925..4c608eb150f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -470,7 +470,7 @@ AC_CHECK_HEADERS(wchar.h)
+ AC_CHECK_HEADERS(ieeefp.h)
+ AC_MSG_CHECKING(for isinf)
+ AC_TRY_LINK([#include <math.h>], [
+- int f = isinf (1);
++ int f = isinf (1.0);
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ISINF, 1, [isinf available])
+diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c
+index 586b54715db..d27857aa092 100644
+--- a/mono/io-layer/processes.c
++++ b/mono/io-layer/processes.c
+@@ -18,6 +18,7 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <sys/wait.h>
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index 6957a287d38..2d071230a84 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 11/21] gnu: Add mono-4.9.0.
(address . 74609@debbugs.gnu.org)
25a65ced1e0ff59aeb0b6a9db06cfc4e527f19d6.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (mono-4.9.0): New variable.
* gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch: New patch.
* gnu/local.mk (dist_patch_DATA): register it.

Change-Id: Iea5926e79f7877aca718c1312c89bcc715b64d21
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 129 ++++++++++++++++++
...ono-4.9.0-fix-runtimemetadataversion.patch | 13 ++
3 files changed, 143 insertions(+)
create mode 100644 gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch

Toggle diff (172 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8007ff19a7e..5facc66932b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1824,6 +1824,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-2.4.2.3-fixes.patch \
%D%/packages/patches/mono-2.6.4-fixes.patch \
%D%/packages/patches/mono-2.11.4-fixes.patch \
+ %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 4d79740d7bd..e658edf8649 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -707,3 +707,132 @@ (define-public mono-3.12.1
;; for some reason a default is only used if this is empty, not
;; if it is unset.
(setenv "TZ" "")))))))))
+
+(define mono-4.9.0-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ;; (("reference-assemblies" "binary-reference-assemblies")
+ ;; "6c77197318fe85dfddf75a1b344b9bf8d0007b0b"
+ ;; "11hbs952srjlsiyin76y2llm5rfjkwjc67ya1i3p0pw193zw14jk")
+ ;; According to github description this is a "custom" fork of boringssl
+ ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998"
+ "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc")
+ ("buildtools" "9b6ee8686be55a983d886938165b6206cda50772"
+ "0sjw3swavcmijynmaxh647qpkjsbgihdr8lhkyzf8dsprhlq4fxd")
+ ("cecil" "2b39856e80d8513f70bc3241ed05325b0de679ae"
+ "0vvax32r6bnhvrcvis83gdrdqcgyxb704hz28g9q0wnay4knqxdm")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ;; ("debian-snapshot" "9342f8f052f81deaba789f030db23a88b4369724"
+ ;; "")
+ ("ikdasm" "e4deabf61c11999f200dcea6f6d6b42474cc2131"
+ "1frbf70y7n7l72j393avdiwk6153cvfwwpighkf2m46clqmq4han")
+ (("ikvm-fork" "ikvm") "367864ef810859ae3ce652864233b35f2dd5fdbe"
+ "0ig99kbma4s0mzb13nzsk1vm200ygfr11q6mzgh6jj46s2fc35px")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("nuget-buildtasks" "04bdab55d8de9edcf628694cfd2001561e8f8e60"
+ "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775")
+ ("nunit-lite" "4bc79a6da1f0ee538560b7e4d0caff46d3c86e4f"
+ "085fpabjw47rn8hb5zw6wizsg2jrgdbj9rnlar9lrls40wig272q")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")))
+
+(define-public mono-4.9.0
+ (package
+ (inherit mono-3.12.1)
+ (version "4.9.0")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ ;; some commit chosen after configure.ac was updated to make
+ ;; the version >= 4.9.0
+ (commit "5a3736606e6243d2c84d4df2cf35c284214b8cc4")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vqkkqkaqwbii4hdzg0vffyy31fz1kmmsa67jyqwxdsvgpjszih3"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-4.9.0-external-repo-specs)
+ #$prepare-mono-source))
+ (patches (search-patches
+ ;; Saves us an extra intermediate step
+ "mono-4.9.0-fix-runtimemetadataversion.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-3.12.1)
+ (replace "mono" mono-3.12.1)
+ (append tzdata-for-tests)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-3.12.1)
+ ((#:configure-flags _ #f)
+ ;; "External Boehm is no longer supported" - I VILL NOT use the
+ ;; bundled software!
+ #~(list "--with-sgen=yes"
+ "--disable-boehm"
+ "--with-csc=mcs"))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'configure 'set-TZDIR
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (search-input-directory (or native-inputs inputs)
+ "share/zoneinfo")))
+ (add-after 'unpack 'use-old-mono-libraries
+ ;; At this point in history mono had not, to my knowledge,
+ ;; deigned to grace us with the actual sources to the binaries
+ ;; shipped in external/binary-reference-assemblies, so just copy
+ ;; the libraries from an older mono for now I guess.
+ (lambda _
+ (substitute* "./mcs/class/reference-assemblies/Makefile"
+ (("\\.\\./\\.\\./\\.\\./external/binary-reference-assemblies/v")
+ (string-append #$(this-package-native-input "mono")
+ "/lib/mono/")))))
+ (add-after 'unpack 'disable-Microsoft.Build.Tasks-tests
+ (lambda _
+ ;; These fail for unknown reasons
+ (substitute* "mcs/class/Microsoft.Build.Tasks/Makefile"
+ (("^include ../../build/library.make" all)
+ (string-append
+ all
+ "\nrun-test-recursive:\n\t@echo skipping tests\n")))))))))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib, mono/metadata/sgen*,
+ ;; mono/arch/*/XXX-codegen.h
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ ;; mono/support (note: directory doesn't exist, probably meant
+ ;; ./support, but that contains a copy of zlib?)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay, mono/utils/memcheck.h
+ license:bsd-4
+ ;; mono/utils/bsearch.c, mono/io-layer/wapi_glob.{h,c}
+ license:bsd-3
+ ;; mono/utils/freebsd-{dwarf,elf_common,elf64,elf32}.h
+ license:bsd-2
+ ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+ ;; mcs/class/RabbitMQ.Client (dual licensed mpl1.1)
+ license:asl2.0
+ ;; ./support, contains a copy of zlib, incl. ./support/minizip
+ license:zlib
+ ;; mono/docs/HtmlAgilityPack, mcs/unit24
+ license:ms-pl
+ ;; mcs/class/I18N/mklist.sh, mono/benchmark/{zipmark,logic}.cs
+ ;; mcs/class/{,Compat.}ICSharpCode.SharpZipLib
+ license:gpl2+
+ ;; mcs/class/RabbitMQ.Client (dual licensed asl2.0)
+ license:mpl1.1
+ ;; API Documentation
+ license:cc-by4.0))))
diff --git a/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch b/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch
new file mode 100644
index 00000000000..ec5bad9ae12
--- /dev/null
+++ b/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch
@@ -0,0 +1,13 @@
+diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs
+index 1393bcd58f3..af5febe7cf6 100644
+--- a/mcs/mcs/settings.cs
++++ b/mcs/mcs/settings.cs
+@@ -1197,7 +1197,7 @@ namespace Mono.CSharp {
+ }
+ return ParseResult.Success;
+
+- case "runtimemetadataversion":
++ case "/runtimemetadataversion":
+ if (value.Length == 0) {
+ Error_RequiresArgument (option);
+ return ParseResult.Error;
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 09/21] gnu: Add mono-3.0.
(address . 74609@debbugs.gnu.org)
be2d1e30054b10e21f4f0b285beb6a297e8e4a7b.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-3.0.12-external-repo-specs, mono-3.0): New variables.

Change-Id: I1f30041187c7d0cf6e45d56f6da9bb4a705202cf
---
gnu/packages/dotnet.scm | 63 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index b7940d24706..df40169dd37 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -592,3 +592,66 @@ (define-public mono-2.11.4
license:bsd-4
;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
license:asl2.0))))
+
+(define mono-3.0.12-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ ;; if reponame starts with https:// it is treated as the repository url,
+ ;; otherwise the name of a repository under https://github.com/mono/
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705"
+ "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ (("ikvm-fork" "ikvm") "10b8312c8024111780ee382688cd4c8754b1f1ac"
+ "025wf9gjgfvrq42vgw91ahy3cmzcw094vx783dsp7gjdyd8q09nm")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "17e8477b2cb8dd018d49a567526fe99fd2897857"
+ "0fyyy4jf0mma6kff6fvbvdcs5ra1bz4s063nvjjva9xlnv7sjvh4")))
+
+(define-public mono-3.0
+ (package
+ (inherit mono-2.11.4)
+ (version "3.0.12")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.0.12"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "110f3hcfikk6bxbrgjas5dqldci9f24gvm3vdgn4j9j7xhlcx1lj"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.0.12-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.11.4)
+ (replace "mono" mono-2.11.4)))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib, mono/metadata/sgen*,
+ ;; mono/arch/*/XXX-codegen.h
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ ;; mono/support (note: directory doesn't exist, probably meant
+ ;; ./support, but that contains a copy of zlib?)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4
+ ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+ license:asl2.0
+ ;; ./support, contains a copy of zlib
+ license:zlib))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 12/21] gnu: Add mono-5.0.1.
(address . 74609@debbugs.gnu.org)
3196ffc09aa6c8debefd48dbfbb7dde61518a39c.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.0.1-external-repo-specs, mono-5.0.1): New variables.

Change-Id: I165ef8238c4adddcf92667c34dbb366f98d288bd
---
gnu/packages/dotnet.scm | 133 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)

Toggle diff (145 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index e658edf8649..5bebb3929c7 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -836,3 +836,136 @@ (define-public mono-4.9.0
license:mpl1.1
;; API Documentation
license:cc-by4.0))))
+
+(define mono-5.0.1-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ;; snippet in the actual package will delete all dlls and exes, so this
+ ;; should be rebuilt from scratch.
+ (("reference-assemblies" "binary-reference-assemblies")
+ "febc100f0313f0dc9d75dd1bcea45e87134b5b55"
+ "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4")
+ ("bockbuild" "512ba41a94bec35ff0c395eb71a180fda23da95c"
+ "16m00la8svx8v07sxy4zxbpq0cbq7d3nzy53w8kqml8b18h5dabg")
+ ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998"
+ "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc")
+ ("buildtools" "9b6ee8686be55a983d886938165b6206cda50772"
+ "0sjw3swavcmijynmaxh647qpkjsbgihdr8lhkyzf8dsprhlq4fxd")
+ ("cecil" "7801534de1bfed97c844821c3244e05fc7ffcfb8"
+ "0dmfyzkm57n3lbgllx6ffz4g84x1slkib9hb4cfp3nhz852qim7b")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "bd96ae5f1485ae8541fe476dfd944efde76bcd9c"
+ "0j51lc54dmwa4fzna2vjfj4pcd1lk1s5bp5dfix1aqcncyzivazi")
+ ("corert" "d87c966d80c1274373ddafe3375bf1730cd430ed"
+ "078v5ks7inm2g1hf96x19k42jnv1qhhh7r8jxrfc7jk4v4lgmqyf")
+ ("ikdasm" "e4deabf61c11999f200dcea6f6d6b42474cc2131"
+ "1frbf70y7n7l72j393avdiwk6153cvfwwpighkf2m46clqmq4han")
+ (("ikvm-fork" "ikvm") "367864ef810859ae3ce652864233b35f2dd5fdbe"
+ "0ig99kbma4s0mzb13nzsk1vm200ygfr11q6mzgh6jj46s2fc35px")
+ ("linker" "e4d9784ac37b9ebf4757175c92bc7a3ec9fd867a"
+ "0ga7br9lqdsycz22dndkbiwbd0c60ml6nl22xlsnjr7lwdccfjvl")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "8d307472ea214f2b59636431f771894dbcba7258"
+ "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")))
+
+(define-public mono-5.0.1
+ (package
+ (inherit mono-4.9.0)
+ (version "5.0.1")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.0.1.1")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05z9bddljp8xwsw7qw3f7bic8i202wrc60pjb9fn4igwfz9278n5"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.0.1-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-4.9.0)
+ (replace "mono" mono-4.9.0)
+ (append cmake-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-4.9.0)
+ ((#:make-flags _ #f)
+ ;; Build system is buggy here, it does some weird wildcard expansion
+ ;; that assumes there's only at most one file in a directory
+ #~(list "V=1" "SKIP_AOT=1"))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'disable-roslyn-install
+ ;; For some reason there is no predefined way to persuade mono to
+ ;; not install the binary blobs it assumes are there.
+ (lambda _
+ (substitute* "mcs/packages/Makefile"
+ (("^install-local:")
+ (string-append "install-local:
+ echo \"Skipping blob install\"
+
+unused0:")))))
+ (delete 'use-old-mono-libraries)
+ (add-after 'build 'build-reference-assemblies
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (let ((top (getcwd)))
+ (with-directory-excursion "external/binary-reference-assemblies"
+ ;; No clue why all these references are missing, just
+ ;; power through I guess.
+ (substitute* (find-files "." "^Makefile$")
+ (("CSC_COMMON_ARGS := " all)
+ (string-append all "-delaysign+ "))
+ (("IBM\\.Data\\.DB2_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Mono\\.Data\\.Sqlite_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.DataSetExtensions_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.OracleClient_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.IdentityModel_REFS := " all)
+ (string-append all "System.Configuration "))
+ (("System\\.Design_REFS := " all)
+ (string-append all "Accessibility "))
+ (("System\\.Web\\.Extensions\\.Design_REFS := " all)
+ (string-append all "System.Windows.Forms System.Web "))
+ (("System\\.ServiceModel\\.Routing_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Web\\.Abstractions_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Reactive\\.Windows\\.Forms_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all)
+ (string-append all "Accessibility "))
+ (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Dynamic\\.Runtime_REFS := " all)
+ (string-append all "System "))
+ (("Facades/System\\.Xml\\.XDocument_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all)
+ (string-append all "System.Xml ")))
+ (apply invoke "make"
+ (string-append "CSC=MONO_PATH="
+ top "/mcs/class/lib/build"
+ " "
+ top "/runtime/mono-wrapper"
+ " "
+ top "/mcs/class/lib/build/mcs.exe")
+ make-flags)))))))))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 13/21] gnu: Add mono-5.1.0.
(address . 74609@debbugs.gnu.org)
f3fa0abfd2a04b0b91acf525333555e44008c804.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.1.0-external-repo-specs, mono-5.1.0): New variables.

Change-Id: Ie58e20f75920ee0492e977c82a2e302311793946
---
gnu/packages/dotnet.scm | 68 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (80 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 5bebb3929c7..50961ee483a 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -969,3 +969,71 @@ (define-public mono-5.0.1
" "
top "/mcs/class/lib/build/mcs.exe")
make-flags)))))))))))
+
+(define mono-5.1.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "febc100f0313f0dc9d75dd1bcea45e87134b5b55"
+ "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4")
+ ("bockbuild" "fd1d6c404d763c98b6f0e64e98ab65f92e808245"
+ "0l2n9863j5y20lp3fjcpbb0a9jcfk0kqmnzlsw20qchd05rjgyb0")
+ ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998"
+ "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "44bc86223530a07fa74ab87007cf264e53d63400"
+ "0smsa8i4709y1nky3hshj7ayxhjcc17wlnfdvhfay7ly5dxml84g")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "63c51e726292149b4868db71baa883e5ad173766"
+ "1406rbra83k6gw2dnnsfqcfwiy1h89y6lq64ma5rckmb5drb0ng9")
+ ("corert" "31eda261991f9f6c1add1686b6d3799f835b2978"
+ "0s0pd4m9070xlx238fdhqf2b3iyd2vzff3f0sxlyi8s0lhsrl8zv")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615"
+ "1xx6s8dcgcz803yvqgzhcgmj16c9s8vrvvl8k4y0xma5w51kn23k")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "04bdab55d8de9edcf628694cfd2001561e8f8e60"
+ "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.1.0
+ (package
+ (inherit mono-5.0.1)
+ (version "5.1.0")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit
+ "6fafd08b507c56f11a2eb6570703a39e5bdc0a81")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sxq40nay5ghhmfbdln98iri19y0h7q36r3pqnxmxnm94livx2k5"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.1.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
+ (replace "mono" mono-5.0.1)))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 14/21] gnu: Add mono-5.2.0.
(address . 74609@debbugs.gnu.org)
7ead09b1f644a0eceb3b7a7d68a5211d13309698.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.2.0-external-repo-specs, mono-5.2.0): New variables.

Change-Id: I089850bfd50f229af5a236bbc39ee9ae4787ef9f
---
gnu/packages/dotnet.scm | 67 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (79 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 50961ee483a..cf391ed9200 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1037,3 +1037,70 @@ (define-public mono-5.1.0
#$@prepare-mono-source-0))))
(native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
(replace "mono" mono-5.0.1)))))
+
+(define mono-5.2.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2"
+ "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9")
+ ("bockbuild" "45aa142fa322f5b41051e7f40008f03346a1e119"
+ "1sjlgzh3hq251k729a1px707c1q2gnfayghgx1z5qyddnyaxna20")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "362e2bb00fa693d04c2d140a4cd313eb82c78d95"
+ "0bvaavlnldrja8ixb66bg33kz05950vm5sk4pz0k0zjgspfgpcvd")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "78360b22e71b70de1d8cc9588cb4ef0040449c31"
+ "1wrszafyar7q1cdfba68xd6b4d54p3iim2czmxblms1yw19ycqm7")
+ ("corert" "ed6296dfbb88d66f08601c013caee30c88c41afa"
+ "179q1aiq44bzdckg1xqm6iwyx835cp6161w5vgsfrgbw0p3kidxr")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "c7450ca2669becddffdea7dcdcc06692e57989e1"
+ "0vd1vw6hqm1p127m6079p9n4xrckrf4iakvj41hnqfwws94w5mv1")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "8d307472ea214f2b59636431f771894dbcba7258"
+ "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "dcb0a0534d5104eaf945d3d1f319dc33044b7bbe"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.2.0
+ (package
+ (inherit mono-5.1.0)
+ (version "5.2.0.224")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.2.0.224")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zsgfqyjkpix05gvgvhqyyqcwcjp5xlvcyv471q32qf307dccbfa"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.2.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.1.0)
+ (replace "mono" mono-5.1.0)))))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 16/21] gnu: Add mono-pre-5.8.0.
(address . 74609@debbugs.gnu.org)
f61f14c664d1377872ab17de488ed974babfe977.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-pre-5.8.0-external-repo-specs, mono-pre-5.8.0): New variable.
* gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patch.

Change-Id: Id573b051e01980867a07032f339fdb2829b2a413
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 79 +
.../corefx-mono-pre-5.8.0-patches.patch | 1349 +++++++++++++++++
3 files changed, 1429 insertions(+)
create mode 100644 gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch

Toggle diff (372 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index aa129d89d58..788f3bb835a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1115,6 +1115,7 @@ dist_patch_DATA = \
%D%/packages/patches/cool-retro-term-wctype.patch \
%D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch \
%D%/packages/patches/corefx-mono-5.4.0-patches.patch \
+ %D%/packages/patches/corefx-mono-pre-5.8.0-patches.patch \
%D%/packages/patches/coreutils-gnulib-tests.patch \
%D%/packages/patches/cppcheck-disable-char-signedness-test.patch \
%D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index b4355b048e2..7799f9b951a 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1196,3 +1196,82 @@ (define-public mono-5.4.0
"mono-5.4.0-patches.patch"))))
(native-inputs (modify-inputs (package-native-inputs mono-5.2.0)
(replace "mono" mono-5.2.0)))))
+
+(define mono-pre-5.8.0-external-repo-specs
+ '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791"
+ "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj"
+ #:recursive? #t)
+ ("api-snapshot" "e790a9b77031ef1d8ebf093ef88840edea11ed73"
+ "1c4np2fqd9mpc1i1x8bsxnypacp58vkvgdwpnmvmlyjdvbj5ax6q")
+ ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2"
+ "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9")
+ ("bockbuild" "b445017309aac741a26d8c51bb0636234084bf23"
+ "1jzhvavd1j0n7sy1waczgjv0kmrbr35gkzd76fhlmqvsy0sr9695")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("cecil" "c76ba7b410447fa37093150cb7bc772cba28a0ae"
+ "0ydi7rn8ajqyvnj9agyn74llb4qgd9kgdcg3gajdfyb2klxx6za8")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "74ccd8aa00d7d271191ca3b9c4f818268dc36c28"
+ "0nm41qdpvj62r8bxnf92m7kimjm1i544ygdqz5a7pgc6zf99as6j"
+ #:patches ("corefx-mono-pre-5.8.0-patches.patch"))
+ ("corert" "48dba73801e804e89f00311da99d873f9c550278"
+ "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk")
+ ("ikdasm" "3aef9cdd6013fc0620a1817f0b11d8fb90ed2e0f"
+ "078cai33x8c71969iwi7hmbqdfwpicpmam2ag3k2bklpva2vnszv")
+ (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1"
+ "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi")
+ ("linker" "21e445c26c69ac3a2e1441befa02d0bd105ff849"
+ "1hx3ik0sg70ysc2y8jdjxm2ljql0069i05i8fp1lakx7s7z7bywc")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "8d307472ea214f2b59636431f771894dbcba7258"
+ "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "80b86f340b7f6fb7afe84443214e1cbd7ff70620"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8"
+ ;; "")
+ ))
+
+(define-public mono-pre-5.8.0
+ (let ((commit "d0f51b4e834042cfa593748ada942033b458cc40")
+ (version "5.4.0.201")
+ (revision "0"))
+ (package
+ (inherit mono-5.4.0)
+ (version (git-version version revision commit))
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0az5syk1nn9gd5imkbmpb13qm9q6ibr2d2ksdzpwsarkfyp4ic53"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-pre-5.8.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches "mono-5.4.0-patches.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.4.0)
+ (replace "mono" mono-5.4.0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-5.4.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (delete 'patch-sub-autogen.sh-shebang))))))))
diff --git a/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch b/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch
new file mode 100644
index 00000000000..04dcc6c5a50
--- /dev/null
+++ b/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch
@@ -0,0 +1,1349 @@
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
+index aa8afa5a1b..3a2518246a 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
+@@ -246,8 +246,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ ExprArrayInit arrinit;
+
+ ExprList list = (ExprList)pExpr.OptionalArguments;
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ methinfo = (ExprMethodInfo)next.OptionalElement;
+ arrinit = (ExprArrayInit)next.OptionalNextListNode;
+ }
+@@ -382,8 +383,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ Expr nextNode = list.OptionalNextListNode;
+ ExprPropertyInfo propinfo;
+ ExprArrayInit arguments;
+- if (nextNode is ExprList nextList)
++ if (nextNode is ExprList)
+ {
++ ExprList nextList = (ExprList)list.OptionalNextListNode;
+ propinfo = nextList.OptionalElement as ExprPropertyInfo;
+ arguments = nextList.OptionalNextListNode as ExprArrayInit;
+ }
+@@ -553,8 +555,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ list = (ExprList)list.OptionalNextListNode;
+ MethodInfo methodInfo;
+ bool bIsLifted = false;
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ ExprConstant isLifted = (ExprConstant)next.OptionalElement;
+ Debug.Assert(isLifted != null);
+ bIsLifted = isLifted.Val.Int32Val == 1;
+@@ -677,8 +680,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expression GetExpression(Expr pExpr)
+ {
+- if (pExpr is ExprWrap wrap)
++ if (pExpr is ExprWrap)
+ {
++ ExprWrap wrap = (ExprWrap) pExpr;
+ return _DictionaryOfParameters[(ExprCall)wrap.OptionalExpression];
+ }
+ else if (pExpr is ExprConstant)
+@@ -875,20 +879,24 @@ namespace Microsoft.CSharp.RuntimeBinder
+ {
+ for (;;)
+ {
+- if (pExpr is ExprCast cast)
++ if (pExpr is ExprCast)
+ {
++ ExprCast cast = (ExprCast) pExpr;
+ pExpr = cast.Argument;
+ }
+- else if (pExpr is ExprTypeOf typeOf)
++ else if (pExpr is ExprTypeOf)
+ {
++ ExprTypeOf typeOf = (ExprTypeOf) pExpr;
+ return typeOf.SourceType.Type.AssociatedSystemType;
+ }
+- else if (pExpr is ExprMethodInfo methodInfo)
++ else if (pExpr is ExprMethodInfo)
+ {
++ ExprMethodInfo methodInfo = (ExprMethodInfo) pExpr;
+ return GetMethodInfoFromExpr(methodInfo);
+ }
+- else if (pExpr is ExprConstant constant)
++ else if (pExpr is ExprConstant)
+ {
++ ExprConstant constant = (ExprConstant) pExpr;
+ ConstVal val = constant.Val;
+ CType underlyingType = pExpr.Type;
+ object objval;
+@@ -954,8 +962,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ return pExpr.Type.isEnumType() ? Enum.ToObject(pExpr.Type.AssociatedSystemType, objval) : objval;
+ }
+- else if (pExpr is ExprZeroInit zeroInit)
++ else if (pExpr is ExprZeroInit)
+ {
++ ExprZeroInit zeroInit = (ExprZeroInit) pExpr;
+ if ((pExpr = zeroInit.OptionalArgument) == null)
+ {
+ return Activator.CreateInstance(zeroInit.Type.AssociatedSystemType);
+@@ -981,8 +990,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ Expr p = list;
+ while (list != null)
+ {
+- if (list is ExprList pList)
++ if (list is ExprList)
+ {
++ ExprList pList = (ExprList) list;
+ p = pList.OptionalElement;
+ list = pList.OptionalNextListNode;
+ }
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
+index a623bfc0bf..4a742156b9 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
+@@ -189,7 +189,8 @@ namespace Microsoft.CSharp.RuntimeBinder
+ LocalVariableSymbol[] locals = PopulateLocalScope(payload, pScope, arguments, parameters);
+
+ // (1.5) - Check to see if we need to defer.
+- if (DeferBinding(payload, arguments, args, locals, out DynamicMetaObject o))
++ DynamicMetaObject o;
++ if (DeferBinding(payload, arguments, args, locals, out o))
+ {
+ deferredBinding = o;
+ return null;
+@@ -1030,8 +1031,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private static void CheckForConditionalMethodError(Expr pExpr)
+ {
+- if (pExpr is ExprCall call)
++ if (pExpr is ExprCall)
+ {
++ ExprCall call = (ExprCall)pExpr;
+ // This mimics the behavior of the native CompilerSymbolLoader in GetConditionalSymbols. Override
+ // methods cannot have the conditional attribute, but implicitly acquire it from their slot.
+
+@@ -1064,8 +1066,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ ExprMemberGroup memgroup;
+ TypeArray typeArgs;
+
+- if (pResult is ExprCall call)
++ if (pResult is ExprCall)
+ {
++ ExprCall call = (ExprCall) pResult;
+ type = call.MethWithInst.Ats;
+ methprop = call.MethWithInst.Meth();
+ memgroup = call.MemberGroup;
+@@ -1132,12 +1135,15 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expr StripNamedArgument(Expr pArg)
+ {
+- if (pArg is ExprNamedArgumentSpecification named)
++ if (pArg is ExprNamedArgumentSpecification)
+ {
++ ExprNamedArgumentSpecification named =
++ (ExprNamedArgumentSpecification) pArg;
+ pArg = named.Value;
+ }
+- else if (pArg is ExprArrayInit init)
++ else if (pArg is ExprArrayInit)
+ {
++ ExprArrayInit init = (ExprArrayInit) pArg;
+ init.OptionalArguments = StripNamedArguments(init.OptionalArguments);
+ }
+
+@@ -1146,14 +1152,16 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expr StripNamedArguments(Expr pArg)
+ {
+- if (pArg is ExprList list)
++ if (pArg is ExprList)
+ {
++ ExprList list = (ExprList) pArg;
+ for(;;)
+ {
+ list.OptionalElement = StripNamedArgument(list.OptionalElement);
+
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ list = next;
+ }
+ else
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
+index cebfcd94e1..179ac21620 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
+@@ -157,8 +157,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ // We then go over the specified arguments and put the type for any named argument in the right position in the array.
+ for (int iParam = 0; iParam < args.carg; iParam++)
+ {
+- if (prgexpr[iParam] is ExprNamedArgumentSpecification named)
++ if (prgexpr[iParam] is ExprNamedArgumentSpecification)
+ {
++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)prgexpr[iParam];
+ // We find the index of the type of the argument in the method parameter list and store that in a temp
+ int index = FindName(methProp.ParameterNames, named.Name);
+ CType tempType = pta[index];
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
+index c406af43de..0ea81ef21c 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
+@@ -76,22 +76,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ {
+ Debug.Assert(expr != null);
+
+- if (expr is ExprLocal local && local.IsOK)
++ if (expr is ExprLocal && ((ExprLocal)expr).IsOK)
+ {
++ ExprLocal local = (ExprLocal)expr;
+ ReportLocalError(local.Local, kind, isNested);
+ return true;
+ }
+
+ Expr pObject = null;
+
+- if (expr is ExprProperty prop)
++ if (expr is ExprProperty)
+ {
++ ExprProperty prop = (ExprProperty)expr;
+ // We've already reported read-only-property errors.
+ Debug.Assert(prop.MethWithTypeSet != null);
+ pObject = prop.MemberGroup.OptionalObject;
+ }
+- else if (expr is ExprField field)
++ else if (expr is ExprField)
+ {
++ ExprField field = (ExprField)expr;
+ if (field.FieldWithType.Field().isReadOnly)
+ {
+ ReportReadOnlyError(field, kind, isNested);
+@@ -105,8 +108,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+
+ if (pObject != null && pObject.Type.isStructOrEnum())
+ {
+- if (pObject is IExprWithArgs withArgs)
++ if (pObject is IExprWithArgs)
+ {
++ IExprWithArgs withArgs = (IExprWithArgs)pObject;
+ // assigning to RHS of method or property getter returning a value-type on the stack or
+ // passing RHS of method or property getter returning a value-type on the stack, as ref or out
+ ErrorContext.Error(ErrorCode.ERR_ReturnNotLValue, withArgs.GetSymWithType());
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
+index 2756538770..99adf488b3 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
+@@ -382,9 +382,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ FUNDTYPE ftSrc = expr.Type.fundType();
+ FUNDTYPE ftDest = dest.fundType();
+
+- if (expr is ExprConstant constant && constant.IsOK &&
++ if (expr is ExprConstant && ((ExprConstant)expr).IsOK &&
+ expr.Type.isSimpleType() && dest.isSimpleType())
+ {
++ ExprConstant constant = (ExprConstant) expr;
+ if ((ftSrc == FUNDTYPE.FT_I4 && (ftDest <= FUNDTYPE.FT_LASTNONLONG || ftDest == FUNDTYPE.FT_U8)) ||
+ (ftSrc == FUNDTYPE.FT_I8 && ftDest == FUNDTYPE.FT_U8))
+ {
+@@ -412,8 +413,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ ErrorContext.Error(dest is TypeParameterType ? ErrorCode.ERR_TypeVarCantBeNull : ErrorCode.ERR_ValueCantBeNull, dest);
+ }
+
+- else if (expr is ExprMemberGroup memGrp)
++ else if (expr is ExprMemberGroup)
+ {
++ ExprMemberGroup memGrp = (ExprMemberGroup) expr;
+ BindGrpConversion(memGrp, dest, true);
+ }
+ else if (canCast(expr.Type, dest, flags))
+@@ -546,8 +548,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ {
+ ErrorContext.Error(ErrorCode.ERR_ValueCantBeNull, dest);
+ }
+- else if (expr is ExprMemberGroup memGrp)
++ else if (expr is ExprMemberGroup)
+ {
++ ExprMemberGroup memGrp = (ExprMemberGroup)expr;
+ BindGrpConversion(memGrp, dest,
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 15/21] gnu: Add mono-5.4.0.
(address . 74609@debbugs.gnu.org)
50408f814cf6fa20cfed8c9b5e6f11fc2aa941a4.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.4.0-external-repo-specs, mono-5.4.0): New variables.
* gnu/packages/patches/corefx-mono-5.4.0-patches.patch: New patch.
* gnu/packages/patches/mono-5.4.0-patches.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patches.

Change-Id: I1510c8ac13db60e5beab8033be3efc483e984ec0
---
gnu/local.mk | 2 +
gnu/packages/dotnet.scm | 92 ++
.../patches/corefx-mono-5.4.0-patches.patch | 915 ++++++++++++++++++
gnu/packages/patches/mono-5.4.0-patches.patch | 100 ++
4 files changed, 1109 insertions(+)
create mode 100644 gnu/packages/patches/corefx-mono-5.4.0-patches.patch
create mode 100644 gnu/packages/patches/mono-5.4.0-patches.patch

Toggle diff (367 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5facc66932b..aa129d89d58 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1114,6 +1114,7 @@ dist_patch_DATA = \
%D%/packages/patches/converseen-hide-non-free-pointers.patch \
%D%/packages/patches/cool-retro-term-wctype.patch \
%D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch \
+ %D%/packages/patches/corefx-mono-5.4.0-patches.patch \
%D%/packages/patches/coreutils-gnulib-tests.patch \
%D%/packages/patches/cppcheck-disable-char-signedness-test.patch \
%D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\
@@ -1825,6 +1826,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-2.6.4-fixes.patch \
%D%/packages/patches/mono-2.11.4-fixes.patch \
%D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \
+ %D%/packages/patches/mono-5.4.0-patches.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index cf391ed9200..b4355b048e2 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1104,3 +1104,95 @@ (define-public mono-5.2.0
#$@prepare-mono-source-0))))
(native-inputs (modify-inputs (package-native-inputs mono-5.1.0)
(replace "mono" mono-5.1.0)))))
+
+(define mono-5.4.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791"
+ "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj"
+ #:recursive? #t)
+ ("api-snapshot" "b09033be33ab25113743151c644c831158c54042"
+ "0z67iqd1brib6ni36pklrp7rlxyhri5nk3px37fm1aacgrnsk7ck")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2"
+ "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9")
+ ("bockbuild" "0efdb371e6d79abc54c0e3bb3689fa1646f4394e"
+ "10qr1m2wa3zb2i3j16i0cq49higjm451bhlqhqd4rlisqn0w8nrv")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("cecil" "c0eb983dac62519d3ae93a689312076aacecb723"
+ "02i3pwpaf6q00pklfmwxhz0lgp83854dyqnvf4c1ys07cs8y1pdk")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "9ad53d674e31327abcc60f35c14387700f50cc68"
+ "0ap4g2fj8wsar4xvbc6dkd2l67qalxlcw5laplq3an5nvj2ld65w"
+ #:patches ("corefx-mono-5.4.0-patches.patch"))
+ ("corert" "48dba73801e804e89f00311da99d873f9c550278"
+ "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk")
+ ("ikdasm" "1d7d43603791e0236b56d076578657bee44fef6b"
+ "1kw8ykkad55qhapg6jbvqim7vainqlpz8469flm083lpz7pks3sg")
+ (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1"
+ "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi")
+ ("linker" "99354bf5c13b8055209cb082cddc50c8047ab088"
+ "05zlajnqf83xfvn2whh9nql6j85sq12aw26sqmyqz7zcpml171mj")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "b58ba4282377bcefd48abdc2d62ce6330e079abe"
+ "1say03fnqkjsx97zacany3sa5j4mhfk827hkwp23ib02q18f7lvp")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "1904c7d0682a878e2d25b4d49f3475d12fbb9cc6"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8"
+ ;; "")
+ ))
+
+(define-public mono-5.4.0
+ (package
+ (inherit mono-5.2.0)
+ (version "5.4.0.212")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit
+ ;; 5.4.0.135 and before have a bug that makes mono not
+ ;; self-hosting (fails to compile self, example error:
+ ;; System.Data.SqlClient/SqlTransaction.cs(39,22): error
+ ;; CS0738: `System.Data.SqlClient.SqlTransaction' does not
+ ;; implement interface member
+ ;; `System.Data.IDbTransaction.Connection.get' and the best
+ ;; implementing candidate
+ ;; `System.Data.SqlClient.SqlTransaction.Connection.get'
+ ;; return type `System.Data.SqlClient.SqlConnection' does not
+ ;; match interface member return type
+ ;; `System.Data.IDbConnection'
+
+ ;; Note: in above example, SqlConnection implements
+ ;; IDbConnection. My understanding is that for this to
+ ;; compile properly, we need covariant return types, which is
+ ;; a C# 9.0 feature, but somehow the same code has been
+ ;; compiled just fine by previous versions of mono, and is
+ ;; compiled fine by this version, but not specific 5.4.0.XXX
+ ;; versions.
+ "mono-5.4.0.212")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0gx3fxz1wlq5fkj7iphv32vg9m78ia74m9pgn9rab4fyq2k9an2y"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.4.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches
+ "mono-5.4.0-patches.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.2.0)
+ (replace "mono" mono-5.2.0)))))
diff --git a/gnu/packages/patches/corefx-mono-5.4.0-patches.patch b/gnu/packages/patches/corefx-mono-5.4.0-patches.patch
new file mode 100644
index 00000000000..034d769ebce
--- /dev/null
+++ b/gnu/packages/patches/corefx-mono-5.4.0-patches.patch
@@ -0,0 +1,915 @@
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
+index aa8afa5a1b..3a2518246a 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs
+@@ -246,8 +246,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ ExprArrayInit arrinit;
+
+ ExprList list = (ExprList)pExpr.OptionalArguments;
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ methinfo = (ExprMethodInfo)next.OptionalElement;
+ arrinit = (ExprArrayInit)next.OptionalNextListNode;
+ }
+@@ -382,8 +383,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ Expr nextNode = list.OptionalNextListNode;
+ ExprPropertyInfo propinfo;
+ ExprArrayInit arguments;
+- if (nextNode is ExprList nextList)
++ if (nextNode is ExprList)
+ {
++ ExprList nextList = (ExprList)list.OptionalNextListNode;
+ propinfo = nextList.OptionalElement as ExprPropertyInfo;
+ arguments = nextList.OptionalNextListNode as ExprArrayInit;
+ }
+@@ -553,8 +555,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ list = (ExprList)list.OptionalNextListNode;
+ MethodInfo methodInfo;
+ bool bIsLifted = false;
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ ExprConstant isLifted = (ExprConstant)next.OptionalElement;
+ Debug.Assert(isLifted != null);
+ bIsLifted = isLifted.Val.Int32Val == 1;
+@@ -677,8 +680,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expression GetExpression(Expr pExpr)
+ {
+- if (pExpr is ExprWrap wrap)
++ if (pExpr is ExprWrap)
+ {
++ ExprWrap wrap = (ExprWrap) pExpr;
+ return _DictionaryOfParameters[(ExprCall)wrap.OptionalExpression];
+ }
+ else if (pExpr is ExprConstant)
+@@ -875,20 +879,24 @@ namespace Microsoft.CSharp.RuntimeBinder
+ {
+ for (;;)
+ {
+- if (pExpr is ExprCast cast)
++ if (pExpr is ExprCast)
+ {
++ ExprCast cast = (ExprCast) pExpr;
+ pExpr = cast.Argument;
+ }
+- else if (pExpr is ExprTypeOf typeOf)
++ else if (pExpr is ExprTypeOf)
+ {
++ ExprTypeOf typeOf = (ExprTypeOf) pExpr;
+ return typeOf.SourceType.Type.AssociatedSystemType;
+ }
+- else if (pExpr is ExprMethodInfo methodInfo)
++ else if (pExpr is ExprMethodInfo)
+ {
++ ExprMethodInfo methodInfo = (ExprMethodInfo) pExpr;
+ return GetMethodInfoFromExpr(methodInfo);
+ }
+- else if (pExpr is ExprConstant constant)
++ else if (pExpr is ExprConstant)
+ {
++ ExprConstant constant = (ExprConstant) pExpr;
+ ConstVal val = constant.Val;
+ CType underlyingType = pExpr.Type;
+ object objval;
+@@ -954,8 +962,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ return pExpr.Type.isEnumType() ? Enum.ToObject(pExpr.Type.AssociatedSystemType, objval) : objval;
+ }
+- else if (pExpr is ExprZeroInit zeroInit)
++ else if (pExpr is ExprZeroInit)
+ {
++ ExprZeroInit zeroInit = (ExprZeroInit) pExpr;
+ if ((pExpr = zeroInit.OptionalArgument) == null)
+ {
+ return Activator.CreateInstance(zeroInit.Type.AssociatedSystemType);
+@@ -981,8 +990,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ Expr p = list;
+ while (list != null)
+ {
+- if (list is ExprList pList)
++ if (list is ExprList)
+ {
++ ExprList pList = (ExprList) list;
+ p = pList.OptionalElement;
+ list = pList.OptionalNextListNode;
+ }
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
+index 6dc888c6ef..89f881f668 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs
+@@ -195,7 +195,8 @@ namespace Microsoft.CSharp.RuntimeBinder
+ LocalVariableSymbol[] locals = PopulateLocalScope(payload, pScope, arguments, parameters);
+
+ // (1.5) - Check to see if we need to defer.
+- if (DeferBinding(payload, arguments, args, locals, out DynamicMetaObject o))
++ DynamicMetaObject o;
++ if (DeferBinding(payload, arguments, args, locals, out o))
+ {
+ deferredBinding = o;
+ return null;
+@@ -1053,8 +1054,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private static void CheckForConditionalMethodError(Expr pExpr)
+ {
+- if (pExpr is ExprCall call)
++ if (pExpr is ExprCall)
+ {
++ ExprCall call = (ExprCall)pExpr;
+ // This mimics the behavior of the native CompilerSymbolLoader in GetConditionalSymbols. Override
+ // methods cannot have the conditional attribute, but implicitly acquire it from their slot.
+
+@@ -1087,8 +1089,9 @@ namespace Microsoft.CSharp.RuntimeBinder
+ ExprMemberGroup memgroup;
+ TypeArray typeArgs;
+
+- if (pResult is ExprCall call)
++ if (pResult is ExprCall)
+ {
++ ExprCall call = (ExprCall) pResult;
+ type = call.MethWithInst.Ats;
+ methprop = call.MethWithInst.Meth();
+ memgroup = call.MemberGroup;
+@@ -1155,12 +1158,15 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expr StripNamedArgument(Expr pArg)
+ {
+- if (pArg is ExprNamedArgumentSpecification named)
++ if (pArg is ExprNamedArgumentSpecification)
+ {
++ ExprNamedArgumentSpecification named =
++ (ExprNamedArgumentSpecification) pArg;
+ pArg = named.Value;
+ }
+- else if (pArg is ExprArrayInit init)
++ else if (pArg is ExprArrayInit)
+ {
++ ExprArrayInit init = (ExprArrayInit) pArg;
+ init.OptionalArguments = StripNamedArguments(init.OptionalArguments);
+ }
+
+@@ -1169,14 +1175,16 @@ namespace Microsoft.CSharp.RuntimeBinder
+
+ private Expr StripNamedArguments(Expr pArg)
+ {
+- if (pArg is ExprList list)
++ if (pArg is ExprList)
+ {
++ ExprList list = (ExprList) pArg;
+ for(;;)
+ {
+ list.OptionalElement = StripNamedArgument(list.OptionalElement);
+
+- if (list.OptionalNextListNode is ExprList next)
++ if (list.OptionalNextListNode is ExprList)
+ {
++ ExprList next = (ExprList)list.OptionalNextListNode;
+ list = next;
+ }
+ else
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
+index cebfcd94e1..179ac21620 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs
+@@ -157,8 +157,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ // We then go over the specified arguments and put the type for any named argument in the right position in the array.
+ for (int iParam = 0; iParam < args.carg; iParam++)
+ {
+- if (prgexpr[iParam] is ExprNamedArgumentSpecification named)
++ if (prgexpr[iParam] is ExprNamedArgumentSpecification)
+ {
++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)prgexpr[iParam];
+ // We find the index of the type of the argument in the method parameter list and store that in a temp
+ int index = FindName(methProp.ParameterNames, named.Name);
+ CType tempType = pta[index];
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
+index c406af43de..0ea81ef21c 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs
+@@ -76,22 +76,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ {
+ Debug.Assert(expr != null);
+
+- if (expr is ExprLocal local && local.IsOK)
++ if (expr is ExprLocal && ((ExprLocal)expr).IsOK)
+ {
++ ExprLocal local = (ExprLocal)expr;
+ ReportLocalError(local.Local, kind, isNested);
+ return true;
+ }
+
+ Expr pObject = null;
+
+- if (expr is ExprProperty prop)
++ if (expr is ExprProperty)
+ {
++ ExprProperty prop = (ExprProperty)expr;
+ // We've already reported read-only-property errors.
+ Debug.Assert(prop.MethWithTypeSet != null);
+ pObject = prop.MemberGroup.OptionalObject;
+ }
+- else if (expr is ExprField field)
++ else if (expr is ExprField)
+ {
++ ExprField field = (ExprField)expr;
+ if (field.FieldWithType.Field().isReadOnly)
+ {
+ ReportReadOnlyError(field, kind, isNested);
+@@ -105,8 +108,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+
+ if (pObject != null && pObject.Type.isStructOrEnum())
+ {
+- if (pObject is IExprWithArgs withArgs)
++ if (pObject is IExprWithArgs)
+ {
++ IExprWithArgs withArgs = (IExprWithArgs)pObject;
+ // assigning to RHS of method or property getter returning a value-type on the stack or
+ // passing RHS of method or property getter returning a value-type on the stack, as ref or out
+ ErrorContext.Error(ErrorCode.ERR_ReturnNotLValue, withArgs.GetSymWithType());
+diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
+index bb62a926b5..873feff72f 100644
+--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs
+@@ -391,9 +391,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics
+ FUNDTYPE ftSrc = expr.Type.fundType();
+ FUNDTYPE ftDest = dest.fundType();
+
+- if (expr is ExprConstant constant && constant.IsOK &&
++ if (expr is ExprConstant && ((ExprConstant)expr).IsOK &&
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 17/21] gnu: Add mono-5.8.0.
(address . 74609@debbugs.gnu.org)
6bb9968172b788d893ce204e2c8ac9c4a9142b39.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.8.0-external-repo-specs, mono-5.8.0): New variables.
* gnu/packages/patches/mono-5.8.0-patches.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patch.

Change-Id: Iea71bf52d67a182f7543adaba44409dbf6c3c0e2
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 123 ++++++++++++++++++
gnu/packages/patches/mono-5.8.0-patches.patch | 60 +++++++++
3 files changed, 184 insertions(+)
create mode 100644 gnu/packages/patches/mono-5.8.0-patches.patch

Toggle diff (213 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 788f3bb835a..2b1a6f7c782 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1828,6 +1828,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-2.11.4-fixes.patch \
%D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \
%D%/packages/patches/mono-5.4.0-patches.patch \
+ %D%/packages/patches/mono-5.8.0-patches.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 7799f9b951a..82fc2033707 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1275,3 +1275,126 @@ (define-public mono-pre-5.8.0
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(delete 'patch-sub-autogen.sh-shebang))))))))
+
+(define mono-5.8.0-external-repo-specs
+ '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791"
+ "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj"
+ #:recursive? #t)
+ ("api-snapshot" "6668c80a9499218c0b8cc41f48a9e242587df756"
+ "0vbwbwa1hr4jlj7283w8bk3v5i8s43h8413r2pkh4hf38b2rks7d")
+ ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "e048fe4a88d237d105ae02fe0363a68296099362"
+ "0i87i3x694f4g8s2flflv0ah88blxds7gbiyrwrmscqdjsifhy49")
+ ("bockbuild" "cb4545409dafe16dfe86c7d8e6548a69c369e2a2"
+ "0svdfv61d6ppwd4zgki129r9prf75fnsqihna253zfwfpzpingx7")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("cecil" "76ffcdabae660e9586273c9b40db180a0dc8d4c8"
+ "0f3bsfri28pxmnb0m6074bnmmjgsr7cjixv9fhnp6aimhvy4l5p4")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "b965d1f8b5281712c4400ef28ed97670ffd4880d"
+ "0r9hr0bs3j3agqi2pq4n1km9jfycaqvxf6756y7r5l3ykqsd6wsr")
+ ("corert" "48dba73801e804e89f00311da99d873f9c550278"
+ "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk")
+ ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a"
+ "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2")
+ (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1"
+ "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi")
+ ("linker" "c62335c350f3902ff0459112f7efc8b926f4f15d"
+ "015191sdw9i7vnhlsycv65pw8nnfpkd65k11jw1y9bikb4x3aj8x")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "b2c30bc81b2a7733a4eeb252a55f6b4d50cfc3a1"
+ "01vajrfx6y12f525xdiwfbn9qzmym2s65rbiqpy9d9xw0pnq7gbl")
+ (("NUnitLite" "nunit-lite") "764656cdafdb3acd25df8cb52a4e0ea14760fccd"
+ "0pc7lk3p916is8cn4ngaqvjlmlzv3vvjpyksy4pvb3qb5iiaw0vq")
+ ;; ("roslyn-binaries" "e484c75e2edd3c3f1870a2468a71a56220cf1f7f"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8"
+ ;; "")
+ ))
+
+(define-public mono-5.8.0
+ (package
+ (inherit mono-pre-5.8.0)
+ (version "5.8.0.129")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.8.0.129")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0130vd33yzp4w7570qw9xjq2g7b2xmacjbpkmzrpbhy8as5hy4z6"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.8.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches "mono-5.8.0-patches.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-pre-5.8.0)
+ (replace "mono" mono-pre-5.8.0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-pre-5.8.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (replace 'build-reference-assemblies
+ ;; More references need updating this time...
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (let ((top (getcwd)))
+ (with-directory-excursion
+ "external/binary-reference-assemblies"
+ (substitute* (find-files "." "^Makefile$")
+ (("CSC_COMMON_ARGS := " all)
+ (string-append all "-delaysign+ "))
+ (("IBM\\.Data\\.DB2_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Mono\\.Data\\.Sqlite_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.DataSetExtensions_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.OracleClient_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.IdentityModel_REFS := " all)
+ (string-append all "System.Configuration "))
+ (("System\\.Design_REFS := " all)
+ (string-append all "Accessibility "))
+ (("System\\.Web\\.Extensions\\.Design_REFS := " all)
+ (string-append all "System.Windows.Forms System.Web "))
+ (("System\\.ServiceModel\\.Routing_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Web\\.Abstractions_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Reactive\\.Windows\\.Forms_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all)
+ (string-append all "Accessibility "))
+ (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Dynamic\\.Runtime_REFS := " all)
+ (string-append all "System "))
+ (("Facades/System\\.Xml\\.XDocument_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Data\\.Common_REFS := " all)
+ (string-append all "System System.Xml ")))
+ (apply invoke "make"
+ (string-append "CSC=MONO_PATH="
+ top "/mcs/class/lib/build"
+ " "
+ top "/runtime/mono-wrapper"
+ " "
+ top "/mcs/class/lib/build/mcs.exe")
+ make-flags)))))))))))
diff --git a/gnu/packages/patches/mono-5.8.0-patches.patch b/gnu/packages/patches/mono-5.8.0-patches.patch
new file mode 100644
index 00000000000..f73c51d92f5
--- /dev/null
+++ b/gnu/packages/patches/mono-5.8.0-patches.patch
@@ -0,0 +1,60 @@
+diff --git a/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs b/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs
+index 0cc69e47648..51ded713ba6 100644
+--- a/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs
++++ b/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs
+@@ -775,7 +775,7 @@ namespace Mono.AppleTls
+ [DllImport (SecurityLibrary)]
+ extern unsafe static /* OSStatus */ SslStatus SSLRead (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed);
+
+- public override unsafe (int ret, bool wantMore) Read (byte[] buffer, int offset, int count)
++ public override unsafe System.ValueTuple<int, bool> Read (byte[] buffer, int offset, int count)
+ {
+ if (Interlocked.Exchange (ref pendingIO, 1) == 1)
+ throw new InvalidOperationException ();
+@@ -816,7 +816,7 @@ namespace Mono.AppleTls
+ [DllImport (SecurityLibrary)]
+ extern unsafe static /* OSStatus */ SslStatus SSLWrite (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed);
+
+- public override unsafe (int ret, bool wantMore) Write (byte[] buffer, int offset, int count)
++ public override unsafe System.ValueTuple<int, bool> Write (byte[] buffer, int offset, int count)
+ {
+ if (Interlocked.Exchange (ref pendingIO, 1) == 1)
+ throw new InvalidOperationException ();
+diff --git a/mcs/class/System/Mono.Btls/MonoBtlsContext.cs b/mcs/class/System/Mono.Btls/MonoBtlsContext.cs
+index 559db4aca5d..b70239c5163 100644
+--- a/mcs/class/System/Mono.Btls/MonoBtlsContext.cs
++++ b/mcs/class/System/Mono.Btls/MonoBtlsContext.cs
+@@ -300,7 +300,7 @@ namespace Mono.Btls
+ throw new NotImplementedException ();
+ }
+
+- public override (int ret, bool wantMore) Read (byte[] buffer, int offset, int size)
++ public override System.ValueTuple<int, bool> Read (byte[] buffer, int offset, int size)
+ {
+ Debug ("Read: {0} {1} {2}", buffer.Length, offset, size);
+
+@@ -329,7 +329,7 @@ namespace Mono.Btls
+ }
+ }
+
+- public override (int ret, bool wantMore) Write (byte[] buffer, int offset, int size)
++ public override System.ValueTuple<int, bool> Write (byte[] buffer, int offset, int size)
+ {
+ Debug ("Write: {0} {1} {2}", buffer.Length, offset, size);
+
+diff --git a/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs
+index 74410976a85..46f0eb59b9c 100644
+--- a/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs
++++ b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs
+@@ -165,9 +165,9 @@ namespace Mono.Net.Security
+
+ public abstract void Flush ();
+
+- public abstract (int ret, bool wantMore) Read (byte[] buffer, int offset, int count);
++ public abstract System.ValueTuple<int, bool> Read (byte[] buffer, int offset, int count);
+
+- public abstract (int ret, bool wantMore) Write (byte[] buffer, int offset, int count);
++ public abstract System.ValueTuple<int, bool> Write (byte[] buffer, int offset, int count);
+
+ public abstract void Shutdown ();
+
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 19/21] gnu: Add mono-5.10.0.
(address . 74609@debbugs.gnu.org)
923e7eea2cf4aeada71c8dc11d3734dacf27b397.1734369315.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-5.10.0-external-repo-specs, mono-5.10.0): New variables.
* gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patch.

Change-Id: Ic5e123c2cd12f9b77d012cd7d73f9be0b5a608ec
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 119 +
.../mono-5.10.0-later-mcs-changes.patch | 4601 +++++++++++++++++
3 files changed, 4721 insertions(+)
create mode 100644 gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch

Toggle diff (534 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c58bfe73cdb..35a2d7e55a7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1829,6 +1829,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \
%D%/packages/patches/mono-5.4.0-patches.patch \
%D%/packages/patches/mono-5.8.0-patches.patch \
+ %D%/packages/patches/mono-5.10.0-later-mcs-changes.patch \
%D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 414e955340f..fc5585ecc7e 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1471,3 +1471,122 @@ (define-public mono-pre-5.10.0
(search-patches "mono-mcs-patches-from-5.10.0.patch"))))
(native-inputs (modify-inputs (package-native-inputs mono-5.8.0)
(replace "mono" mono-5.8.0))))))
+
+(define mono-5.10.0-external-repo-specs
+ '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791"
+ "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj"
+ #:recursive? #t)
+ ("api-snapshot" "da8bb8c7b970383ce26c9b09ce3689d843a6222e"
+ "00kxw09yirdh0bzkvs0v3h6bkdjv9d4g9agn3b8640awvpym3yqw")
+ ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "e048fe4a88d237d105ae02fe0363a68296099362"
+ "0i87i3x694f4g8s2flflv0ah88blxds7gbiyrwrmscqdjsifhy49")
+ ("bockbuild" "1908d43ec630544189bd11630a59ec4ef571db28"
+ "1h13lgic2dwnbzc58nqhjhagn0f100nl5mhzryjdmypgrf3cr1b3")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("cecil" "dfee11e80d59e1a3d6d9c914c3f277c726bace52"
+ "1y2f59v988y2llqpqi0zl9ly0lkym8zw0a4vkav7cpp6m5mkq208")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "e327d2855ed74dac96f684797e4820345297a690"
+ "11pinnn8zwf4hi0gfj98cyqkmh7wrmd5mhcdm84gkl9s2g18iaq0")
+ ("corert" "aa64b376c1a2238b1a768e158d1b11dac77d722a"
+ "1gg4m49s0ry5yx96dwjary7r395ypzzg4ssz1ajld2x5g7ggvwgg")
+ ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a"
+ "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2")
+ (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1"
+ "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi")
+ ("linker" "84d37424cde6e66bbf997110a4dbdba7e60038e9"
+ "07ffkc9ijzsdvbkrc1fn5sb25sgxyabs54kzyblwkzparwj047qr")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "b2c30bc81b2a7733a4eeb252a55f6b4d50cfc3a1"
+ "01vajrfx6y12f525xdiwfbn9qzmym2s65rbiqpy9d9xw0pnq7gbl")
+ (("NUnitLite" "nunit-lite") "70bb70b0ffd0109aadaa6e4ea178972d4fb63ea3"
+ "0ln7rn1960cdwmfqcscp2d2ncpwnknhq9rf8v53ay8g2c3g6gh4q")
+ ;; ("roslyn-binaries" "00da53c4746250988a92055ef3ac653ccf84fc40"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "c5a907be25c201cda38bec99f6c82548ab3d9b5a"
+ ;; "")
+ ))
+
+(define-public mono-5.10.0
+ (package
+ (inherit mono-pre-5.10.0)
+ (version "5.10.0.179")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.10.0.179")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zvib164w4mzrsk06ym9my0208ccdanja2fx6x6mlyib358h3626"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.10.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches "mono-5.10.0-later-mcs-changes.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-pre-5.10.0)
+ (replace "mono" mono-pre-5.10.0)
+ (append (default-python))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-pre-5.10.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ ;; Build now relies on these being built before any mcs is built;
+ ;; have to use the input mcs.
+ (delete 'build-reference-assemblies)
+ (add-before 'build 'build-reference-assemblies
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (let ((top (getcwd)))
+ (with-directory-excursion
+ "external/binary-reference-assemblies"
+ (substitute* (find-files "." "^Makefile$")
+ (("CSC_COMMON_ARGS := " all)
+ (string-append all "-delaysign+ "))
+ (("IBM\\.Data\\.DB2_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Mono\\.Data\\.Sqlite_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.DataSetExtensions_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.OracleClient_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.IdentityModel_REFS := " all)
+ (string-append all "System.Configuration "))
+ (("System\\.Design_REFS := " all)
+ (string-append all "Accessibility "))
+ (("System\\.Web\\.Extensions\\.Design_REFS := " all)
+ (string-append all "System.Windows.Forms System.Web "))
+ (("System\\.ServiceModel\\.Routing_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Web\\.Abstractions_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Reactive\\.Windows\\.Forms_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all)
+ (string-append all "Accessibility "))
+ (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Dynamic\\.Runtime_REFS := " all)
+ (string-append all "System "))
+ (("Facades/System\\.Xml\\.XDocument_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Data\\.Common_REFS := " all)
+ (string-append all "System System.Xml ")))
+ (apply invoke "make" "CSC=mcs" make-flags)))))))))))
diff --git a/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch b/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch
new file mode 100644
index 00000000000..d8f5991f482
--- /dev/null
+++ b/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch
@@ -0,0 +1,4601 @@
+The result of cherry-picking every commit (except ones that seemed to not
+affect the compiler itself) from mono-5.10.0.179 to mono-6.12.0.206 that
+touched ./mcs/mcs.
+
+Mono seems to consistently, almost as a rule, depend on C# features before
+they implement them. This is extremely awkward for building using previous
+versions, so hopefully this will allow us to jump straight to a high version.
+
+Includes the following commits, in order of most-recent to least-recent:
+
+b3911589b37
+6700dd220fe
+2a7dfb28e07
+eea6f11a3e6
+3fc047c6f3a
+ac6666f5b0b
+927b27bb9d8
+4ab24d4c059
+aa836b46a23
+ee7dccfb320
+23510f26915
+d9f26547d88
+9dc1c885a0f
+ef558ead89a
+2cb7909b13c
+0390ea2e78c
+b4f6659bdc0
+e92d6070eaf
+4c5b3fbd4f4
+e6507f2da8a
+656a4b1120c
+9bd2fa4cf33
+be2d1aeffe0
+454a76cfa4a
+60c1ee454d4
+53f1ef506ea
+d3487bfebb3
+92f6e5b1a81
+
+diff --git a/.gitignore b/.gitignore
+index c6ef19a849b..c37d4fce3f0 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -40,6 +40,7 @@ Ankh.NoLoad
+ *.gpState
+ .vscode/
+ *.exp
++.vs/
+
+ # Tooling
+ _ReSharper*/
+diff --git a/mcs/class/Commons.Xml.Relaxng/Makefile b/mcs/class/Commons.Xml.Relaxng/Makefile
+index 1febae4eb1e..f9b57fea265 100644
+--- a/mcs/class/Commons.Xml.Relaxng/Makefile
++++ b/mcs/class/Commons.Xml.Relaxng/Makefile
+@@ -22,7 +22,7 @@ EXTRA_DISTFILES = \
+ $(RESOURCE_FILES)
+
+ Commons.Xml.Relaxng.Rnc/RncParser.cs: Commons.Xml.Relaxng.Rnc/RncParser.jay $(topdir)/jay/skeleton.cs
+- $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $(CURDIR)/Commons.Xml.Relaxng.Rnc/RncParser.jay > Commons.Xml.Relaxng.Rnc/RncParser.cs
++ $(topdir)/jay/jay -ctv -o Commons.Xml.Relaxng.Rnc/RncParser.cs $< < $(topdir)/jay/skeleton.cs
+
+ BUILT_SOURCES = Commons.Xml.Relaxng.Rnc/RncParser.cs
+
+diff --git a/mcs/class/Microsoft.Build/Makefile b/mcs/class/Microsoft.Build/Makefile
+index 2dcbefdf7f9..1a711069b0b 100644
+--- a/mcs/class/Microsoft.Build/Makefile
++++ b/mcs/class/Microsoft.Build/Makefile
+@@ -26,7 +26,7 @@ EXTRA_DISTFILES = \
+ EXPR_PARSER = Microsoft.Build.Internal/ExpressionParser
+
+ $(EXPR_PARSER).cs: $(EXPR_PARSER).jay $(topdir)/jay/skeleton.cs
+- (cd Microsoft.Build.Internal; $(topdir)/../jay/jay -ctv < $(topdir)/../jay/skeleton.cs ExpressionParser.jay > ExpressionParser.cs)
++ (cd Microsoft.Build.Internal; $(topdir)/../jay/jay -ctv -o ExpressionParser.cs ExpressionParser.jay < $(topdir)/../jay/skeleton.cs )
+
+ BUILT_SOURCES = $(EXPR_PARSER).cs
+
+diff --git a/mcs/class/Mono.CSharp/Makefile b/mcs/class/Mono.CSharp/Makefile
+index 7b1986b78e5..3615532853d 100644
+--- a/mcs/class/Mono.CSharp/Makefile
++++ b/mcs/class/Mono.CSharp/Makefile
+@@ -24,7 +24,7 @@ LIB_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
+ BUILT_SOURCES = $(PROFILE)-parser.cs
+
+ $(PROFILE)-parser.cs: $(topdir)/mcs/cs-parser.jay $(topdir)/jay/skeleton.cs
+- $(topdir)/jay/jay -c < $(topdir)/jay/skeleton.cs $< > $(PROFILE)-jay-tmp.out && mv $(PROFILE)-jay-tmp.out $@
++ $(topdir)/jay/jay -c -o $(PROFILE)-jay-tmp.out $< < $(topdir)/jay/skeleton.cs && mv $(PROFILE)-jay-tmp.out $@
+
+ include ../../build/library.make
+
+diff --git a/mcs/class/Mono.Xml.Ext/Makefile b/mcs/class/Mono.Xml.Ext/Makefile
+index dc49f816fee..16498215a38 100644
+--- a/mcs/class/Mono.Xml.Ext/Makefile
++++ b/mcs/class/Mono.Xml.Ext/Makefile
+@@ -29,13 +29,13 @@ Mono.Xml.XPath2/XQueryParser.jay: Mono.Xml.XPath2/ParserBase.jay $(SKELETON)
+ Mono.Xml.XPath2/XPath2Parser.cs: Mono.Xml.XPath2/XPath2Parser.jay
+ echo "#define XPATH2_PARSER" > $@
+ echo "#if NET_2_0" >> $@
+- $(topdir)/jay/jay -ct < $(SKELETON) $(CURDIR)/$< >>$@
++ $(topdir)/jay/jay -ct $(CURDIR)/$< < $(SKELETON) >>$@
+ echo "#endif" >> $@
+
+ Mono.Xml.XPath2/XQueryParser.cs: Mono.Xml.XPath2/XQueryParser.jay $(SKELETON)
+ echo "#define XQUERY_PARSER" > $@
+ echo "#if NET_2_0" >> $@
+- $(topdir)/jay/jay -ct < $(SKELETON) $(CURDIR)/$< >>$@
++ $(topdir)/jay/jay -ct $(CURDIR)/$< < $(SKELETON) >>$@
+ echo "#endif" >> $@
+
+ Mono.Xml.XPath2/XPath2Tokenizer.cs: Mono.Xml.XPath2/TokenizerBase.cs
+diff --git a/mcs/class/corlib/System/RuntimeArgumentHandle.cs b/mcs/class/corlib/System/RuntimeArgumentHandle.cs
+index 216c4ea3924..c10d3f174d1 100644
+--- a/mcs/class/corlib/System/RuntimeArgumentHandle.cs
++++ b/mcs/class/corlib/System/RuntimeArgumentHandle.cs
+@@ -31,13 +31,9 @@
+ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ //
+
+-using System;
+-using System.Runtime.InteropServices;
+-
+ namespace System
+ {
+- [ComVisible (true)]
+- public struct RuntimeArgumentHandle
++ public ref struct RuntimeArgumentHandle
+ {
+ #pragma warning disable 649
+ internal IntPtr args;
+diff --git a/mcs/class/referencesource/mscorlib/system/typedreference.cs b/mcs/class/referencesource/mscorlib/system/typedreference.cs
+index 80bef5ab852..a30541f4399 100644
+--- a/mcs/class/referencesource/mscorlib/system/typedreference.cs
++++ b/mcs/class/referencesource/mscorlib/system/typedreference.cs
+@@ -19,7 +19,11 @@ namespace System {
+ [CLSCompliant(false)]
+ [System.Runtime.InteropServices.ComVisible(true)]
+ [System.Runtime.Versioning.NonVersionable] // This only applies to field layout
+- public struct TypedReference
++ public
++#if MONO
++ ref
++#endif
++ struct TypedReference
+ {
+ #if MONO
+ #pragma warning disable 169
+diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs
+index 0e45b1a9049..c9e05589e4d 100644
+--- a/mcs/errors/cs0151-4.cs
++++ b/mcs/errors/cs0151-4.cs
+@@ -1,5 +1,6 @@
+ // CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+-// Line: 24
++// Line: 25
++// Compiler options: -langversion:5
+
+ using System;
+
+diff --git a/mcs/errors/cs0273-2.cs b/mcs/errors/cs0273-2.cs
+new file mode 100644
+index 00000000000..b0bdbef9e75
+--- /dev/null
++++ b/mcs/errors/cs0273-2.cs
+@@ -0,0 +1,9 @@
++// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2'
++// Line: 7
++// Compiler options: -langversion:7.2
++
++ class C
++ {
++ private string S2 { get; private protected set; }
++ }
++
+diff --git a/mcs/errors/cs0280.cs b/mcs/errors/cs0280.cs
+new file mode 100644
+index 00000000000..62be8e39585
+--- /dev/null
++++ b/mcs/errors/cs0280.cs
+@@ -0,0 +1,22 @@
++// CS0280: `C.Fixable.GetPinnableReference(int)' has the wrong signature to be used in extensible fixed statement
++// Line: 11
++// Compiler options: -unsafe -langversion:latest -warnaserror
++
++using System;
++
++unsafe class C
++{
++ public static void Main ()
++ {
++ fixed (int* p = new Fixable ()) {
++ }
++ }
++
++ struct Fixable
++ {
++ public ref int GetPinnableReference (int i = 1)
++ {
++ throw new NotImplementedException ();
++ }
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0826-9.cs b/mcs/errors/cs0826-9.cs
+deleted file mode 100644
+index 4e098969b8c..00000000000
+--- a/mcs/errors/cs0826-9.cs
++++ /dev/null
+@@ -1,16 +0,0 @@
+-// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly
+-// Line: 8
+-
+-class C
+-{
+- static void Main()
+- {
+- object o = 1;
+- dynamic d = 1;
+-
+- var a = new[] {
+- new { X = o },
+- new { X = d }
+- };
+- }
+-}
+diff --git a/mcs/errors/cs1013-1.cs b/mcs/errors/cs1013-1.cs
+new file mode 100644
+index 00000000000..01827df4995
+--- /dev/null
++++ b/mcs/errors/cs1013-1.cs
+@@ -0,0 +1,8 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 0b;
++ static void Main () {}
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-2.cs b/mcs/errors/cs1013-2.cs
+new file mode 100644
+index 00000000000..c868cb2a769
+--- /dev/null
++++ b/mcs/errors/cs1013-2.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 0x0_;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-3.cs b/mcs/errors/cs1013-3.cs
+new file mode 100644
+index 00000000000..3145b1ba596
+--- /dev/null
++++ b/mcs/errors/cs1013-3.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 1_;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-4.cs b/mcs/errors/cs1013-4.cs
+new file mode 100644
+index 00000000000..3a5e744ff4f
+--- /dev/null
++++ b/mcs/errors/cs1013-4.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static double i = 1_.2;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-5.cs b/mcs/errors/cs1013-5.cs
+new file mode 100644
+index 00000000000..8082743c0b5
+--- /dev/null
++++ b/mcs/errors/cs1013-5.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 1_e1;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-6.cs b/mcs/errors/cs1013-6.cs
+new file mode 100644
+index 00000000000..d2cea2c72dd
+--- /dev/null
++++ b/mcs/errors/cs1013-6.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static float i = 1_f;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-7.cs b/mcs/errors/cs1013-7.cs
+new file mode 100644
+index 00000000000..8030d6ed095
+--- /dev/null
++++ b/mcs/errors/cs1013-7.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 0x_1;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1013-8.cs b/mcs/errors/cs1013-8.cs
+new file mode 100644
+index 00000000000..d26c7acacb7
+--- /dev/null
++++ b/mcs/errors/cs1013-8.cs
+@@ -0,0 +1,7 @@
++// CS1013: Invalid number
++// Line : 6
++
++class X
++{
++ static int i = 0b_1;
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1021-4.cs b/mcs/errors/cs1021-4.cs
+new file mode 100644
+index 00000000000..75c2ff70360
+--- /dev/null
++++ b/mcs/errors/cs1021-4.cs
+@@ -0,0 +1,8 @@
++// CS1021: Integral constant is too large
++// Line: 6
++
++class X {
++ public static void Main() {
++ int h = 0b11111111111111111111111111111111111111111111111111111111111111111;
++ }
++}
+diff --git a/mcs/errors/cs1061-18.cs b/mcs/errors/cs1061-18.cs
+new file mode 100644
+index 00000000000..3ac82b7f2d3
+--- /dev/null
++++ b/mcs/errors/cs1061-18.cs
+@@ -0,0 +1,10 @@
++// CS1061: Type `int' does not contain a definition for `__0' and no extension method `__0' of type `int' could be found. Are you missing an assembly reference?
++// Line: 8
++
++static class C
++{
++ static void Main ()
++ {
++ int c = 0.__0;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1525-27.cs b/mcs/errors/cs1525-27.cs
+index dc184931667..d4c1f326be2 100644
+--- a/mcs/errors/cs1525-27.cs
++++ b/mcs/errors/cs1525-27.cs
+@@ -1,4 +1,4 @@
+-// CS1525: Unexpected symbol `fe', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
++// CS1525: Unexpected symbol `fe', expecting `class', `delegate', `enum', `interface', `partial', `ref', or `struct'
+ // Line: 6
+
+ namespace X
+diff --git a/mcs/errors/cs1525-43.cs b/mcs/errors/cs1525-43.cs
+index d83d4d847fa..26f466a2528 100644
+--- a/mcs/errors/cs1525-43.cs
++++ b/mcs/errors/cs1525-43.cs
+@@ -1,4 +1,4 @@
+-// CS1525: Unexpected symbol `)', expecting `(', `[', `out', `params', `ref', `this', or `type'
++// CS1525: Unexpected symbol `)'
+ // Line: 6
+
+ class TestClass
+diff --gi
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 18/21] gnu: Add mono-pre-5.10.0.
(address . 74609@debbugs.gnu.org)
3cbfc5b25a94ed1a917791c8f79b692b6c78b2b2.1734369314.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm
(mono-pre-5.10.0-external-repo-specs, mono-pre-5.10.0): New variables.
* gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register new patch.

Change-Id: Ie78dce071032b6743b6e4c2eb58e43bc89e6a1d1
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 73 +
.../mono-mcs-patches-from-5.10.0.patch | 4218 +++++++++++++++++
3 files changed, 4292 insertions(+)
create mode 100644 gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch

Toggle diff (630 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 2b1a6f7c782..c58bfe73cdb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1829,6 +1829,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \
%D%/packages/patches/mono-5.4.0-patches.patch \
%D%/packages/patches/mono-5.8.0-patches.patch \
+ %D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 82fc2033707..414e955340f 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1398,3 +1398,76 @@ (define-public mono-5.8.0
" "
top "/mcs/class/lib/build/mcs.exe")
make-flags)))))))))))
+
+(define mono-pre-5.10.0-external-repo-specs
+ '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791"
+ "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj"
+ #:recursive? #t)
+ ("api-snapshot" "627333cae84f02a36ee9ca605c96dac4557d9f35"
+ "0p9c6brxiwx38yvaf55jd0l1mxfj3b5ah0xas2hv6frkz80yrqdl")
+ ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "9c5cc7f051a0bba2e41341a5baebfc4d2c2133ef"
+ "14bfn1qvni8gyfxjwmvykyjjy3j5ng4fnbljdadi9dm4b9al0wg1")
+ ("bockbuild" "29022af5d8a94651b2eece93f910559b254ec3f0"
+ "0lclc1smmrj6xw32dll073mxw4ddiixv9arv02yw3w5h135ay7w4")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("cecil" "bc11f472954694ebd92ae4956f110c1036a7c2e0"
+ "122nnp5pcnw18pj6amnqkqxlrmapd4vy9xs65hd0bqyqjh56bwnd")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "cb1b049c95227465c1791b857cb5ba86385d9f29"
+ "1pr0qjlgxf63zs1g80gqd6x3qhlgb0wlcc8zm8z8am5aywrvgb53")
+ ("corert" "48dba73801e804e89f00311da99d873f9c550278"
+ "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk")
+ ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a"
+ "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2")
+ (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1"
+ "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi")
+ ("linker" "99354bf5c13b8055209cb082cddc50c8047ab088"
+ "05zlajnqf83xfvn2whh9nql6j85sq12aw26sqmyqz7zcpml171mj")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "b58ba4282377bcefd48abdc2d62ce6330e079abe"
+ "1say03fnqkjsx97zacany3sa5j4mhfk827hkwp23ib02q18f7lvp")
+ (("NUnitLite" "nunit-lite") "764656cdafdb3acd25df8cb52a4e0ea14760fccd"
+ "0pc7lk3p916is8cn4ngaqvjlmlzv3vvjpyksy4pvb3qb5iiaw0vq")
+ ;; ("roslyn-binaries" "1904c7d0682a878e2d25b4d49f3475d12fbb9cc6"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8"
+ ;; "")
+ ))
+
+(define-public mono-pre-5.10.0
+ (let ((commit "3e9d7d6e9cf8dc33eb29c497c350a1cd7df3a057")
+ (version "5.8.0.129")
+ (revision "0"))
+ (package
+ (inherit mono-5.8.0)
+ (version (git-version version revision commit))
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0m8i0zgzh0fgb3ssy95v9czk1c0rl76q0jj7834s5fjnkdj8l4jb"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-pre-5.10.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches "mono-mcs-patches-from-5.10.0.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.8.0)
+ (replace "mono" mono-5.8.0))))))
diff --git a/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch b/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch
new file mode 100644
index 00000000000..41dfed7df7f
--- /dev/null
+++ b/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch
@@ -0,0 +1,4218 @@
+Includes the following commits:
+6f5bfe5cf5a
+3812d1c13fc
+a80f3d0d87c
+b2f051f0b19
+2a202a8478b
+4d7d1606d73
+d9970305731
+94e80fc8d7f
+0b9280083a9
+07d1e5f36a5
+5f279f14aa2
+889421f3bef
+f4c0fd3dc11
+71df5c63b46
+d6e5bf16782
+207f5c2cd6d
+c512752a416
+9aca8d5fe4b
+diff --git a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
+index 97f9e047e6d..f8bf63455de 100644
+--- a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
++++ b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs
+@@ -131,5 +131,17 @@ namespace MonoTests.EvaluatorTest
+ {
+ Evaluator.Run ("public class TestClass { private TestEnum _te; public string Get() { return _te.ToString(); } } public enum TestEnum { First, Second }");
+ }
++
++ [Test]
++ public void EnumTypeWithOrderDependency ()
++ {
++ Evaluator.Run ("public class TestClass { public enum TestEnum { Val1, Val2, Val3 } public TestEnum test; public TestClass() { test = TestEnum.Val3; } }");
++ object res = Evaluator.Evaluate ("new TestClass()");
++
++ var fields = res.GetType ().GetFields ();
++ foreach (var field in fields) {
++ Console.WriteLine ($"{field.Name} = {field.MemberType}");
++ }
++ }
+ }
+ }
+\ No newline at end of file
+diff --git a/mcs/errors/cs0023-30.cs b/mcs/errors/cs0023-30.cs
+new file mode 100644
+index 00000000000..fc19cc24e3e
+--- /dev/null
++++ b/mcs/errors/cs0023-30.cs
+@@ -0,0 +1,11 @@
++// CS0023: The `is' operator cannot be applied to operand of type `default'
++// Line: 9
++// Compiler options: -langversion:latest
++
++class C
++{
++ static void Main ()
++ {
++ bool d = default is C;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0029-39.cs b/mcs/errors/cs0029-39.cs
+new file mode 100644
+index 00000000000..0ed200036dc
+--- /dev/null
++++ b/mcs/errors/cs0029-39.cs
+@@ -0,0 +1,15 @@
++// CS0029: Cannot implicitly convert type `S' to `object'
++// Line: 13
++// Compiler options: -langversion:latest
++
++public ref struct S
++{
++}
++
++class Test
++{
++ public static void Main ()
++ {
++ object o = new S ();
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0029-40.cs b/mcs/errors/cs0029-40.cs
+new file mode 100644
+index 00000000000..6d9167c31fa
+--- /dev/null
++++ b/mcs/errors/cs0029-40.cs
+@@ -0,0 +1,19 @@
++// CS0029: Cannot implicitly convert type `S' to `System.ValueType'
++// Line: 16
++// Compiler options: -langversion:latest
++
++using System;
++
++public ref struct S
++{
++}
++
++class Test
++{
++ public static void Main ()
++ {
++ var s = default (S);
++ ValueType s2 = s;
++ var res = default (S).ToString ();
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0029-41.cs b/mcs/errors/cs0029-41.cs
+new file mode 100644
+index 00000000000..1a65f52f737
+--- /dev/null
++++ b/mcs/errors/cs0029-41.cs
+@@ -0,0 +1,12 @@
++// CS0029: Cannot implicitly convert type `System.TypedReference' to `object'
++// Line: 10
++
++using System;
++
++class Test
++{
++ public static void Main ()
++ {
++ var res = default (TypedReference).ToString ();
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0029-42.cs b/mcs/errors/cs0029-42.cs
+new file mode 100644
+index 00000000000..c7671000c76
+--- /dev/null
++++ b/mcs/errors/cs0029-42.cs
+@@ -0,0 +1,10 @@
++// CS0029: Cannot implicitly convert type `string' to `int'
++// Line: 8
++
++class C
++{
++ void Exists (int _)
++ {
++ _ = "2";
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0030-17.cs b/mcs/errors/cs0030-17.cs
+new file mode 100644
+index 00000000000..b72b8bf71e5
+--- /dev/null
++++ b/mcs/errors/cs0030-17.cs
+@@ -0,0 +1,15 @@
++// CS0030: Cannot convert type `object' to `S'
++// Line: 13
++// Compiler options: -langversion:latest
++
++ref struct S
++{
++}
++
++class X
++{
++ public static void Foo (object o)
++ {
++ var res = (S) o;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0103-18.cs b/mcs/errors/cs0103-18.cs
+new file mode 100644
+index 00000000000..8cec755d23d
+--- /dev/null
++++ b/mcs/errors/cs0103-18.cs
+@@ -0,0 +1,10 @@
++// CS0103: The name `_' does not exist in the current context
++// Line: 8
++
++class C
++{
++ void Test ()
++ {
++ _.ToString ();
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0123-10.cs b/mcs/errors/cs0123-10.cs
+new file mode 100644
+index 00000000000..43d5e5d6368
+--- /dev/null
++++ b/mcs/errors/cs0123-10.cs
+@@ -0,0 +1,18 @@
++// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func<string>()' parameters
++// Line: 16
++// Compiler options: -langversion:latest
++
++using System;
++
++public ref struct S
++{
++}
++
++class Test
++{
++ public static void Main ()
++ {
++ var s = new S ();
++ Func<string> f = s.ToString;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0123-11.cs b/mcs/errors/cs0123-11.cs
+new file mode 100644
+index 00000000000..427b628c159
+--- /dev/null
++++ b/mcs/errors/cs0123-11.cs
+@@ -0,0 +1,12 @@
++// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func<string>()' parameters
++// Line: 16
++
++using System;
++
++class Test
++{
++ public static void Main ()
++ {
++ Func<string> f = default (TypedReference).ToString;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0133-2.cs b/mcs/errors/cs0133-2.cs
+index b7a37182d73..48488876f7e 100644
+--- a/mcs/errors/cs0133-2.cs
++++ b/mcs/errors/cs0133-2.cs
+@@ -1,4 +1,4 @@
+-// CS0133: The expression being assigned to `c' must be constant
++// CS0133: The expression being assigned to `c' must be a constant or default value
+ // Line: 10
+
+ class C
+diff --git a/mcs/errors/cs0133-3.cs b/mcs/errors/cs0133-3.cs
+index caae3bde68c..2f7dac6880d 100644
+--- a/mcs/errors/cs0133-3.cs
++++ b/mcs/errors/cs0133-3.cs
+@@ -1,5 +1,5 @@
+-// CS0133: The expression being assigned to `Foo' must be constant
+-// Line: 12
++// CS0133: The expression being assigned to `Foo' must be a constant or default value
++// Line: 8
+
+ class T
+ {
+diff --git a/mcs/errors/cs0133-4.cs b/mcs/errors/cs0133-4.cs
+index 41fe639b446..54162d544ca 100644
+--- a/mcs/errors/cs0133-4.cs
++++ b/mcs/errors/cs0133-4.cs
+@@ -1,4 +1,4 @@
+-// CS0133: The expression being assigned to `S.pathName' must be constant
++// CS0133: The expression being assigned to `S.pathName' must be a constant or default value
+ // Line: 12
+ // Compiler options: -unsafe
+
+diff --git a/mcs/errors/cs0133-5.cs b/mcs/errors/cs0133-5.cs
+index a49f265c690..32e6bfdf416 100644
+--- a/mcs/errors/cs0133-5.cs
++++ b/mcs/errors/cs0133-5.cs
+@@ -1,4 +1,4 @@
+-// CS0133: The expression being assigned to `b' must be constant
++// CS0133: The expression being assigned to `b' must be a constant or default value
+ // Line: 8
+
+ class X
+diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs
+index a523169cdbd..28448dd6de8 100644
+--- a/mcs/errors/cs0133-6.cs
++++ b/mcs/errors/cs0133-6.cs
+@@ -1,4 +1,4 @@
+-// CS0133: The expression being assigned to `o' must be constant
++// CS0133: The expression being assigned to `o' must be a constant or default value
+ // Line: 8
+
+ class X
+diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs
+index 10d82d9fe5e..024bc148229 100644
+--- a/mcs/errors/cs0133-7.cs
++++ b/mcs/errors/cs0133-7.cs
+@@ -1,4 +1,4 @@
+-// CS0133: The expression being assigned to `o' must be constant
++// CS0133: The expression being assigned to `o' must be a constant or default value
+ // Line: 8
+
+ class X
+diff --git a/mcs/errors/cs0133.cs b/mcs/errors/cs0133.cs
+index 094194deabb..f0dda9ee3cb 100644
+--- a/mcs/errors/cs0133.cs
++++ b/mcs/errors/cs0133.cs
+@@ -1,5 +1,6 @@
+-// CS0133: The expression being assigned to `x' must be constant
+-// Line: 6
++// CS0133: The expression being assigned to `x' must be a constant or default value
++// Line: 7
++
+ class X {
+ X (int arg)
+ {
+diff --git a/mcs/errors/cs0306-4.cs b/mcs/errors/cs0306-4.cs
+new file mode 100644
+index 00000000000..4653512e55b
+--- /dev/null
++++ b/mcs/errors/cs0306-4.cs
+@@ -0,0 +1,15 @@
++// CS0306: The type `S' may not be used as a type argument
++// Line: 13
++// Compiler options: -langversion:latest
++
++public ref struct S
++{
++}
++
++class Test<T>
++{
++ public static void Foo ()
++ {
++ Test<S> local;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0611-3.cs b/mcs/errors/cs0611-3.cs
+new file mode 100644
+index 00000000000..6eda773dd24
+--- /dev/null
++++ b/mcs/errors/cs0611-3.cs
+@@ -0,0 +1,15 @@
++// CS0611: Array elements cannot be of type `S'
++// Line: 13
++// Compiler options: -langversion:latest
++
++public ref struct S
++{
++}
++
++class Test
++{
++ public static void Main ()
++ {
++ var x = new S[0];
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs0815-9.cs b/mcs/errors/cs0815-9.cs
+new file mode 100644
+index 00000000000..f54703349be
+--- /dev/null
++++ b/mcs/errors/cs0815-9.cs
+@@ -0,0 +1,11 @@
++// CS0815: An implicitly typed local variable declaration cannot be initialized with `default'
++// Line: 9
++// Compiler options: -langversion:latest
++
++static class X
++{
++ public static void Main ()
++ {
++ var x = default;
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1502-11.cs b/mcs/errors/cs1502-11.cs
+deleted file mode 100644
+index 82dcb3a2c17..00000000000
+--- a/mcs/errors/cs1502-11.cs
++++ /dev/null
+@@ -1,11 +0,0 @@
+-// CS1502: The best overloaded method match for `string.String(char*)' has some invalid arguments
+-// Line: 8
+-
+-class C
+-{
+- static string Prop {
+- get {
+- return new string ("s");
+- }
+- }
+-}
+diff --git a/mcs/errors/cs1599-2.cs b/mcs/errors/cs1599-2.cs
+index 941ff6bb0d6..28aa05b2ed3 100644
+--- a/mcs/errors/cs1599-2.cs
++++ b/mcs/errors/cs1599-2.cs
+@@ -1,4 +1,4 @@
+-// CS1599: Method or delegate cannot return type `System.ArgIterator'
++// CS1599: The return type of `System.ArgIterator' is not allowed
+ // Line: 8
+
+ using System;
+diff --git a/mcs/errors/cs1599-3.cs b/mcs/errors/cs1599-3.cs
+index e4869dcaf70..9d378099d82 100644
+--- a/mcs/errors/cs1599-3.cs
++++ b/mcs/errors/cs1599-3.cs
+@@ -1,4 +1,4 @@
+-// CS1599: Method or delegate cannot return type `System.ArgIterator'
++// CS1599: The return type of `System.ArgIterator' is not allowed
+ // Line: 8
+
+ using System;
+diff --git a/mcs/errors/cs1599-4.cs b/mcs/errors/cs1599-4.cs
+new file mode 100644
+index 00000000000..358eee59a13
+--- /dev/null
++++ b/mcs/errors/cs1599-4.cs
+@@ -0,0 +1,12 @@
++// CS1599: The return type of `System.TypedReference' is not allowed
++// Line: 8
++
++using System;
++
++public class Program
++{
++ public static TypedReference operator + (int a, Program b)
++ {
++ throw new ApplicationException ();
++ }
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1599.cs b/mcs/errors/cs1599.cs
+index 5cef32d7f97..871d9fb3e7a 100644
+--- a/mcs/errors/cs1599.cs
++++ b/mcs/errors/cs1599.cs
+@@ -1,4 +1,4 @@
+-// CS1599: Method or delegate cannot return type `System.TypedReference'
++// CS1599: The return type of `System.TypedReference' is not allowed
+ // Line: 8
+
+ using System;
+diff --git a/mcs/errors/cs1644-57.cs b/mcs/errors/cs1644-57.cs
+new file mode 100644
+index 00000000000..7ee98373080
+--- /dev/null
++++ b/mcs/errors/cs1644-57.cs
+@@ -0,0 +1,7 @@
++// CS1644: Feature `ref structs' cannot be used because it is not part of the C# 7.0 language specification
++// Line: 5
++// Compiler options: -langversion:7
++
++ref struct S
++{
++}
+\ No newline at end of file
+diff --git a/mcs/errors/cs1644-58.cs b/mcs/errors/cs1644-58.cs
+new file mode 100644
+index 00000000000..e994cf338bd
+--- /dev/null
++++ b/mcs/errors/cs1644-58.cs
+@@ -0,0 +1,8 @@
++// CS1644: Feature `default literal' cannot be used because it is not part of the C# 7.0 language specification
++// Line: 7
++// Compiler options: -langversion:7
++
++class X
++{
++ int i = default;
++}
+diff --git a/mcs/errors/cs1644-59.cs b/mcs/errors/cs1644-59.cs
+new file mode 100644
+index 00000000000..2f8aed6b958
+--- /dev/null
++++ b/mcs/errors/cs1644-59.cs
+@@ -0,0 +1,13 @@
++// CS1644: Feature `readonly references' cannot be used because it is not part of the C# 7.0 language specification
++// Line: 9
++// Compiler options: -langversion:7
++
++class X
++{
++ int i;
++
++ ref readonly int Test ()
++ {
++ return ref i;
++ }
++}
+diff --git a/mcs/errors/cs1644-60.cs b/mcs/errors/cs1644-60.cs
+new file mode 100644
+index 00000000000..ca9547bc561
+--- /dev/null
++++ b/mcs/errors/cs1644-60.cs
+@@ -0,0 +1,11 @@
++// CS1644: Feature `discards' cannot be used because it is not part of the C# 6.0 language specification
++// Line: 9
++// Compiler options: -langversion:6
++
++class X
++{
++ int Test ()
++ {
++ _ = 2;
++ }
++}
+diff --git a/mcs/errors/cs1738-2.cs b/mcs/errors/cs1738-2.cs
+index f59221f4c7a..44b3f6d1b14 100644
+--- a/mcs/errors/cs1738-2.cs
++++ b/mcs/errors/cs1738-2.cs
+@@ -1,4 +1,4 @@
+-// CS1738: Named arguments must appear after the positional arguments
++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
+ // Line: 13
+
+ using System;
+diff --git a/mcs/errors/cs1738-3.cs b/mcs/errors/cs1738-3.cs
+index 53c4efc3553..901ac0e5d59 100644
+--- a/mcs/errors/cs1738-3.cs
++++ b/mcs/errors/cs1738-3.cs
+@@ -1,4 +1,4 @@
+-// CS1738: Named arguments must appear after the positional arguments
++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
+ // Line: 14
+
+ class C
+diff --git a/mcs/errors/cs1738.cs b/mcs/errors/cs1738.cs
+index dab9a61160b..537bc17b917 100644
+--- a/mcs/errors/cs1738.cs
++++ b/mcs/errors/cs1738.cs
+@@ -1,4 +1,4 @@
+-// CS1738: Named arguments must appear after the positional arguments
++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2
+ // Line: 12
+
+ class C
+diff --git a/mcs/errors/cs1983.cs b/mcs/errors/cs1983.cs
+index a2ef6c150d6..76d2db4e677 100644
+--- a/mcs/errors/cs1983.cs
++++ b/mcs/errors/cs1983.cs
+@@ -1,4 +1,4 @@
+-// CS1983: The return type of an async method must be void, Task, or Task<T>
++// CS1983: The return type of an async method must be void o
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 20/21] gnu: Add libgdiplus.
(address . 74609@debbugs.gnu.org)
0c79983d4bb80c1ce3f577af0f85e6a414440c53.1734369315.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

* gnu/packages/dotnet.scm (libgdiplus): New variable.

Change-Id: I492254c09fd6c9c8b0bc633e1f95665bfa9fe96a
---
gnu/packages/dotnet.scm | 44 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index fc5585ecc7e..03e18e29c6d 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1590,3 +1590,47 @@ (define-public mono-5.10.0
(("Facades/System\\.Data\\.Common_REFS := " all)
(string-append all "System System.Xml ")))
(apply invoke "make" "CSC=mcs" make-flags)))))))))))
+
+(define-public libgdiplus
+ (package
+ (name "libgdiplus")
+ (version "6.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mono/libgdiplus.git")
+ (commit "94a49875487e296376f209fe64b921c6020f74c0")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gwmhrddr8kdlfprjqcd6gqiy8p5v8sl9215dbd949j1l76szl9v"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "./Makefile.am"
+ (("\\./update_submodules\\.sh")
+ ":")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list automake
+ autoconf
+ googletest-1.8
+ libtool
+ pkg-config
+ which))
+ (inputs (list cairo
+ freetype
+ fontconfig
+ gettext-minimal
+ giflib
+ glib
+ libexif
+ libjpeg-turbo
+ libpng
+ libtiff
+ libx11))
+ (synopsis "Open Source implementation of the GDI+ API")
+ (description "Libgdiplus is the Mono library that provides a
+GDI+-compatible API on non-Windows operating systems. It uses Cairo to do
+most of the heavy lifting.")
+ (home-page "https://github.com/mono/libgdiplus")
+ (license license:expat)))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 16 Dec 2024 18:26
[PATCH 21/21] gnu: Add mono-6.12.0.
(address . 74609@debbugs.gnu.org)
83835bd9c18faf25c98fbf2d57429026f6b7e03c.1734369315.git.efraim@flashner.co.il
From: unmush <unmush@hashbang.sh>

This includes a patch to add support for a <runpath> element to
mono's *.dll.config and *.exe.config files. See mono-6.12.0-add-runpath.patch
for details.

* gnu/packages/dotnet.scm
(mono-6.12.0-external-repo-specs, mono-6.12.0): New variable.
* gnu/packages/patches/mono-6.12.0-{add-runpath,fix-AssemblyResolver,fix-ConditionParser}.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Register new patches.

Change-Id: I9d5bd5d366c368eb235483411818c90374bfc4d4
---
gnu/local.mk | 3 +
gnu/packages/dotnet.scm | 194 ++++++++++++++
.../patches/mono-6.12.0-add-runpath.patch | 185 ++++++++++++++
.../mono-6.12.0-fix-AssemblyResolver.patch | 236 ++++++++++++++++++
.../mono-6.12.0-fix-ConditionParser.patch | 46 ++++
5 files changed, 664 insertions(+)
create mode 100644 gnu/packages/patches/mono-6.12.0-add-runpath.patch
create mode 100644 gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch
create mode 100644 gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch

Toggle diff (392 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 35a2d7e55a7..8722c2a33d9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1830,6 +1830,9 @@ dist_patch_DATA = \
%D%/packages/patches/mono-5.4.0-patches.patch \
%D%/packages/patches/mono-5.8.0-patches.patch \
%D%/packages/patches/mono-5.10.0-later-mcs-changes.patch \
+ %D%/packages/patches/mono-6.12.0-add-runpath.patch \
+ %D%/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch \
+ %D%/packages/patches/mono-6.12.0-fix-ConditionParser.patch \
%D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 03e18e29c6d..22dcf88adb4 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1634,3 +1634,197 @@ (define-public libgdiplus
most of the heavy lifting.")
(home-page "https://github.com/mono/libgdiplus")
(license license:expat)))
+
+(define mono-6.12.0-external-repo-specs
+ '(("api-doc-tools" "5da8127af9e68c9d58a90aa9de21f57491d81261"
+ "0rq8dxmy5av36nd298k60d8s386zhqlw63yn2ywc0416xsflscg4"
+ #:recursive? #t)
+ ("api-snapshot" "808e8a9e4be8d38e097d2b0919cac37bc195844a"
+ "1i5migdw649bmxqii99q2hd6vka11wlcphfrm98kb7pprz4k401a")
+ ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ;; (("https://github.com/Unity-Technologies/bdwgc" "bdwgc")
+ ;; "a27eddb837d613cb4cf436405c23ce39ed16a86d"
+ ;; "")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "e68046d5106aa0349c23f95821456955fc15b96b"
+ "1mqpz274qdhl84y6x8bazrfmajcf6qagiks2g0gyg4qyqwgrp490")
+ ("bockbuild" "3bd44f6784b85b1ece8b00b13d12cf416f5a87e7"
+ "0z3d8qylfwnlklpcvsmsgy5n248gcff5vmzqjzalfj7d1h7vcjxs")
+ ("boringssl" "296137cf989688b03ed89f72cd7bfd86d470441e"
+ "11ghdayfcvysnh1617bj478hxrg7b43jpk7vgafm6jb7ykpxl8fa")
+ ("cecil" "8021f3fbe75715a1762e725594d8c00cce3679d8"
+ "0j19lwbs30y2xz8myk0fbxs4hbal1p8vqjmnkvn301v0xxacynxm")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "c4eeab9fc2faa0195a812e552cd73ee298d39386"
+ "03530pf6dddqlihvb83m9z34bark8mzrffnrclq726gndfg4vqs8")
+ ("corert" "11136ad55767485063226be08cfbd32ed574ca43"
+ "1g0q83fff13237nwsfcmk7fmzwx0kv93zsqqybcigwip5x6ani8f")
+ ("helix-binaries" "64b3a67631ac8a08ff82d61087cfbfc664eb4af8"
+ "1f6kkpbzj3bx9p1hb36kzjq0ppckk4rpmjnr82hyq7y18fwikfd7")
+ ("ikdasm" "f0fd66ea063929ef5d51aafdb10832164835bb0f"
+ "0313pvmmjh01h9b306jd6cd6fcbnbxaglaj81m0l0acf4yn7zb10")
+ (("ikvm-fork" "ikvm") "08266ac8c0b620cc929ffaeb1f23ac37629ce825"
+ "1g0v1v8nvxkwq7w9qyqhf9kgmxq3qm6rsw4al8x0w3dmbgxjhqjv")
+ ("illinker-test-assets" "ec9eb51af2eb07dbe50a2724db826bf3bfb930a6"
+ "1b4vq4jbgnl4lzffg02n5w1sppg2k6bfks0150pj403sbnml85gl")
+ ("linker" "ed4a9413489aa29a70e41f94c3dac5621099f734"
+ "16rdpch9anarnhczi441a9zna4rz93jwpb31x0dzrb4j03cxajg2")
+ ;; (("https://github.com/dotnet/llvm-project" "llvm-project")
+ ;; "7dfdea1267f0a40955e02567dcbcd1bcb987e825"
+ ;; "")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "99558479578b1d6af0f443bb411bc3520fcbae5c"
+ "1434m6z9sb7bvki9ba6iinqpmh4a4iyld76jz10qz07sycklflq3")
+ (("NUnitLite" "nunit-lite") "a977ca57572c545e108b56ef32aa3f7ff8287611"
+ "02zwdfpw8pazllwbp4hkzqwfql98g4854diykqdb9wa0vrb8w4sj")
+ ;; ("roslyn-binaries" "1c6482470cd219dcc7503259a20f26a1723f20ec"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "8f6e62e1c016dfb15420852e220e07091923734a"
+ ;; "")
+ ))
+
+(define-public mono-6.12.0
+ (package
+ (inherit mono-5.10.0)
+ (version "6.12.0.206")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "6.12.0.206"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1cw9v53bgbc6v7xmp5ij76y6inb6sz1g1zx2jk825rxshq96alvk"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-6.12.0-external-repo-specs)
+ #$@prepare-mono-source-0))
+ (patches
+ (search-patches
+ "mono-6.12.0-fix-ConditionParser.patch"
+ "mono-6.12.0-add-runpath.patch"
+ "mono-6.12.0-fix-AssemblyResolver.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.10.0)
+ (replace "mono" mono-5.10.0)
+ (append (default-python))))
+ (inputs (modify-inputs (package-inputs mono-5.10.0)
+ (append libgdiplus)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-5.10.0)
+ ((#:make-flags make-flags #~'())
+ #~(append #$make-flags
+ (list
+ (string-append "PLATFORM_DISABLED_TESTS="
+ ;; segfaults (!), reason unknown
+ "safehandle.2.exe"
+ ;; unclear why these fail
+ "bug-10834.exe"
+ "bug-60848.exe"
+ ;; these are tests of microsoft
+ ;; telemetry. They fail because
+ ;; microsoft telemetry is only
+ ;; enabled on OSX. No idea why
+ ;; these tests are run by default.
+ "merp-crash-test.exe"
+ "merp-json-valid.exe"))))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (delete 'patch-sub-autogen.sh-shebang)
+ ;; Our 5.10.0 compiler has been rather souped up.
+ (add-after 'unpack 'disable-profile-version-check
+ (lambda _
+ (substitute* "mcs/build/common/basic-profile-check.cs"
+ (("min_mono_version = .*")
+ "min_mono_version = new Version (0, 0);\n"))))
+ (add-after 'unpack 'disable-c#-8.0-tests
+ ;; These aren't compilable by mcs
+ (lambda _
+ (substitute* "mono/mini/Makefile.am.in"
+ (("-langversion:8\\.0")
+ ""))
+ (substitute* "mono/tests/Makefile.am"
+ ((" (dim-generic|dim-issue-18917|interface-2|delegate18|generic-unmanaged-constraint|async-generic-enum)\\.cs.*")
+ ""))))
+ (add-after 'unpack 'disable-verification-error
+ (lambda _
+ ;; For some reason verification fails complaining about a bunch
+ ;; of missing icalls.
+ (substitute* "runtime/Makefile.am"
+ ((" fi; done; done;")
+ " fi; done; done; ok=:;"))))
+ ;; This requires binary blobs to be used, it doesn't provide a
+ ;; clear way to regenerate them and no corresponding source is
+ ;; linked, plus from what little I know of it it sounds like it's
+ ;; not something we need at all?
+ (add-after 'unpack 'disable-helix-client
+ (lambda _
+ (substitute* "mcs/tools/Makefile"
+ (("mono-helix-client")
+ ""))))
+ (replace 'build-reference-assemblies
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (let ((top (getcwd)))
+ (with-directory-excursion
+ "external/binary-reference-assemblies"
+ (substitute* (find-files "." "^Makefile$")
+ (("CSC_COMMON_ARGS := " all)
+ (string-append all "-delaysign+ "))
+ (("IBM\\.Data\\.DB2_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Mono\\.Data\\.Sqlite_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.DataSetExtensions_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Data\\.OracleClient_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.IdentityModel_REFS := " all)
+ (string-append all "System.Configuration "))
+ (("System\\.Design_REFS := " all)
+ (string-append all "Accessibility "))
+ (("System\\.Web\\.Extensions\\.Design_REFS := " all)
+ (string-append all "System.Windows.Forms System.Web "))
+ (("System\\.ServiceModel\\.Routing_REFS := " all)
+ (string-append all "System.Xml "))
+ (("System\\.Web\\.Abstractions_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Reactive\\.Windows\\.Forms_REFS := " all)
+ (string-append all "System "))
+ (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all)
+ (string-append all "Accessibility "))
+ (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Dynamic\\.Runtime_REFS := " all)
+ (string-append all "System "))
+ (("Facades/System\\.Xml\\.XDocument_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all)
+ (string-append all "System.Xml "))
+ (("Facades/System\\.Data\\.Common_REFS := " all)
+ (string-append all "System System.Xml ")))
+ (substitute* "build/monodroid/Makefile"
+ (("ECMA_KEY := \\.\\./\\.\\./\\.\\./\\.\\./\\.\\./mono/")
+ ;; it should only be 4 directories up, and it's in
+ ;; mcs/, not mono/mcs/
+ "ECMA_KEY := ../../../../"))
+ (apply invoke "make" "CSC=mcs" make-flags)))))
+ (replace 'check
+ (lambda* (#:key tests? (make-flags '()) #:allow-other-keys)
+ (when tests?
+ ;; There are more tests than these, but they depend on
+ ;; external/xunit-binaries, so we limit ourselves to the
+ ;; tests that debian runs.
+ (with-directory-excursion "mono/mini"
+ (apply invoke "make" "check" make-flags))
+ (with-directory-excursion "mono/tests"
+ (apply invoke "make" "check" make-flags)))))))))))
diff --git a/gnu/packages/patches/mono-6.12.0-add-runpath.patch b/gnu/packages/patches/mono-6.12.0-add-runpath.patch
new file mode 100644
index 00000000000..3062bd6a0de
--- /dev/null
+++ b/gnu/packages/patches/mono-6.12.0-add-runpath.patch
@@ -0,0 +1,185 @@
+mono: metadata: add <runpath> element to .config files.
+
+This new element is of the form:
+
+<runpath path="/path1/to/libs:/path2/to/libs:..."/>
+
+(the : will actually be whatever G_SEARCHPATH_SEPARATOR_S is, so likely ; on
+windows and : elsewhere).
+
+* mono/metadata/metadata-internals.h (struct _MonoImage): new 'runpath' field.
+* mono/metadata/mono-config.c (runpath_init, runpath_start, runpath_handler):
+ new functions and parser using them to populate runpath field from <runpath>
+ element.
+ (mono_config_init): register runpath_handler.
+* mono/metadata/assembly.c (mono_assembly_load_full_gac_base_default): new
+ 'requesting' parameter, use it to search the requesting assembly's runpath
+ first.
+ (mono_assembly_request_byname_nosearch): use it.
+
+
+diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c
+index f9feaacf2c1..8c71ad0eb95 100644
+--- a/mono/metadata/assembly.c
++++ b/mono/metadata/assembly.c
+@@ -376,7 +376,7 @@ mono_assembly_invoke_search_hook_internal (MonoAssemblyLoadContext *alc, MonoAss
+ static MonoAssembly*
+ mono_assembly_request_byname_nosearch (MonoAssemblyName *aname, const MonoAssemblyByNameRequest *req, MonoImageOpenStatus *status);
+ static MonoAssembly*
+-mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, const char *basedir, MonoAssemblyLoadContext *alc, MonoAssemblyContextKind asmctx, MonoImageOpenStatus *status);
++mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, MonoAssembly *requesting, const char *basedir, MonoAssemblyLoadContext *alc, MonoAssemblyContextKind asmctx, MonoImageOpenStatus *status);
+ static MonoAssembly*
+ chain_redirections_loadfrom (MonoAssemblyLoadContext *alc, MonoImage *image, MonoImageOpenStatus *out_status);
+ static MonoAssembly*
+@@ -4655,7 +4655,7 @@ mono_assembly_request_byname_nosearch (MonoAssemblyName *aname,
+ }
+
+ #ifndef ENABLE_NETCORE
+- result = mono_assembly_load_full_gac_base_default (aname, req->basedir, req->request.alc, req->request.asmctx, status);
++ result = mono_assembly_load_full_gac_base_default (aname, req->requesting_assembly, req->basedir, req->request.alc, req->request.asmctx, status);
+ #endif
+ return result;
+ }
+@@ -4667,6 +4667,7 @@ mono_assembly_request_byname_nosearch (MonoAssemblyName *aname,
+ */
+ MonoAssembly*
+ mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname,
++ MonoAssembly *requesting,
+ const char *basedir,
+ MonoAssemblyLoadContext *alc,
+ MonoAssemblyContextKind asmctx,
+@@ -4718,6 +4719,23 @@ mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname,
+ filename = g_strconcat (aname->name, ext, (const char*)NULL);
+ }
+
++ if (requesting
++ && requesting->image
++ && requesting->image->runpath) {
++ char **runpath = requesting->image->runpath;
++ int j;
++ for (j = 0; runpath[j]; j++) {
++ fullpath = g_build_filename (runpath[j], filename, NULL);
++ result = mono_assembly_request_open (fullpath, &req, status);
++ g_free (fullpath);
++ if (result) {
++ result->in_gac = FALSE;
++ g_free (filename);
++ return result;
++ }
++ }
++ }
++
+ #ifndef DISABLE_GAC
+ const gboolean refonly = asmctx == MONO_ASMCTX_REFONLY;
+
+diff --git a/mono/metadata/image.c b/mono/metadata/image.c
+index e0b86dd3d09..12a8094e4e0 100644
+--- a/mono/metadata/image.c
++++ b/mono/metadata/image.c
+@@ -2363,6 +2363,9 @@ mono_image_close_except_pools (MonoImage *image)
+
+ mono_metadata_clean_for_image (image);
+
++ if (image->runpath)
++ g_strfreev (image->runpath);
++
+ /*
+ * The caches inside a MonoImage might refer to metadata which is stored in referenced
+ * assemblies, so we can't release these references in mono_assembly_close () since the
+diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h
+index 9388d69b0fd..93f4b880c61 100644
+--- a/mono/metadata/metadata-internals.h
++++ b/mono/metadata/metadata-internals.h
+@@ -423,6 +423,12 @@ struct _MonoImage {
+ /**/
+ MonoTableInfo tables [MONO_TABLE_NUM];
+
++ /*
++ Search path to be tried first when looking for assemblies referenced by
++ this image, or NULL. Is a NULL-terminated vector.
++ */
++ char **runpath;
++
+ /*
+ * references is initialized only by using the mono_assembly_open
+ * function, and not by using the lowlevel mono_image_open.
+diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c
+index d973de53c8c..8888c7b4fac 100644
+--- a/mono/metadata/mono-config.c
++++ b/mono/metadata/mono-config.c
+@@ -21,6 +21,7 @@
+ #include "mono/metadata/metadata-internals.h"
+ #include "mono/metadata/object-internals.h"
+ #include "mono/utils/mono-logger-internals.h"
++#include "mono/utils/mono-path.h"
+
+ #if defined(TARGET_PS3)
+ #define CONFIG_OS "CellOS"
+@@ -464,6 +465,59 @@ aot_cache_handler = {
+ NULL, /* finish */
+ };
+
++static void*
++runpath_init (MonoImage *assembly)
++{
++ return assembly;
++}
++
++static void
++runpath_start (gpointer user_data,
++ const gchar *element_name,
++ const gchar **attribute_names,
++ const gchar **attribute_values)
++{
++ MonoImage *assembly = (MonoImage *) user_data;
++ int i;
++
++ if (strcmp (element_name, "runpath") != 0)
++ return;
++
++ for (i = 0; attribute_names[i]; i++)
++ {
++ if(!strcmp (attribute_names [i], "path"))
++ {
++ char **splitted, **dest;
++
++ splitted = g_strsplit (attribute_values[i],
++ G_SEARCHPATH_SEPARATOR_S,
++ 1000);
++ if (assembly->runpath)
++ g_strfreev (assembly->runpath);
++ assembly->runpath = dest = splitted;
++ while (*splitted) {
++ char *tmp = *splitted;
++ if (*tmp)
++ *dest++ = mono_path_canonicalize (tmp);
++ g_free (tmp);
++ splitted++;
++ }
++ *dest = *splitted;
++ break;
++ }
++ }
++}
++
++static const MonoParseHandler
++runpath_handler = {
++ "runpath",
++ runpath_init,
++ runpath_start,
++ NULL
This message was truncated. Download the full message here.
A
A
Adam Faiz wrote on 17 Dec 2024 02:37
Merge old C# bootstrapping effort with the newest one
(address . control@debbugs.gnu.org)
0179582a-16f6-4380-79ba-96c253751af2@disroot.org
merge 57625 74609
thankyou
U
U
unmush wrote on 20 Dec 2024 06:12
V2 series
(name . 74609@debbugs.gnu.org)(address . 74609@debbugs.gnu.org)
2Zx39DgdkCBWdzQR1QSV4eAxPs98sBBj43GTHCUKL3lvKNunS5hQwqkEpvrKSg1W-hlzxdx5RNwlrn5_ILHPHYidzwx_8oCkmzzXxyk6y8M=@proton.me
Efraim writes:

Toggle quote (3 lines)
> It turns out the first 2 patches didn't apply cleanly, so I fixed that
> up and I'm sending them back to the list.

It turns out that git wants to do a full 3-way merge when applying patches, and
I formatted the patches from my local repository which has a bunch of extra
commits in it that touch gnu/local.mk, so the generated patch referenced a file
hash that didn't exist upstream.

Toggle quote (4 lines)
> A couple of things that I noticed:
>
> * mono-5.something doesn't have its patches apply cleanly

mono-5.10's patches didn't apply cleanly because some of the mono sources being
patched used CRLF line endings, and git normalized those in the
patch-containing-the-patch. This time around I've tried first running "git
config core.autocrlf false", hopefully that fixes it. Note that you'll need to
pass '--keep-cr' to 'git am'.

Toggle quote (3 lines)
> * I was only able to build to mono-3.12 before I got a build failure on
> x86_64

After some discussion in #guix we discovered that the cause for this was that
parallel builds weren't properly supported. I didn't encounter these failures
very much on my own system because I used --keep-failed, which disabled
offloading so that they were built on my rather weak 4-core system. I
have since tested without --keep-failed and found consistent built failures with
'#:parallel-build? #t' all the way up to and including mono-5.10.0, so I've
passed '#:parallel-build? #f' to all of those.

I have, however, added `"-j" (number->string (parallel-job-count))' to the
build-reference-assemblies phase, since that phase takes quite a long time and
doesn't seem to have any trouble with parallel builds.

Toggle quote (3 lines)
> * mono-1.2.6 doesn't have support for aarch64 or riscv64, and will
> probably need some patches (later) to add support.

Old versions of mono do technically have an interpreter, but by mono-1.2.6 it's
already bitrotted to the point of not working (it's not only missing several
includes, it also refers to nonexistent fields and procedures that seem to have
been since renamed). They eventually fully deleted the interpreter in 2014 in
commit 6bee6a7b18978aa6ce977b8b0f9ce19cf962f36b, only to later revive it in 2017
fixed up mono 1.2.6's interpreter, we'd need to also get it working for each
version up to 2017 in order to achieve a fully portable bootstrap path.

One alternative option could be some variety of frankenmono: either trying to
backport 2017's interpreter to older versions of mono, or trying to run an old
mono compiler / class library with a newer mono runtime. Mono's class library
depends on runtime-specific icalls, which may have changed over time in a
non-backwards-compatible way, which could hinder the latter attempt. The
implementation of those icalls, additionally, is probably going to depend on
code that is also depended on by the interpreter, so replacing runtime internals
to more easily suit the backported interpreter may also require updating those,
which could hinder the former attempt.

Another possibility would be trying to use pnet's ilrun for mono versions up to
2017, but this would run in to the same issues with runtime-specific icalls, so
either mono's class library would need to be adjusted to be able to use pnet's
icalls, or mono's icalls would have to be ported to pnet's ilrun, or mcs would
have to be adjusted to not depend on anything mono-specific (if it doesn't
already).

That last possibility may be one of the most interesting, as compilers usually
don't need many fancy runtime features (they are after all a very basic batch
input-output process that usually solely touches files), and this would
effectively strip every intermediate mono build down to just building
mcs. Additionally, if the build could be stripped down to just building mcs, we
wouldn't need to support the new features used by the class library, which would
allow us to make much bigger jumps between versions. The sheer amount of work
saved may end up more than making up for ilrun's lower performance.

Toggle quote (6 lines)
> * libjit FTBFS on powerpc64le. I tried working around it but wasn't
> successful in when it came to using libjit.
> * The assembly included in libjit targets a too-early version of arm, so
> it is just broken completely on armhf and would probably do best with it
> being ripped out.

libjit is the one component of Portable.NET that outlived its parent project,
and it's been updated as recently as 2020. It's supposed to fall back to
interpreting on architectures it doesn't support, so it could be that the only
changes that need to be made are to refine its detection process. In the
meantime, I've adjusted pnet-git to not use libjit on all non-x86 platforms,
instead using pnet's own Converted Virtual Machine (CVM) interpreter. This was
buggy when using its "unroller" functionality, which requires a small amount of
platform-specific code anyway, so I disabled that. This also caused a subtle
change in pnetlib-git's test suite, so that a test that previously failed is now
properly reported as failing, so I disabled that (it failed due to requiring
libx11 and an X server, and due to no provision being made for it to find a .so
produced by pnetlib that interfaces with libx11).



A V2 series is attached. Note: the full series in one message was rejected by debbugs moderators, but presumably made it through to the other CC'ed recipients. I'm splitting it across some more messages in the hope that it will go through that way. There should be 21 patches in total.
From f8b05606513f2df1a3d085f90bdd953c8e202ae9 Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 12:13:32
Subject: [PATCH v2 01/21] gnu: add treecc.

* gnu/packages/dotnet.scm: new module.
(treecc): new package.
* gnu/local.mk (GNU_SYSTEM_MODULES): add new module.
---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 62 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
create mode 100644 gnu/packages/dotnet.scm

Toggle diff (82 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index fbe9dfbb0ef..9ebe49ca864 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -243,6 +243,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/dhall.scm \
%D%/packages/dico.scm \
%D%/packages/dictd.scm \
+ %D%/packages/dotnet.scm \
%D%/packages/dictionaries.scm \
%D%/packages/diffoscope.scm \
%D%/packages/digest.scm \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
new file mode 100644
index 00000000000..3084e1cf3a5
--- /dev/null
+++ b/gnu/packages/dotnet.scm
@@ -0,0 +1,62 @@
+(define-module (gnu packages dotnet)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages assembly)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bdw-gc)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages icu4c)
+ #:use-module (gnu packages instrumentation)
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages photo)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages version-control)
+ #:use-module (gnu packages)
+ #:use-module (guix modules)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (ice-9 match))
+
+(define-public treecc
+ (package
+ (name "treecc")
+ (version "0.3.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay"))))
+ (build-system gnu-build-system)
+ (home-page "https://www.gnu.org/software/dotgnu")
+ (synopsis "Tree Compiler-Compiler.")
+ (description "The treecc program is designed to assist in the development
+of compilers and other language-based tools. It manages the generation of
+code to handle abstract syntax trees and operations upon the trees.")
+ (license license:gpl2+)))
--
2.45.2
From 7fd3eb19130d60075e24c1c2b0bd0367386d50ba Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 12:53:23
Subject: [PATCH v2 03/21] gnu: Add pnetlib-git.

* gnu/packages/dotnet.scm (pnetlib-git): New variable.

---
gnu/packages/dotnet.scm | 81 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)

Toggle diff (91 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index fd0d71bfe69..9d9cc5421b0 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -184,3 +184,84 @@ (define-public pnet-git
to build and execute .NET applications, including a C# compiler,
assembler, disassembler, and runtime engine.")
(license license:gpl2+))))
+
+(define-public pnetlib-git
+ (let ((version "0.8.0")
+ (commit "c3c12b8b0c65f5482d03d6a4865f7670e98baf4c")
+ (revision "0"))
+ (package
+ (name "pnetlib-git")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://git.savannah.gnu.org/git/dotgnu-pnet/pnetlib.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04dikki3lr3m1cacirld90rpi95656b2y2mc5rkycb7s0yfdz1nk"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (for-each delete-file (filter file-exists?
+ '("configure"
+ "config.guess"
+ "config.sub"
+ "install-sh"
+ "ltmain.sh")))
+ (for-each delete-file (find-files "." "Makefile(\\.in)?$"))
+ (substitute* (find-files "tests" "^Makefile\\.am$")
+ (("TESTS_ENVIRONMENT.*")
+ (string-append
+ "LOG_COMPILER = $(SHELL)\n"
+ "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh"
+ " $(top_builddir)")))
+ (substitute* "tools/run_test.sh.in"
+ (("en_US") "en_US.utf8"))
+ (substitute* "tools/wrapper.sh.in"
+ (("exec .LN_S clrwrap ..1." all)
+ (string-append
+ "echo '#!@SHELL@' >> $1\n"
+ "echo exec $CLRWRAP"
+ " $(dirname $(dirname $1))"
+ "/lib/cscc/lib/$(basename $1).exe >> $1\n"
+ "chmod +x $1")))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-x11-tests
+ (lambda _
+ (substitute* "tests/Makefile.am"
+ ;; This actually always fails, for a number of
+ ;; reasons:
+ ;; 1. We have no libx11 present, nor do we have an X display
+ ;; present. This will cause libXsharpSupport.so to be
+ ;; built with only shims that fail at runtime.
+ ;; 2. No mechanism is provided for
+ ;; tests/System.Windows.Forms/TestForms.dll to find
+ ;; libXsharpSupport.so, which seems to sit at
+ ;; Xsharp/.libs/libXsharpSupport.so.
+ ;; With a libjit pnet,
+ ;; System.Drawing.Toolkit.ToolkitHandler.CreateDefaultToolkit
+ ;; throws ArgumentNullException when invoking Assembly.Load,
+ ;; while a cvm pnet instead succeeds temporarily, but then
+ ;; fails when invoking
+ ;; System.Drawing.Toolkit.DrawingToolkit..ctor. For some
+ ;; reason this results in csunit passing the former and
+ ;; failing the latter.
+ (("System\\.Windows\\.Forms") "")))))))
+ (native-inputs
+ (list autoconf automake libtool treecc))
+ (inputs
+ (list pnet-git))
+ (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html")
+ (synopsis "Libraries for the C# programming language")
+ (description
+ "DotGNU Portable.NET Library contains an implementation of the C# library,
+for use with .NET-capable runtime engines and applications.")
+ (license license:gpl2+))))
--
2.45.2
From f13ff502f887d3167c2f482c2b851881c17547e4 Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:04:13
Subject: [PATCH v2 07/21] gnu: Add mono-2.6.4.

* gnu/dotnet.scm (mono-2.6.4): New variable.
* gnu/packages/patches/mono-2.6.4-fixes.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

---
gnu/local.mk | 1 +
gnu/packages/dotnet.scm | 23 ++++++++++
gnu/packages/patches/mono-2.6.4-fixes.patch | 49 +++++++++++++++++++++
3 files changed, 73 insertions(+)
create mode 100644 gnu/packages/patches/mono-2.6.4-fixes.patch

Toggle diff (100 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index fa99696e338..99e106df8fc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1827,6 +1827,7 @@ dist_patch_DATA = \
%D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \
%D%/packages/patches/mono-1.9.1-fixes.patch \
%D%/packages/patches/mono-2.4.2.3-fixes.patch \
+ %D%/packages/patches/mono-2.6.4-fixes.patch \
%D%/packages/patches/mosaicatcher-unbundle-htslib.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
%D%/packages/patches/mtools-mformat-uninitialized.patch \
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index ac4dfb67c4c..82bee55aa90 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -522,3 +522,26 @@ (define-public mono-2.4.2
license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
;; mcs/jay
license:bsd-4))))
+
+(define-public mono-2.6.4
+ (package
+ (inherit mono-2.4.2)
+ (version "2.6.4")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "2.6.4"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17977w45qh8jmfsl4bhi83si4fxd8s3x8b0pxnwdzjv3bqr54c85"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet prepare-mono-source)
+ (patches
+ (search-patches "mono-2.6.4-fixes.patch"))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.4.2)
+ (replace "mono" mono-2.4.2)))))
diff --git a/gnu/packages/patches/mono-2.6.4-fixes.patch b/gnu/packages/patches/mono-2.6.4-fixes.patch
new file mode 100644
index 00000000000..e802c8bb7e4
--- /dev/null
+++ b/gnu/packages/patches/mono-2.6.4-fixes.patch
@@ -0,0 +1,49 @@
+diff --git a/data/mono.pc.in b/data/mono.pc.in
+index 01e0a9e5d41..d43bb187218 100644
+--- a/data/mono.pc.in
++++ b/data/mono.pc.in
+@@ -7,8 +7,6 @@ sysconfdir=@sysconfdir@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-## Commented out because SLE hides devel files in the SLE SDK,
+-## which not all customers will have.
+-#Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I${includedir} @libmono_cflags@
+diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in
+index 7fa3f12dc91..2a0734362fd 100644
+--- a/mono-uninstalled.pc.in
++++ b/mono-uninstalled.pc.in
+@@ -1,6 +1,6 @@
+ Name: Mono
+ Description: Mono Runtime
+ Version: @VERSION@
+-Requires: glib-2.0 gthread-2.0
++Requires: glib-2.0 gthread-2.0 bdw-gc
+ Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@
+ Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@
+diff --git a/mono/mini/driver.c b/mono/mini/driver.c
+index c4e7f4ccdb3..bb705c0d1fc 100644
+--- a/mono/mini/driver.c
++++ b/mono/mini/driver.c
+@@ -1302,6 +1302,7 @@ mono_main (int argc, char* argv[])
+ #endif
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
++ GC_allow_register_threads();
+
+ if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
+ GMemVTable mem_vtable;
+diff --git a/runtime/Makefile.am b/runtime/Makefile.am
+index da0c0e8671d..9d0deaf182f 100644
+--- a/runtime/Makefile.am
++++ b/runtime/Makefile.am
+@@ -1,6 +1,3 @@
+-# hack to prevent 'check' from depending on 'all'
+-AUTOMAKE_OPTIONS = cygnus
+-
+ tmpinst = _tmpinst
+
+ noinst_SCRIPTS = mono-wrapper monodis-wrapper
--
2.45.2
From 4017125ae45aeaf4388944c41192d1989e7d25ac Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:13:40
Subject: [PATCH v2 09/21] gnu: Add mono-3.0.

* gnu/packages/dotnet.scm
(mono-3.0.12-external-repo-specs, mono-3.0): New variables.

---
gnu/packages/dotnet.scm | 63 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index f97567dc29f..1dd82703b91 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -640,3 +640,66 @@ (define-public mono-2.11.4
license:bsd-4
;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
license:asl2.0))))
+
+(define mono-3.0.12-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ ;; if reponame starts with https:// it is treated as the repository url,
+ ;; otherwise the name of a repository under https://github.com/mono/
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705"
+ "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ (("ikvm-fork" "ikvm") "10b8312c8024111780ee382688cd4c8754b1f1ac"
+ "025wf9gjgfvrq42vgw91ahy3cmzcw094vx783dsp7gjdyd8q09nm")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "17e8477b2cb8dd018d49a567526fe99fd2897857"
+ "0fyyy4jf0mma6kff6fvbvdcs5ra1bz4s063nvjjva9xlnv7sjvh4")))
+
+(define-public mono-3.0
+ (package
+ (inherit mono-2.11.4)
+ (version "3.0.12")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.0.12"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "110f3hcfikk6bxbrgjas5dqldci9f24gvm3vdgn4j9j7xhlcx1lj"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.0.12-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-2.11.4)
+ (replace "mono" mono-2.11.4)))
+ (license (list
+ ;; most of mcs/tools, mono/man, most of mcs/class, tests by
+ ;; default, mono/eglib, mono/metadata/sgen*,
+ ;; mono/arch/*/XXX-codegen.h
+ ;; mcs/mcs, mcs/gmcs (dual-licensed GPL)
+ ;; samples
+ license:x11
+ ;; mcs/mcs, mcs/gmcs (dual-licensed X11)
+ ;; some of mcs/tools
+ license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version
+ ;; mono/mono (the mono VM, I think they meant mono/mini)
+ ;; mono/support (note: directory doesn't exist, probably meant
+ ;; ./support, but that contains a copy of zlib?)
+ license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version
+ ;; mcs/jay
+ license:bsd-4
+ ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+ license:asl2.0
+ ;; ./support, contains a copy of zlib
+ license:zlib))))
--
2.45.2
From e6f255c9e1199a69ec780ef28e987db88d117320 Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:14:35
Subject: [PATCH v2 10/21] gnu: Add mono-3.12.1.

* gnu/packages/dotnet.scm
(mono-3.12.1-external-repo-specs, mono-3.12.1): New variables.

---
gnu/packages/dotnet.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 1dd82703b91..5375ec412e3 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -703,3 +703,55 @@ (define-public mono-3.0
license:asl2.0
;; ./support, contains a copy of zlib
license:zlib))))
+
+(define mono-3.12.1-external-repo-specs
+ ;; format: ({reponame OR (reponame dir-name)} commit sha256) ...
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ ("cecil" "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd"
+ "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7")
+ ("ikdasm" "7ded4decb9c39446be634d42a575fda9bc3d945c"
+ "0f3mbfizxmvr5njj123w0wn7sz85v5q2mzwijjql8w1095i0916l")
+ (("ikvm-fork" "ikvm") "22534de2098acbcf208f6b06836d122dab799e4b"
+ "1ivywy5sc594sl3bs9xrkna1dbhkp7v1mv79n96ydgq6zcs0698l")
+ ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df"
+ "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ ("rx" "00c1aadf149334c694d2a5096983a84cf46221b8"
+ "0ndam0qrnkb4gj21lapqgcy0mqw7s18viswsjyjyaaa4fgqw8kmq")))
+
+(define-public mono-3.12.1
+ (package
+ (inherit mono-3.0)
+ (version "3.12.1")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit (string-append "mono-" "3.12.1"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01sxrnfch61k8v7av7ccbmy3v37ky8yp8460j6ycnbyfa3305y0f"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-3.12.1-external-repo-specs)
+ #$prepare-mono-source))))
+ (native-inputs (modify-inputs (package-native-inputs mono-3.0)
+ (replace "mono" mono-3.0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mono-3.0)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-TZ
+ (lambda _
+ ;; for some reason a default is only used if this is empty, not
+ ;; if it is unset.
+ (setenv "TZ" "")))))))))
--
2.45.2
U
U
unmush wrote on 20 Dec 2024 06:13
V2 series part 2
(name . 74609@debbugs.gnu.org)(address . 74609@debbugs.gnu.org)
glfA5q0a-GvIrFdsK5HCC_oZfv1ZCU0lsxsMhsw2vC2ugrPLFbvypqa-jLugX6HzHGJLoHYaz3lnL1yRtIfPyCAQuC3TXeFy0JceFCoUXJo=@proton.me
Here are the remaining patches
From 6c3aad70ba6576fc612967e68a0df4cdcc5f3acc Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:33:38
Subject: [PATCH v2 14/21] gnu: Add mono-5.2.0.

* gnu/packages/dotnet.scm
(mono-5.2.0-external-repo-specs, mono-5.2.0): New variables.

---
gnu/packages/dotnet.scm | 67 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (77 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index e70a6f0e55f..bf1414368b3 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1092,3 +1092,70 @@ (define-public mono-5.1.0
#$@prepare-mono-source-0))))
(native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
(replace "mono" mono-5.0.1)))))
+
+(define mono-5.2.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2"
+ "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9")
+ ("bockbuild" "45aa142fa322f5b41051e7f40008f03346a1e119"
+ "1sjlgzh3hq251k729a1px707c1q2gnfayghgx1z5qyddnyaxna20")
+ ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff"
+ "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "362e2bb00fa693d04c2d140a4cd313eb82c78d95"
+ "0bvaavlnldrja8ixb66bg33kz05950vm5sk4pz0k0zjgspfgpcvd")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "78360b22e71b70de1d8cc9588cb4ef0040449c31"
+ "1wrszafyar7q1cdfba68xd6b4d54p3iim2czmxblms1yw19ycqm7")
+ ("corert" "ed6296dfbb88d66f08601c013caee30c88c41afa"
+ "179q1aiq44bzdckg1xqm6iwyx835cp6161w5vgsfrgbw0p3kidxr")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "c7450ca2669becddffdea7dcdcc06692e57989e1"
+ "0vd1vw6hqm1p127m6079p9n4xrckrf4iakvj41hnqfwws94w5mv1")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "8d307472ea214f2b59636431f771894dbcba7258"
+ "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "dcb0a0534d5104eaf945d3d1f319dc33044b7bbe"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.2.0
+ (package
+ (inherit mono-5.1.0)
+ (version "5.2.0.224")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit "mono-5.2.0.224")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zsgfqyjkpix05gvgvhqyyqcwcjp5xlvcyv471q32qf307dccbfa"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.2.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.1.0)
+ (replace "mono" mono-5.1.0)))))
--
2.45.2
From b16d372038b67f43be8e565b1c43511167018a6f Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Tue, 26 Nov 2024 13:29:31
Subject: [PATCH v2 13/21] gnu: Add mono-5.1.0.

* gnu/packages/dotnet.scm
(mono-5.1.0-external-repo-specs, mono-5.1.0): New variables.
---
gnu/packages/dotnet.scm | 68 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index fafc106822b..e70a6f0e55f 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1024,3 +1024,71 @@ (define-public mono-5.0.1
" "
top "/mcs/class/lib/build/mcs.exe")
,@make-flags))))))))))))
+
+(define mono-5.1.0-external-repo-specs
+ '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299"
+ "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1")
+ (("reference-assemblies" "binary-reference-assemblies")
+ "febc100f0313f0dc9d75dd1bcea45e87134b5b55"
+ "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4")
+ ("bockbuild" "fd1d6c404d763c98b6f0e64e98ab65f92e808245"
+ "0l2n9863j5y20lp3fjcpbb0a9jcfk0kqmnzlsw20qchd05rjgyb0")
+ ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998"
+ "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc")
+ ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479"
+ "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06")
+ ("cecil" "44bc86223530a07fa74ab87007cf264e53d63400"
+ "0smsa8i4709y1nky3hshj7ayxhjcc17wlnfdvhfay7ly5dxml84g")
+ (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1"
+ "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb")
+ ("corefx" "63c51e726292149b4868db71baa883e5ad173766"
+ "1406rbra83k6gw2dnnsfqcfwiy1h89y6lq64ma5rckmb5drb0ng9")
+ ("corert" "31eda261991f9f6c1add1686b6d3799f835b2978"
+ "0s0pd4m9070xlx238fdhqf2b3iyd2vzff3f0sxlyi8s0lhsrl8zv")
+ ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166"
+ "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw")
+ (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82"
+ "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn")
+ ("linker" "1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615"
+ "1xx6s8dcgcz803yvqgzhcgmj16c9s8vrvvl8k4y0xma5w51kn23k")
+ ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284"
+ "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii")
+ ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4"
+ "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s")
+ (("NuGet.BuildTasks" "nuget-buildtasks")
+ "04bdab55d8de9edcf628694cfd2001561e8f8e60"
+ "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775")
+ (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee"
+ "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc")
+ ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46"
+ ;; "")
+ ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e"
+ "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv")
+ ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388"
+ ;; "")
+ ))
+
+(define-public mono-5.1.0
+ (package
+ (inherit mono-5.0.1)
+ (version "5.1.0")
+ (name "mono")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.winehq.org/mono/mono.git")
+ (commit
+ "6fafd08b507c56f11a2eb6570703a39e5bdc0a81")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sxq40nay5ghhmfbdln98iri19y0h7q36r3pqnxmxnm94livx2k5"))
+ (modules '((guix build utils)
+ (ice-9 string-fun)))
+ (snippet #~(begin
+ #$(add-external-repos
+ mono-5.1.0-external-repo-specs)
+ #$@prepare-mono-source-0))))
+ (native-inputs (modify-inputs (package-native-inputs mono-5.0.1)
+ (replace "mono" mono-5.0.1)))))
--
2.45.2
From 9a1da50e3abc73624083dc8f827aa3eb8f9cb40f Mon Sep 17 00:00:00 2001
From: unmush <unmush@hashbang.sh>
Date: Wed, 27 Nov 2024 00:56:00
Subject: [PATCH v2 20/21] gnu: Add libgdiplus.

* gnu/packages/dotnet.scm (libgdiplus): New variable.
---
gnu/packages/dotnet.scm | 44 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm
index 321b71236d8..9c38a83cc64 100644
--- a/gnu/packages/dotnet.scm
+++ b/gnu/packages/dotnet.scm
@@ -1661,3 +1661,47 @@ (define-public mono-5.10.0
'())
"CSC=mcs"
,@make-flags))))))))))))
+
+(define-public libgdiplus
+ (package
+ (name "libgdiplus")
+ (version "6.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mono/libgdiplus.git")
+ (commit "94a49875487e296376f209fe64b921c6020f74c0")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gwmhrddr8kdlfprjqcd6gqiy8p5v8sl9215dbd949j1l76szl9v"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "./Makefile.am"
+ (("\\./update_submodules\\.sh")
+ ":")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list automake
+ autoconf
+ googletest-1.8
+ libtool
+ pkg-config
+ which))
+ (inputs (list cairo
+ freetype
+ fontconfig
+ gettext-minimal
+ giflib
+ glib
+ libexif
+ libjpeg-turbo
+ libpng
+ libtiff
+ libx11))
+ (synopsis "Open Source implementation of the GDI+ API")
+ (description "Libgdiplus is the Mono library that provides a
+GDI+-compatible API on non-Windows operating systems. It uses Cairo to do
+most of the heavy lifting.")
+ (home-page "https://github.com/mono/libgdiplus")
+ (license license:expat)))
--
2.45.2
L
L
Ludovic Courtès wrote on 21 Dec 2024 12:03
Re: [bug#74609] [PATCH 00/21] mono bootstrap
(name . Efraim Flashner)(address . efraim@flashner.co.il)
8734ihi9hm.fsf@gnu.org
Hi Efraim,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (9 lines)
> It turns out the first 2 patches didn't apply cleanly, so I fixed that
> up and I'm sending them back to the list.
>
> A couple of things that I noticed:
>
> * mono-5.something doesn't have its patches apply cleanly
> * I was only able to build to mono-3.12 before I got a build failure on
> x86_64

Oh, that looks like half of the chain. Could you share the error with
unmush? Does it fail reproducibly?

Toggle quote (8 lines)
> * mono-1.2.6 doesn't have support for aarch64 or riscv64, and will
> probably need some patches (later) to add support.
> * libjit FTBFS on powerpc64le. I tried working around it but wasn't
> successful in when it came to using libjit.
> * The assembly included in libjit targets a too-early version of arm, so
> it is just broken completely on armhf and would probably do best with it
> being ripped out.

Regarding architecture support, that’s fine: we can add a suitably
restrictive ‘supported-systems’ field and improve platform coverage
if/when patches are available.

Thanks,
Ludo’.
E
E
Efraim Flashner wrote on 21 Dec 2024 17:39
(name . Ludovic Courtès)(address . ludo@gnu.org)
Z2bvQrO7SPzFi7_h@3900XT
On Sat, Dec 21, 2024 at 12:03:17PM +0100, Ludovic Courtès wrote:
Toggle quote (16 lines)
> Hi Efraim,
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > It turns out the first 2 patches didn't apply cleanly, so I fixed that
> > up and I'm sending them back to the list.
> >
> > A couple of things that I noticed:
> >
> > * mono-5.something doesn't have its patches apply cleanly
> > * I was only able to build to mono-3.12 before I got a build failure on
> > x86_64
>
> Oh, that looks like half of the chain. Could you share the error with
> unmush? Does it fail reproducibly?

We figured out there was a race condition and now the earlier versions
of mono have parallel-build? #f set.

Toggle quote (15 lines)
> > * mono-1.2.6 doesn't have support for aarch64 or riscv64, and will
> > probably need some patches (later) to add support.
> > * libjit FTBFS on powerpc64le. I tried working around it but wasn't
> > successful in when it came to using libjit.
> > * The assembly included in libjit targets a too-early version of arm, so
> > it is just broken completely on armhf and would probably do best with it
> > being ripped out.
>
> Regarding architecture support, that’s fine: we can add a suitably
> restrictive ‘supported-systems’ field and improve platform coverage
> if/when patches are available.
>
> Thanks,
> Ludo’.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmdm70IACgkQQarn3Mo9
g1ET6w/9GNgk7BuHBZdFxyoN1ceeoOLpHxISK5aQ1QgttXXS5qvpX2UqGWkgsdNN
+WkLBBUHj72xEANElkhlFltlF5jjM0XPrVuqczdY/LtMhAGVUkKLvpuelHTAYBvb
CxmRXXg2MSOBp2m5z6Rj4lOs+hc8fJ0XozhEMwAPZEtdtVZ6SVEnwVEsm0pH0Ket
TygIs/TxiFSLBv2tj2lu1WUgKY8oLaF+1Js77gTBhuLog1hOirYvg3ZXwaOlrRje
7PAd1Ero5Hc8z4EAmHf8wlR+OUEqYao6fiVLdpXUNLZuD33GAsp46no8usqVbN2F
3QhpP/6BgCnns28ET22WCr5eXF/LvUwcxNbjJw5RN9Uw2kEMEI3iDAW+s2p/sxez
O0BHYpw1E1eUbNVwMmv5fkx6W9JbFQa33hM1d9JHofGzTXNt9cRrVER+RIQzXmuc
HCyU18a5BEASo00r406v7d4EzdZdg2kt9y7U9C1toPl5LYSFuBDLcLpne85Qc0Vg
dj8WStYoQwEvK53klqpHqk8WUGvupnaHk5t6Ana1M5CaaKSkJ9k0txhaJ1Gc2s3v
noO1n1503LQaQ11QS0iztJjjKmkRmlG6tPvRoCSUh2ejwqjzSzLfnUq47MvV9Pxd
JzuUN25yfar5iLmNlUqaTIqaaDQee4ILWGMV0iDj4BPfytNxw4w=
=NaWS
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 22 Dec 2024 14:40
Re: V2 series
(name . unmush)(address . unmush@proton.me)
Z2gW3JrUOOAQ0gcp@3900XT
I made a couple of small tweaks and pushed the patches. Welcome back
mono!

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmdoFtwACgkQQarn3Mo9
g1HfdA/5AeM4jnbabYcNsUEEf+k8rH9AjYUtd/PZtdDLy4z5EJQeqBQe+lrwaT9B
pHfj/qbGUiqEW+RUkLHI17DsnP6699oS8MLYt1ex0CSJ13W7DTz+D8Tgnqz5r9Vu
VGxjABNFCf0lT/L+k+VrU9NlL0q4bccDCil6EtePent2lB4H16PBMwl/k/TdeRrv
Eu2W19VHplYttcGp5YAFcT2x8knamwTjb5FlZDq9Cy1xMLZ98INm4moowDc4QZXp
lWJbflBT83xK9uzVsv/q0oqVHs+ATGTGHtG1knhwzoYWKeMDIPur+o3hSkR9gm8Z
8J9AOYFXJCMoMeWfay/7/7Bg+OVh1rSNggAM8iOlXXSXsg8GRM7YR2lNE8aCoUtZ
9qo/NrzWKLC217OFwdLyqaRjwtmiO8DS9iKsuD/eHRj8sWpBE5b9gLA+gS/uKp7+
digAfoUWpVasCQV0QrSp8dqHiVkdZMZRWkc7AGblhEagdAwHe0ZMKxDV/2yNfoVR
fyoOXBEm57pzqoKWBOg5+bRUfSmR59a88qK2dNlZLdpKBYeNbGYyNg5m9K1IQ7GG
/bKglWKcGogkq8ozsJGJt22bYBTsGgDcemI+Fe4x3pfdJdRtdNBpzYqrXp1pfTB0
yP36ngTLz0P/K2h/GCldRB5WOuRutI0IZMKt+GhEom+1l2uBuB0=
=KJbU
-----END PGP SIGNATURE-----


Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74609@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74609
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch