Diff gpsbabel-1.7.0-r1 with a gpsbabel-1.8.0-r1

/usr/portage/sci-geosciences/gpsbabel/gpsbabel-1.8.0-r1.ebuild 2023-10-09 14:52:35.048368490 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit qmake-utils
6
CMAKE_IN_SOURCE_BUILD=1
7
inherit cmake desktop xdg
7 8

  
8 9
MY_PV="${PV//./_}"
9 10
MY_P="${PN}_${MY_PV}"
10 11

  
11 12
DESCRIPTION="GPS waypoints, tracks and routes converter"
12 13
HOMEPAGE="https://www.gpsbabel.org/ https://github.com/gpsbabel/gpsbabel"
14

  
13 15
if [[ ${PV} == 9999 ]] ; then
14 16
	inherit git-r3
15 17
	EGIT_REPO_URI="https://github.com/gpsbabel/gpsbabel.git"
16
	SRC_URI="doc? ( https://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )"
17 18
else
18
	SRC_URI="
19
		https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_${MY_PV}.tar.gz
20
		doc? ( https://www.gpsbabel.org/style3.css -> gpsbabel.org-style3.css )
21
	"
22
	KEYWORDS="amd64 ~ppc ~x86"
19
	SRC_URI="https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_${MY_PV}.tar.gz"
20
	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
23 21
	S="${WORKDIR}/gpsbabel-gpsbabel_${MY_PV}"
24 22
fi
25 23

  
26 24
LICENSE="GPL-2"
27 25
SLOT="0"
28
IUSE="doc"
26
IUSE="doc qt6"
29 27

  
30
DEPEND="
31
	dev-qt/qtcore:5
32
	sci-libs/shapelib:=
33
	sys-libs/zlib
34
	virtual/libusb:1
35
"
36 28
BDEPEND="
37 29
	virtual/pkgconfig
38 30
	doc? (
......
40 32
		dev-lang/perl
41 33
		dev-libs/libxslt
42 34
	)
35
	!qt6? ( dev-qt/linguist-tools:5 )
36
	qt6? ( dev-qt/qttools:6[linguist] )
43 37
"
44
RDEPEND="${DEPEND}"
38

  
39
RDEPEND="
40
	dev-libs/expat
41
	sci-libs/shapelib:=
42
	sys-libs/zlib:=[minizip]
43
	virtual/libusb:1
44
	!qt6? (
45
		dev-qt/qtcore:5
46
		dev-qt/qtgui:5
47
		dev-qt/qtnetwork:5
48
		dev-qt/qtserialport:5
49
		dev-qt/qtwebchannel:5
50
		dev-qt/qtwebengine:5[widgets]
51
		dev-qt/qtwidgets:5
52
		dev-qt/qtxml:5
53
	)
54
	qt6? (
55
		dev-qt/qtbase:6[gui,network,widgets,xml]
56
		dev-qt/qtserialport:6
57
		dev-qt/qtwebchannel:6
58
		dev-qt/qtwebengine:6[widgets]
59
		dev-qt/qt5compat:6
60
	)
61
"
62

  
63
DEPEND="${RDEPEND}"
64

  
65
DOCS=( AUTHORS NEWS README.{contrib,igc,mapconverter,md} gui/README.{contrib,gui} )
45 66

  
46 67
PATCHES=(
47
	"${FILESDIR}"/${PN}-1.7.0-xmldoc.patch
48
	"${FILESDIR}"/${PN}-1.7.0-use_system_shapelib.patch
68
	"${FILESDIR}/${PN}-1.8.0-no-automagic-qt5-qt6.patch"
49 69
)
50 70

  
51
S="${WORKDIR}/${PN}-${MY_P}"
52

  
53 71
src_prepare() {
54
	default
72
	cmake_src_prepare
55 73

  
56 74
	# ensure bundled libs are not used
57 75
	rm -r shapelib zlib || die
58
	# remove prerequisite zlib/zlib.h
59
	sed -i -e "s: zlib\/[a-z]*\.h::g" Makefile.in || die
60
	# remove failing test (fixed by f91d28bf)
61
	rm testo.d/arc-project.test || die
62

  
63
	use doc && cp "${DISTDIR}/gpsbabel.org-style3.css" "${S}"
64 76
}
65 77

  
66 78
src_configure() {
67
	econf \
68
		$(use_with doc doc "${S}"/doc/manual) \
69
		QMAKE=$(qt5_get_bindir)/qmake \
70
		--with-zlib=system
71
}
79
	local mycmakeargs=(
80
		-DGPSBABEL_WITH_LIBUSB=pkgconfig
81
		-DGPSBABEL_WITH_SHAPELIB=pkgconfig
82
		-DGPSBABEL_WITH_ZLIB=pkgconfig
83
		-DGPSBABEL_MAPPREVIEW=ON
84
		-DGPSBABEL_EMBED_MAP=ON
85
		-DGPSBABEL_EMBED_TRANSLATIONS=ON
86
		-DUSE_QT6="$(usex qt6)"
87
	)
72 88

  
73
src_compile() {
74
	default
89
	cmake_src_configure
90
}
75 91

  
76
	if use doc; then
77
		perl xmldoc/makedoc || die
78
		emake gpsbabel.html
79
	fi
92
cmake_src_compile() {
93
	cmake_build gpsbabel
94
	cmake_build gpsbabelfe
95
	use doc && cmake_build gpsbabel.html
80 96
}
81 97

  
82 98
src_install() {
83
	use doc && HTML_DOCS=( "${S}"/${PN}.html "${S}"/${PN}.org-style3.css )
99
	use doc && dodoc gpsbabel.html
100
	einstalldocs
84 101

  
85
	default
102
	dobin gpsbabel
103
	dobin gui/GPSBabelFE/gpsbabelfe
104
	insinto /usr/share/${PN}/translations/
105
	doins gui/gpsbabel*_*.qm
106
	newicon gui/images/appicon.png ${PN}.png
107
	domenu gui/gpsbabel.desktop
86 108
}
Thank you!