svn commit: r373560 - in head/games/openra: . files

Dmitry Marakasov amdmi3 at FreeBSD.org
Fri Nov 28 11:52:46 UTC 2014


Author: amdmi3
Date: Fri Nov 28 11:52:44 2014
New Revision: 373560
URL: https://svnweb.freebsd.org/changeset/ports/373560
QAT: https://qat.redports.org/buildarchive/r373560/

Log:
  - Replace custom patch which fixes ternary operators to upstream one
  
  PR:		195371
  Submitted by:	jbeich at vfemail.net (maintainer)

Modified:
  head/games/openra/Makefile
  head/games/openra/files/patch-xamarin-bug23319

Modified: head/games/openra/Makefile
==============================================================================
--- head/games/openra/Makefile	Fri Nov 28 11:51:30 2014	(r373559)
+++ head/games/openra/Makefile	Fri Nov 28 11:52:44 2014	(r373560)
@@ -2,6 +2,7 @@
 
 PORTNAME=	openra
 PORTVERSION=	20141029
+PORTREVISION=	1
 CATEGORIES=	games
 
 MAINTAINER=	jbeich at vfemail.net

Modified: head/games/openra/files/patch-xamarin-bug23319
==============================================================================
--- head/games/openra/files/patch-xamarin-bug23319	Fri Nov 28 11:51:30 2014	(r373559)
+++ head/games/openra/files/patch-xamarin-bug23319	Fri Nov 28 11:52:44 2014	(r373560)
@@ -1,25 +1,50 @@
-# https://bugzilla.xamarin.com/show_bug.cgi?id=23319
-# https://github.com/mono/mono/commit/1d94d17
+commit 04cbea3
+Author: Gordon Martin <gordonhughmartin at gmail.com>
+Date:   Tue Nov 11 13:35:49 2014 +0000
 
---- OpenRA.Game/Exts.cs~
+    Desugaring a couple of ternary expressions which prevented OpenRA building on Mono 3.10 and certain versions of the 3.8 series due to a bug in Mono: https://bugzilla.xamarin.com/show_bug.cgi?id=23319
+---
+ OpenRA.Game/Exts.cs                      |  8 ++++++--
+ OpenRA.Mods.RA/Render/WithMuzzleFlash.cs | 10 ++++++++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git OpenRA.Game/Exts.cs OpenRA.Game/Exts.cs
+index 19d177a..0faf5af 100644
+--- OpenRA.Game/Exts.cs
 +++ OpenRA.Game/Exts.cs
-@@ -375,7 +375,7 @@ namespace OpenRA
+@@ -374,8 +374,12 @@ public static T[] MakeArray<T>(int count, Func<int, T> f)
+ 			var result = new T[width, height];
  			for (var i = 0; i < width; i++)
  				for (var j = 0; j < height; j++)
- 					result[i, j] = i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1)
+-					result[i, j] = i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1)
 -						? ts[i, j] : t;
-+						? (ts[i, j]) : t;
++					// Workaround for broken ternary operators in certain versions of mono (3.10 and  
++					// certain versions of the 3.8 series): https://bugzilla.xamarin.com/show_bug.cgi?id=23319
++					if (i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1))
++						result[i, j] = ts[i, j];
++					else
++						result[i, j] = t;
  			return result;
  		}
  
---- OpenRA.Mods.RA/Render/WithMuzzleFlash.cs~
+diff --git OpenRA.Mods.RA/Render/WithMuzzleFlash.cs OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
+index 2db391a..40a59d9 100644
+--- OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
 +++ OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
-@@ -50,7 +50,7 @@ namespace OpenRA.Mods.RA.Render
+@@ -51,8 +51,14 @@ public WithMuzzleFlash(Actor self, WithMuzzleFlashInfo info)
  					var turreted = self.TraitsImplementing<Turreted>()
  						.FirstOrDefault(t => t.Name ==  arm.Info.Turret);
  
 -					getFacing = turreted != null ? () => turreted.TurretFacing :
-+					getFacing = turreted != null ? (() => turreted.TurretFacing) :
- 						facing != null ? (Func<int>)(() => facing.Facing) : () => 0;
+-						facing != null ? (Func<int>)(() => facing.Facing) : () => 0;
++					// Workaround for broken ternary operators in certain versions of mono (3.10 and  
++					// certain versions of the 3.8 series): https://bugzilla.xamarin.com/show_bug.cgi?id=23319
++					if (turreted != null)
++						getFacing = () => turreted.TurretFacing;
++					else if (facing != null)
++						getFacing = (Func<int>)(() => facing.Facing);
++					else
++						getFacing = () => 0;
  
  					var muzzleFlash = new Animation(self.World, render.GetImage(self), getFacing);
+ 					visible.Add(barrel, false);


More information about the svn-ports-head mailing list