diff --git a/games/Makefile b/games/Makefile index bd6ea8a0f2ad..a5c246ad1a38 100644 --- a/games/Makefile +++ b/games/Makefile @@ -126,6 +126,7 @@ SUBDIR += capitalism SUBDIR += cardpics SUBDIR += castlevox + SUBDIR += cataclysm-dda SUBDIR += cave9 SUBDIR += cavezofphear SUBDIR += ceferino diff --git a/games/cataclysm-dda/Makefile b/games/cataclysm-dda/Makefile new file mode 100644 index 000000000000..709dde1b75c4 --- /dev/null +++ b/games/cataclysm-dda/Makefile @@ -0,0 +1,85 @@ +# Created by: Vladimir Kondratiev +# $FreeBSD$ + +PORTNAME= cataclysm-dda +PORTVERSION= 0.9 +CATEGORIES= games + +MAINTAINER= wulf@cicgroup.ru +COMMENT= Fork/variant of Cataclysm Roguelike by Whales + +LICENSE= CCPL.BY-SA.30 +LICENSE_NAME= Creative Commons Attribution-ShareAlike 3.0 Unported License +LICENSE_FILE= ${WRKSRC}/LICENSE.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +USES= gmake shebangfix +SHEBANG_FILES= lang/*.sh +bash_CMD= /bin/sh + +USE_GITHUB= yes +GH_ACCOUNT= CleverRaven +GH_PROJECT= Cataclysm-DDA +GH_TAGNAME= ${GH_COMMIT} +GH_COMMIT= ebd2393 +MAKE_ARGS+= RELEASE=1 +CXXFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +OPTIONS_DEFINE= NLS +OPTIONS_DEFAULT=NCURSES +OPTIONS_SINGLE= UI +OPTIONS_SINGLE_UI= NCURSES SDL + +UI_DESC= User Interface + +OPTIONS_SUB= yes +SUB_FILES= cataclysm +REINPLACE_ARGS= -i '' + +NCURSES_USES= ncurses +SDL_USE= SDL=sdl,ttf,image +SDL_MAKE_ARGS= TILES=1 TILESTARGET=cataclysm +NLS_USES= gettext +NLS_LDFLAGS= -lintl +NLS_MAKE_ARGS= L10N=localization + +.include + +.if ! ${PORT_OPTIONS:MNLS} +MAKE_ARGS+= LOCALIZE=0 +.endif + +post-extract: + ${RM} ${WRKSRC}/data/.gitignore + +post-patch: + ${REINPLACE_CMD} -e 's|"lang/mo"|"${PREFIX}/share/locale"|' ${WRKSRC}/main.cpp + cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|gfx|${DATADIR}/&|' options.cpp \ + sdltiles.cpp cata_tiles.cpp gfx/*/tileset.txt + cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|data/json|${DATADIR}/&|' \ + game.cpp init.cpp map.cpp sdltiles.cpp + cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|data/raw|${DATADIR}/&|' \ + input.cpp iuse_software_sokoban.cpp + ${REINPLACE_CMD} -e 's|data/font["/]|${DATADIR}/&| ; \ + s|data/FONTDATA|${DATADIR}/&|' ${WRKSRC}/sdltiles.cpp + ${REINPLACE_CMD} -e 's|data/motd|${DATADIR}/&| ; \ + s|data/credits|${DATADIR}/&|' ${WRKSRC}/main_menu.cpp + ${REINPLACE_CMD} -e '/^CXX *=/d ; /^LD *=/s/g++/$$(CXX)/ ; \ + /OTHERS += -O3/d ; s/\(-lncurses\)\(w*\)/\1\2 -ltinfo\2/ ; \ + /^WARNINGS *=/d' ${WRKSRC}/Makefile + +do-install: + ${INSTALL_SCRIPT} ${WRKDIR}/cataclysm ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/cataclysm ${STAGEDIR}${PREFIX}/libexec +.for dir in data gfx + cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${DATADIR} +.endfor +.if ${PORT_OPTIONS:MNLS} + cd ${WRKSRC}/lang/mo && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/locale +.endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${FIND} ${WRKSRC} \( -name "*.md" -or -name "*.txt" \) \ + -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/ \; + +.include diff --git a/games/cataclysm-dda/distinfo b/games/cataclysm-dda/distinfo new file mode 100644 index 000000000000..ee8a1f055083 --- /dev/null +++ b/games/cataclysm-dda/distinfo @@ -0,0 +1,2 @@ +SHA256 (cataclysm-dda-0.9.tar.gz) = d57455c9f2abdd50a26424d131048276efdc68d3c2d4f22b4bdde903cc0f30be +SIZE (cataclysm-dda-0.9.tar.gz) = 7219436 diff --git a/games/cataclysm-dda/files/cataclysm.in b/games/cataclysm-dda/files/cataclysm.in new file mode 100644 index 000000000000..cd3ed1fd0d4e --- /dev/null +++ b/games/cataclysm-dda/files/cataclysm.in @@ -0,0 +1,17 @@ +#!/bin/sh + +BIN=%%PREFIX%%/libexec/cataclysm + +die () { + echo `basename $0`" failed: $1" + exit 1 +} + +if [ "x$HOME" = "x" ]; then + HOME=`getent passwd $(id -nu) | cut -d: -f6` +fi +test "x$HOME" = "x" && die "HOME directory is not found" + +GAMEDIR=$HOME/.cataclysm +mkdir -p $GAMEDIR/data || die "Can\`t create $GAMEDIR/data directory" +cd $GAMEDIR && exec $BIN $@ diff --git a/games/cataclysm-dda/files/patch-debug.cpp b/games/cataclysm-dda/files/patch-debug.cpp new file mode 100644 index 000000000000..0a9355ddd827 --- /dev/null +++ b/games/cataclysm-dda/files/patch-debug.cpp @@ -0,0 +1,10 @@ +--- debug.cpp.orig 2013-11-26 02:52:18.384654297 +0400 ++++ debug.cpp 2013-11-26 02:52:27.078654024 +0400 +@@ -8,7 +8,6 @@ + + + #if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) +-#include + #include + #endif + diff --git a/games/cataclysm-dda/pkg-descr b/games/cataclysm-dda/pkg-descr new file mode 100644 index 000000000000..39b211c4c96e --- /dev/null +++ b/games/cataclysm-dda/pkg-descr @@ -0,0 +1,11 @@ +Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. +While some have described it as a "zombie game", there's far more to +Cataclysm than that. Struggle to survive in a harsh, persistant, +procedurally generated world. Scavenge the remnants of a dead civilization +for for food, equipment, or, if you're lucky, a vehicle with a full tank of +gas to get you the hell out of Dodge. Fight to defeat or escape from a wide +variety of powerful monstrosities, from zombies to giant insects to killer +robots and things far stranger and deadlier, and against the others like +yourself, that want what you have... + +WWW: http://en.cataclysmdda.com/ diff --git a/games/cataclysm-dda/pkg-plist b/games/cataclysm-dda/pkg-plist new file mode 100644 index 000000000000..22441ac22e3c --- /dev/null +++ b/games/cataclysm-dda/pkg-plist @@ -0,0 +1,109 @@ +bin/cataclysm +libexec/cataclysm +%%DATADIR%%/data/FONTDATA +%%DATADIR%%/data/cataicon.ico +%%DATADIR%%/data/changelog.txt +%%DATADIR%%/data/credits +%%DATADIR%%/data/font/fixedsys.ttf +%%DATADIR%%/data/font/terminus.fon +%%DATADIR%%/data/json/bionics.json +%%DATADIR%%/data/json/colors.json +%%DATADIR%%/data/json/dreams.json +%%DATADIR%%/data/json/furniture.json +%%DATADIR%%/data/json/halloween_special.json +%%DATADIR%%/data/json/hints.json +%%DATADIR%%/data/json/item_groups.json +%%DATADIR%%/data/json/items/ammo.json +%%DATADIR%%/data/json/items/archery.json +%%DATADIR%%/data/json/items/armor.json +%%DATADIR%%/data/json/items/books.json +%%DATADIR%%/data/json/items/comestibles.json +%%DATADIR%%/data/json/items/containers.json +%%DATADIR%%/data/json/items/instruments.json +%%DATADIR%%/data/json/items/melee.json +%%DATADIR%%/data/json/items/mods.json +%%DATADIR%%/data/json/items/ranged.json +%%DATADIR%%/data/json/items/tools.json +%%DATADIR%%/data/json/items/vehicle_parts.json +%%DATADIR%%/data/json/lab_notes.json +%%DATADIR%%/data/json/martialarts.json +%%DATADIR%%/data/json/materials.json +%%DATADIR%%/data/json/migo_speech.json +%%DATADIR%%/data/json/monstergroups.json +%%DATADIR%%/data/json/monsters.json +%%DATADIR%%/data/json/mutations.json +%%DATADIR%%/data/json/names.json +%%DATADIR%%/data/json/professions.json +%%DATADIR%%/data/json/recipes.json +%%DATADIR%%/data/json/skills.json +%%DATADIR%%/data/json/snippets.json +%%DATADIR%%/data/json/species.json +%%DATADIR%%/data/json/techniques.json +%%DATADIR%%/data/json/terrain.json +%%DATADIR%%/data/json/tool_qualities.json +%%DATADIR%%/data/json/tutorial.json +%%DATADIR%%/data/json/vehicle_parts.json +%%DATADIR%%/data/json/vehicles.json +%%DATADIR%%/data/motd +%%DATADIR%%/data/raw/keybindings.json +%%DATADIR%%/data/raw/sokoban.txt +%%DATADIR%%/gfx/DeonTileset/deontiles.png +%%DATADIR%%/gfx/DeonTileset/tile_config.json +%%DATADIR%%/gfx/DeonTileset/tileset.txt +%%DATADIR%%/gfx/HoderTileset/hodertiles.png +%%DATADIR%%/gfx/HoderTileset/tile_config.json +%%DATADIR%%/gfx/HoderTileset/tileset.txt +%%DATADIR%%/gfx/TsuTileset/tile_config.json +%%DATADIR%%/gfx/TsuTileset/tileset.txt +%%DATADIR%%/gfx/TsuTileset/tsutiles.png +%%DATADIR%%/gfx/tile.png +%%DATADIR%%/gfx/tile_config.json +%%DATADIR%%/gfx/tile_config_template.json +%%DATADIR%%/gfx/tinytile.png +%%PORTDOCS%%%%DOCSDIR%%/CMakeLists.txt +%%PORTDOCS%%%%DOCSDIR%%/CODE_STYLE.txt +%%PORTDOCS%%%%DOCSDIR%%/COMPILING.md +%%PORTDOCS%%%%DOCSDIR%%/COMPILING_osx.md +%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md +%%PORTDOCS%%%%DOCSDIR%%/DEVELOPER_FAQ.md +%%PORTDOCS%%%%DOCSDIR%%/ENUMS.md +%%PORTDOCS%%%%DOCSDIR%%/GAMEMODES.md +%%PORTDOCS%%%%DOCSDIR%%/GAME_BALANCE.txt +%%PORTDOCS%%%%DOCSDIR%%/JSON_INFO.md +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt +%%PORTDOCS%%%%DOCSDIR%%/MODDING.txt +%%PORTDOCS%%%%DOCSDIR%%/OLD_TODO.txt +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/README.txt +%%PORTDOCS%%%%DOCSDIR%%/README_all_translators.txt +%%PORTDOCS%%%%DOCSDIR%%/TESTING.txt +%%PORTDOCS%%%%DOCSDIR%%/TRANSLATING.md +%%PORTDOCS%%%%DOCSDIR%%/changelog.txt +%%PORTDOCS%%%%DOCSDIR%%/de.txt +%%PORTDOCS%%%%DOCSDIR%%/doxygen_conf.txt +%%PORTDOCS%%%%DOCSDIR%%/sokoban.txt +%%PORTDOCS%%%%DOCSDIR%%/tileset.txt +%%NLS%%share/locale/cs/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/de/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/fr/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/it/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/ja/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/ko/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/pl/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/pt/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/ru/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/sr/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/vi/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/zh_CN/LC_MESSAGES/cataclysm-dda.mo +%%NLS%%share/locale/zh_TW/LC_MESSAGES/cataclysm-dda.mo +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%DATADIR%%/gfx/TsuTileset +@dirrm %%DATADIR%%/gfx/HoderTileset +@dirrm %%DATADIR%%/gfx/DeonTileset +@dirrm %%DATADIR%%/gfx +@dirrm %%DATADIR%%/data/raw +@dirrm %%DATADIR%%/data/json/items +@dirrm %%DATADIR%%/data/json +@dirrm %%DATADIR%%/data/font +@dirrm %%DATADIR%%/data +@dirrm %%DATADIR%%