diff --git a/games/openxcom/Makefile b/games/openxcom/Makefile index 40f5ccb53451..2fbfacf42bdf 100644 --- a/games/openxcom/Makefile +++ b/games/openxcom/Makefile @@ -1,52 +1,52 @@ PORTNAME= openxcom PORTVERSION= 1.0 DISTVERSIONPREFIX= v -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= games MAINTAINER= amdmi3@FreeBSD.org COMMENT= Open-source reimplementation of the original X-Com WWW= https://openxcom.org/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE.txt LIB_DEPENDS= libyaml-cpp.so:devel/yaml-cpp USE_GITHUB= yes GH_ACCOUNT= SupSuper GH_PROJECT= OpenXcom USES= compiler:c++11-lang gl gmake pkgconfig sdl USE_CXXSTD= c++11 USE_SDL= sdl mixer image gfx USE_GL= gl BUILD_WRKSRC= ${WRKSRC}/src MAKEFILE= Makefile.simple SUB_FILES= pkg-message PLIST_FILES= bin/openxcom share/applications/${PORTNAME}.desktop \ share/pixmaps/${PORTNAME}.svg PORTDOCS= * PORTDATA= * OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/README.txt \ ${WRKSRC}/src/Engine/CrossPlatform.cpp do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_DATA} ${WRKSRC}/res/linux/openxcom.desktop ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL_DATA} ${WRKSRC}/res/linux/icons/openxcom.svg ${STAGEDIR}${PREFIX}/share/pixmaps/ @cd ${WRKSRC}/bin && ${COPYTREE_SHARE} data ${STAGEDIR}${DATADIR}/ do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.txt ${WRKSRC}/CHANGELOG.txt ${STAGEDIR}${DOCSDIR}/ .include diff --git a/games/openxcom/files/patch-src_Savegame_SavedBattleGame.cpp b/games/openxcom/files/patch-src_Savegame_SavedBattleGame.cpp new file mode 100644 index 000000000000..6c1bbe6d363f --- /dev/null +++ b/games/openxcom/files/patch-src_Savegame_SavedBattleGame.cpp @@ -0,0 +1,46 @@ +Corresponds to upstream commits 09f8473 and 7fe2dd9 + +--- src/Savegame/SavedBattleGame.cpp.orig 2014-06-13 21:14:43 UTC ++++ src/Savegame/SavedBattleGame.cpp +@@ -148,14 +148,14 @@ + Tile::SerializationKey serKey; + size_t totalTiles = node["totalTiles"].as(); + +- memset(&serKey, 0, sizeof(Tile::SerializationKey)); +- serKey.index = node["tileIndexSize"].as(serKey.index); ++ memset(&serKey, 0, sizeof(Tile::SerializationKey)); ++ serKey.index = node["tileIndexSize"].as(serKey.index); + serKey.totalBytes = node["tileTotalBytesPer"].as(serKey.totalBytes); +- serKey._fire = node["tileFireSize"].as(serKey._fire); +- serKey._smoke = node["tileSmokeSize"].as(serKey._smoke); +- serKey._mapDataID = node["tileIDSize"].as(serKey._mapDataID); +- serKey._mapDataSetID = node["tileSetIDSize"].as(serKey._mapDataSetID); +- serKey.boolFields = node["tileBoolFieldsSize"].as(1); // boolean flags used to be stored in an unmentioned byte (Uint8) :| ++ serKey._fire = node["tileFireSize"].as(serKey._fire); ++ serKey._smoke = node["tileSmokeSize"].as(serKey._smoke); ++ serKey._mapDataID = node["tileIDSize"].as(serKey._mapDataID); ++ serKey._mapDataSetID = node["tileSetIDSize"].as(serKey._mapDataSetID); ++ serKey.boolFields = node["tileBoolFieldsSize"].as(1); // boolean flags used to be stored in an unmentioned byte (Uint8) :| + + // load binary tile data! + YAML::Binary binTiles = node["binTiles"].as(); +@@ -380,13 +380,13 @@ + } + #else + // first, write out the field sizes we're going to use to write the tile data +- node["tileIndexSize"] = Tile::serializationKey.index; ++ node["tileIndexSize"] = static_cast(Tile::serializationKey.index); + node["tileTotalBytesPer"] = Tile::serializationKey.totalBytes; +- node["tileFireSize"] = Tile::serializationKey._fire; +- node["tileSmokeSize"] = Tile::serializationKey._smoke; +- node["tileIDSize"] = Tile::serializationKey._mapDataID; +- node["tileSetIDSize"] = Tile::serializationKey._mapDataSetID; +- node["tileBoolFieldsSize"] = Tile::serializationKey.boolFields; ++ node["tileFireSize"] = static_cast(Tile::serializationKey._fire); ++ node["tileSmokeSize"] = static_cast(Tile::serializationKey._smoke); ++ node["tileIDSize"] = static_cast(Tile::serializationKey._mapDataID); ++ node["tileSetIDSize"] = static_cast(Tile::serializationKey._mapDataSetID); ++ node["tileBoolFieldsSize"] = static_cast(Tile::serializationKey.boolFields); + + size_t tileDataSize = Tile::serializationKey.totalBytes * _mapsize_z * _mapsize_y * _mapsize_x; + Uint8* tileData = (Uint8*) calloc(tileDataSize, 1);