blob: 4da02d15793a878fa09706af55e9bf5a775514da (
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
75
76
77
78
79
80
81
82
83
84
85
86
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit qmake-utils
MY_PV="${PV//./_}"
MY_P="${PN}_${MY_PV}"
DESCRIPTION="GPS waypoints, tracks and routes converter"
HOMEPAGE="https://www.gpsbabel.org/ https://github.com/gpsbabel/gpsbabel"
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/gpsbabel/gpsbabel.git"
SRC_URI="doc? ( https://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )"
else
SRC_URI="
https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_${MY_PV}.tar.gz
doc? ( https://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )
"
KEYWORDS="~amd64 ~ppc ~x86"
S="${WORKDIR}/gpsbabel-gpsbabel_${MY_PV}"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="doc"
DEPEND="
dev-qt/qtcore:5
sci-libs/shapelib:=
sys-libs/zlib
virtual/libusb:1
"
BDEPEND="
virtual/pkgconfig
doc? (
app-text/docbook-xml-dtd:4.1.2
dev-lang/perl
dev-libs/libxslt
)
"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-1.7.0-xmldoc.patch
"${FILESDIR}"/${PN}-1.7.0-use_system_shapelib.patch
)
S="${WORKDIR}/${PN}-${MY_P}"
src_prepare() {
default
# ensure bundled libs are not used
rm -r shapelib zlib || die
# remove prerequisite zlib/zlib.h
sed -i -e "s: zlib\/[a-z]*\.h::g" Makefile.in || die
# remove failing test (fixed by f91d28bf)
rm testo.d/arc-project.test || die
use doc && cp "${DISTDIR}/gpsbabel.org-style3.css" "${S}"
}
src_configure() {
econf \
$(use_with doc doc "${S}"/doc/manual) \
QMAKE=$(qt5_get_bindir)/qmake \
--with-zlib=system
}
src_compile() {
default
if use doc; then
perl xmldoc/makedoc || die
emake gpsbabel.html
fi
}
src_install() {
use doc && HTML_DOCS=( "${S}"/${PN}.html "${S}"/${PN}.org-style3.css )
default
}
|