FreeBSD Bugzilla – Attachment 149833 Details for
Bug 195371
[MAINTAINER] games/openra: replace custom hack with upstream commit (xamarin bug 23319)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix
upstream.diff (text/plain), 3.34 KB, created by
Jan Beich
on 2014-11-25 17:28:35 UTC
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2014-11-25 17:28:35 UTC
Size:
3.34 KB
patch
obsolete
>Index: games/openra/Makefile >=================================================================== >--- games/openra/Makefile (revision 372830) >+++ games/openra/Makefile (working copy) >@@ -2,6 +2,7 @@ > > PORTNAME= openra > PORTVERSION= 20141029 >+PORTREVISION= 1 > CATEGORIES= games > > MAINTAINER= jbeich@vfemail.net >Index: games/openra/files/patch-xamarin-bug23319 >=================================================================== >--- games/openra/files/patch-xamarin-bug23319 (revision 372830) >+++ games/openra/files/patch-xamarin-bug23319 (working copy) >@@ -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@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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 195371
: 149833 |
149835