summaryrefslogtreecommitdiff
path: root/dev-qt/qtchooser/qtchooser-0_p20170803.ebuild
blob: 417de66722f4614518bdc2ae3a7cf791a13bebf3 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit qmake-utils toolchain-funcs

DESCRIPTION="Qt4/Qt5 version chooser"
HOMEPAGE="https://code.qt.io/cgit/qtsdk/qtchooser.git/"
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${P}.tar.xz"

LICENSE="|| ( LGPL-2.1 GPL-3 )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE="test"

DEPEND="test? (
		dev-qt/qtcore:5
		dev-qt/qttest:5
	)"
RDEPEND="
	!<dev-qt/assistant-4.8.6:4
	!<dev-qt/designer-4.8.6:4
	!<dev-qt/linguist-4.8.6:4
	!<dev-qt/pixeltool-4.8.6:4
	!<dev-qt/qdbusviewer-4.8.6:4
	!<dev-qt/qt3support-4.8.6:4
	!<dev-qt/qtbearer-4.8.6:4
	!<dev-qt/qtcore-4.8.6:4
	!<dev-qt/qtdbus-4.8.6:4
	!<dev-qt/qtdeclarative-4.8.6:4
	!<dev-qt/qtdemo-4.8.6:4
	!<dev-qt/qtgui-4.8.6:4
	!<dev-qt/qthelp-4.8.6:4
	!<dev-qt/qtmultimedia-4.8.6:4
	!<dev-qt/qtopengl-4.8.6:4
	!<dev-qt/qtopenvg-4.8.6:4
	!<dev-qt/qtphonon-4.8.6:4
	!<dev-qt/qtscript-4.8.6:4
	!<dev-qt/qtsql-4.8.6:4
	!<dev-qt/qtsvg-4.8.6:4
	!<dev-qt/qttest-4.8.6:4
	!<dev-qt/qtwebkit-4.8.6:4
	!<dev-qt/qtxmlpatterns-4.8.6:4
"

qtchooser_make() {
	emake \
		CXX="$(tc-getCXX)" \
		LFLAGS="${LDFLAGS}" \
		prefix="${EPREFIX}/usr" \
		"$@"
}

src_compile() {
	qtchooser_make
}

src_test() {
	pushd tests/auto >/dev/null || die
	eqmake5
	popd >/dev/null || die

	qtchooser_make check
}

src_install() {
	qtchooser_make INSTALL_ROOT="${D}" install

	keepdir /etc/xdg/qtchooser

	# TODO: bash and zsh completion
	# newbashcomp scripts/${PN}.bash ${PN}
}