summaryrefslogtreecommitdiff
blob: 9c13749cad81d23ecca8a1f24794b9e769d11a02 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

QT5MIN="5.15.0"
QT6MIN="6.2.0"
KF5MIN="5.82.0"

inherit cmake xdg

DESCRIPTION="SVG-based theme engine for Qt5, KDE Plasma and LXQt"
HOMEPAGE="https://github.com/tsujan/Kvantum"
SRC_URI="https://github.com/tsujan/${PN^}/archive/V${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN^}-${PV}/${PN^}"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
IUSE="qt6"

RESTRICT="test" # no tests

CDEPEND="
	>=dev-qt/qtcore-${QT5MIN}:5
	>=dev-qt/qtgui-${QT5MIN}:5
	>=dev-qt/qtsvg-${QT5MIN}:5
	>=dev-qt/qtwidgets-${QT5MIN}:5
	>=dev-qt/qtx11extras-${QT5MIN}:5
	>=kde-frameworks/kwindowsystem-${KF5MIN}:5
	x11-libs/libX11
	qt6? (
		>=dev-qt/qtbase-${QT6MIN}:6[gui,widgets]
		>=dev-qt/qtsvg-${QT6MIN}:6
	)
"
DEPEND="
	${CDEPEND}
	x11-base/xorg-proto
"
RDEPEND="
	${CDEPEND}
"
BDEPEND="
	dev-qt/linguist-tools:5
	qt6? ( dev-qt/qttools:6[linguist] )
"

BUILD_DIR_QT6="${S}_qt6"

src_configure() {
	local mycmakeargs=(
		-DENABLE_QT4=OFF
		-DENABLE_QT5=ON
		-DWITHOUT_KF=OFF
	)
	cmake_src_configure

	local mycmakeargs=(
		-DENABLE_QT4=OFF
		-DENABLE_QT5=OFF
		-DWITHOUT_KF=ON
	)
	use qt6 && BUILD_DIR="${BUILD_DIR_QT6}" cmake_src_configure
}

src_compile() {
	cmake_src_compile
	use qt6 && BUILD_DIR="${BUILD_DIR_QT6}" cmake_src_compile
}

src_install() {
	cmake_src_install
	use qt6 && BUILD_DIR="${BUILD_DIR_QT6}" cmake_src_install

	einstalldocs
}