summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2015-11-07 14:32:57 +0100
committerPacho Ramos <pacho@gentoo.org>2015-11-07 14:33:19 +0100
commitb7af69e8e1e4b595c3dd4e4a477cbb7d21c0203c (patch)
tree019296eafc4dfb7a183cd92615e27100ca40ddd5 /games-board/openyahtzee
parentx11-misc/lightdm: Version bump (diff)
downloadgentoo-b7af69e8e1e4b595c3dd4e4a477cbb7d21c0203c.tar.gz
gentoo-b7af69e8e1e4b595c3dd4e4a477cbb7d21c0203c.tar.bz2
gentoo-b7af69e8e1e4b595c3dd4e4a477cbb7d21c0203c.zip
games-board/openyahtzee: Version bump and support wxGTK:3.0 (#563962)
Package-Manager: portage-2.2.23
Diffstat (limited to 'games-board/openyahtzee')
-rw-r--r--games-board/openyahtzee/Manifest1
-rw-r--r--games-board/openyahtzee/files/openyahtzee-1.9.2-wx3.0.patch67
-rw-r--r--games-board/openyahtzee/openyahtzee-1.9.2.ebuild46
3 files changed, 114 insertions, 0 deletions
diff --git a/games-board/openyahtzee/Manifest b/games-board/openyahtzee/Manifest
index 1a1267e26f1..717069734e3 100644
--- a/games-board/openyahtzee/Manifest
+++ b/games-board/openyahtzee/Manifest
@@ -1 +1,2 @@
DIST openyahtzee-1.9.1.tar.bz2 159149 SHA256 aa553a248d30ba259abb8dee735d5728bfdbb8d4705805bc716453245f1cb0a0 SHA512 2833a7085bb03d157b58a5e3a95c03b8a51cc8b527aec204188c8f773c492f4822655ec15dbedd4330c25bc4382132694ae7d3935dfb27756e859149ab66ef59 WHIRLPOOL 8c9986f163576d2d5ab31ea4083139645513c6d3e1a171cba9cb7030186a2f022984e8a9925f7524e2b25b9c7ad3a989eb39bb76b13642cef848e66daabfa86d
+DIST openyahtzee-1.9.2.tar.bz2 194053 SHA256 a56c2c16fc6ec3f4eba5a85afcf19467b364ec38f4374724673a0360fc3f83cd SHA512 012b7081eafafb28ada3d15f82d42b0a7fe5fe2e4c728dfbd1e3c688ef0e00bd22a55b1450e267c6e1d9d3cc2a8cf76dbec336c744a239df7dd46a473038b141 WHIRLPOOL 9013b7006fe4da86f69127c9a5a11544bd1022e31a4f0197d4fce58d75113b0246d5b76e1adf6a7e4d73ddd4beff0ce2a1a53a0e853366c59effbb3dfd406e80
diff --git a/games-board/openyahtzee/files/openyahtzee-1.9.2-wx3.0.patch b/games-board/openyahtzee/files/openyahtzee-1.9.2-wx3.0.patch
new file mode 100644
index 00000000000..485a14c9cee
--- /dev/null
+++ b/games-board/openyahtzee/files/openyahtzee-1.9.2-wx3.0.patch
@@ -0,0 +1,67 @@
+From: Guy Rutenberg <guyrutenberg@gmail.com>
+Date: Sat, 25 Oct 2014 15:33:42 +0200
+Subject: wxstrtol
+
+Fixes a FTBFS with recent versions of wx3.0.
+---
+ src/MainFrame.cpp | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/MainFrame.cpp b/src/MainFrame.cpp
+index 2128376..8e29d6d 100644
+--- a/src/MainFrame.cpp
++++ b/src/MainFrame.cpp
+@@ -510,7 +510,7 @@ void MainFrame::OnUndo(wxCommandEvent& event)
+ wxString tempstr;
+
+ tempstr = ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> GetValue();
+- tempstr.Printf(wxT("%li"), wxStrtol(tempstr, NULL, 10) - 100);
++ tempstr.Printf(wxT("%li"), strtol(tempstr.mb_str(), NULL, 10) - 100);
+ ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> SetValue(tempstr);
+ }
+
+@@ -936,7 +936,7 @@ void MainFrame::YahtzeeBonus()
+ return;
+ if (m_score_dice.IsYahtzee()) {
+ tempstr = ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> GetValue();
+- tempstr.Printf(wxT("%li"), wxStrtol(tempstr, NULL, 10) + 100);
++ tempstr.Printf(wxT("%li"), strtol(tempstr.mb_str(), NULL, 10) + 100);
+ ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> SetValue(tempstr);
+ m_yahtzeebonus = true;
+ }
+@@ -973,7 +973,7 @@ void MainFrame::EndofGame()
+
+ for (int i = ID_ACESTEXT; i<=ID_SIXESTEXT; i++){
+ tempstr = ((wxTextCtrl*) FindWindow(i)) -> GetValue();
+- upperscore += wxStrtol(tempstr, NULL, 10);
++ upperscore += strtol(tempstr.mb_str(), NULL, 10);
+ }
+
+ tempstr.Printf(wxT("%li"),upperscore);
+@@ -992,7 +992,7 @@ void MainFrame::EndofGame()
+ //calculate total on lower section
+ for (int i = ID_THREEOFAKINDTEXT; i<=ID_YAHTZEEBONUSTEXT; i++) {
+ tempstr = ((wxTextCtrl*) FindWindow(i)) -> GetValue();
+- lowerscore += wxStrtol(tempstr, NULL, 10);
++ lowerscore += strtol(tempstr.mb_str(), NULL, 10);
+ }
+
+ tempstr.Printf(wxT("%li"),lowerscore);
+@@ -1091,7 +1091,7 @@ void MainFrame::CalculateSubTotal()
+
+ for (int i = ID_ACESTEXT; i<=ID_SIXESTEXT; i++){
+ tempstr = ((wxTextCtrl*) FindWindow(i)) -> GetValue();
+- upperscore += wxStrtol(tempstr, NULL, 10);
++ upperscore += strtol(tempstr.mb_str(), NULL, 10);
+ }
+
+ tempstr.Printf(wxT("%li"),upperscore);
+@@ -1105,7 +1105,7 @@ void MainFrame::CalculateSubTotal()
+
+ for (int i = ID_THREEOFAKINDTEXT; i<=ID_YAHTZEEBONUSTEXT; i++) {
+ tempstr = ((wxTextCtrl*) FindWindow(i)) -> GetValue();
+- lowerscore += wxStrtol(tempstr, NULL, 10);
++ lowerscore += strtol(tempstr.mb_str(), NULL, 10);
+ }
+
+ tempstr.Printf(wxT("%li"),lowerscore);
diff --git a/games-board/openyahtzee/openyahtzee-1.9.2.ebuild b/games-board/openyahtzee/openyahtzee-1.9.2.ebuild
new file mode 100644
index 00000000000..8458d300d93
--- /dev/null
+++ b/games-board/openyahtzee/openyahtzee-1.9.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="3.0"
+inherit eutils wxwidgets toolchain-funcs versionator games
+
+DESCRIPTION="A full-featured wxWidgets version of the classic dice game Yahtzee"
+HOMEPAGE="http://openyahtzee.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openyahtzee/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X]"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.6
+ dev-libs/boost"
+
+pkg_pretend() {
+ local ver=4.6
+ local msg="You need at least GCC ${ver}.x for C++11 range-based 'for' and nullptr support."
+ if ! version_is_at_least ${ver} $(gcc-version); then
+ eerror ${msg}
+ die ${msg}
+ fi
+}
+
+src_prepare() {
+ # Debian patch that was upstreamed and accepted
+ # This can be dropped on next version then
+ epatch "${FILESDIR}"/${P}-wx3.0.patch
+}
+
+src_configure() {
+ need-wxwidgets unicode
+ egamesconf --datadir=/usr/share
+}
+
+src_install() {
+ default
+ prepgamesdirs
+}