Diff gpsd-3.17-r4 with a gpsd-3.18.1

/usr/portage/sci-geosciences/gpsd/gpsd-3.18.1.ebuild 2020-05-07 18:39:00.000000000 +0300
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2020 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=5
5 5

  
6 6
DISTUTILS_OPTIONAL=1
7
PYTHON_COMPAT=( python2_7 )
8
SCONS_MIN_VERSION="1.2.1"
7
PYTHON_COMPAT=( python3_6 )
8
SCONS_MIN_VERSION="2.3.0"
9 9

  
10 10
inherit eutils udev user multilib distutils-r1 scons-utils toolchain-funcs
11 11

  
12 12
if [[ ${PV} == "9999" ]] ; then
13
	EGIT_REPO_URI="git://git.savannah.nongnu.org/gpsd.git"
14
	inherit git-2
13
	EGIT_REPO_URI="https://gitlab.com/gpsd/gpsd.git"
14
	inherit git-r3
15 15
else
16 16
	SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
17 17
	KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
18 18
fi
19 19

  
20 20
DESCRIPTION="GPS daemon and library for USB/serial GPS devices and GPS/mapping clients"
21
HOMEPAGE="http://catb.org/gpsd/"
21
HOMEPAGE="https://gpsd.gitlab.io/gpsd/"
22 22

  
23 23
LICENSE="BSD"
24
SLOT="0/23"
24
SLOT="0/24"
25 25

  
26 26
GPSD_PROTOCOLS=(
27 27
	aivdm ashtech earthmate evermore fury fv18 garmin garmintxt geostar
28
	gpsclock isync itrax mtk3301 navcom nmea0183 nmea2000 ntrip oceanserver
29
	oncore passthrough rtcm104v2 rtcm104v3 sirf skytraq superstar2 tnt
30
	tripmate tsip ublox
28
	gpsclock greis isync itrax mtk3301 navcom nmea0183 nmea2000 ntrip
29
	oceanserver oncore passthrough rtcm104v2 rtcm104v3 sirf skytraq
30
	superstar2 tnt tripmate tsip ublox
31 31
)
32
IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/gpsd_protocols_}
32
IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/+gpsd_protocols_}
33 33
IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing ncurses ntp python qt5 +shm +sockets static test udev usb X"
34
RESTRICT="!test? ( test )"
35 34
REQUIRED_USE="X? ( python )
36 35
	gpsd_protocols_nmea2000? ( gpsd_protocols_aivdm )
36
	gpsd_protocols_isync? ( gpsd_protocols_ublox )
37
	gpsd_protocols_ublox? ( python )
38
	gpsd_protocols_greis? ( python )
37 39
	python? ( ${PYTHON_REQUIRED_USE} )
38 40
	qt5? ( cxx )"
41
RESTRICT="!test? ( test )"
39 42

  
40 43
RDEPEND="
41 44
	>=net-misc/pps-tools-0.0.20120407
......
55 58
		dev-qt/qtnetwork:5
56 59
	)
57 60
	python? ( ${PYTHON_DEPS} )
61
	gpsd_protocols_ublox? ( dev-python/pyserial )
62
	gpsd_protocols_greis? ( dev-python/pyserial )
58 63
	usb? ( virtual/libusb:1 )
59 64
	X? ( dev-python/pygobject:3[cairo,${PYTHON_USEDEP}] )"
60 65
DEPEND="${RDEPEND}
......
80 85
	fi
81 86

  
82 87
	epatch "${FILESDIR}"/${P}-do_not_rm_library.patch
83
	epatch "${FILESDIR}"/${P}-scons-print.patch
84
	epatch "${FILESDIR}"/${P}-scons-py3.patch
88
	# Merged upstream
89
	#epatch "${FILESDIR}"/${P}-scons-print.patch
90
	#epatch "${FILESDIR}"/${P}-scons-py3.patch
85 91

  
86 92
	# Avoid useless -L paths to the install dir
87 93
	sed -i \
88 94
		-e 's:\<STAGING_PREFIX\>:SYSROOT:g' \
89 95
		SConstruct || die
90 96

  
97
	default
98

  
91 99
	use python && distutils-r1_src_prepare
92 100
}
93 101

  
94 102
python_prepare_all() {
95 103
	python_setup
104
	python_export
105

  
96 106
	# Extract python info out of SConstruct so we can use saner distribute
97 107
	pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
98 108
	local pybins=$(pyvar python_progs | tail -1)
99 109
	# Handle conditional tools manually. #666734
100 110
	use X && pybins+="+ ['xgps', 'xgpsspeed']"
111
	use gpsd_protocols_ublox && pybins+="+ ['ubxtool']"
112
	use gpsd_protocols_greis && pybins+="+ ['zerk']"
101 113
	local pysrcs=$(sed -n '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct)
102 114
	local packet=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/packet'])")
103 115
	local client=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/clienthelpers'])")
......
133 145
		$(use_scons ncurses)
134 146
		$(use_scons ntp ntpshm)
135 147
		$(use_scons ntp pps)
136
		$(use_scons X python)
148
		$(use_scons python)
137 149
		$(use_scons qt5 qt)
138 150
		$(use_scons shm shm_export)
139 151
		$(use_scons sockets socket_export)
140 152
		$(use_scons usb)
141 153
	)
142 154

  
143
	use X && myesconsargs+=( xgps=1 )
155
	use X && myesconsargs+=( xgps=1 xgpsspeed=1 )
144 156
	use qt5 && myesconsargs+=( qt_versioned=5 )
145 157

  
146 158
	# enable specified protocols
......
165 177
	newconfd "${FILESDIR}"/gpsd.conf-2 gpsd
166 178
	newinitd "${FILESDIR}"/gpsd.init-2 gpsd
167 179

  
180
	# Cleanup bad alt copy due to Scons
181
	rm -rf  "${D}"/usr/local/$(get_libdir)/python*/site-packages/gps*
182
	find "${D}"/usr/local/ -type d -delete
183
	# Install correct multi-python copy
168 184
	use python && distutils-r1_src_install
185

  
169 186
}
170 187

  
171 188
pkg_preinst() {
Thank you!