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

EAPI=6

inherit xdg-utils eutils versionator

DESCRIPTION="Master PDF Editor is a complete solution for viewing and editing PDF files"
HOMEPAGE="https://code-industry.net/free-pdf-editor/"

SRC_URI="http://get.code-industry.net/public/${P}_qt5.amd64.tar.gz"

LICENSE="master-pdf-editor"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="mirror"

COMMON_DEPEND="
	app-arch/bzip2
	dev-libs/double-conversion
	dev-libs/glib
	dev-libs/icu
	dev-libs/openssl
	media-gfx/graphite2
	media-gfx/sane-backends
	media-libs/freetype
	media-libs/harfbuzz
	media-libs/libjpeg-turbo
	media-libs/libpng
	media-libs/tiff
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libxcb
	x11-libs/libXdmcp
	x11-libs/libXext
	>=dev-qt/qtsvg-5.4:5
	>=dev-qt/qtnetwork-5.4:5
	>=dev-qt/qtgui-5.4:5
	>=dev-qt/qtprintsupport-5.4:5
"

RDEPEND="${COMMON_DEPEND}"

S="${WORKDIR}/${PN}-$(get_major_version ${PV})"

src_install() {
	local dest=/opt/${PN}
	local bin_name=masterpdfeditor4

	insinto ${dest}
	doins -r fonts lang stamps templates ${bin_name}.png

	exeinto ${dest}
	doexe ${bin_name}

	dosym ${dest}/${bin_name} /opt/bin/${bin_name}
	make_desktop_entry ${bin_name} \
		"Master PDF Editor ${PV}" ${dest}/${bin_name}.png \
		"Office;Graphics;Viewer" \
		"MimeType=application/pdf;application/x-bzpdf;application/x-gzpdf;\nTerminal=false"
}

pkg_postinst() {
	sed -i -e \
		'/^Exec=/s/masterpdfeditor4/masterpdfeditor4 %f/' \
		/usr/share/applications/masterpdfeditor4-${PN}.desktop || die
	xdg_desktop_database_update
}

pkg_postrm() {
	xdg_desktop_database_update
}