summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
diff options
context:
space:
mode:
authorunmush <[email protected]>2024-11-27 01:37:40 +0200
committerEfraim Flashner <[email protected]>2024-12-22 15:37:35 +0200
commit84df0c4f396bcde7b0d0f5a6bb7455efa4a2f643 (patch)
tree076a0861787655528b4a6344e4e1e4f9a371eea5 /gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
parenta46816dcd155e0544e745deb7256362574fe3154 (diff)
gnu: Add mono-6.12.0.
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.patch, gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch, gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register new patches. Signed-off-by: Efraim Flashner <[email protected]> Change-Id: I937715ad00df17b92137b8cd364652e7d445e22e
Diffstat (limited to 'gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch')
-rw-r--r--gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch b/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
new file mode 100644
index 0000000000..4ecde07d42
--- /dev/null
+++ b/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch
@@ -0,0 +1,46 @@
+diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
+index b5e2e809ae4..757492d15e4 100644
+--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
++++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
+@@ -205,19 +205,30 @@ ConditionExpression ParseFunctionExpression (string function_name)
+ {
+ List <ConditionFactorExpression> list = new List <ConditionFactorExpression> ();
+ ConditionFactorExpression e;
+-
++
++ /* starts looking at the open paren, move past it */
++ tokenizer.GetNextToken ();
++ if (tokenizer.Token.Type == TokenType.RightParen) {
++ /* leave us looking past the end of the argument list */
++ tokenizer.GetNextToken ();
++ return list;
++ }
+ while (true) {
+- tokenizer.GetNextToken ();
+- if (tokenizer.Token.Type == TokenType.RightParen) {
+- tokenizer.GetNextToken ();
+- break;
+- }
+- if (tokenizer.Token.Type == TokenType.Comma)
++ e = (ConditionFactorExpression) ParseFactorExpression ();
++ list.Add (e);
++ /* ParseFactorExpression leaves us looking at what follows the
++ * expression */
++ if (tokenizer.Token.Type == TokenType.RightParen) {
++ /* leave us looking past the end of the argument list */
++ tokenizer.GetNextToken ();
++ break;
++ }
++ if (tokenizer.Token.Type == TokenType.Comma) {
++ tokenizer.GetNextToken ();
+ continue;
+-
+- tokenizer.Putback (tokenizer.Token);
+- e = (ConditionFactorExpression) ParseFactorExpression ();
+- list.Add (e);
++ }
++
++ throw new ExpressionParseException (String.Format ("Unexpected token {0} in argument list while parsing condition \"{1}\"", tokenizer.Token, conditionStr));
+ }
+
+ return list;