diff options
author | Pacho Ramos <pacho@gentoo.org> | 2015-12-31 12:42:11 +0100 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2015-12-31 12:42:11 +0100 |
commit | 91ecddb6c84583bc2839b5b510629880a763a045 (patch) | |
tree | 9e99a72b77996e96b8f5599e059a8561818daf6b /games-board/freedoko | |
parent | x11-misc/easystroke: Fix building with latest glibmm/libsigc++ with ArchLinux... (diff) | |
download | gentoo-91ecddb6c84583bc2839b5b510629880a763a045.tar.gz gentoo-91ecddb6c84583bc2839b5b510629880a763a045.tar.bz2 gentoo-91ecddb6c84583bc2839b5b510629880a763a045.zip |
games-board/freedoko: Fix building with latest glibmm/libsigc++ (#569530)
Package-Manager: portage-2.2.26
Diffstat (limited to 'games-board/freedoko')
-rw-r--r-- | games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch | 36 | ||||
-rw-r--r-- | games-board/freedoko/freedoko-0.7.13-r1.ebuild | 100 |
2 files changed, 136 insertions, 0 deletions
diff --git a/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch b/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch new file mode 100644 index 000000000000..2c356695c710 --- /dev/null +++ b/games-board/freedoko/files/freedoko-0.7.13-libsigc26.patch @@ -0,0 +1,36 @@ +--- src/ui/gtkmm/player.h 2015-11-17 14:04:43.251096876 +0100 ++++ src/ui/gtkmm/player.h 2015-11-17 14:04:43.251096876 +0100 +@@ -36,7 +36,7 @@ + #include "../../player/player.h" + typedef ::Player::Type PlayerType; + +-#include <sigc++/object.h> ++#include <sigc++/trackable.h> + namespace Gtk { + class Label; + class Button; + +--- src/ui/gtkmm/aiconfig.h 2015-11-17 14:04:43.251096876 +0100 ++++ src/ui/gtkmm/aiconfig.h 2015-11-17 14:04:43.251096876 +0100 +@@ -36,7 +36,7 @@ + #include "../../player/aiconfig.h" + + #include "widgets/label_type_selector.h" +-#include <sigc++/object.h> ++#include <sigc++/trackable.h> + #include <gtkmm/liststore.h> + namespace Gtk { + class VBox; + +--- src/player/ai/heuristics.cpp 2015-11-17 14:04:13.267766289 +0100 ++++ src/player/ai/heuristics.cpp 2015-11-17 14:04:13.267766289 +0100 +@@ -2350,7 +2350,7 @@ + && ( card.less(c) + || ( tpoints >= hi.value( Aiconfig::LIMITDOLLE ) + && c.less(Card(Card::DIAMOND, Card::QUEEN)) +- && !hi.color_runs( t.startcard().color() ) < 1 ++ && (hi.color_runs( t.startcard().color() ) > 0) + && !t.islastcard() + ) + ) + diff --git a/games-board/freedoko/freedoko-0.7.13-r1.ebuild b/games-board/freedoko/freedoko-0.7.13-r1.ebuild new file mode 100644 index 000000000000..5ed375597785 --- /dev/null +++ b/games-board/freedoko/freedoko-0.7.13-r1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils flag-o-matic gnome2-utils games + +DESCRIPTION="FreeDoko is a Doppelkopf-game" +HOMEPAGE="http://free-doko.sourceforge.net" +SRC_URI="mirror://sourceforge/free-doko/FreeDoko_${PV}.src.zip + backgrounds? ( mirror://sourceforge/free-doko/backgrounds.zip -> ${PN}-backgrounds.zip ) + kdecards? ( mirror://sourceforge/free-doko/kdecarddecks.zip ) + xskatcards? ( mirror://sourceforge/free-doko/xskat.zip ) + pysolcards? ( mirror://sourceforge/free-doko/pysol.zip ) + gnomecards? ( mirror://sourceforge/free-doko/gnome-games.zip ) + openclipartcards? ( mirror://sourceforge/free-doko/openclipart.zip ) + !xskatcards? ( + !kdecards? ( + !gnomecards? ( + !openclipartcards? ( + !pysolcards? ( + mirror://sourceforge/free-doko/xskat.zip ) ) ) ) )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="+xskatcards +gnomecards +kdecards +openclipartcards +pysolcards +backgrounds net" + +RDEPEND="net? ( net-libs/gnet dev-libs/glib:2 ) + >=dev-cpp/gtkmm-2.4:2.4" +DEPEND="${RDEPEND} + app-arch/unzip + virtual/pkgconfig" + +S=${WORKDIR}/FreeDoko_${PV} + +src_unpack() { + local cards=0 + + unpack_cards() { + use $1 && { unpack $2 ; cards=$(( $cards + 1 )); }; + } + unpack FreeDoko_${PV}.src.zip + cp /dev/null "${S}"/src/Makefile.local + + cd "${S}"/data/cardsets + + unpack_cards xskatcards xskat.zip + unpack_cards kdecards kdecarddecks.zip + unpack_cards pysolcards pysol.zip + unpack_cards gnomecards gnome-games.zip + unpack_cards openclipartcards openclipart.zip + [ $cards ] || unpack xskat.zip # fall back to xskat + + if use backgrounds ; then + cd "${S}"/data/backgrounds + unpack ${PN}-backgrounds.zip + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + epatch "${FILESDIR}"/${P}-libsigc26.patch + append-cxxflags -std=c++11 +} + +src_compile() { + export CPPFLAGS="-DPUBLIC_DATA_DIRECTORY_VALUE='\"${GAMES_DATADIR}/${PN}\"'" + export CPPFLAGS+=" -DMANUAL_DIRECTORY_VALUE='\"/usr/share/doc/${PF}/html\"'" + export OSTYPE=Linux + export USE_NETWORK=$(use net && echo true || echo false) + export USE_SOUND_ALUT=false # still marked experimental + emake Version + emake -C src FreeDoko +} + +src_install() { + newgamesbin src/FreeDoko freedoko + insinto "${GAMES_DATADIR}"/${PN}/ + doins -r data/{ai,cardsets,backgrounds,rules,sounds,translations,*png} + find "${D}${GAMES_DATADIR}"/${PN} -name Makefile -delete + dodoc AUTHORS README ChangeLog + newicon -s 32 src/FreeDoko.png ${PN}.png + make_desktop_entry ${PN} FreeDoko + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} |