Сравнение gpsbabel-1.8.0-r1 с gpsbabel-9999

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

  
4
EAPI=8
4
EAPI=7
5 5

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

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

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

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

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

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

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

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

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

  
74 56
	# ensure bundled libs are not used
75 57
	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}"
76 64
}
77 65

  
78 66
src_configure() {
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
	)
88

  
89
	cmake_src_configure
67
	econf \
68
		$(use_with doc doc "${S}"/doc/manual) \
69
		QMAKE=$(qt5_get_bindir)/qmake \
70
		--with-zlib=system
90 71
}
91 72

  
92
cmake_src_compile() {
93
	cmake_build gpsbabel
94
	cmake_build gpsbabelfe
95
	use doc && cmake_build gpsbabel.html
73
src_compile() {
74
	default
75

  
76
	if use doc; then
77
		perl xmldoc/makedoc || die
78
		emake gpsbabel.html
79
	fi
96 80
}
97 81

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

  
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
85
	default
108 86
}
Спасибо!