summaryrefslogtreecommitdiff
blob: 804460e26d8f8b2554f3c71dddd7f6dc11cf8372 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit qmake-utils eutils

DESCRIPTION="Cross-platform Twitch client"
HOMEPAGE="https://alamminsalo.github.io/orion/"
SRC_URI="https://github.com/alamminsalo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+mpv"

DEPEND="dev-qt/qtquickcontrols:5
	dev-qt/qtsvg:5
	dev-qt/qtwebengine:5
	mpv? ( media-video/mpv[libmpv] )
	!mpv? ( dev-qt/qtmultimedia:5 )"
RDEPEND="${DEPEND}
	!mpv? ( media-plugins/gst-plugins-hls )"

src_prepare() {
	sed -i \
		-e 's:^Icon=/usr/local/share/icons/orion.svg$:Icon=/usr/share/icons/hicolor/scalable/apps/orion.svg:' \
		-e 's:^Categories=Games$:Categories=Game;:' \
		distfiles/*.desktop
	eapply_user
}

src_configure() {
	# TODO: also supports qtav, not yet in portage
	local PLAYER
	if use mpv; then
		PLAYER=mpv
	else
		PLAYER=multimedia
	fi
	eqmake5 ${PN}.pro CONFIG+=${PLAYER}
}

src_install() {
	dobin ${PN}
	domenu distfiles/*.desktop

	insinto /usr/share/icons/hicolor/scalable/apps
	doins distfiles/${PN}.svg
}