Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2019 14:19:44 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r514077 - in head/games: . openfodder openfodder/files
Message-ID:  <201910081419.x98EJiiA025024@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Oct  8 14:19:44 2019
New Revision: 514077
URL: https://svnweb.freebsd.org/changeset/ports/514077

Log:
  games/openfodder: add new port
  
  Cannon Fodder is an action-strategy shoot 'em up game developed by
  Sensible Software and published by Virgin Interactive. Open Fodder is
  a modern open source engine for it.
  
  The game is military-themed and based on shooting action but with a
  strategy game-style control system. The player directs troops through
  numerous missions, battling enemy infantry, vehicles and
  installations.
  
  http://openfodder.com/

Added:
  head/games/openfodder/
  head/games/openfodder/Makefile   (contents, props changed)
  head/games/openfodder/distinfo   (contents, props changed)
  head/games/openfodder/files/
  head/games/openfodder/files/patch-Source_stdafx.cpp   (contents, props changed)
  head/games/openfodder/pkg-descr   (contents, props changed)
Modified:
  head/games/Makefile   (contents, props changed)

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Tue Oct  8 13:57:15 2019	(r514076)
+++ head/games/Makefile	Tue Oct  8 14:19:44 2019	(r514077)
@@ -670,6 +670,7 @@
     SUBDIR += openclaw
     SUBDIR += openclonk
     SUBDIR += opendungeons
+    SUBDIR += openfodder
     SUBDIR += opengfx
     SUBDIR += openglad
     SUBDIR += openjazz

Added: head/games/openfodder/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openfodder/Makefile	Tue Oct  8 14:19:44 2019	(r514077)
@@ -0,0 +1,73 @@
+# $FreeBSD$
+
+PORTNAME=	OpenFodder
+DISTVERSION=	1.5.3
+CATEGORIES=	games
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Open source port of Cannon Fodder
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/gpl-3.0.txt
+
+USES=		compiler:c++14-lang sdl
+USE_GITHUB=	yes
+USE_SDL=	mixer2
+GH_TUPLE=	${PORTNAME}:data:1.6.0:data
+GH_PROJECT=	${PORTNAME:tl}
+PLIST_FILES=	bin/${PORTNAME}
+PORTDATA=	*
+PORTDOCS=	*.md
+
+DESKTOP_ENTRIES="${PORTNAME}" \
+		"" \
+		"${PORTNAME:tl}" \
+		"${PORTNAME}" \
+		"Game;ArcadeGame;" \
+		""
+
+OPTIONS_DEFINE=	DOCS ICONS
+OPTIONS_DEFAULT=ICONS
+
+ICONS_BUILD_DEPENDS=	mogrify:graphics/ImageMagick6
+
+post-patch:
+	@${REINPLACE_CMD} -e 's,clang++,${CXX},' \
+		-e 's/ -ferror-limit=100//' \
+		-e 's, -I/usr/include[^[:space:]]*,,g' \
+		-e 's,git log -n 1 --pretty=,${ECHO_CMD} ,' \
+		-e 's,%%h,${DISTVERSIONFULL},' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} 's,/usr/local,${PREFIX},' \
+		${WRKSRC}/Source/stdafx.cpp
+
+post-build-ICONS-on:
+	@for size in 16x16 24x24 32x32 48x48 57x57; do \
+		${MKDIR} ${WRKDIR}/icons/hicolor/$$size/apps; \
+	done
+	@mogrify -verbose -set filename:size %wx%h -format png \
+		 -path ${WRKDIR}/icons/hicolor/%\[filename:size]/apps \
+		${WRKSRC}/Projects/openfodder.ico
+
+do-test:
+	@(cd ${WRKSRC_data} && ${SETENV} ${TEST_ENV} \
+		${WRKSRC}/Run/${PORTNAME} --unit-test-headless)
+
+pre-install:	do-test
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/Run/${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin
+	(cd ${WRKSRC_data} && ${COPYTREE_SHARE} "${PORTDATA}" \
+		${STAGEDIR}${DATADIR})
+
+do-install-DOCS-on:
+	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" \
+		${STAGEDIR}${DOCSDIR})
+
+do-install-ICONS-on:
+	(cd ${WRKDIR}/icons && ${COPYTREE_SHARE} . \
+		${STAGEDIR}${PREFIX}/share/icons)
+	(cd ${STAGEDIR}${PREFIX} && ${FIND} share/icons -type f >>${TMPPLIST})
+
+.include <bsd.port.mk>

Added: head/games/openfodder/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openfodder/distinfo	Tue Oct  8 14:19:44 2019	(r514077)
@@ -0,0 +1,5 @@
+TIMESTAMP = 1544863677
+SHA256 (OpenFodder-openfodder-1.5.3_GH0.tar.gz) = d9f40c4f85d38624a32f59450ee710825d82ee19ec5948faf67abc764c3f6799
+SIZE (OpenFodder-openfodder-1.5.3_GH0.tar.gz) = 424997
+SHA256 (OpenFodder-data-1.6.0_GH0.tar.gz) = 04368eea546de1ec17e875a9535d7d44b8e9cf587beba9fa7c5c06a750e10f45
+SIZE (OpenFodder-data-1.6.0_GH0.tar.gz) = 3385617

Added: head/games/openfodder/files/patch-Source_stdafx.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openfodder/files/patch-Source_stdafx.cpp	Tue Oct  8 14:19:44 2019	(r514077)
@@ -0,0 +1,14 @@
+Check DATADIR if ~/.local/share/ exists but lacks OpenFodder subdirectory.
+Allows to run demo on first launch on a common desktop.
+
+--- Source/stdafx.cpp.orig	2018-12-15 08:47:57 UTC
++++ Source/stdafx.cpp
+@@ -249,7 +249,7 @@ void local_BasePathGenerate() {
+     }
+ 
+     // Fall back just incase
+-    if (!FinalPath.size())
++    if (!local_FileExists(FinalPath + "OpenFodder/"))
+         FinalPath = "/usr/local/share/";
+ 
+     filePathFinal << FinalPath << "OpenFodder/";

Added: head/games/openfodder/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/openfodder/pkg-descr	Tue Oct  8 14:19:44 2019	(r514077)
@@ -0,0 +1,10 @@
+Cannon Fodder is an action-strategy shoot 'em up game developed by
+Sensible Software and published by Virgin Interactive. Open Fodder is
+a modern open source engine for it.
+
+The game is military-themed and based on shooting action but with a
+strategy game-style control system. The player directs troops through
+numerous missions, battling enemy infantry, vehicles and
+installations.
+
+WWW: http://openfodder.com/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910081419.x98EJiiA025024>