]> Pileus Git - ~andy/sunrise/blob - games-board/pokerth/pokerth-0.5.ebuild
games-board/pokerth: whitey safe now :)
[~andy/sunrise] / games-board / pokerth / pokerth-0.5.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils games qt4
6
7 MY_PN="PokerTH"
8 S="${WORKDIR}/${MY_PN}-${PV}"
9
10 DESCRIPTION="Texas Hold'em poker game."
11 HOMEPAGE="http://www.pokerth.net/"
12 SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-src.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 DEPEND="$(qt4_min_version 4.2.3)
20         >=dev-libs/boost-1.33
21         >=dev-libs/openssl-0.9.7
22         media-libs/libsdl
23         media-libs/sdl-mixer"
24 RDEPEND="${DEPEND}"
25
26 pkg_setup() {
27         if ! built_with_use "x11-libs/qt" qt3support ; then
28                 eerror "x11-libs/qt has to be compiled with 'qt3support'"
29                 eerror "USE-flag enabled."
30                 die "Needed USE-flag for x11-libs/qt not found."
31         fi
32
33         if has_version "<dev-libs/boost-1.34" && \
34                 ! built_with_use "dev-libs/boost" threads
35         then
36                 eerror "dev-libs/boost has to be compiled with 'threads'"
37                 eerror "USE-flag enabled."
38                 die "Needed USE-flag for dev-libs/boost not found."
39         fi
40
41         # Qt bug #171858, fixed in 4.3.2 and 4.4.0
42         if has_version "~x11-libs/qt-4.3.0" || \
43                 has_version "~x11-libs/qt-4.3.1"
44         then
45                 ewarn "x11-libs/qt versions 4.3.0 and 4.3.1 are known to break"
46                 ewarn "stylesheet support for buttons (game is still playable)."
47         fi
48
49         games_pkg_setup
50 }
51
52 src_compile() {
53         qmake || die "qmake failed."
54         emake || die "emake failed."
55 }
56
57 src_install() {
58         dogamesbin bin/pokerth
59         newicon pokerth.png "${PN}.png"
60         make_desktop_entry "${PN}" "PokerTH" "${PN}.png"
61
62         prepgamesdirs
63 }