aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-10-31 12:54:17 +0000
committerJohn Marino <marino@FreeBSD.org>2014-10-31 12:54:17 +0000
commitd6ccfa1296b7c1e378c18506d801b3ba746d2f1c (patch)
treee931f9a864009299f3e90562589f4f50e7e782cf
parentabaef20b78a6d6d169e4e6ca3e998feae6d0c2b2 (diff)
downloadports-d6ccfa1296b7c1e378c18506d801b3ba746d2f1c.tar.gz
ports-d6ccfa1296b7c1e378c18506d801b3ba746d2f1c.zip
Notes
-rw-r--r--games/Makefile1
-rw-r--r--games/openra/Makefile77
-rw-r--r--games/openra/distinfo2
-rw-r--r--games/openra/files/patch-Makefile35
-rw-r--r--games/openra/files/patch-xamarin-bug2331925
-rw-r--r--games/openra/pkg-descr7
-rw-r--r--games/openra/pkg-plist12
7 files changed, 159 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 1e3b460d641a..00a45879d5d6 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -669,6 +669,7 @@
SUBDIR += openmortal
SUBDIR += openmsx
SUBDIR += openpref
+ SUBDIR += openra
SUBDIR += opensfx
SUBDIR += opensonic
SUBDIR += openspades
diff --git a/games/openra/Makefile b/games/openra/Makefile
new file mode 100644
index 000000000000..079276afacf0
--- /dev/null
+++ b/games/openra/Makefile
@@ -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>
diff --git a/games/openra/distinfo b/games/openra/distinfo
new file mode 100644
index 000000000000..36bff510d42f
--- /dev/null
+++ b/games/openra/distinfo
@@ -0,0 +1,2 @@
+SHA256 (openra-20141029.tar.gz) = 4c3f8224a7ad9d3cb78c3ce2696850246ba0d9703cbd91bf5a42806b09c26a36
+SIZE (openra-20141029.tar.gz) = 15340674
diff --git a/games/openra/files/patch-Makefile b/games/openra/files/patch-Makefile
new file mode 100644
index 000000000000..1b0a197cee30
--- /dev/null
+++ b/games/openra/files/patch-Makefile
@@ -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
diff --git a/games/openra/files/patch-xamarin-bug23319 b/games/openra/files/patch-xamarin-bug23319
new file mode 100644
index 000000000000..ac51c4bd7298
--- /dev/null
+++ b/games/openra/files/patch-xamarin-bug23319
@@ -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);
diff --git a/games/openra/pkg-descr b/games/openra/pkg-descr
new file mode 100644
index 000000000000..d7afffe1354b
--- /dev/null
+++ b/games/openra/pkg-descr
@@ -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
diff --git a/games/openra/pkg-plist b/games/openra/pkg-plist
new file mode 100644
index 000000000000..bd2161dfa62d
--- /dev/null
+++ b/games/openra/pkg-plist
@@ -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