Index: head/games/xmoto/Makefile =================================================================== --- head/games/xmoto/Makefile (revision 426112) +++ head/games/xmoto/Makefile (revision 426113) @@ -1,75 +1,75 @@ # Created by: Dmitry Marakasov # $FreeBSD$ PORTNAME= xmoto PORTVERSION= 0.5.11 PORTREVISION= 7 CATEGORIES= games MASTER_SITES= http://download.tuxfamily.org/xmoto/xmoto/${PORTVERSION}/ \ http://mirror.amdmi3.ru/distfiles/ DISTNAME= ${PORTNAME}-${PORTVERSION}-src MAINTAINER= amdmi3@FreeBSD.org COMMENT= Challenging 2D motocross platform game +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + LIB_DEPENDS= libpng.so:graphics/png \ libcurl.so:ftp/curl \ libxdg-basedir.so:x11/libxdg-basedir BUILD_DEPENDS= ${LOCALBASE}/lib/libode.a:devel/ode -LICENSE= GPLv2+ -LICENSE_FILE= ${WRKSRC}/COPYING - GNU_CONFIGURE= yes -USES= compiler:features dos2unix gmake jpeg lua:51 sqlite +USES= compiler:features dos2unix gmake jpeg localbase lua:51 sqlite USE_GNOME= libxml2 USE_SDL= sdl mixer ttf net USE_GL= gl glu DOS2UNIX_GLOB= *.cpp *.h -CPPFLAGS+= -I${LOCALBASE}/include -I${LUA_INCDIR} -LDFLAGS+= -L${LOCALBASE}/lib -L${LUA_LIBDIR} +CPPFLAGS+= -isystem${LUA_INCDIR} +LDFLAGS+= -L${LUA_LIBDIR} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PORTDOCS= README ChangeLog PORTDATA= * +DESKTOP_ENTRIES="XMoto" \ + "Motorcross game" \ + "${DATADIR}/xmoto_icone_x.ico" \ + "xmoto" \ + "Game;SportsGame;ArcadeGame;" \ + false + OPTIONS_DEFINE= ASIAN_TTF DOCS NLS OPTIONS_SUB= yes ASIAN_TTF_DESC= Use asian TTF font ASIAN_TTF_RUN_DEPENDS= ${LOCALBASE}/share/fonts/TrueType/bkai00mp.ttf:chinese/arphicttf ASIAN_TTF_CONFIGURE_ON= --with-asian-ttf-file=${LOCALBASE}/share/fonts/TrueType/bsmi00lp.ttf ASIAN_TTF_CONFIGURE_OFF=--without-asian-ttf-file NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls -DESKTOP_ENTRIES="XMoto" \ - "Motorcross game" \ - "${DATADIR}/xmoto_icone_x.ico" \ - "xmoto" \ - "Game;SportsGame;ArcadeGame;" \ - false - .include .if ${COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 BROKEN= does not build with gcc 4.2 .endif post-extract: @${RM} -r ${WRKSRC}/src/ode post-patch: @${REINPLACE_CMD} -e "s/lua5.1/lua-${LUA_VER}/g" ${WRKSRC}/configure -post-install: - ${MKDIR} ${STAGEDIR}${DOCSDIR} +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} .for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ .endfor .include Index: head/games/xmoto/files/patch-src-GameInit.cpp =================================================================== --- head/games/xmoto/files/patch-src-GameInit.cpp (revision 426112) +++ head/games/xmoto/files/patch-src-GameInit.cpp (revision 426113) @@ -1,11 +1,11 @@ ---- src/GameInit.cpp.orig 2015-01-10 18:22:36.000000000 +0100 -+++ src/GameInit.cpp 2015-01-10 18:27:28.000000000 +0100 +--- src/GameInit.cpp.orig 2011-10-11 20:18:35 UTC ++++ src/GameInit.cpp @@ -248,7 +248,7 @@ void GameApp::run_load(int nNumArgs, cha Logger::setActiv(XMSession::instance()->noLog() == false); /* apply log activ mode */ LogInfo(std::string("X-Moto " + XMBuild::getVersionString(true)).c_str()); - LogInfo("compiled at "__DATE__" "__TIME__); + LogInfo("compiled at " __DATE__ " " __TIME__); if(SwapEndian::bigendien) { LogInfo("Systeme is bigendien"); } else { Index: head/games/xmoto/files/patch-src-VTexture.h =================================================================== --- head/games/xmoto/files/patch-src-VTexture.h (revision 426112) +++ head/games/xmoto/files/patch-src-VTexture.h (revision 426113) @@ -1,11 +1,11 @@ ---- src/VTexture.h.orig 2011-10-12 00:18:35.000000000 +0400 -+++ src/VTexture.h 2014-11-24 22:08:42.749026473 +0300 -@@ -135,7 +135,7 @@ +--- src/VTexture.h.orig 2011-10-11 20:18:35 UTC ++++ src/VTexture.h +@@ -135,7 +135,7 @@ private: void cleanUnregistredTextures(); - HashNamespace::hash_map, hashcmp_str> m_textureSizeCache; + HashNamespace::hash_map m_textureSizeCache; std::vector m_textureSizeCacheKeys; std::vector m_textureSizeCacheValues; Index: head/games/xmoto/files/patch-src-WWW.cpp =================================================================== --- head/games/xmoto/files/patch-src-WWW.cpp (revision 426112) +++ head/games/xmoto/files/patch-src-WWW.cpp (revision 426113) @@ -1,47 +1,47 @@ ---- src/WWW.cpp.orig 2015-01-10 18:11:22.000000000 +0100 -+++ src/WWW.cpp 2015-01-10 18:21:32.000000000 +0100 +--- src/WWW.cpp.orig 2011-10-11 20:18:35 UTC ++++ src/WWW.cpp @@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::stri std::string v_www_agent = WWW_AGENT; /* open the file */ - if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) { + if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) { throw Exception("error : unable to open output file " + v_local_file_tmp); } @@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::stri LogInfo(std::string("Uploading replay " + p_replayFilename).c_str()); /* open the file */ - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) { throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR")); } @@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string& LogInfo("Sending vote"); /* open the file */ - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) { throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV")); } @@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string LogInfo("Sending report"); /* open the file */ - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) { + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) { throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR")); } @@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::stri LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str()); /* open the file */ - if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) { + if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) { throw Exception("error : unable to open output file " + p_answerFile); } Index: head/games/xmoto/files/patch-src-drawlib-DrawLibOpenGL.cpp =================================================================== --- head/games/xmoto/files/patch-src-drawlib-DrawLibOpenGL.cpp (revision 426112) +++ head/games/xmoto/files/patch-src-drawlib-DrawLibOpenGL.cpp (revision 426113) @@ -1,34 +1,34 @@ ---- src/drawlib/DrawLibOpenGL.cpp.orig 2011-10-12 00:18:26.000000000 +0400 -+++ src/drawlib/DrawLibOpenGL.cpp 2014-11-24 22:08:12.925973647 +0300 -@@ -80,7 +80,7 @@ +--- src/drawlib/DrawLibOpenGL.cpp.orig 2011-10-11 20:18:26 UTC ++++ src/drawlib/DrawLibOpenGL.cpp +@@ -80,7 +80,7 @@ public: /* a glyph from other glyphs */ /*kejo:why not just grrr create a copy contructor*/ GLFontGlyph(const std::string& i_value, - HashNamespace::hash_map, hashcmp_str>& i_glyphsLetters); + HashNamespace::hash_map& i_glyphsLetters); virtual ~GLFontGlyph(); std::string Value() const; -@@ -132,11 +132,11 @@ +@@ -132,11 +132,11 @@ public: private: std::vector m_glyphsKeys; std::vector m_glyphsValues; - HashNamespace::hash_map, hashcmp_str> m_glyphs; + HashNamespace::hash_map m_glyphs; std::vector m_glyphsLettersKeys; std::vector m_glyphsLettersValues; - HashNamespace::hash_map, hashcmp_str> m_glyphsLetters; + HashNamespace::hash_map m_glyphsLetters; unsigned int getLonguestLineSize(const std::string& i_value, unsigned int i_start = 0, unsigned int i_nbLinesToRead = -1); }; -@@ -825,7 +825,7 @@ +@@ -825,7 +825,7 @@ GLFontGlyph::GLFontGlyph(const std::stri } GLFontGlyph::GLFontGlyph(const std::string& i_value, - HashNamespace::hash_map, hashcmp_str>& i_glyphsLetters) { + HashNamespace::hash_map& i_glyphsLetters) { GLFontGlyph* v_glyph; std::string v_char; Index: head/games/xmoto/files/patch-src-helpers-System.cpp =================================================================== --- head/games/xmoto/files/patch-src-helpers-System.cpp (revision 426112) +++ head/games/xmoto/files/patch-src-helpers-System.cpp (revision 426113) @@ -1,11 +1,11 @@ ---- src/helpers/System.cpp.orig 2011-10-12 00:18:14.000000000 +0400 -+++ src/helpers/System.cpp 2013-09-13 22:36:38.029229232 +0400 -@@ -25,6 +25,8 @@ - #include "VExcept.h" - #include +--- src/helpers/System.cpp.orig 2014-03-29 06:14:14 UTC ++++ src/helpers/System.cpp +@@ -31,6 +31,8 @@ Foundation, Inc., 59 Temple Place, Suite + #include + #endif +#include // for getpid() + std::vector* System::getDisplayModes(int windowed) { std::vector* modes = new std::vector; SDL_Rect **sdl_modes; Index: head/games/xmoto/files/patch-src-include-xm__hashmap.h =================================================================== --- head/games/xmoto/files/patch-src-include-xm__hashmap.h (revision 426112) +++ head/games/xmoto/files/patch-src-include-xm__hashmap.h (revision 426113) @@ -1,28 +1,28 @@ ---- src/include/xm_hashmap.h.orig 2015-01-12 23:04:54.000000000 +0100 -+++ src/include/xm_hashmap.h 2015-01-12 23:07:53.000000000 +0100 +--- src/include/xm_hashmap.h.orig 2011-10-11 20:18:17 UTC ++++ src/include/xm_hashmap.h @@ -13,13 +13,18 @@ #include namespace HashNamespace=std; #endif -struct hashcmp_str { - bool operator()(const char* s1, const char* s2) { - if(s1 == NULL || s2 == NULL) { - return false; + +#ifdef _LIBCPP_VERSION +namespace __gnu_cxx { + template<> struct hash + : public unary_function + { + size_t operator()(const std::string& s) const + { + return hash()(s.c_str()); } - return strcmp(s1, s2) == 0; - } -}; + }; +} +#endif // _LIBCPP_VERSION #endif