summaryrefslogtreecommitdiff
blob: 7a7001dd26d7d802a82d1111873d1039808b56d8 (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop qmake-utils xdg-utils

DESCRIPTION="2D animation and drawing program based on Qt5"
HOMEPAGE="https://www.pencil2d.org/"
SRC_URI="https://github.com/pencil2d/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtmultimedia:5
	dev-qt/qtnetwork:5
	dev-qt/qtsvg:5
	dev-qt/qtwidgets:5
	dev-qt/qtxml:5
"
DEPEND="${RDEPEND}
	test? ( dev-qt/qttest:5 )
"

S="${WORKDIR}/${P/_/-}"

src_prepare() {
	default
	sed -e "/^QT/s/xmlpatterns //" \
		-i core_lib/core_lib.pro tests/tests.pro || die
}

src_configure() {
	eqmake5
}

src_install() {
	einstalldocs

	# install target not yet provided
	# emake INSTALL_ROOT="${D}" install
	newbin bin/pencil2d ${PN}

	newicon app/data/icons/icon.png ${PN}.png
	make_desktop_entry ${PN} pencil2d ${PN} Graphics

	insinto /usr/share/mime/packages/
	doins app/data/pencil2d.xml

	# TODO: Install l10n files
}

pkg_postinst() {
	xdg_mimeinfo_database_update
	xdg_desktop_database_update
}