Package: openyahtzee
Version: 1.9.1-2
Severity: important
Tags: patch
User: [email protected]
Usertags: wx3.0
Dear maintainer,
We're aiming to migrate the archive to using wxwidgets3.0 instead of
wxwidgets2.8, and intend to drop wxwidgets2.8 before jessie is released.
I've rebuilt your package using the attached patch, and tested it, and
everything seems to work fine.
I'm happy to NMU this change if you wish me to - just let me know.
Cheers,
Olly
diff -Nru openyahtzee-1.9.1/debian/changelog openyahtzee-1.9.1/debian/changelog
--- openyahtzee-1.9.1/debian/changelog 2012-12-29 10:52:08.000000000 +1300
+++ openyahtzee-1.9.1/debian/changelog 2014-06-01 00:31:03.000000000 +1200
@@ -1,3 +1,10 @@
+openyahtzee (1.9.1-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Update to use wxwidgets3.0 (new patch wx3.0-compat.patch)
+
+ -- Olly Betts <[email protected]> Sun, 01 Jun 2014 00:31:01 +1200
+
openyahtzee (1.9.1-2) unstable; urgency=low
* New Maintainer. (Closes: #544935)
diff -Nru openyahtzee-1.9.1/debian/control openyahtzee-1.9.1/debian/control
--- openyahtzee-1.9.1/debian/control 2013-01-12 13:25:54.000000000 +1300
+++ openyahtzee-1.9.1/debian/control 2013-11-17 01:17:28.000000000 +1300
@@ -9,7 +9,7 @@
debhelper (>= 9),
dh-autoreconf,
libboost-dev,
- libwxgtk2.8-dev,
+ libwxgtk3.0-dev,
pkg-config
Standards-Version: 3.9.4
Homepage: http://www.openyahtzee.org/
diff -Nru openyahtzee-1.9.1/debian/patches/series openyahtzee-1.9.1/debian/patches/series
--- openyahtzee-1.9.1/debian/patches/series 1970-01-01 12:00:00.000000000 +1200
+++ openyahtzee-1.9.1/debian/patches/series 2014-06-01 00:30:37.000000000 +1200
@@ -0,0 +1 @@
+wx3.0-compat.patch
diff -Nru openyahtzee-1.9.1/debian/patches/wx3.0-compat.patch openyahtzee-1.9.1/debian/patches/wx3.0-compat.patch
--- openyahtzee-1.9.1/debian/patches/wx3.0-compat.patch 1970-01-01 12:00:00.000000000 +1200
+++ openyahtzee-1.9.1/debian/patches/wx3.0-compat.patch 2014-06-01 00:30:51.000000000 +1200
@@ -0,0 +1,245 @@
+Description: wx3.0 compatibility
+Author: Olly Betts <[email protected]>
+Last-Update: 2014-06-01
+
+--- openyahtzee-1.9.1.orig/src/simple_pie_plot.cpp
++++ openyahtzee-1.9.1/src/simple_pie_plot.cpp
+@@ -22,6 +22,7 @@
+ #include <memory>
+ #include <algorithm>
+ #include <cmath>
++#include <wx/graphics.h>
+ using namespace std;
+ using namespace simple_pie_plot;
+
+--- openyahtzee-1.9.1.orig/src/MainFrame.cpp
++++ openyahtzee-1.9.1/src/MainFrame.cpp
+@@ -465,7 +465,7 @@ void MainFrame::OnUndo(wxCommandEvent& e
+ ((wxButton*) FindWindow(ID_ROLL)) -> Enable(false);
+
+ // change the displayed roll counter
+- wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls);
++ wxString caption = wxString::Format(wxT("Roll! (%hi)"),m_rolls);
+ FindWindow(ID_ROLL)->SetLabel(caption);
+
+ //restore the 'keep' checkboxes
+@@ -491,7 +491,7 @@ void MainFrame::OnUndo(wxCommandEvent& e
+ tempstr = ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> GetValue();
+ tempstr.ToLong(&temp,10);
+ temp -= 100; //this line reduces the points given for the yahtzee bonus
+- tempstr.Printf(wxT("%i"),temp);
++ tempstr.Printf(wxT("%li"),temp);
+ ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> SetValue(tempstr);
+ }
+
+@@ -614,7 +614,7 @@ void MainFrame::OnRollButton ()
+ --m_rolls;
+
+ // change the displayed roll counter
+- wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls);
++ wxString caption = wxString::Format(wxT("Roll! (%hi)"),m_rolls);
+ FindWindow(ID_ROLL)->SetLabel(caption);
+
+ #ifndef DEBUG
+@@ -696,7 +696,7 @@ void MainFrame::OnUpperButtons (wxComman
+ break;
+ }
+
+- out.Printf(wxT("%i"),temp);
++ out.Printf(wxT("%hi"),temp);
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(event.GetId() - ID_ACES + ID_ACESTEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -717,7 +717,7 @@ void MainFrame::On3ofakindButton(wxComma
+ YahtzeeBonus();
+ wxString out;
+
+- out.Printf(wxT("%i"),m_score_dice.ThreeOfAKind());
++ out.Printf(wxT("%hi"),m_score_dice.ThreeOfAKind());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_THREEOFAKINDTEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -738,7 +738,7 @@ void MainFrame::On4ofakindButton(wxComma
+ YahtzeeBonus();
+ wxString out;
+
+- out.Printf(wxT("%i"),m_score_dice.FourOfAKind());
++ out.Printf(wxT("%hi"),m_score_dice.FourOfAKind());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_FOUROFAKINDTEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -760,7 +760,7 @@ void MainFrame::OnFullHouseButton(wxComm
+
+ YahtzeeBonus();
+
+- out.Printf(wxT("%i"), m_score_dice.FullHouse());
++ out.Printf(wxT("%hi"), m_score_dice.FullHouse());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_FULLHOUSETEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -782,7 +782,7 @@ void MainFrame::OnSmallSequenceButton(wx
+
+ YahtzeeBonus();
+
+- out.Printf(wxT("%i"), m_score_dice.SmallSequence());
++ out.Printf(wxT("%hi"), m_score_dice.SmallSequence());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_SMALLSEQUENCETEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -804,7 +804,7 @@ void MainFrame::OnLargeSequenceButton(wx
+
+ YahtzeeBonus();
+
+- out.Printf(wxT("%i"), m_score_dice.LargeSequence());
++ out.Printf(wxT("%hi"), m_score_dice.LargeSequence());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_LARGESEQUENCETEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -826,7 +826,7 @@ void MainFrame::OnYahtzeeButton(wxComman
+ return;
+
+ if (m_score_dice.IsYahtzee()) m_yahtzee = true;
+- out.Printf(wxT("%i"), m_score_dice.Yahtzee());
++ out.Printf(wxT("%hi"), m_score_dice.Yahtzee());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_YAHTZEETEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -847,7 +847,7 @@ void MainFrame::OnChanceButton (wxComman
+
+ YahtzeeBonus();
+
+- out.Printf(wxT("%i"),m_score_dice.Chance());
++ out.Printf(wxT("%hi"),m_score_dice.Chance());
+ wxTextCtrl *text_ctrl = dynamic_cast<wxTextCtrl*>(FindWindow(ID_CHANCETEXT));
+ text_ctrl->SetValue(out);
+ text_ctrl->SetBackgroundColour(*wxWHITE);
+@@ -920,7 +920,7 @@ void MainFrame::YahtzeeBonus()
+ tempstr = ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> GetValue();
+ tempstr.ToLong(&temp,10);
+ temp += 100;
+- tempstr.Printf(wxT("%i"),temp);
++ tempstr.Printf(wxT("%li"),temp);
+ ((wxTextCtrl*) FindWindow(ID_YAHTZEEBONUSTEXT)) -> SetValue(tempstr);
+ m_yahtzeebonus = true;
+ }
+@@ -962,7 +962,7 @@ void MainFrame::EndofGame()
+ upperscore +=temp;
+ }
+
+- tempstr.Printf(wxT("%i"),upperscore);
++ tempstr.Printf(wxT("%li"),upperscore);
+ ((wxTextCtrl*) FindWindow(ID_UPPERSECTIONTOTAL)) -> SetValue(tempstr);
+
+ //check for bonus
+@@ -972,7 +972,7 @@ void MainFrame::EndofGame()
+ } else
+ ((wxTextCtrl*) FindWindow(ID_BONUS)) -> SetValue(wxT("0"));
+
+- tempstr.Printf(wxT("%i"),upperscore);
++ tempstr.Printf(wxT("%li"),upperscore);
+ ((wxTextCtrl*) FindWindow(ID_UPPERTOTAL)) -> SetValue(tempstr);
+
+ //calculate total on lower section
+@@ -982,15 +982,15 @@ void MainFrame::EndofGame()
+ lowerscore +=temp;
+ }
+
+- tempstr.Printf(wxT("%i"),lowerscore);
++ tempstr.Printf(wxT("%li"),lowerscore);
+ ((wxTextCtrl*) FindWindow(ID_LOWERTOTAL)) -> SetValue(tempstr);
+- tempstr.Printf(wxT("%i"),upperscore + lowerscore);
++ tempstr.Printf(wxT("%li"),upperscore + lowerscore);
+ ((wxTextCtrl*) FindWindow(ID_GRANDTOTAL)) -> SetValue(tempstr);
+
+ //disable the roll button;
+ ((wxButton*) FindWindow(ID_ROLL)) -> Enable(false);
+
+- tempstr.Printf(wxT("Your final score is %i points!"),lowerscore+upperscore);
++ tempstr.Printf(wxT("Your final score is %li points!"),lowerscore+upperscore);
+ wxMessageBox(tempstr, wxT("Game Ended"), wxOK | wxICON_INFORMATION, this);
+
+ m_stats->game_finished(lowerscore+upperscore);
+@@ -1084,7 +1084,7 @@ void MainFrame::CalculateSubTotal()
+ upperscore +=temp;
+ }
+
+- tempstr.Printf(wxT("%i"),upperscore);
++ tempstr.Printf(wxT("%li"),upperscore);
+ ((wxTextCtrl*) FindWindow(ID_UPPERSECTIONTOTAL)) -> SetValue(tempstr);
+ if (upperscore >= 63) {
+ ((wxTextCtrl*) FindWindow(ID_BONUS))->SetValue(wxT("35"));
+@@ -1099,7 +1099,7 @@ void MainFrame::CalculateSubTotal()
+ lowerscore +=temp;
+ }
+
+- tempstr.Printf(wxT("%i"),lowerscore);
++ tempstr.Printf(wxT("%li"),lowerscore);
+ ((wxTextCtrl*) FindWindow(ID_LOWERTOTAL)) -> SetValue(tempstr);
+ }
+
+@@ -1193,7 +1193,7 @@ void MainFrame::Relayout()
+
+ // if there are rolls left we should display the count of them
+ if (roll_button_enabled) {
+- wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls);
++ wxString caption = wxString::Format(wxT("Roll! (%hi)"),m_rolls);
+ FindWindow(ID_ROLL)->SetLabel(caption);
+ }
+
+@@ -1276,43 +1276,43 @@ void MainFrameEvtHandler::OnScoreMouseEn
+ text_control = ((wxTextCtrl*)m_main_frame->FindWindow(id-ID_ACES+ID_ACESTEXT));
+ switch (id) {
+ case ID_ACES:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Aces());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Aces());
+ break;
+ case ID_TWOS:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Twos());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Twos());
+ break;
+ case ID_THREES:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Threes());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Threes());
+ break;
+ case ID_FOURS:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Fours());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Fours());
+ break;
+ case ID_FIVES:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Fives());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Fives());
+ break;
+ case ID_SIXES:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Sixes());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Sixes());
+ break;
+ case ID_THREEOFAKIND:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.ThreeOfAKind());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.ThreeOfAKind());
+ break;
+ case ID_FOUROFAKIND:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.FourOfAKind());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.FourOfAKind());
+ break;
+ case ID_FULLHOUSE:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.FullHouse());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.FullHouse());
+ break;
+ case ID_SMALLSEQUENCE:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.SmallSequence());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.SmallSequence());
+ break;
+ case ID_LARGESEQUENCE:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.LargeSequence());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.LargeSequence());
+ break;
+ case ID_YAHTZEE:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Yahtzee());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Yahtzee());
+ break;
+ case ID_CHANCE:
+- out.Printf(wxT("%i"), m_main_frame->m_score_dice.Chance());
++ out.Printf(wxT("%hi"), m_main_frame->m_score_dice.Chance());
+ break;
+ }
+ text_control->SetValue(out);