Date: Sunday, May 21, 2017 @ 14:19:06 Author: svenstaro Revision: 228907
upgpkg: openra 20170421-2 Add patch for mono 5 Added: openra/trunk/b74141666b57075be1bcc16a1d864e19988b9dfb.patch Modified: openra/trunk/PKGBUILD ------------------------------------------------+ PKGBUILD | 10 +++++-- b74141666b57075be1bcc16a1d864e19988b9dfb.patch | 30 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-05-21 14:07:57 UTC (rev 228906) +++ PKGBUILD 2017-05-21 14:19:06 UTC (rev 228907) @@ -3,7 +3,7 @@ # Contributor: Matthew Bowra-Dean <[email protected]> pkgname=openra pkgver=20170421 -pkgrel=1 +pkgrel=2 pkgdesc="An open-source implementation of the Red Alert engine using .NET/Mono and OpenGL" arch=('any') url="http://www.openra.net" @@ -13,12 +13,16 @@ 'desktop-file-utils' 'xdg-utils' 'zenity') makedepends=('git' 'unzip') options=(!strip) -source=("git+https://github.com/OpenRA/OpenRA.git#tag=release-${pkgver}") -md5sums=('SKIP') +source=("git+https://github.com/OpenRA/OpenRA.git#tag=release-${pkgver}" + b74141666b57075be1bcc16a1d864e19988b9dfb.patch) +md5sums=('SKIP' + 'ef4913d8de94aa2d77cf9bb252987ca2') prepare() { cd OpenRA + patch -Np1 < "$srcdir"/b74141666b57075be1bcc16a1d864e19988b9dfb.patch + make version } Added: b74141666b57075be1bcc16a1d864e19988b9dfb.patch =================================================================== --- b74141666b57075be1bcc16a1d864e19988b9dfb.patch (rev 0) +++ b74141666b57075be1bcc16a1d864e19988b9dfb.patch 2017-05-21 14:19:06 UTC (rev 228907) @@ -0,0 +1,30 @@ +From b74141666b57075be1bcc16a1d864e19988b9dfb Mon Sep 17 00:00:00 2001 +From: Paul Chote <[email protected]> +Date: Thu, 18 May 2017 08:58:52 +0100 +Subject: [PATCH] Implement a workaround for the mono 5.0 cursor enumerator + bug. + +--- + OpenRA.Game/Orders/UnitOrderGenerator.cs | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/OpenRA.Game/Orders/UnitOrderGenerator.cs b/OpenRA.Game/Orders/UnitOrderGenerator.cs +index 92862b8eb38..0a5b459709c 100644 +--- a/OpenRA.Game/Orders/UnitOrderGenerator.cs ++++ b/OpenRA.Game/Orders/UnitOrderGenerator.cs +@@ -139,8 +139,15 @@ static UnitOrderResult OrderForUnit(Actor self, Target target, List<Actor> actor + if (mi.Modifiers.HasModifier(Modifiers.Alt)) + modifiers |= TargetModifiers.ForceMove; + ++ // The Select(x => x) is required to work around an issue on mono 5.0 ++ // where calling OrderBy* on SelectManySingleSelectorIterator can in some ++ // circumstances (which we were unable to identify) replace entries in the ++ // enumeration with duplicates of other entries. ++ // Other action that replace the SelectManySingleSelectorIterator with a ++ // different enumerator type (e.g. .Where(true) or .ToList()) also work. + var orders = self.TraitsImplementing<IIssueOrder>() + .SelectMany(trait => trait.Orders.Select(x => new { Trait = trait, Order = x })) ++ .Select(x => x) + .OrderByDescending(x => x.Order.OrderPriority); + + for (var i = 0; i < 2; i++)
