app-emulation/spice: Move some dependencies into BDEPEND for EAPI 7
[gentoo.git] / games-board / pokerth / pokerth-1.1.2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit desktop qmake-utils xdg
7
8 DESCRIPTION="Texas Hold'em poker game"
9 HOMEPAGE="https://www.pokerth.net/"
10 SRC_URI="mirror://sourceforge/pokerth/${P}.tar.gz"
11
12 LICENSE="AGPL-3 GPL-1 GPL-2 GPL-3 BitstreamVera public-domain"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="dedicated"
16
17 RDEPEND="dev-db/sqlite:3
18         dev-libs/boost:0=[threads(+)]
19         dev-libs/libgcrypt:0
20         dev-libs/protobuf:0=
21         dev-libs/tinyxml[stl]
22         dev-qt/qtcore:5
23         dev-qt/qtnetwork:5
24         >=net-libs/libircclient-1.6-r2
25         >=net-misc/curl-7.16
26         virtual/gsasl
27         !dedicated? (
28                 dev-qt/qtgui:5
29                 dev-qt/qtwidgets:5
30                 media-libs/libsdl:0
31                 media-libs/sdl-mixer[mod,vorbis]
32         )"
33 DEPEND="${RDEPEND}
34         dev-cpp/websocketpp
35         !dedicated? ( dev-qt/qtsql:5 )"
36 BDEPEND="virtual/pkgconfig"
37
38 S="${WORKDIR}/${P}-rc"
39
40 PATCHES=(
41         "${FILESDIR}"/${PN}-1.1.1-boost-1.65-ambiguous-advance.patch
42         "${FILESDIR}"/${PN}-1.1.2-protobuf.patch
43         "${FILESDIR}"/${PN}-1.1.2-boost-1.66.patch
44         "${FILESDIR}"/${PN}-1.1.2-fix-includes.patch
45         # unbundle dev-cpp/websocketpp
46         "${FILESDIR}"/${PN}-1.1.2-system-websockets.patch
47 )
48
49 src_prepare() {
50         xdg_src_prepare
51         sed -i 's/!client//' *.pro || die
52
53         # delete bundled dev-cpp/websocketpp to be safe
54         rm -r src/third_party/websocketpp || die
55 }
56
57 src_configure() {
58         eqmake5 pokerth.pro \
59                         QMAKE_CFLAGS_ISYSTEM= \
60                         CONFIG+="$(use dedicated || echo client)"
61 }
62
63 src_install() {
64         dobin bin/pokerth_server chatcleaner
65         dodoc docs/{gui_styling,server_setup}_howto.txt
66         doman docs/pokerth.1
67
68         if ! use dedicated; then
69                 dobin ${PN}
70                 insinto /usr/share/${PN}
71                 doins -r data
72                 domenu ${PN}.desktop
73                 doicon -s 128 ${PN}.png
74         fi
75 }