Date: Thu, 24 Oct 2019 14:30:31 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r515341 - in head/games/xmoto: . files Message-ID: <201910241430.x9OEUVHx008696@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Thu Oct 24 14:30:30 2019 New Revision: 515341 URL: https://svnweb.freebsd.org/changeset/ports/515341 Log: - Add missing USES and dependency on libX11 - Simplify hash_map handling, C++11 way (fixed build on CURRENT) Modified: head/games/xmoto/Makefile head/games/xmoto/files/patch-src-include-xm__hashmap.h Modified: head/games/xmoto/Makefile ============================================================================== --- head/games/xmoto/Makefile Thu Oct 24 14:28:27 2019 (r515340) +++ head/games/xmoto/Makefile Thu Oct 24 14:30:30 2019 (r515341) @@ -23,10 +23,12 @@ LIB_DEPENDS= libode.so:devel/ode \ BROKEN_powerpc64= fails to compile: hashtable.h: no match for call to __gnu_cxx::hash GNU_CONFIGURE= yes -USES= compiler:features dos2unix gmake jpeg localbase lua:51 sqlite +USES= compiler:features dos2unix gl gmake gnome jpeg localbase lua:51 sdl sqlite xorg USE_GNOME= libxml2 USE_SDL= sdl mixer ttf net USE_GL= gl glu +USE_CXXSTD= c++11 +USE_XORG= x11 DOS2UNIX_GLOB= *.cpp *.h CPPFLAGS+= -isystem${LUA_INCDIR} Modified: head/games/xmoto/files/patch-src-include-xm__hashmap.h ============================================================================== --- head/games/xmoto/files/patch-src-include-xm__hashmap.h Thu Oct 24 14:28:27 2019 (r515340) +++ head/games/xmoto/files/patch-src-include-xm__hashmap.h Thu Oct 24 14:30:30 2019 (r515341) @@ -1,28 +1,33 @@ ---- src/include/xm_hashmap.h.orig 2011-10-11 20:18:17 UTC +--- src/include/xm_hashmap.h.orig 2019-10-23 11:51:33 UTC +++ src/include/xm_hashmap.h -@@ -13,13 +13,18 @@ - #include <hash_map> - namespace HashNamespace=std; - #endif +@@ -1,25 +1,11 @@ + #ifndef __XMHASHMAP_H__ + #define __XMHASHMAP_H__ + +-#ifdef __GNUC__ +-#if (__GNUC__ >= 3) +-#include <ext/hash_map> +- namespace HashNamespace=__gnu_cxx; +-#else +-#include <hash_map> +-#define HashNamespace std +-#endif +-#else // #ifdef __GNUC__ +-#include <hash_map> +-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<std::string> -+ : public unary_function<std::string, size_t> -+ { -+ size_t operator()(const std::string& s) const -+ { -+ return hash<const char*>()(s.c_str()); - } +- } - return strcmp(s1, s2) == 0; - } --}; -+ }; -+} -+#endif // _LIBCPP_VERSION ++#include <unordered_map> ++ ++namespace HashNamespace { ++ template <class Key, class T, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>, class Allocator = std::allocator< std::pair<const Key, T> >> ++ using hash_map = std::unordered_map<Key, T, Hash, Pred, Allocator>; + }; #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910241430.x9OEUVHx008696>