blob: 3b07666bdf599e7e04cead0b8a4d1440e34b5e99 (
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools desktop qmake-utils
DESCRIPTION="GPS waypoints, tracks and routes converter"
HOMEPAGE="https://www.gpsbabel.org/ https://github.com/gpsbabel/gpsbabel"
SRC_URI="
https://dev.gentoo.org/~asturm/${P}.tar.gz
doc? ( https://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE="doc +gui"
BDEPEND="
doc? (
app-text/docbook-xml-dtd:4.1.2
dev-lang/perl
dev-libs/libxslt
)
gui? ( dev-qt/linguist-tools:5 )
"
RDEPEND="
dev-libs/expat
dev-qt/qtcore:5
sci-libs/shapelib:=
sys-libs/zlib[minizip]
virtual/libusb:0
gui? (
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtwebchannel:5
dev-qt/qtwebengine:5[widgets]
dev-qt/qtwidgets:5
dev-qt/qtxml:5
)
"
DEPEND="${RDEPEND}"
DOCS=( AUTHORS README.{contrib,igc,mapconverter,md,xmapwpt} )
PATCHES=(
"${FILESDIR}"/${PN}-1.4.3-fix_binary_name.patch
"${FILESDIR}"/${P}-disable_statistic_uploading.patch
"${FILESDIR}"/${P}-disable_update_check.patch
"${FILESDIR}"/${P}-disable_version_check.patch
"${FILESDIR}"/${P}-use_system_shapelib.patch
"${FILESDIR}"/${P}-use_system_zlib.patch
"${FILESDIR}"/${P}-xmldoc.patch
"${FILESDIR}"/${P}-qt-5.9-{1,2}.patch
)
RESTRICT="test" # bug 421699
src_prepare() {
default
# remove bundled libs and cleanup
rm -r shapelib zlib || die
sed -i -e "s: zlib\/[a-z]*\.h::g" Makefile.in || die
mv configure.in configure.ac || die
sed -i -e "/^configure:/s/configure.in/configure.ac/" Makefile.in || die
if use doc; then
cp "${DISTDIR}/gpsbabel.org-style3.css" . || die
fi
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with doc doc doc/manual)
LRELEASE=$(qt5_get_bindir)/lrelease
LUPDATE=$(qt5_get_bindir)/lupdate
QMAKE=$(qt5_get_bindir)/qmake
--with-zlib=system
)
econf "${myeconfargs[@]}"
if use gui; then
pushd gui > /dev/null || die
$(qt5_get_bindir)/lrelease *.ts || die
eqmake5
popd > /dev/null
fi
}
src_compile() {
default
if use gui; then
pushd gui > /dev/null || die
emake
popd > /dev/null
fi
if use doc; then
perl xmldoc/makedoc || die
emake gpsbabel.html
fi
}
src_install() {
use doc && local HTML_DOCS=( ${PN}.html ${PN}.org-style3.css )
default
if use gui; then
dobin gui/objects/gpsbabelfe
insinto /usr/share/${PN}/translations/
doins gui/gpsbabel*_*.qm
newicon gui/images/appicon.png ${PN}.png
make_desktop_entry gpsbabelfe ${PN} ${PN} "Science;Geoscience"
fi
}
|