summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2020-07-28 12:48:04 -0400
committerRick Farina <zerochaos@gentoo.org>2020-07-28 14:12:02 -0400
commit8cf177c62fc32e0564439b007ed4ffd68ccec1cd (patch)
tree6399c0cd60cc156cef67b039686389c44bd32f21 /sci-geosciences/gpsd/gpsd-9999.ebuild
parentsys-devel/gcc-config: stable 2.3.1 for hppa, bug #733870 (diff)
downloadgentoo-8cf177c62fc32e0564439b007ed4ffd68ccec1cd.tar.gz
gentoo-8cf177c62fc32e0564439b007ed4ffd68ccec1cd.tar.bz2
gentoo-8cf177c62fc32e0564439b007ed4ffd68ccec1cd.zip
sci-geosciences/gpsd: bumpity bump
bumping eapi bumping version various cleanups for same Much work contributed by michael AT weiser.dinsnail.net Significant work on bug #704580 which I am still going through all of Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'sci-geosciences/gpsd/gpsd-9999.ebuild')
-rw-r--r--sci-geosciences/gpsd/gpsd-9999.ebuild69
1 files changed, 35 insertions, 34 deletions
diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild b/sci-geosciences/gpsd/gpsd-9999.ebuild
index 76b0f95ce737..cd96667f22ed 100644
--- a/sci-geosciences/gpsd/gpsd-9999.ebuild
+++ b/sci-geosciences/gpsd/gpsd-9999.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_6 )
+PYTHON_COMPAT=( python3_{6,7,8} )
SCONS_MIN_VERSION="2.3.0"
inherit eutils udev user multilib distutils-r1 scons-utils toolchain-funcs
@@ -84,11 +84,6 @@ src_prepare() {
die "please sync ebuild & source"
fi
- epatch "${FILESDIR}"/${PN}-3.19-do_not_rm_library.patch
- # Merged upstream
- #epatch "${FILESDIR}"/${P}-scons-print.patch
- #epatch "${FILESDIR}"/${P}-scons-py3.patch
-
# Avoid useless -L paths to the install dir
sed -i \
-e 's:\<STAGING_PREFIX\>:SYSROOT:g' \
@@ -101,17 +96,20 @@ src_prepare() {
python_prepare_all() {
python_setup
- python_export
# Extract python info out of SConstruct so we can use saner distribute
- pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
- local pybins=$(pyvar python_progs | tail -1)
+ pyarray() { sed -n "/^ *$1 *= *\\[/,/\\]/p" SConstruct ; }
+ local pyprogs=$(pyarray python_progs)
+ local pybins=$("${PYTHON}" -c "${pyprogs}; \
+ print(list(set(python_progs) - {'xgps', 'xgpsspeed', 'ubxtool', 'zerk'}))" || die "Unable to list pybins")
# 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 '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct)
- local packet=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/packet'])")
+ local pysrcs=$(pyarray packet_ffi_extension)
+ local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)" || die "Unable to extract packet types")
+
+ pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
# Post 3.19 the clienthelpers were merged into gps.packet
sed \
-e "s|@VERSION@|$(pyvar gpsd_version)|" \
@@ -126,7 +124,7 @@ python_prepare_all() {
}
src_configure() {
- myesconsargs=(
+ scons_opts=(
prefix="${EPREFIX}/usr"
libdir="\$prefix/$(get_libdir)"
udevdir="$(get_udevdir)"
@@ -136,29 +134,32 @@ src_configure() {
nostrip=True
manbuild=False
shared=$(usex !static True False)
- $(use_scons bluetooth bluez)
- $(use_scons cxx libgpsmm)
- $(use_scons debug clientdebug)
- $(use_scons dbus dbus_export)
- $(use_scons ipv6)
- $(use_scons latency-timing timing)
- $(use_scons ncurses)
- $(use_scons ntp ntpshm)
- $(use_scons ntp pps)
- $(use_scons python)
- $(use_scons qt5 qt)
- $(use_scons shm shm_export)
- $(use_scons sockets socket_export)
- $(use_scons usb)
+ 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)
)
- use X && myesconsargs+=( xgps=1 xgpsspeed=1 )
- use qt5 && myesconsargs+=( qt_versioned=5 )
+ use X && scons_opts+=( xgps=1 xgpsspeed=1 )
+ use qt5 && scons_opts+=( qt_versioned=5 )
# enable specified protocols
local protocol
for protocol in ${GPSD_PROTOCOLS[@]} ; do
- myesconsargs+=( $(use_scons gpsd_protocols_${protocol} ${protocol}) )
+ scons_opts+=( ${protocol}=$(usex gpsd_protocols_${protocol}) )
done
}
@@ -166,20 +167,20 @@ src_compile() {
export CHRPATH=
tc-export CC CXX PKG_CONFIG
export SHLINKFLAGS=${LDFLAGS} LINKFLAGS=${LDFLAGS}
- escons
+ escons "${scons_opts[@]}"
use python && distutils-r1_src_compile
}
src_install() {
- DESTDIR="${D}" escons install $(usex udev udev-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}"/usr/local/$(get_libdir)/python*/site-packages/gps*
- find "${D}"/usr/local/ -type d -delete
+ rm -rf "${D}"/python-discard/gps*
+ find "${D}"/python-discard/ -type d -delete
# Install correct multi-python copy
use python && distutils-r1_src_install