diff options
author | jbeich <jbeich@FreeBSD.org> | 2019-10-08 22:19:44 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2019-10-08 22:19:44 +0800 |
commit | a91c67e6c466b0bd4b08afeb69e188d464d9db84 (patch) | |
tree | aebf56077dee7a71d21486aa4147b83b899cd14b /games | |
parent | 5220b9f2fd78ae3287acdfe312999228e6515991 (diff) | |
download | freebsd-ports-gnome-a91c67e6c466b0bd4b08afeb69e188d464d9db84.tar.gz freebsd-ports-gnome-a91c67e6c466b0bd4b08afeb69e188d464d9db84.tar.zst freebsd-ports-gnome-a91c67e6c466b0bd4b08afeb69e188d464d9db84.zip |
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/
Diffstat (limited to 'games')
-rw-r--r-- | games/Makefile | 1 | ||||
-rw-r--r-- | games/openfodder/Makefile | 73 | ||||
-rw-r--r-- | games/openfodder/distinfo | 5 | ||||
-rw-r--r-- | games/openfodder/files/patch-Source_stdafx.cpp | 14 | ||||
-rw-r--r-- | games/openfodder/pkg-descr | 10 |
5 files changed, 103 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index 2435e6dc5f62..48cbb7654d1e 100644 --- a/games/Makefile +++ b/games/Makefile @@ -670,6 +670,7 @@ SUBDIR += openclaw SUBDIR += openclonk SUBDIR += opendungeons + SUBDIR += openfodder SUBDIR += opengfx SUBDIR += openglad SUBDIR += openjazz diff --git a/games/openfodder/Makefile b/games/openfodder/Makefile new file mode 100644 index 000000000000..56ef9031fb86 --- /dev/null +++ b/games/openfodder/Makefile @@ -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> diff --git a/games/openfodder/distinfo b/games/openfodder/distinfo new file mode 100644 index 000000000000..b2484b426f7f --- /dev/null +++ b/games/openfodder/distinfo @@ -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 diff --git a/games/openfodder/files/patch-Source_stdafx.cpp b/games/openfodder/files/patch-Source_stdafx.cpp new file mode 100644 index 000000000000..4c1230a6b4bf --- /dev/null +++ b/games/openfodder/files/patch-Source_stdafx.cpp @@ -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/"; diff --git a/games/openfodder/pkg-descr b/games/openfodder/pkg-descr new file mode 100644 index 000000000000..ee578f606ff9 --- /dev/null +++ b/games/openfodder/pkg-descr @@ -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/ |