Add new port games/openra

PR:		193422
Submitted by:	Jan Beich

A reimplementation of the Command & Conquer: Red Alert game engine
using .NET/Mono, OpenGL, OpenAL and SDL. It includes reimagninations
of Command & Conquer: Red Alert, Command & Conquer: Tiberian Dawn as
well as Dune 2000. These combine the classic gameplay of the originals
with modern improvements such as unit veterancy and the fog of war.
This commit is contained in:
John Marino 2014-10-31 12:54:17 +00:00
parent abaef20b78
commit d6ccfa1296
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371809
7 changed files with 159 additions and 0 deletions

View file

@ -669,6 +669,7 @@
SUBDIR += openmortal
SUBDIR += openmsx
SUBDIR += openpref
SUBDIR += openra
SUBDIR += opensfx
SUBDIR += opensonic
SUBDIR += openspades

77
games/openra/Makefile Normal file
View file

@ -0,0 +1,77 @@
# $FreeBSD$
PORTNAME= openra
PORTVERSION= 20141029
CATEGORIES= games
MAINTAINER= jbeich@vfemail.net
COMMENT= Multiplayer re-envisioning of early RTS games by Westwood Studios
LICENSE= GPLv3
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
libgdiplus.so:${PORTSDIR}/x11-toolkits/libgdiplus
USE_GITHUB= yes
GH_ACCOUNT= ${GH_PROJECT}
GH_PROJECT= OpenRA
GH_TAGNAME= release-${PORTVERSION}
GH_COMMIT= e5948ba
NO_ARCH= yes
USES= gmake lua:51,run mono openal:soft
USE_SDL= sdl2
INSTALLS_ICONS= yes
MAKE_ENV= prefix="${PREFIX}"
MAKE_ARGS= VERSION="${GH_TAGNAME}"
INSTALL_TARGET= install-all install-linux-shortcuts
DATADIR= ${PREFIX}/lib/${PORTNAME}
PORTDATA= *
PORTDOCS= *
OPTIONS_DEFINE= DOCS TEST ZENITY
OPTIONS_DEFAULT=ZENITY
DOCS_BUILD_DEPENDS=markdown:${PORTSDIR}/textproc/markdown
DOCS_ALL_TARGET=docs
TEST_MAKE_ENV= HOME="${WRKDIR}"
TEST_ALL_TARGET=test
ZENITY_RUN_DEPENDS=xdg-open:${PORTSDIR}/devel/xdg-utils \
zenity:${PORTSDIR}/x11/zenity
ZENITY_DESC= Use native crash dialog
.include <bsd.port.options.mk>
post-patch:
${REINPLACE_CMD} -e 's/Linux/${OPSYS}/' \
-e 's/crashdialog/gamemonitor/' \
-e '/^mods:/s/$$/ version/' \
-e '/^docs:/s/$$/ all/' \
-e '/^test:/s/$$/ all/' \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e '/linux/{ p; s//${OPSYS:tl}/; }' \
${WRKSRC}/thirdparty/*.config*
${SED} 's/@LIBLUA51@/liblua-${LUA_VER}.so/' \
${WRKSRC}/thirdparty/Eluant.dll.config.in \
>${WRKSRC}/Eluant.dll.config
# DragonFly lacks BSD suffix
${REINPLACE_CMD} -e 's/"BSD"/"${OPSYS}"/' \
${WRKSRC}/OpenRA.Game/Platform.cs
post-build:
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} Generating HTML documentation...
@for f in ${WRKSRC}/*.md; do \
markdown $$f >$${f%.md}.html; \
done
.endif
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/*.html ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

2
games/openra/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (openra-20141029.tar.gz) = 4c3f8224a7ad9d3cb78c3ce2696850246ba0d9703cbd91bf5a42806b09c26a36
SIZE (openra-20141029.tar.gz) = 15340674

View file

@ -0,0 +1,35 @@
# Without zenity(1) fallback to either WinForms or no crash dialog
--- Makefile~
+++ Makefile
@@ -357,10 +357,28 @@ install-linux-desktop:
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
- @echo 'mono OpenRA.Game.exe "$$@"' >> openra
+ @echo 'ZENITY=`which zenity`' >> openra
+ @echo 'if [ -z "$$ZENITY" ] && (' >> openra
+ @echo ' # from mono/io-layer/processes.c' >> openra
+ @echo ' hash xdg-open 2>/dev/null ||' >> openra
+ @echo ' hash gnome-open 2>/dev/null ||' >> openra
+ @echo ' hash kfmclient 2>/dev/null)' >> openra
+ @echo 'then' >> openra
+ @echo ' mono OpenRA.exe "$$@"' >> openra
+ @echo 'else' >> openra
+ @echo ' mono OpenRA.Game.exe "$$@"' >> openra
+ @echo 'fi' >> openra
@echo 'if [ $$? != 0 ]' >> 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
+ @echo ' then' >> openra
+ @echo ' echo' >> openra
+ @echo ' echo "OpenRA has encountered a fatal error."' >> openra
+ @echo ' echo "Log Files are available in ~/.openra."' >> openra
+ @echo ' echo' >> openra
+ @echo ' echo "See https://github.com/OpenRA/OpenRA/wiki/FAQ"' >> openra
+ @echo ' exit 1' >> openra
+ @echo ' fi' >> openra
@echo '$$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ' >> openra
@echo 'exit 1' >> openra
@echo 'fi' >> openra

View file

@ -0,0 +1,25 @@
# https://bugzilla.xamarin.com/show_bug.cgi?id=23319
# https://github.com/mono/mono/commit/1d94d17
--- OpenRA.Game/Exts.cs~
+++ OpenRA.Game/Exts.cs
@@ -375,7 +375,7 @@ namespace OpenRA
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;
+ ? (ts[i, j]) : t;
return result;
}
--- OpenRA.Mods.RA/Render/WithMuzzleFlash.cs~
+++ OpenRA.Mods.RA/Render/WithMuzzleFlash.cs
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.RA.Render
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;
var muzzleFlash = new Animation(self.World, render.GetImage(self), getFacing);

7
games/openra/pkg-descr Normal file
View file

@ -0,0 +1,7 @@
A reimplementation of the Command & Conquer: Red Alert game engine
using .NET/Mono, OpenGL, OpenAL and SDL. It includes reimagninations
of Command & Conquer: Red Alert, Command & Conquer: Tiberian Dawn as
well as Dune 2000. These combine the classic gameplay of the originals
with modern improvements such as unit veterancy and the fog of war.
WWW: http://www.openra.net

12
games/openra/pkg-plist Normal file
View file

@ -0,0 +1,12 @@
bin/openra
bin/openra-editor
share/applications/openra-editor.desktop
share/applications/openra.desktop
share/icons/128x128/apps/openra.png
share/icons/16x16/apps/openra.png
share/icons/32x32/apps/openra-editor.png
share/icons/32x32/apps/openra.png
share/icons/48x48/apps/openra-editor.png
share/icons/48x48/apps/openra.png
share/icons/64x64/apps/openra.png
share/icons/scalable/apps/openra.svg