diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2017-06-23 13:38:13 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-17 23:14:48 -0500 |
commit | d52ff9c7616b905e2ed840b06a898c600938df81 (patch) | |
tree | ded0e8cc50671b0c4d65cb2ef82704e038a905c1 | |
parent | 6d8464510cd12f8dd45e77880d72b58beb6eb701 (diff) |
games/brainparty: Patch for gcc >= 6.x.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | games/brainparty/brainparty.SlackBuild | 3 | ||||
-rw-r--r-- | games/brainparty/patches/gcc-6.patch | 47 |
2 files changed, 50 insertions, 0 deletions
diff --git a/games/brainparty/brainparty.SlackBuild b/games/brainparty/brainparty.SlackBuild index 71770366d2c7..8536a943313b 100644 --- a/games/brainparty/brainparty.SlackBuild +++ b/games/brainparty/brainparty.SlackBuild @@ -51,6 +51,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Thanks debian +patch -p1 < $CWD/patches/gcc-6.patch + # Save directory patch. Data directory patch. Use custom SLKCFLAGS. patch -p1 < $CWD/patches/brainparty-0.5-savegame.patch patch -p1 < $CWD/patches/brainparty-0.5-data-directory.patch diff --git a/games/brainparty/patches/gcc-6.patch b/games/brainparty/patches/gcc-6.patch new file mode 100644 index 000000000000..67dfadd5405a --- /dev/null +++ b/games/brainparty/patches/gcc-6.patch @@ -0,0 +1,47 @@ +Description: Fix FTBFS on GCC 6 by removing use of hash_set class +Author: James Cowgill <jcowgill@debian.org> +Bug-Debian: https://bugs.debian.org/811885 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/WordList.h ++++ b/WordList.h +@@ -18,24 +18,11 @@ + #ifndef __WORDLIST_H__ + #define __WORDLIST_H__ + ++#include <string> + #include <vector> +-#include <ext/hash_set> ++#include <unordered_set> + +-using namespace std; +-using namespace __gnu_cxx; +- +-namespace __gnu_cxx +-{ +- template<> struct hash< std::string > +- { +- size_t operator()( const std::string& x ) const +- { +- return hash< const char* >()( x.c_str() ); +- } +- }; +-} +- +-typedef hash_set<string, hash<string> > string_hash_set; ++typedef std::unordered_set<std::string> string_hash_set; + + class WordList { + private: +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,9 @@ else + OSXCOMPAT = + endif + ++# enable c++11 ++CXXFLAGS += -std=c++11 ++ + # object files have corresponding source files + CXX = g++ + |