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

EAPI=7

inherit cmake xdg

DESCRIPTION="GPS mapping utility"
HOMEPAGE="https://github.com/Maproom/qmapshack/wiki"
SRC_URI="https://github.com/Maproom/${PN}/archive/V_${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

RDEPEND="
	dev-libs/quazip:0=
	dev-qt/designer:5
	dev-qt/qtdbus:5
	dev-qt/qtdeclarative:5[widgets]
	dev-qt/qthelp:5
	dev-qt/qtnetwork:5[ssl]
	dev-qt/qtprintsupport:5
	dev-qt/qtsql:5
	dev-qt/qtwebengine:5[widgets]
	>=sci-geosciences/routino-3.1.1
	sci-libs/alglib
	sci-libs/gdal
	<sci-libs/proj-8:=
"
DEPEND="${RDEPEND}"
BDEPEND="dev-qt/linguist-tools:5"

S="${WORKDIR}"/${PN}-V_${PV}

PATCHES=(
	"${S}"/FindPROJ4.patch
	"${FILESDIR}"/${P}-no-hacks-kthxbye.patch
)

src_prepare() {
	cmake_src_prepare

	# TODO: upstream
	if has_version ">=dev-libs/quazip-1.0"; then
		sed -e "/^find_package(QuaZip5/s/5          /-Qt5 CONFIG/" \
			-i CMakeLists.txt || die

		sed -e "s/\${QUAZIP_LIBRARIES}/QuaZip::QuaZip/" \
			-i src/qmapshack/CMakeLists.txt || die
	fi
}

src_install() {
	docompress -x /usr/share/doc/${PF}/html
	cmake_src_install
	mv "${D}"/usr/share/doc/HTML "${D}"/usr/share/doc/${PF}/html || die "mv Qt help failed"
}