1 |
commit: 91ecddb6c84583bc2839b5b510629880a763a045 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 31 11:42:11 2015 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 11:42:11 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91ecddb6 |
7 |
|
8 |
games-board/freedoko: Fix building with latest glibmm/libsigc++ (#569530) |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
.../freedoko/files/freedoko-0.7.13-libsigc26.patch | 36 ++++++++ |
13 |
games-board/freedoko/freedoko-0.7.13-r1.ebuild | 100 +++++++++++++++++++++ |
14 |
2 files changed, 136 insertions(+) |
15 |
|
16 |
diff --git a/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch b/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch |
17 |
new file mode 100644 |
18 |
index 0000000..2c35669 |
19 |
--- /dev/null |
20 |
+++ b/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch |
21 |
@@ -0,0 +1,36 @@ |
22 |
+--- src/ui/gtkmm/player.h 2015-11-17 14:04:43.251096876 +0100 |
23 |
++++ src/ui/gtkmm/player.h 2015-11-17 14:04:43.251096876 +0100 |
24 |
+@@ -36,7 +36,7 @@ |
25 |
+ #include "../../player/player.h" |
26 |
+ typedef ::Player::Type PlayerType; |
27 |
+ |
28 |
+-#include <sigc++/object.h> |
29 |
++#include <sigc++/trackable.h> |
30 |
+ namespace Gtk { |
31 |
+ class Label; |
32 |
+ class Button; |
33 |
+ |
34 |
+--- src/ui/gtkmm/aiconfig.h 2015-11-17 14:04:43.251096876 +0100 |
35 |
++++ src/ui/gtkmm/aiconfig.h 2015-11-17 14:04:43.251096876 +0100 |
36 |
+@@ -36,7 +36,7 @@ |
37 |
+ #include "../../player/aiconfig.h" |
38 |
+ |
39 |
+ #include "widgets/label_type_selector.h" |
40 |
+-#include <sigc++/object.h> |
41 |
++#include <sigc++/trackable.h> |
42 |
+ #include <gtkmm/liststore.h> |
43 |
+ namespace Gtk { |
44 |
+ class VBox; |
45 |
+ |
46 |
+--- src/player/ai/heuristics.cpp 2015-11-17 14:04:13.267766289 +0100 |
47 |
++++ src/player/ai/heuristics.cpp 2015-11-17 14:04:13.267766289 +0100 |
48 |
+@@ -2350,7 +2350,7 @@ |
49 |
+ && ( card.less(c) |
50 |
+ || ( tpoints >= hi.value( Aiconfig::LIMITDOLLE ) |
51 |
+ && c.less(Card(Card::DIAMOND, Card::QUEEN)) |
52 |
+- && !hi.color_runs( t.startcard().color() ) < 1 |
53 |
++ && (hi.color_runs( t.startcard().color() ) > 0) |
54 |
+ && !t.islastcard() |
55 |
+ ) |
56 |
+ ) |
57 |
+ |
58 |
|
59 |
diff --git a/games-board/freedoko/freedoko-0.7.13-r1.ebuild b/games-board/freedoko/freedoko-0.7.13-r1.ebuild |
60 |
new file mode 100644 |
61 |
index 0000000..5ed3755 |
62 |
--- /dev/null |
63 |
+++ b/games-board/freedoko/freedoko-0.7.13-r1.ebuild |
64 |
@@ -0,0 +1,100 @@ |
65 |
+# Copyright 1999-2015 Gentoo Foundation |
66 |
+# Distributed under the terms of the GNU General Public License v2 |
67 |
+# $Id$ |
68 |
+ |
69 |
+EAPI=5 |
70 |
+inherit eutils flag-o-matic gnome2-utils games |
71 |
+ |
72 |
+DESCRIPTION="FreeDoko is a Doppelkopf-game" |
73 |
+HOMEPAGE="http://free-doko.sourceforge.net" |
74 |
+SRC_URI="mirror://sourceforge/free-doko/FreeDoko_${PV}.src.zip |
75 |
+ backgrounds? ( mirror://sourceforge/free-doko/backgrounds.zip -> ${PN}-backgrounds.zip ) |
76 |
+ kdecards? ( mirror://sourceforge/free-doko/kdecarddecks.zip ) |
77 |
+ xskatcards? ( mirror://sourceforge/free-doko/xskat.zip ) |
78 |
+ pysolcards? ( mirror://sourceforge/free-doko/pysol.zip ) |
79 |
+ gnomecards? ( mirror://sourceforge/free-doko/gnome-games.zip ) |
80 |
+ openclipartcards? ( mirror://sourceforge/free-doko/openclipart.zip ) |
81 |
+ !xskatcards? ( |
82 |
+ !kdecards? ( |
83 |
+ !gnomecards? ( |
84 |
+ !openclipartcards? ( |
85 |
+ !pysolcards? ( |
86 |
+ mirror://sourceforge/free-doko/xskat.zip ) ) ) ) )" |
87 |
+ |
88 |
+LICENSE="GPL-2" |
89 |
+SLOT="0" |
90 |
+KEYWORDS="~amd64 ~ppc ~x86" |
91 |
+IUSE="+xskatcards +gnomecards +kdecards +openclipartcards +pysolcards +backgrounds net" |
92 |
+ |
93 |
+RDEPEND="net? ( net-libs/gnet dev-libs/glib:2 ) |
94 |
+ >=dev-cpp/gtkmm-2.4:2.4" |
95 |
+DEPEND="${RDEPEND} |
96 |
+ app-arch/unzip |
97 |
+ virtual/pkgconfig" |
98 |
+ |
99 |
+S=${WORKDIR}/FreeDoko_${PV} |
100 |
+ |
101 |
+src_unpack() { |
102 |
+ local cards=0 |
103 |
+ |
104 |
+ unpack_cards() { |
105 |
+ use $1 && { unpack $2 ; cards=$(( $cards + 1 )); }; |
106 |
+ } |
107 |
+ unpack FreeDoko_${PV}.src.zip |
108 |
+ cp /dev/null "${S}"/src/Makefile.local |
109 |
+ |
110 |
+ cd "${S}"/data/cardsets |
111 |
+ |
112 |
+ unpack_cards xskatcards xskat.zip |
113 |
+ unpack_cards kdecards kdecarddecks.zip |
114 |
+ unpack_cards pysolcards pysol.zip |
115 |
+ unpack_cards gnomecards gnome-games.zip |
116 |
+ unpack_cards openclipartcards openclipart.zip |
117 |
+ [ $cards ] || unpack xskat.zip # fall back to xskat |
118 |
+ |
119 |
+ if use backgrounds ; then |
120 |
+ cd "${S}"/data/backgrounds |
121 |
+ unpack ${PN}-backgrounds.zip |
122 |
+ fi |
123 |
+} |
124 |
+ |
125 |
+src_prepare() { |
126 |
+ epatch "${FILESDIR}"/${P}-gentoo.patch |
127 |
+ epatch "${FILESDIR}"/${P}-libsigc26.patch |
128 |
+ append-cxxflags -std=c++11 |
129 |
+} |
130 |
+ |
131 |
+src_compile() { |
132 |
+ export CPPFLAGS="-DPUBLIC_DATA_DIRECTORY_VALUE='\"${GAMES_DATADIR}/${PN}\"'" |
133 |
+ export CPPFLAGS+=" -DMANUAL_DIRECTORY_VALUE='\"/usr/share/doc/${PF}/html\"'" |
134 |
+ export OSTYPE=Linux |
135 |
+ export USE_NETWORK=$(use net && echo true || echo false) |
136 |
+ export USE_SOUND_ALUT=false # still marked experimental |
137 |
+ emake Version |
138 |
+ emake -C src FreeDoko |
139 |
+} |
140 |
+ |
141 |
+src_install() { |
142 |
+ newgamesbin src/FreeDoko freedoko |
143 |
+ insinto "${GAMES_DATADIR}"/${PN}/ |
144 |
+ doins -r data/{ai,cardsets,backgrounds,rules,sounds,translations,*png} |
145 |
+ find "${D}${GAMES_DATADIR}"/${PN} -name Makefile -delete |
146 |
+ dodoc AUTHORS README ChangeLog |
147 |
+ newicon -s 32 src/FreeDoko.png ${PN}.png |
148 |
+ make_desktop_entry ${PN} FreeDoko |
149 |
+ prepgamesdirs |
150 |
+} |
151 |
+ |
152 |
+pkg_preinst() { |
153 |
+ games_pkg_preinst |
154 |
+ gnome2_icon_savelist |
155 |
+} |
156 |
+ |
157 |
+pkg_postinst() { |
158 |
+ games_pkg_postinst |
159 |
+ gnome2_icon_cache_update |
160 |
+} |
161 |
+ |
162 |
+pkg_postrm() { |
163 |
+ gnome2_icon_cache_update |
164 |
+} |