diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2007-08-09 23:15:40 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2007-08-09 23:15:40 +0000 |
commit | d186fde7c3c86c6784a013fff14b6278defb56c9 (patch) | |
tree | d35bd1f008417b4bfdb0f883a68d3a5ecc0c6402 /games-board/slibo | |
parent | Version bump. (diff) | |
download | gentoo-2-d186fde7c3c86c6784a013fff14b6278defb56c9.tar.gz gentoo-2-d186fde7c3c86c6784a013fff14b6278defb56c9.tar.bz2 gentoo-2-d186fde7c3c86c6784a013fff14b6278defb56c9.zip |
Compile fixes for gcc4.2. Submitted by Gene Seto in bug #188069
(Portage version: 2.1.2.11)
Diffstat (limited to 'games-board/slibo')
-rw-r--r-- | games-board/slibo/ChangeLog | 6 | ||||
-rw-r--r-- | games-board/slibo/files/slibo-0.4.4-gcc42.patch | 64 | ||||
-rw-r--r-- | games-board/slibo/slibo-0.4.4.ebuild | 4 |
3 files changed, 71 insertions, 3 deletions
diff --git a/games-board/slibo/ChangeLog b/games-board/slibo/ChangeLog index 107a3ed237ec..fa49c2dcb76b 100644 --- a/games-board/slibo/ChangeLog +++ b/games-board/slibo/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-board/slibo # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-board/slibo/ChangeLog,v 1.10 2007/03/12 13:53:42 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-board/slibo/ChangeLog,v 1.11 2007/08/09 23:15:39 mr_bones_ Exp $ + + 09 Aug 2007; Michael Sterrett <mr_bones_@gentoo.org> + +files/slibo-0.4.4-gcc42.patch, slibo-0.4.4.ebuild: + Compile fixes for gcc4.2. Submitted by Gene Seto in bug #188069 12 Mar 2007; Marius Mauch <genone@gentoo.org> slibo-0.4.4.ebuild: Replacing einfo with elog diff --git a/games-board/slibo/files/slibo-0.4.4-gcc42.patch b/games-board/slibo/files/slibo-0.4.4-gcc42.patch new file mode 100644 index 000000000000..f8b4d1b5860c --- /dev/null +++ b/games-board/slibo/files/slibo-0.4.4-gcc42.patch @@ -0,0 +1,64 @@ +Compile fixes for gcc4.2. +Submitted by Gene Seto at +http://bugs.gentoo.org/show_bug.cgi?id=188069 + +--- slibo-0.4.4/src/flatview.old 2007-08-09 16:48:34.000000000 +0000 ++++ slibo-0.4.4/src/flatview.cpp 2007-08-09 16:54:53.000000000 +0000 +@@ -43,14 +43,14 @@ + //convert board to screen coordinates + + QPoint FlatView::board2screen(CoorFloat q) { +- int squaresize = (width() <? height())/8; ++ int squaresize = (width() < height() ? width() : height())/8; + return QPoint((int)(q.x*squaresize), (int)((8.0-q.y)*squaresize)); + } + + //convert screen to board coordinates. + + CoorFloat FlatView::screen2board(QPoint p1) { +- float squaresize = (width() <? height())/8.0; ++ float squaresize = (width() < height() ? width() : height())/8.0; + return CoorFloat(p1.x() / squaresize, p1.y() / squaresize); + } + +@@ -65,7 +65,7 @@ + } + + void FlatView::resizeEvent(QResizeEvent *e) { +- int squaresize = (e->size().width() <? e->size().height())/8; ++ int squaresize = (e->size().width() < e->size().height() ? e->size().width(): e->size().height())/8; + int nsize = squaresize * 8; + if (nsize != width() || nsize != height()) { + resize(nsize, nsize); +@@ -92,7 +92,7 @@ + } + + void FlatView::paintEvent(QPaintEvent*) { +- int squaresize = (width() <? height())/8; ++ int squaresize = (width() < height() ? width() : height())/8; + QTime t = QTime::currentTime(); + + QValueList<ViewPiece>::iterator i; +--- slibo-0.4.4/src/glview.old 2007-08-09 16:48:39.000000000 +0000 ++++ slibo-0.4.4/src/glview.cpp 2007-08-09 16:56:30.000000000 +0000 +@@ -288,8 +288,8 @@ + q = q + CoorFloat((p2x*vy - p2y*vx), (ux*p2y - uy*p2x)) * (1.0/det); + // q.x += (p2x*vy - p2y*vx) / det; + // q.y += (ux*p2y - uy*p2x) / det; +- q.x = 0.0 >? q.x <? 7.0; +- q.y = 0.0 >? q.y <? 7.0; ++ q.x = std::min(std::max(0.0, (double)q.x), 7.0); ++ q.y = std::min(std::max(0.0, (double)q.y), 7.0); + lastq = q; + d *= 0.5; + } +--- slibo-0.4.4/src/sliboengine/main.old 2007-08-09 16:33:22.000000000 +0000 ++++ slibo-0.4.4/src/sliboengine/main.c 2007-08-09 16:33:32.000000000 +0000 +@@ -22,6 +22,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <signal.h> + #include <unistd.h> + #include <getopt.h> diff --git a/games-board/slibo/slibo-0.4.4.ebuild b/games-board/slibo/slibo-0.4.4.ebuild index 6c9d3d040207..cc51727dc9c1 100644 --- a/games-board/slibo/slibo-0.4.4.ebuild +++ b/games-board/slibo/slibo-0.4.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-board/slibo/slibo-0.4.4.ebuild,v 1.12 2007/03/12 13:53:42 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-board/slibo/slibo-0.4.4.ebuild,v 1.13 2007/08/09 23:15:39 mr_bones_ Exp $ inherit eutils kde @@ -16,7 +16,7 @@ IUSE="" DEPEND="=dev-db/sqlite-2*" need-kde 3 -PATCHES="${FILESDIR}/${PV}-gcc34.patch ${FILESDIR}/${P}-gcc41.patch" +PATCHES="${FILESDIR}/${PV}-gcc34.patch ${FILESDIR}/${P}-gcc41.patch ${FILESDIR}/${P}-gcc42.patch" src_install() { kde_src_install |