From f5d962b1ae6dfc11d3fea7322c289082482176fa Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 16 Sep 2012 10:06:23 -0300 Subject: games/pentagram: Fixed to build against gcc-4.7 Signed-off-by: Niels Horn --- games/pentagram/pentagram.SlackBuild | 5 +++- games/pentagram/pentagram_gcc47.patch | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 games/pentagram/pentagram_gcc47.patch diff --git a/games/pentagram/pentagram.SlackBuild b/games/pentagram/pentagram.SlackBuild index fbb49e2ac6..a819f971db 100644 --- a/games/pentagram/pentagram.SlackBuild +++ b/games/pentagram/pentagram.SlackBuild @@ -6,7 +6,7 @@ PRGNAM=pentagram VERSION=${VERSION:-20110229_svn} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -51,6 +51,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Patch to build against gcc-4.7 +patch -p1 < $CWD/pentagram_gcc47.patch + ./bootstrap # The extra scalers make the binary about 50% bigger (not enough diff --git a/games/pentagram/pentagram_gcc47.patch b/games/pentagram/pentagram_gcc47.patch new file mode 100644 index 0000000000..153c40ea6d --- /dev/null +++ b/games/pentagram/pentagram_gcc47.patch @@ -0,0 +1,46 @@ +--- pentagram-20110229_svn/misc/istring.h 2004-11-14 11:09:40.000000000 -0200 ++++ pentagram-20110229_svn_patched/misc/istring.h 2012-09-16 00:36:09.000000000 -0300 +@@ -143,37 +143,37 @@ + + _Myt& operator=(const _Myt& _Right) + { // assign _Right +- assign(_Right); ++ this->assign(_Right); + return (*this); + } + + _Myt& operator=(const _Elem *_Ptr) + { // assign [_Ptr, ) +- assign(_Ptr); ++ this->assign(_Ptr); + return (*this); + } + + _Myt& operator=(_Elem _Ch) + { // assign 1 * _Ch +- assign(1, _Ch); ++ this->assign(1, _Ch); + return (*this); + } + + _Myt& operator+=(const _Myt& _Right) + { // append _Right +- append(_Right); ++ this->append(_Right); + return (*this); + } + + _Myt& operator+=(const _Elem *_Ptr) + { // append [_Ptr, ) +- append(_Ptr); ++ this->append(_Ptr); + return (*this); + } + + _Myt& operator+=(_Elem _Ch) + { // append 1 * _Ch +- append(static_cast(1), _Ch); ++ this->append(static_cast(1), _Ch); + return (*this); + } + -- cgit v1.2.3-65-gdbad