diff --git a/games/xray_re-tools/Makefile b/games/xray_re-tools/Makefile index 6267cb8bf449..7e162e8e333b 100644 --- a/games/xray_re-tools/Makefile +++ b/games/xray_re-tools/Makefile @@ -1,74 +1,73 @@ PORTNAME= xray_re-tools DISTVERSION= g20180902 CATEGORIES= games converters MAINTAINER= danfe@FreeBSD.org COMMENT= X-Ray engine game asset converter (unofficial) WWW= https://github.com/abramcumner/xray_re-tools BUILD_DEPENDS= ${NONEXISTENT}:graphics/nvidia-texture-tools:patch LIB_DEPENDS= liblzo2.so:archivers/lzo2 \ libvorbisfile.so:audio/libvorbis \ libnvtt.so:graphics/nvidia-texture-tools USE_GITHUB= yes GH_ACCOUNT= abramcumner GH_TAGNAME= 52721d2 MAKEFILE= ${FILESDIR}/Makefile BUILD_WRKSRC= ${WRKSRC}/sources WITHOUT_FBSD10_FIX= yes _NVTT_WRKSRC= ${MAKE} -C ${PORTSDIR}/graphics/nvidia-texture-tools -V WRKSRC PLIST_FILES= bin/xr_converter post-extract: @${MV} ${WRKSRC}/sources/3rd\ party ${WRKSRC}/sources/3rd-party @cd ${WRKSRC}/sources/3rd-party && ${RM} -r libogg libvorbis nvtt @${MV} ${WRKSRC}/sources/utils/converter/opcode/Ice/IceTrilist.h \ ${WRKSRC}/sources/utils/converter/opcode/Ice/IceTriList.h @${LN} -s StdAfx.h ${WRKSRC}/sources/utils/converter/opcode/Stdafx.h post-patch: @${REINPLACE_CMD} -e '/#include/s,Math,math,' \ -e '/#include/s,\.\\Ice\\,Ice/,' \ ${WRKSRC}/sources/utils/converter/opcode/OPC_IceHook.h @${REINPLACE_CMD} -e 's,string& version,string version,' \ ${WRKSRC}/sources/utils/converter/level_tools.cxx @${REINPLACE_CMD} -e '19s,attenuation1,attenuation2,' \ ${WRKSRC}/sources/xray_re/xr_d3d_light.cxx @${REINPLACE_CMD} -e '/OGF3_S_SMPARAMS_VERSION/s,||,\&\&,' \ ${WRKSRC}/sources/xray_re/xr_ogf_v3.cxx @${REINPLACE_CMD} -e 's,mP0,mP1,' \ ${WRKSRC}/sources/utils/converter/opcode/Ice/IceLSS.h @${REINPLACE_CMD} -e 's,} if,} else if,' \ ${WRKSRC}/sources/utils/converter/level_mesh_ladders.cxx @${REINPLACE_CMD} -e 's,push_back,this->&,' \ ${WRKSRC}/sources/xray_re/xr_influence.h @${REINPLACE_CMD} -e 's,type_info& type,std::&,' \ ${WRKSRC}/sources/xray_re/xr_scene.cxx @${REINPLACE_CMD} -e 's,sprintf_s,xr_snprintf,' \ ${WRKSRC}/sources/xray_re/xr_scene_ways.cxx @${REINPLACE_CMD} -e '/return/s,_stricmp,strcasecmp,' \ ${WRKSRC}/sources/xray_re/xr_string_utils.h @${REINPLACE_CMD} -e 's,MINGW32__),& || defined(__FreeBSD__),' \ ${WRKSRC}/sources/xray_re/xr_types.h post-configure: @${LN} -sf ${_NVTT_WRKSRC:sh}/src ${WRKSRC}/sources/3rd-party/nvtt - @${REINPLACE_CMD} -e '/#include "nvconfig\.h"/d' \ - ${WRKSRC}/sources/3rd-party/nvtt/nvcore/nvcore.h + @${ECHO_CMD} > ${WRKSRC}/sources/xray_re/nvconfig.h do-install: ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/converter \ ${STAGEDIR}${PREFIX}/bin/xr_converter # Alternative to DOS2UNIX_FILES that preserves original timestamps, # to be used together with `-l' switch added to PATCH_ARGS below. fixpatches: @${FIND} ${FILESDIR} -name patch-* | ${XARGS} ${SED} -i '' \ -E 's,[[:cntrl:]]*$$,,' .include PATCH_ARGS+= -l