public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpsd/files/, sci-geosciences/gpsd/
Date: Thu, 10 Sep 2020 15:27:30 +0000 (UTC)	[thread overview]
Message-ID: <1599751632.d2e1501ab7f3f8353b92edc95d586273a5c01900.marecki@gentoo> (raw)

commit:     d2e1501ab7f3f8353b92edc95d586273a5c01900
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 10 15:12:54 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Sep 10 15:27:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e1501a

sci-geosciences/gpsd: bump to 3.21

Also fixes a few of the outstanding bugs.
Invoking maintainer timeout.

Closes: https://bugs.gentoo.org/show_bug.cgi?id=734364
Closes: https://bugs.gentoo.org/show_bug.cgi?id=735554
Closes: https://bugs.gentoo.org/show_bug.cgi?id=735964
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 sci-geosciences/gpsd/Manifest                      |   1 +
 ...psd-3.21-scons_conditional_python_scripts.patch |  64 +++++++
 sci-geosciences/gpsd/gpsd-3.21.ebuild              | 192 +++++++++++++++++++++
 3 files changed, 257 insertions(+)

diff --git a/sci-geosciences/gpsd/Manifest b/sci-geosciences/gpsd/Manifest
index d7ad2e03d2c..595d071ea61 100644
--- a/sci-geosciences/gpsd/Manifest
+++ b/sci-geosciences/gpsd/Manifest
@@ -2,3 +2,4 @@ DIST gpsd-3.17.tar.gz 8755304 BLAKE2B d1f82b5734fd90fe903a6f2fe8835fe8292fe3e729
 DIST gpsd-3.18.1.tar.gz 9031595 BLAKE2B 170863740c7281ea111c3f4db2dfeb67f4366da7e9e8d2f7f3bbddacbc9d2083558379b1fe60c9293c31a6428288d205aba565694fedde6f1dfe67999a6782c6 SHA512 b381b177fcd29089a61aa11f5df2c67473720a6bbc5590ca1c4fda627331c407de01c62caceeddae780626b9a02392e9a770d52a143357e1babdcc2fbff0ed38
 DIST gpsd-3.19.tar.gz 10581777 BLAKE2B 0801919c968b8027c357047dabdc8587e1d5950cb0d80f89d6d62678a11b3dfc76a6a89ae59123680dac3188a695d0c37618d3f83280f5e584e10c1fa9a5dc03 SHA512 c9f9a9ff65759f852771ec4cf97ab15343c9176a149dd5ea6c2e2dc18b47aa7c7bf9ff1f2e8523121564d33a34ae6aa08169c5454847b4fe7848e616fd20a814
 DIST gpsd-3.20.tar.gz 3600835 BLAKE2B 6c9a3540de1be9191a601d6666c18c79e8e8913a3b4455448bafd0fa81e3a1859bd4851d42c3d06aed48fd0910060919f87a661d02fec44c001e9a393d8658e6 SHA512 557ef5e5f3b511da4fc441f4bb2e0cd2e23c2981e8b3ce2999973767a04fde070d3ec6f14af60d0e471320078e9f4d1144e5796e7927975ecfbd55fc97f470a9
+DIST gpsd-3.21.tar.xz 2620396 BLAKE2B 366d1857f7ff63e087ac1bec8c95d997cd8d48a60d5548c1644748e1ed20334f45a4fb279bc26c61481cc3dea0244eb0aaca0ba562838a3b5de15da5d1d82502 SHA512 a45416c31ee891a84203aea786b6385ea5f557a406d898a8facdde78d120199b7e7db8f86ab8c395f6ca90965940355fa19413b2b918642fd8c7df219745233e

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
new file mode 100644
index 00000000000..00fe5ad2b81
--- /dev/null
+++ b/sci-geosciences/gpsd/files/gpsd-3.21-scons_conditional_python_scripts.patch
@@ -0,0 +1,64 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -150,10 +150,6 @@
+     'packaging/rpm/gpsd.spec',
+     'packet_names.h',
+     'Qgpsmm.pc',
+-    'ubxtool',
+-    'xgps',
+-    'xgpsspeed',
+-    'zerk',
+    ]
+ 
+ generated_www = [
+@@ -172,10 +168,6 @@
+     "gpscat",
+     "gpsfake",
+     "gpsprof",
+-    "ubxtool",
+-    "xgps",
+-    "xgpsspeed",
+-    "zerk",
+ ]
+ 
+ # All man pages.  Always build them all.
+@@ -205,10 +197,6 @@
+     "man/ntpshmmon.1": "man/ntpshmmon.xml",
+     "man/ppscheck.8": "man/ppscheck.xml",
+     "man/srec.5": "man/srec.xml",
+-    "man/ubxtool.1": "man/ubxtool.xml",
+-    "man/xgps.1": "man/gps.xml",
+-    "man/xgpsspeed.1": "man/gps.xml",
+-    "man/zerk.1": "man/zerk.xml",
+ }
+ 
+ # doc files to install in share/gpsd/doc
+@@ -1964,6 +1952,28 @@
+         "valgrind-audit.py"
+     ]
+ 
++    if env['greis']:
++        generated_sources.extend(["zerk"])
++        python_progs.extend(["zerk"])
++        all_manpages.update({
++            "man/zerk.1": "man/zerk.xml",
++        })
++
++    if env['ublox']:
++        generated_sources.extend(["ubxtool"])
++        python_progs.extend(["ubxtool"])
++        all_manpages.update({
++            "man/ubxtool.1": "man/ubxtool.xml",
++        })
++
++    if env['xgps']:
++        generated_sources.extend(["xgps", "xgpsspeed"])
++        python_progs.extend(["xgps", "xgpsspeed"])
++        all_manpages.update({
++            "man/xgps.1": "man/xgps.xml",
++            "man/xgpsspeed.1": "man/xgps.xml",
++        })
++
+     # Dependencies for imports in test programs
+     env.Depends('tests/test_clienthelpers.py',
+                 ['gps/__init__.py', 'gps/clienthelpers.py', 'gps/misc.py'])

diff --git a/sci-geosciences/gpsd/gpsd-3.21.ebuild b/sci-geosciences/gpsd/gpsd-3.21.ebuild
new file mode 100644
index 00000000000..ff88fc9a160
--- /dev/null
+++ b/sci-geosciences/gpsd/gpsd-3.21.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit eutils udev multilib distutils-r1 scons-utils toolchain-funcs
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://gitlab.com/gpsd/gpsd.git"
+	inherit git-r3
+else
+	SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
+	KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="GPS daemon and library for USB/serial GPS devices and GPS/mapping clients"
+HOMEPAGE="https://gpsd.io/"
+
+LICENSE="BSD"
+SLOT="0/27"
+
+GPSD_PROTOCOLS=(
+	aivdm ashtech earthmate evermore fury fv18 garmin garmintxt geostar
+	gpsclock greis isync itrax mtk3301 navcom nmea0183 nmea2000 ntrip
+	oceanserver oncore passthrough rtcm104v2 rtcm104v3 sirf skytraq
+	superstar2 tnt tripmate tsip ublox
+)
+IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/+gpsd_protocols_}
+IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth +cxx dbus debug ipv6 latency-timing ncurses ntp python qt5 +shm +sockets static test udev usb X"
+REQUIRED_USE="X? ( python )
+	gpsd_protocols_nmea2000? ( gpsd_protocols_aivdm )
+	gpsd_protocols_isync? ( gpsd_protocols_ublox )
+	gpsd_protocols_ublox? ( python )
+	gpsd_protocols_greis? ( python )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt5? ( cxx )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	acct-user/gpsd
+	>=net-misc/pps-tools-0.0.20120407
+	bluetooth? ( net-wireless/bluez )
+	dbus? (
+		sys-apps/dbus
+		dev-libs/dbus-glib
+	)
+	ncurses? ( sys-libs/ncurses:= )
+	ntp? ( || (
+		net-misc/ntp
+		net-misc/ntpsec
+		net-misc/chrony
+	) )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtnetwork:5
+	)
+	python? ( ${PYTHON_DEPS} )
+	gpsd_protocols_ublox? ( dev-python/pyserial )
+	gpsd_protocols_greis? ( dev-python/pyserial )
+	usb? ( virtual/libusb:1 )
+	X? ( dev-python/pygobject:3[cairo,${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+	test? ( sys-devel/bc )"
+BDEPEND="virtual/pkgconfig
+	$(python_gen_any_dep ">=dev-util/scons-2.3.0[\${PYTHON_USEDEP}]")"
+
+# xml packages are for man page generation
+if [[ ${PV} == *9999* ]] ; then
+	DEPEND+="
+		app-text/xmlto
+		=app-text/docbook-xml-dtd-4.1*"
+fi
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.21-scons_conditional_python_scripts.patch
+)
+
+src_prepare() {
+	# Make sure our list matches the source.
+	local src_protocols=$(echo $(
+		sed -n '/# GPS protocols/,/# Time service/{s:#.*::;s:[(",]::g;p}' "${S}"/SConstruct | awk '{print $1}' | LC_ALL=C sort
+	) )
+	if [[ ${src_protocols} != ${GPSD_PROTOCOLS[*]} ]] ; then
+		eerror "Detected protocols: ${src_protocols}"
+		eerror "Ebuild protocols:   ${GPSD_PROTOCOLS[*]}"
+		die "please sync ebuild & source"
+	fi
+
+	# Avoid useless -L paths to the install dir
+	sed -i \
+		-e 's:\<STAGING_PREFIX\>:SYSROOT:g' \
+		SConstruct || die
+
+	#Fix systemd binary paths
+	sed -i -e 's/local\///' 'systemd/gpsd.service'
+	sed -i -e 's/local\///' 'systemd/gpsdctl@.service.in'
+
+	default
+
+	use python && distutils-r1_src_prepare
+}
+
+python_prepare_all() {
+	python_setup
+
+	# Extract python info out of SConstruct so we can use saner distribute
+	pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
+	local pyprogs=$(sed -n '/^ *python_progs = \[/,/\]/{s:^ *::p}' SConstruct)
+	local pybins=$("${PYTHON}" -c "${pyprogs}; print(python_progs)" || die "Unable to extract core Python tools")
+	# Handle conditional tools manually. #666734
+	use X && pybins+="+ ['xgps', 'xgpsspeed']"
+	use gpsd_protocols_ublox && pybins+="+ ['ubxtool']"
+	use gpsd_protocols_greis && pybins+="+ ['zerk']"
+	local pysrcs=$(sed -n '/^ *packet_ffi_extension = \[/,/\]/{s:^ *::p}' SConstruct)
+	local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)" || die "Unable to extract packet types")
+	# Post 3.19 the clienthelpers were merged into gps.packet
+	sed \
+		-e "s|@VERSION@|$(pyvar gpsd_version)|" \
+		-e "s|@URL@|'${HOMEPAGE}'|" \
+		-e "s|@EMAIL@|$(pyvar devmail)|" \
+		-e "s|@GPS_PACKET_SOURCES@|${packet}|" \
+		-e "/@GPS_CLIENT_SOURCES@/d" \
+		-e "s|@SCRIPTS@|${pybins}|" \
+		"${FILESDIR}"/${PN}-3.3-setup.py > setup.py || die
+	distutils-r1_python_prepare_all
+}
+
+src_configure() {
+	scons_opts=(
+		prefix="${EPREFIX}/usr"
+		libdir="\$prefix/$(get_libdir)"
+		udevdir="$(get_udevdir)"
+		rundir="/run"
+		chrpath=False
+		gpsd_user=gpsd
+		gpsd_group=dialout
+		nostrip=True
+		manbuild=False
+		shared=$(usex !static True False)
+		bluez=$(usex bluetooth)
+		libgpsmm=$(usex cxx)
+		clientdebug=$(usex debug)
+		dbus_export=$(usex dbus)
+		ipv6=$(usex ipv6)
+		timing=$(usex latency-timing)
+		ncurses=$(usex ncurses)
+		ntpshm=$(usex ntp)
+		pps=$(usex ntp)
+		python=$(usex python)
+		# force a predictable python libdir because lib vs. lib64 usage differs
+		# from 3.5 to 3.6+
+		$(usex python python_libdir="${EPREFIX}"/python-discard "")
+		qt=$(usex qt5)
+		shm_export=$(usex shm)
+		socket_export=$(usex sockets)
+		usb=$(usex usb)
+		xgps=$(usex X)
+	)
+
+	use qt5 && scons_opts+=( qt_versioned=5 )
+
+	# enable specified protocols
+	local protocol
+	for protocol in ${GPSD_PROTOCOLS[@]} ; do
+		scons_opts+=( ${protocol}=$(usex gpsd_protocols_${protocol}) )
+	done
+}
+
+src_compile() {
+	export CHRPATH=
+	tc-export CC CXX PKG_CONFIG
+	export SHLINKFLAGS=${LDFLAGS} LINKFLAGS=${LDFLAGS}
+	escons "${scons_opts[@]}"
+
+	use python && distutils-r1_src_compile
+}
+
+src_install() {
+	DESTDIR="${D}" escons install "${scons_opts[@]}" $(usex udev udev-install "")
+
+	newconfd "${FILESDIR}"/gpsd.conf-2 gpsd
+	newinitd "${FILESDIR}"/gpsd.init-2 gpsd
+
+	# Cleanup bad alt copy due to Scons
+	rm -rf  "${D}"/python-discard/gps*
+	find "${D}"/python-discard/ -type d -delete
+	# Install correct multi-python copy
+	use python && distutils-r1_src_install
+}


             reply	other threads:[~2020-09-10 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 15:27 Marek Szuba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-25 17:56 [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpsd/files/, sci-geosciences/gpsd/ Sam James
2019-10-04 19:23 Robin H. Johnson
2019-09-12  3:57 Mike Frysinger
2017-09-21 11:58 Andreas Hüttel
2017-02-17 22:33 Michał Górny
2017-01-24  5:29 Matthias Maier
2016-05-09 19:45 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1599751632.d2e1501ab7f3f8353b92edc95d586273a5c01900.marecki@gentoo \
    --to=marecki@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox