1 |
commit: d2e1501ab7f3f8353b92edc95d586273a5c01900 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 10 15:12:54 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 10 15:27:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e1501a |
7 |
|
8 |
sci-geosciences/gpsd: bump to 3.21 |
9 |
|
10 |
Also fixes a few of the outstanding bugs. |
11 |
Invoking maintainer timeout. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=734364 |
14 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=735554 |
15 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=735964 |
16 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
17 |
|
18 |
sci-geosciences/gpsd/Manifest | 1 + |
19 |
...psd-3.21-scons_conditional_python_scripts.patch | 64 +++++++ |
20 |
sci-geosciences/gpsd/gpsd-3.21.ebuild | 192 +++++++++++++++++++++ |
21 |
3 files changed, 257 insertions(+) |
22 |
|
23 |
diff --git a/sci-geosciences/gpsd/Manifest b/sci-geosciences/gpsd/Manifest |
24 |
index d7ad2e03d2c..595d071ea61 100644 |
25 |
--- a/sci-geosciences/gpsd/Manifest |
26 |
+++ b/sci-geosciences/gpsd/Manifest |
27 |
@@ -2,3 +2,4 @@ DIST gpsd-3.17.tar.gz 8755304 BLAKE2B d1f82b5734fd90fe903a6f2fe8835fe8292fe3e729 |
28 |
DIST gpsd-3.18.1.tar.gz 9031595 BLAKE2B 170863740c7281ea111c3f4db2dfeb67f4366da7e9e8d2f7f3bbddacbc9d2083558379b1fe60c9293c31a6428288d205aba565694fedde6f1dfe67999a6782c6 SHA512 b381b177fcd29089a61aa11f5df2c67473720a6bbc5590ca1c4fda627331c407de01c62caceeddae780626b9a02392e9a770d52a143357e1babdcc2fbff0ed38 |
29 |
DIST gpsd-3.19.tar.gz 10581777 BLAKE2B 0801919c968b8027c357047dabdc8587e1d5950cb0d80f89d6d62678a11b3dfc76a6a89ae59123680dac3188a695d0c37618d3f83280f5e584e10c1fa9a5dc03 SHA512 c9f9a9ff65759f852771ec4cf97ab15343c9176a149dd5ea6c2e2dc18b47aa7c7bf9ff1f2e8523121564d33a34ae6aa08169c5454847b4fe7848e616fd20a814 |
30 |
DIST gpsd-3.20.tar.gz 3600835 BLAKE2B 6c9a3540de1be9191a601d6666c18c79e8e8913a3b4455448bafd0fa81e3a1859bd4851d42c3d06aed48fd0910060919f87a661d02fec44c001e9a393d8658e6 SHA512 557ef5e5f3b511da4fc441f4bb2e0cd2e23c2981e8b3ce2999973767a04fde070d3ec6f14af60d0e471320078e9f4d1144e5796e7927975ecfbd55fc97f470a9 |
31 |
+DIST gpsd-3.21.tar.xz 2620396 BLAKE2B 366d1857f7ff63e087ac1bec8c95d997cd8d48a60d5548c1644748e1ed20334f45a4fb279bc26c61481cc3dea0244eb0aaca0ba562838a3b5de15da5d1d82502 SHA512 a45416c31ee891a84203aea786b6385ea5f557a406d898a8facdde78d120199b7e7db8f86ab8c395f6ca90965940355fa19413b2b918642fd8c7df219745233e |
32 |
|
33 |
diff --git a/sci-geosciences/gpsd/files/gpsd-3.21-scons_conditional_python_scripts.patch b/sci-geosciences/gpsd/files/gpsd-3.21-scons_conditional_python_scripts.patch |
34 |
new file mode 100644 |
35 |
index 00000000000..00fe5ad2b81 |
36 |
--- /dev/null |
37 |
+++ b/sci-geosciences/gpsd/files/gpsd-3.21-scons_conditional_python_scripts.patch |
38 |
@@ -0,0 +1,64 @@ |
39 |
+--- a/SConstruct |
40 |
++++ b/SConstruct |
41 |
+@@ -150,10 +150,6 @@ |
42 |
+ 'packaging/rpm/gpsd.spec', |
43 |
+ 'packet_names.h', |
44 |
+ 'Qgpsmm.pc', |
45 |
+- 'ubxtool', |
46 |
+- 'xgps', |
47 |
+- 'xgpsspeed', |
48 |
+- 'zerk', |
49 |
+ ] |
50 |
+ |
51 |
+ generated_www = [ |
52 |
+@@ -172,10 +168,6 @@ |
53 |
+ "gpscat", |
54 |
+ "gpsfake", |
55 |
+ "gpsprof", |
56 |
+- "ubxtool", |
57 |
+- "xgps", |
58 |
+- "xgpsspeed", |
59 |
+- "zerk", |
60 |
+ ] |
61 |
+ |
62 |
+ # All man pages. Always build them all. |
63 |
+@@ -205,10 +197,6 @@ |
64 |
+ "man/ntpshmmon.1": "man/ntpshmmon.xml", |
65 |
+ "man/ppscheck.8": "man/ppscheck.xml", |
66 |
+ "man/srec.5": "man/srec.xml", |
67 |
+- "man/ubxtool.1": "man/ubxtool.xml", |
68 |
+- "man/xgps.1": "man/gps.xml", |
69 |
+- "man/xgpsspeed.1": "man/gps.xml", |
70 |
+- "man/zerk.1": "man/zerk.xml", |
71 |
+ } |
72 |
+ |
73 |
+ # doc files to install in share/gpsd/doc |
74 |
+@@ -1964,6 +1952,28 @@ |
75 |
+ "valgrind-audit.py" |
76 |
+ ] |
77 |
+ |
78 |
++ if env['greis']: |
79 |
++ generated_sources.extend(["zerk"]) |
80 |
++ python_progs.extend(["zerk"]) |
81 |
++ all_manpages.update({ |
82 |
++ "man/zerk.1": "man/zerk.xml", |
83 |
++ }) |
84 |
++ |
85 |
++ if env['ublox']: |
86 |
++ generated_sources.extend(["ubxtool"]) |
87 |
++ python_progs.extend(["ubxtool"]) |
88 |
++ all_manpages.update({ |
89 |
++ "man/ubxtool.1": "man/ubxtool.xml", |
90 |
++ }) |
91 |
++ |
92 |
++ if env['xgps']: |
93 |
++ generated_sources.extend(["xgps", "xgpsspeed"]) |
94 |
++ python_progs.extend(["xgps", "xgpsspeed"]) |
95 |
++ all_manpages.update({ |
96 |
++ "man/xgps.1": "man/xgps.xml", |
97 |
++ "man/xgpsspeed.1": "man/xgps.xml", |
98 |
++ }) |
99 |
++ |
100 |
+ # Dependencies for imports in test programs |
101 |
+ env.Depends('tests/test_clienthelpers.py', |
102 |
+ ['gps/__init__.py', 'gps/clienthelpers.py', 'gps/misc.py']) |
103 |
|
104 |
diff --git a/sci-geosciences/gpsd/gpsd-3.21.ebuild b/sci-geosciences/gpsd/gpsd-3.21.ebuild |
105 |
new file mode 100644 |
106 |
index 00000000000..ff88fc9a160 |
107 |
--- /dev/null |
108 |
+++ b/sci-geosciences/gpsd/gpsd-3.21.ebuild |
109 |
@@ -0,0 +1,192 @@ |
110 |
+# Copyright 1999-2020 Gentoo Authors |
111 |
+# Distributed under the terms of the GNU General Public License v2 |
112 |
+ |
113 |
+EAPI=7 |
114 |
+ |
115 |
+DISTUTILS_OPTIONAL=1 |
116 |
+PYTHON_COMPAT=( python3_{6..9} ) |
117 |
+ |
118 |
+inherit eutils udev multilib distutils-r1 scons-utils toolchain-funcs |
119 |
+ |
120 |
+if [[ ${PV} == "9999" ]] ; then |
121 |
+ EGIT_REPO_URI="https://gitlab.com/gpsd/gpsd.git" |
122 |
+ inherit git-r3 |
123 |
+else |
124 |
+ SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" |
125 |
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" |
126 |
+fi |
127 |
+ |
128 |
+DESCRIPTION="GPS daemon and library for USB/serial GPS devices and GPS/mapping clients" |
129 |
+HOMEPAGE="https://gpsd.io/" |
130 |
+ |
131 |
+LICENSE="BSD" |
132 |
+SLOT="0/27" |
133 |
+ |
134 |
+GPSD_PROTOCOLS=( |
135 |
+ aivdm ashtech earthmate evermore fury fv18 garmin garmintxt geostar |
136 |
+ gpsclock greis isync itrax mtk3301 navcom nmea0183 nmea2000 ntrip |
137 |
+ oceanserver oncore passthrough rtcm104v2 rtcm104v3 sirf skytraq |
138 |
+ superstar2 tnt tripmate tsip ublox |
139 |
+) |
140 |
+IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/+gpsd_protocols_} |
141 |
+IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing ncurses ntp python qt5 +shm +sockets static test udev usb X" |
142 |
+REQUIRED_USE="X? ( python ) |
143 |
+ gpsd_protocols_nmea2000? ( gpsd_protocols_aivdm ) |
144 |
+ gpsd_protocols_isync? ( gpsd_protocols_ublox ) |
145 |
+ gpsd_protocols_ublox? ( python ) |
146 |
+ gpsd_protocols_greis? ( python ) |
147 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
148 |
+ qt5? ( cxx )" |
149 |
+RESTRICT="!test? ( test )" |
150 |
+ |
151 |
+RDEPEND=" |
152 |
+ acct-user/gpsd |
153 |
+ >=net-misc/pps-tools-0.0.20120407 |
154 |
+ bluetooth? ( net-wireless/bluez ) |
155 |
+ dbus? ( |
156 |
+ sys-apps/dbus |
157 |
+ dev-libs/dbus-glib |
158 |
+ ) |
159 |
+ ncurses? ( sys-libs/ncurses:= ) |
160 |
+ ntp? ( || ( |
161 |
+ net-misc/ntp |
162 |
+ net-misc/ntpsec |
163 |
+ net-misc/chrony |
164 |
+ ) ) |
165 |
+ qt5? ( |
166 |
+ dev-qt/qtcore:5 |
167 |
+ dev-qt/qtnetwork:5 |
168 |
+ ) |
169 |
+ python? ( ${PYTHON_DEPS} ) |
170 |
+ gpsd_protocols_ublox? ( dev-python/pyserial ) |
171 |
+ gpsd_protocols_greis? ( dev-python/pyserial ) |
172 |
+ usb? ( virtual/libusb:1 ) |
173 |
+ X? ( dev-python/pygobject:3[cairo,${PYTHON_USEDEP}] )" |
174 |
+DEPEND="${RDEPEND} |
175 |
+ test? ( sys-devel/bc )" |
176 |
+BDEPEND="virtual/pkgconfig |
177 |
+ $(python_gen_any_dep ">=dev-util/scons-2.3.0[\${PYTHON_USEDEP}]")" |
178 |
+ |
179 |
+# xml packages are for man page generation |
180 |
+if [[ ${PV} == *9999* ]] ; then |
181 |
+ DEPEND+=" |
182 |
+ app-text/xmlto |
183 |
+ =app-text/docbook-xml-dtd-4.1*" |
184 |
+fi |
185 |
+ |
186 |
+PATCHES=( |
187 |
+ "${FILESDIR}"/${PN}-3.21-scons_conditional_python_scripts.patch |
188 |
+) |
189 |
+ |
190 |
+src_prepare() { |
191 |
+ # Make sure our list matches the source. |
192 |
+ local src_protocols=$(echo $( |
193 |
+ sed -n '/# GPS protocols/,/# Time service/{s:#.*::;s:[(",]::g;p}' "${S}"/SConstruct | awk '{print $1}' | LC_ALL=C sort |
194 |
+ ) ) |
195 |
+ if [[ ${src_protocols} != ${GPSD_PROTOCOLS[*]} ]] ; then |
196 |
+ eerror "Detected protocols: ${src_protocols}" |
197 |
+ eerror "Ebuild protocols: ${GPSD_PROTOCOLS[*]}" |
198 |
+ die "please sync ebuild & source" |
199 |
+ fi |
200 |
+ |
201 |
+ # Avoid useless -L paths to the install dir |
202 |
+ sed -i \ |
203 |
+ -e 's:\<STAGING_PREFIX\>:SYSROOT:g' \ |
204 |
+ SConstruct || die |
205 |
+ |
206 |
+ #Fix systemd binary paths |
207 |
+ sed -i -e 's/local\///' 'systemd/gpsd.service' |
208 |
+ sed -i -e 's/local\///' 'systemd/gpsdctl@××××××××.in' |
209 |
+ |
210 |
+ default |
211 |
+ |
212 |
+ use python && distutils-r1_src_prepare |
213 |
+} |
214 |
+ |
215 |
+python_prepare_all() { |
216 |
+ python_setup |
217 |
+ |
218 |
+ # Extract python info out of SConstruct so we can use saner distribute |
219 |
+ pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; } |
220 |
+ local pyprogs=$(sed -n '/^ *python_progs = \[/,/\]/{s:^ *::p}' SConstruct) |
221 |
+ local pybins=$("${PYTHON}" -c "${pyprogs}; print(python_progs)" || die "Unable to extract core Python tools") |
222 |
+ # Handle conditional tools manually. #666734 |
223 |
+ use X && pybins+="+ ['xgps', 'xgpsspeed']" |
224 |
+ use gpsd_protocols_ublox && pybins+="+ ['ubxtool']" |
225 |
+ use gpsd_protocols_greis && pybins+="+ ['zerk']" |
226 |
+ local pysrcs=$(sed -n '/^ *packet_ffi_extension = \[/,/\]/{s:^ *::p}' SConstruct) |
227 |
+ local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)" || die "Unable to extract packet types") |
228 |
+ # Post 3.19 the clienthelpers were merged into gps.packet |
229 |
+ sed \ |
230 |
+ -e "s|@VERSION@|$(pyvar gpsd_version)|" \ |
231 |
+ -e "s|@URL@|'${HOMEPAGE}'|" \ |
232 |
+ -e "s|@EMAIL@|$(pyvar devmail)|" \ |
233 |
+ -e "s|@GPS_PACKET_SOURCES@|${packet}|" \ |
234 |
+ -e "/@GPS_CLIENT_SOURCES@/d" \ |
235 |
+ -e "s|@SCRIPTS@|${pybins}|" \ |
236 |
+ "${FILESDIR}"/${PN}-3.3-setup.py > setup.py || die |
237 |
+ distutils-r1_python_prepare_all |
238 |
+} |
239 |
+ |
240 |
+src_configure() { |
241 |
+ scons_opts=( |
242 |
+ prefix="${EPREFIX}/usr" |
243 |
+ libdir="\$prefix/$(get_libdir)" |
244 |
+ udevdir="$(get_udevdir)" |
245 |
+ rundir="/run" |
246 |
+ chrpath=False |
247 |
+ gpsd_user=gpsd |
248 |
+ gpsd_group=dialout |
249 |
+ nostrip=True |
250 |
+ manbuild=False |
251 |
+ shared=$(usex !static True False) |
252 |
+ bluez=$(usex bluetooth) |
253 |
+ libgpsmm=$(usex cxx) |
254 |
+ clientdebug=$(usex debug) |
255 |
+ dbus_export=$(usex dbus) |
256 |
+ ipv6=$(usex ipv6) |
257 |
+ timing=$(usex latency-timing) |
258 |
+ ncurses=$(usex ncurses) |
259 |
+ ntpshm=$(usex ntp) |
260 |
+ pps=$(usex ntp) |
261 |
+ python=$(usex python) |
262 |
+ # force a predictable python libdir because lib vs. lib64 usage differs |
263 |
+ # from 3.5 to 3.6+ |
264 |
+ $(usex python python_libdir="${EPREFIX}"/python-discard "") |
265 |
+ qt=$(usex qt5) |
266 |
+ shm_export=$(usex shm) |
267 |
+ socket_export=$(usex sockets) |
268 |
+ usb=$(usex usb) |
269 |
+ xgps=$(usex X) |
270 |
+ ) |
271 |
+ |
272 |
+ use qt5 && scons_opts+=( qt_versioned=5 ) |
273 |
+ |
274 |
+ # enable specified protocols |
275 |
+ local protocol |
276 |
+ for protocol in ${GPSD_PROTOCOLS[@]} ; do |
277 |
+ scons_opts+=( ${protocol}=$(usex gpsd_protocols_${protocol}) ) |
278 |
+ done |
279 |
+} |
280 |
+ |
281 |
+src_compile() { |
282 |
+ export CHRPATH= |
283 |
+ tc-export CC CXX PKG_CONFIG |
284 |
+ export SHLINKFLAGS=${LDFLAGS} LINKFLAGS=${LDFLAGS} |
285 |
+ escons "${scons_opts[@]}" |
286 |
+ |
287 |
+ use python && distutils-r1_src_compile |
288 |
+} |
289 |
+ |
290 |
+src_install() { |
291 |
+ DESTDIR="${D}" escons install "${scons_opts[@]}" $(usex udev udev-install "") |
292 |
+ |
293 |
+ newconfd "${FILESDIR}"/gpsd.conf-2 gpsd |
294 |
+ newinitd "${FILESDIR}"/gpsd.init-2 gpsd |
295 |
+ |
296 |
+ # Cleanup bad alt copy due to Scons |
297 |
+ rm -rf "${D}"/python-discard/gps* |
298 |
+ find "${D}"/python-discard/ -type d -delete |
299 |
+ # Install correct multi-python copy |
300 |
+ use python && distutils-r1_src_install |
301 |
+} |