summaryrefslogtreecommitdiff
blob: d8d1c4fa29d745bbb200bf04237d354c993a13ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit eutils cmake-utils flag-o-matic

DESCRIPTION="Lets you easily share a single mouse and keyboard between multiple computers"
HOMEPAGE="https://github.com/debauchee/barrier"
SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="libressl qt5"
RESTRICT="test"

DEPEND="
	!libressl? ( dev-libs/openssl:* )
	libressl? ( dev-libs/libressl )
	net-misc/curl
	x11-libs/libICE
	x11-libs/libSM
	x11-libs/libX11
	x11-libs/libXext
	x11-libs/libXi
	x11-libs/libXinerama
	x11-libs/libXrandr
	x11-libs/libXtst
	qt5? (
		dev-qt/qtcore:5
		dev-qt/qtgui:5
		dev-qt/qtwidgets:5
		dev-qt/qtnetwork:5
		net-dns/avahi[mdnsresponder-compat]
	)
	x11-base/xorg-proto
"

RDEPEND="${DEPEND}"

PATCHES=( "${FILESDIR}"/${PN}-qt5.11-port.patch )

src_configure() {
	local mycmakeargs=(
		-DBARRIER_BUILD_INSTALLER=OFF
		-DBARRIER_BUILD_GUI=$(usex qt5)
	)
	cmake-utils_src_configure
}

src_install() {
	cmake-utils_src_install
	if use qt5; then
		newicon -s 256 "${S}"/res/${PN}.png ${PN}.png
		newmenu "${S}"/res/${PN}.desktop ${PN}.desktop
	fi
}