diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-12 20:32:39 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-12 20:32:39 +0000 |
commit | 21cb1319976d90574dd1ea6bd85217126d5d73a5 (patch) | |
tree | 0bdff83c6df62cdf670c32a6e101c3d16cd39bf0 /games-board/hexxagon | |
parent | Added tcllib as a dependency for dplite (diff) | |
download | gentoo-2-21cb1319976d90574dd1ea6bd85217126d5d73a5.tar.gz gentoo-2-21cb1319976d90574dd1ea6bd85217126d5d73a5.tar.bz2 gentoo-2-21cb1319976d90574dd1ea6bd85217126d5d73a5.zip |
Fix building with GCC 4.4+ wrt #273226, thanks to vasuvi from #gentoo-kde for patch.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'games-board/hexxagon')
-rw-r--r-- | games-board/hexxagon/ChangeLog | 9 | ||||
-rw-r--r-- | games-board/hexxagon/files/hexxagon-1.0-gcc42.patch | 18 | ||||
-rw-r--r-- | games-board/hexxagon/files/hexxagon-1.0-toolchain.patch | 139 | ||||
-rw-r--r-- | games-board/hexxagon/hexxagon-1.0.ebuild | 13 |
4 files changed, 152 insertions, 27 deletions
diff --git a/games-board/hexxagon/ChangeLog b/games-board/hexxagon/ChangeLog index 3729278da22d..b442fce59061 100644 --- a/games-board/hexxagon/ChangeLog +++ b/games-board/hexxagon/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-board/hexxagon -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-board/hexxagon/ChangeLog,v 1.19 2008/04/08 01:45:41 mr_bones_ Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-board/hexxagon/ChangeLog,v 1.20 2009/08/12 20:32:39 ssuominen Exp $ + + 12 Aug 2009; Samuli Suominen <ssuominen@gentoo.org> hexxagon-1.0.ebuild, + +files/hexxagon-1.0-toolchain.patch: + Fix building with GCC 4.4+ wrt #273226, thanks to vasuvi from #gentoo-kde + for patch. 08 Apr 2008; Michael Sterrett <mr_bones_@gentoo.org> hexxagon-1.0.ebuild: fix deps (bug #216560) diff --git a/games-board/hexxagon/files/hexxagon-1.0-gcc42.patch b/games-board/hexxagon/files/hexxagon-1.0-gcc42.patch deleted file mode 100644 index 200958b07f77..000000000000 --- a/games-board/hexxagon/files/hexxagon-1.0-gcc42.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- src/libhexx/bitboard64.h -+++ src/libhexx/bitboard64.h -@@ -55,13 +55,12 @@ - printf("0x%X, 0x%X\n", lowbits, highbits); - }; - -- friend std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b); -- friend std::istream& operator>>(std::istream &input, class BitBoard64 &b); - -- private: - - uint32_t lowbits, highbits; - }; -+ std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b); -+ std::istream& operator>>(std::istream &input, class BitBoard64 &b); - } - - #endif diff --git a/games-board/hexxagon/files/hexxagon-1.0-toolchain.patch b/games-board/hexxagon/files/hexxagon-1.0-toolchain.patch new file mode 100644 index 000000000000..d4d30913ad12 --- /dev/null +++ b/games-board/hexxagon/files/hexxagon-1.0-toolchain.patch @@ -0,0 +1,139 @@ +diff -ur hexxagon-1.0/src/libhexx/bitboard64.h ../BUILD/hexxagon-1.0/src/libhexx/bitboard64.h
+--- hexxagon-1.0/src/libhexx/bitboard64.h 2005-01-13 13:19:07.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/bitboard64.h 2009-08-12 13:11:57.663180010 -0700
+@@ -19,12 +19,12 @@
+ *
+ */
+
+-
+ #ifndef _BITBOARD64_H
+ #define _BITBOARD64_H
+
+ #include <netinet/in.h>
+ #include <iostream>
++#include <cstdio>
+
+ namespace libhexx
+ {
+@@ -54,14 +54,12 @@
+ {
+ printf("0x%X, 0x%X\n", lowbits, highbits);
+ };
+-
+- friend std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b);
+- friend std::istream& operator>>(std::istream &input, class BitBoard64 &b);
+-
+- private:
+-
++
+ uint32_t lowbits, highbits;
+ };
++
++ std::ostream& operator<<(std::ostream &output, const class BitBoard64 &b);
++ std::istream& operator>>(std::istream &input, class BitBoard64 &b);
+ }
+
+ #endif
+diff -ur hexxagon-1.0/src/libhexx/board.h ../BUILD/hexxagon-1.0/src/libhexx/board.h
+--- hexxagon-1.0/src/libhexx/board.h 2005-01-16 03:12:23.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/board.h 2009-08-12 13:11:35.577180031 -0700
+@@ -33,8 +33,21 @@
+
+ namespace libhexx
+ {
+- class Move;
+- class MoveList;
++ class Move
++ {
++ public:
++ Move();
++ Move(int t);
++ Move(int f, int t);
++
++ operator bool() const;
++
++ char from, to;
++ int score;
++ };
++
++ bool scoreMoves(std::vector<Move> &moves, class Board board,
++ const LookUp& lookUp, int depth, bool (*callback)(), int maxtime);
+
+ enum
+ {
+diff -ur hexxagon-1.0/src/libhexx/libhexx.h ../BUILD/hexxagon-1.0/src/libhexx/libhexx.h
+--- hexxagon-1.0/src/libhexx/libhexx.h 2005-01-13 13:19:07.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/libhexx.h 2009-08-12 12:02:28.756180003 -0700
+@@ -19,7 +19,6 @@
+ *
+ */
+
+-
+ #include "bitboard64.h"
+ #include "move.h"
+ #include "board.h"
+diff -ur hexxagon-1.0/src/libhexx/lookup.h ../BUILD/hexxagon-1.0/src/libhexx/lookup.h
+--- hexxagon-1.0/src/libhexx/lookup.h 2005-01-13 13:19:07.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/lookup.h 2009-08-12 11:58:08.758180417 -0700
+@@ -27,6 +27,8 @@
+
+ namespace libhexx
+ {
++ class BitBoard64;
++
+ int getHexxagonIndex(int x, int y);
+
+ class LookUp
+diff -ur hexxagon-1.0/src/libhexx/move.cpp ../BUILD/hexxagon-1.0/src/libhexx/move.cpp
+--- hexxagon-1.0/src/libhexx/move.cpp 2005-01-16 03:12:23.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/move.cpp 2009-08-12 13:12:27.140180083 -0700
+@@ -114,4 +114,11 @@
+ return true;
+ }
+
+-
++Move::Move() { from = 99; to = 99;};
++Move::Move(int t) { from = t; to = t; };
++Move::Move(int f, int t) { from = f; to = t; };
++
++Move::operator bool() const
++{
++ return from != 99 && to != 99;
++}
+diff -ur hexxagon-1.0/src/libhexx/move.h ../BUILD/hexxagon-1.0/src/libhexx/move.h
+--- hexxagon-1.0/src/libhexx/move.h 2005-01-13 13:19:07.000000000 -0800
++++ ../BUILD/hexxagon-1.0/src/libhexx/move.h 2009-08-12 13:12:50.146179982 -0700
+@@ -23,19 +23,19 @@
+ #ifndef _MOVE_H
+ #define _MOVE_H
+
+-#include "board.h"
+-
+ #include <list>
+ #include <vector>
+
+ namespace libhexx
+ {
++ class Board;
++
+ class Move
+ {
+ public:
+- Move() { from = 99; to = 99;};
+- Move(int t) { from = t; to = t; };
+- Move(int f, int t) { from = f; to = t; };
++ Move();
++ Move(int t);
++ Move(int f, int t);
+
+ inline bool operator<(const Move &r) const
+ {
+@@ -47,7 +47,7 @@
+ return (score != r.score);
+ };
+
+- operator bool() const { return from != 99 && to != 99; };
++ operator bool() const;
+
+ char from, to;
+ int score;
diff --git a/games-board/hexxagon/hexxagon-1.0.ebuild b/games-board/hexxagon/hexxagon-1.0.ebuild index 7827aaed3475..a900d8ca3142 100644 --- a/games-board/hexxagon/hexxagon-1.0.ebuild +++ b/games-board/hexxagon/hexxagon-1.0.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-board/hexxagon/hexxagon-1.0.ebuild,v 1.9 2008/04/08 01:45:41 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-board/hexxagon/hexxagon-1.0.ebuild,v 1.10 2009/08/12 20:32:39 ssuominen Exp $ +EAPI=2 inherit eutils games DESCRIPTION="clone of the original DOS game" @@ -15,14 +16,12 @@ IUSE="" RDEPEND=">=dev-cpp/glibmm-2.4 >=dev-cpp/gtkmm-2.4 - >=x11-libs/gtk+-2.0" + x11-libs/gtk+:2" DEPEND="${RDEPEND} dev-util/pkgconfig" -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${P}-gcc42.patch +src_prepare() { + epatch "${FILESDIR}"/${P}-toolchain.patch } src_install() { |