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

EAPI=6

inherit eutils cmake-utils qmake-utils git-r3

DESCRIPTION="A QT5-based editor for the TikZ language"
HOMEPAGE="http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language"
LICENSE="GPL-2"
SLOT="5"
KEYWORDS=""
IUSE="kde +doc -debug"

EGIT_REPO_URI="https://github.com/fhackenberger/ktikz.git"
EGIT_BRANCH="frameworks"

DEPEND="
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtwidgets:5
	dev-qt/qtprintsupport:5
	app-text/poppler[qt5]
	doc? ( dev-qt/qthelp:5 )
	kde? (
		kde-frameworks/kxmlgui
		kde-frameworks/ktexteditor
		kde-frameworks/kparts
		kde-frameworks/kiconthemes
	)
	virtual/latex-base
	dev-texlive/texlive-latexextra
	dev-tex/pgf
"
RDEPEND="${DEPEND}
	!media-gfx/ktikz:4
"

DOCS="Changelog TODO"

src_prepare() {
	# correct the qcollectiongenerator binary
	sed -ie 's%#QCOLLECTIONGENERATORCOMMAND = qcollectiongenerator%QCOLLECTIONGENERATORCOMMAND = /usr/lib/qt5/bin/qcollectiongenerator%g' qmake/qtikzconfig.pri || die
	eapply_user
}

src_configure() {
	if use kde; then
		cmake-utils_src_configure
	else
		KDECONFIG="CONFIG-=usekde"
		eqmake5 qtikz.pro "CONFIG+=nostrip" "$KDECONFIG"
	fi
}

src_compile() {
		if use !doc; then
			comment_add_subdirectory doc
		fi
		if use kde; then
			cmake-utils_src_compile
		else
			emake
		fi
}

src_install() {
		if use kde; then
			cmake-utils_src_install
		else
			emake INSTALL_ROOT="${D}" install
		fi
}