games/openra: update to 20150424

- thirdparty/*.dll were removed upstream in favor of NuGet
- SharpFont-3.0 upstream patch to simplify sed(1) line
- Verbose build/stage

Changes:	https://github.com/OpenRA/OpenRA/wiki/Changelog#release-20150424
This commit is contained in:
Jan Beich 2015-05-24 17:45:55 +00:00
parent acaf83b07a
commit f53f2edd14
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=387287
5 changed files with 127 additions and 56 deletions

View File

@ -1,10 +1,40 @@
# $FreeBSD$
PORTNAME= openra
PORTVERSION= 20141029
PORTVERSION= 20150424
DISTVERSIONPREFIX= release-
PORTREVISION= 2
CATEGORIES= games
# XXX Convert to USES=nuget or package dependencies instead
MASTER_SITES= https://nuget.org/api/v2/package/StyleCopPlus.MSBuild/4.7.49.5?dummy=/:StyleCopPlus \
https://nuget.org/api/v2/package/StyleCop.MSBuild/4.7.49.0?dummy=/:StyleCop \
https://nuget.org/api/v2/package/SharpZipLib/0.86.0?dummy=/:SharpZipLib \
https://nuget.org/api/v2/package/MaxMind.Db/1.0.0.0?dummy=/:MaxMind_Db \
https://nuget.org/api/v2/package/Newtonsoft.Json/6.0.5?dummy=/:Newtonsoft_Json \
https://nuget.org/api/v2/package/RestSharp/105.0.1?dummy=/:RestSharp \
https://nuget.org/api/v2/package/MaxMind.GeoIP2/2.1.0?dummy=/:MaxMind_GeoIP2 \
https://nuget.org/api/v2/package/SharpFont/3.0.1?dummy=/:SharpFont \
https://nuget.org/api/v2/package/NUnit/2.6.4?dummy=/:NUnit \
https://nuget.org/api/v2/package/Mono.Nat/1.2.21?dummy=/:Mono_Nat \
https://nuget.org/api/v2/package/Moq/4.2.1502.0911?dummy=/:Moq \
https://nuget.org/api/v2/package/FuzzyLogicLibrary/1.2.0?dummy=/:FuzzyLogicLibrary \
https://github.com/${GH_ACCOUNT}/SDL2-CS/releases/download/20140407/:SDL2_CS \
https://github.com/${GH_ACCOUNT}/Eluant/releases/download/20140425/:Eluant
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
StyleCopPlus.MSBuild-4.7.49.5.zip:StyleCopPlus \
StyleCop.MSBuild-4.7.49.0.zip:StyleCop \
SharpZipLib-0.86.0.zip:SharpZipLib \
MaxMind.Db-1.0.0.0.zip:MaxMind_Db \
Newtonsoft.Json-6.0.5.zip:Newtonsoft_Json \
RestSharp-105.0.1.zip:RestSharp \
MaxMind.GeoIP2-2.1.0.zip:MaxMind_GeoIP2 \
SharpFont-3.0.1.zip:SharpFont \
NUnit-2.6.4.zip:NUnit \
Mono.Nat-1.2.21.zip:Mono_Nat \
Moq-4.2.1502.0911.zip:Moq \
FuzzyLogicLibrary-1.2.0.zip:FuzzyLogicLibrary \
SDL2-CS.dll:SDL2_CS \
Eluant.dll:Eluant
EXTRACT_ONLY= ${DISTFILES:C/:.*//:N*.dll}
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Multiplayer re-envisioning of early RTS games by Westwood Studios
@ -44,9 +74,19 @@ ZENITY_DESC= Use native crash dialog
.include <bsd.port.options.mk>
post-patch:
# XXX Move under post-extract once patch-SharpFont-3.0 is no longer needed
@${CP} -v ${DISTFILES:C/:.*//:M*.dll:S,^,${_DISTDIR}/,} \
${WRKSRC}/thirdparty
@for f in $$(${SED} -n 's/\.$$//; s,cp \./,,p' \
${WRKSRC}/thirdparty/fetch-thirdparty-deps.sh); do \
${MV} -v ${WRKDIR}/$${f#*/} ${WRKSRC}/thirdparty; \
done
${REINPLACE_CMD} -e 's/Linux/${OPSYS}/' \
-e '/CP_R/s,hicolor/,hicolor,' \
-e '/fetch-thirdparty-deps/d' \
-e 's/crashdialog/gamemonitor/' \
-e '/echo/!s/ @/ /' \
-e '/^mods:/s/$$/ version/' \
-e '/^docs:/s/$$/ all/' \
-e '/^test:/s/$$/ all/' \
@ -64,6 +104,7 @@ post-build:
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} Generating HTML documentation...
@for f in ${WRKSRC}/*.md; do \
${ECHO_MSG} markdown $$f -\> $${f%.md}.html; \
markdown $$f >$${f%.md}.html; \
done
.endif

View File

@ -1,2 +1,30 @@
SHA256 (openra-OpenRA-release-20141029_GH0.tar.gz) = f9986bb0d8b5b058056f012e547eab015da1e4f079414cb419661a833ce35920
SIZE (openra-OpenRA-release-20141029_GH0.tar.gz) = 15336937
SHA256 (openra-OpenRA-release-20150424_GH0.tar.gz) = b5837cc6b33ff804aa45f25c77662d448828815b1b554eab38ed6bd2ae48dd07
SIZE (openra-OpenRA-release-20150424_GH0.tar.gz) = 17110851
SHA256 (StyleCopPlus.MSBuild-4.7.49.5.zip) = b98a8ed20c5e82ff5fe6c2a52ecd45bffd4d4ab284611f35a25889c3bba364c3
SIZE (StyleCopPlus.MSBuild-4.7.49.5.zip) = 124724
SHA256 (StyleCop.MSBuild-4.7.49.0.zip) = 6680dedaa5d27fb1ead475015de98e476e58fa9a27e4b7ad0f08d5f7d8f6ee66
SIZE (StyleCop.MSBuild-4.7.49.0.zip) = 2366995
SHA256 (SharpZipLib-0.86.0.zip) = 5906c248bb986d50489192f490f94d2331d04e7d34337bc3c0d64df6d0008207
SIZE (SharpZipLib-0.86.0.zip) = 454026
SHA256 (MaxMind.Db-1.0.0.0.zip) = ad5680b58af5a5673b97d67ff979552917c3bc7059276914d8d2badfc504438b
SIZE (MaxMind.Db-1.0.0.0.zip) = 12965
SHA256 (Newtonsoft.Json-6.0.5.zip) = d66ea7d215ab374707fcd51101d5d90c2eea23ddc57c234b50542c28ce0e21cd
SIZE (Newtonsoft.Json-6.0.5.zip) = 1520354
SHA256 (RestSharp-105.0.1.zip) = 4f6856c893e56a26fa404d134cb23b9b162469e88e66bd49839a559e104f21db
SIZE (RestSharp-105.0.1.zip) = 511839
SHA256 (MaxMind.GeoIP2-2.1.0.zip) = 538fbc832264868e83b4699d3fd9f21a02d1dfcf0ad0a48434c58ffaf741b8b6
SIZE (MaxMind.GeoIP2-2.1.0.zip) = 21327
SHA256 (SharpFont-3.0.1.zip) = 1a4e4d0a5e7a7adebb5093d21655e3166da801abc469dc41c586f555514cc3bc
SIZE (SharpFont-3.0.1.zip) = 60372
SHA256 (NUnit-2.6.4.zip) = be8cde6e9754474d5d4f553addb6331cf442c2182a0eb4dc87618d744fd59ca9
SIZE (NUnit-2.6.4.zip) = 99004
SHA256 (Mono.Nat-1.2.21.zip) = fa380d8b531069e0dd7a5d8dffe70b128f591205e432074280859b9e65853d04
SIZE (Mono.Nat-1.2.21.zip) = 23598
SHA256 (Moq-4.2.1502.0911.zip) = 1187ebedd98ba9b8abee93de9779a20ef75068b63c401967235351542f213b03
SIZE (Moq-4.2.1502.0911.zip) = 645358
SHA256 (FuzzyLogicLibrary-1.2.0.zip) = b464509236260f53d963771ed99410a7e1cdbd268a2bde43b189e7d15044a174
SIZE (FuzzyLogicLibrary-1.2.0.zip) = 70571
SHA256 (SDL2-CS.dll) = 61ea325dad3c585449d606c031d6fb2d37ac517ddae78851790846a35dc4d47f
SIZE (SDL2-CS.dll) = 2882560
SHA256 (Eluant.dll) = abb67679c241ae35a430f79696792cbd9093ceda5998f6f578d0fd763ee440b0
SIZE (Eluant.dll) = 64000

View File

@ -2,7 +2,7 @@
--- Makefile~
+++ Makefile
@@ -357,10 +357,28 @@ install-linux-desktop:
@@ -381,10 +381,28 @@ install-linux-mime:
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
@ -18,7 +18,7 @@
+ @echo 'else' >> openra
+ @echo ' mono OpenRA.Game.exe "$$@"' >> openra
+ @echo 'fi' >> openra
@echo 'if [ $$? != 0 ]' >> openra
@echo 'if [ $$? != 0 -a $$? != 1 ]' >> openra
@echo 'then' >> openra
- @echo 'ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."' >> openra
+ @echo ' if [ -z "$$ZENITY" ]' >> openra

View File

@ -0,0 +1,52 @@
commit 4987a6b
Author: Robert Rouhani <robert.rouhani@gmail.com>
Date: Fri Mar 20 23:51:24 2015 -0400
Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types.
---
OpenRA.Game/Graphics/SpriteFont.cs | 4 ++--
thirdparty/fetch-thirdparty-deps-windows.sh | 14 +++-----------
thirdparty/fetch-thirdparty-deps.ps1 | 20 ++++++--------------
thirdparty/fetch-thirdparty-deps.sh | 5 +++--
4 files changed, 14 insertions(+), 29 deletions(-)
diff --git OpenRA.Game/Graphics/SpriteFont.cs OpenRA.Game/Graphics/SpriteFont.cs
index 65a885e..5f79683 100644
--- OpenRA.Game/Graphics/SpriteFont.cs
+++ OpenRA.Game/Graphics/SpriteFont.cs
@@ -102,13 +102,13 @@ GlyphInfo CreateGlyph(Pair<char, Color> c)
face.LoadChar(c.First, LoadFlags.Default, LoadTarget.Normal);
face.Glyph.RenderGlyph(RenderMode.Normal);
- var size = new Size((int)face.Glyph.Metrics.Width >> 6, (int)face.Glyph.Metrics.Height >> 6);
+ var size = new Size((int)face.Glyph.Metrics.Width, (int)face.Glyph.Metrics.Height);
var s = builder.Allocate(size);
var g = new GlyphInfo
{
Sprite = s,
- Advance = (int)face.Glyph.Metrics.HorizontalAdvance / 64f,
+ Advance = (float)face.Glyph.Metrics.HorizontalAdvance,
Offset = new int2(face.Glyph.BitmapLeft, -face.Glyph.BitmapTop)
};
diff --git thirdparty/fetch-thirdparty-deps.sh thirdparty/fetch-thirdparty-deps.sh
index dcd4b9b..8452657 100755
--- thirdparty/fetch-thirdparty-deps.sh
+++ thirdparty/fetch-thirdparty-deps.sh
@@ -39,10 +39,11 @@ fi
if [ ! -f SharpFont.dll ]; then
echo "Fetching SharpFont from nuget"
- nuget install SharpFont -Version 2.5.0.1
- cp ./SharpFont.2.5.0.1/lib/net20/SharpFont* .
- sed '/osx/s@\(dll="\)[^"]*\(" />\)@\1/Library/Frameworks/Mono.framework/Libraries/libfreetype.6.dylib\2@' ./SharpFont.2.5.0.1/Content/SharpFont.dll.config > SharpFont.dll.config
- rm -rf SharpFont.2.5.0.1
+ nuget install SharpFont -Version 3.0.1
+ cp ./SharpFont.3.0.1/lib/net20/SharpFont* .
+ cp ./SharpFont.3.0.1/config/SharpFont.dll.config .
+ rm -rf SharpFont.3.0.1
+ rm -rf SharpFont.Dependencies.2.5.5.1
fi
if [ ! -f nunit.framework.dll ]; then

View File

@ -1,50 +0,0 @@
commit 04cbea3
Author: Gordon Martin <gordonhughmartin@gmail.com>
Date: Tue Nov 11 13:35:49 2014 +0000
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
@@ -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)
- ? 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;
}
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
@@ -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 :
- 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);