Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpsd/
Date: Thu, 12 Sep 2019 03:58:01
Message-Id: 1568259972.b9459744e9345aec8bd0e8fdbc857c1e13838618.vapier@gentoo
1 commit: b9459744e9345aec8bd0e8fdbc857c1e13838618
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 8 19:27:38 2019 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 12 03:46:12 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9459744
7
8 sci-geosciences/gpsd: fix xgps python shebangs
9
10 The logic to pull the python scripts out misses the dynamic xps
11 scripts leading them to not be wrapped as Python 2-specific.
12
13 Closes: https://bugs.gentoo.org/666734
14 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
15
16 .../gpsd/{gpsd-9999.ebuild => gpsd-3.17-r4.ebuild} | 17 +++++++----------
17 sci-geosciences/gpsd/gpsd-9999.ebuild | 2 ++
18 2 files changed, 9 insertions(+), 10 deletions(-)
19
20 diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild b/sci-geosciences/gpsd/gpsd-3.17-r4.ebuild
21 similarity index 93%
22 copy from sci-geosciences/gpsd/gpsd-9999.ebuild
23 copy to sci-geosciences/gpsd/gpsd-3.17-r4.ebuild
24 index 84668fd1c77..dc6247feaeb 100644
25 --- a/sci-geosciences/gpsd/gpsd-9999.ebuild
26 +++ b/sci-geosciences/gpsd/gpsd-3.17-r4.ebuild
27 @@ -14,7 +14,7 @@ if [[ ${PV} == "9999" ]] ; then
28 inherit git-2
29 else
30 SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
31 - KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
32 + KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
33 fi
34
35 DESCRIPTION="GPS daemon and library for USB/serial GPS devices and GPS/mapping clients"
36 @@ -55,7 +55,7 @@ RDEPEND="
37 )
38 python? ( ${PYTHON_DEPS} )
39 usb? ( virtual/libusb:1 )
40 - X? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )"
41 + X? ( dev-python/pygobject:3[cairo,${PYTHON_USEDEP}] )"
42 DEPEND="${RDEPEND}
43 virtual/pkgconfig
44 test? ( sys-devel/bc )"
45 @@ -93,6 +93,8 @@ python_prepare_all() {
46 # Extract python info out of SConstruct so we can use saner distribute
47 pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
48 local pybins=$(pyvar python_progs | tail -1)
49 + # Handle conditional tools manually. #666734
50 + use X && pybins+="+ ['xgps', 'xgpsspeed']"
51 local pysrcs=$(sed -n '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct)
52 local packet=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/packet'])")
53 local client=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/clienthelpers'])")
54 @@ -117,7 +119,6 @@ src_configure() {
55 gpsd_user=gpsd
56 gpsd_group=uucp
57 nostrip=True
58 - python=False
59 manbuild=False
60 shared=$(usex !static True False)
61 $(use_scons bluetooth bluez)
62 @@ -129,12 +130,14 @@ src_configure() {
63 $(use_scons ncurses)
64 $(use_scons ntp ntpshm)
65 $(use_scons ntp pps)
66 + $(use_scons X python)
67 $(use_scons qt5 qt)
68 $(use_scons shm shm_export)
69 $(use_scons sockets socket_export)
70 $(use_scons usb)
71 )
72
73 + use X && myesconsargs+=( xgps=1 )
74 use qt5 && myesconsargs+=( qt_versioned=5 )
75
76 # enable specified protocols
77 @@ -159,13 +162,7 @@ src_install() {
78 newconfd "${FILESDIR}"/gpsd.conf-2 gpsd
79 newinitd "${FILESDIR}"/gpsd.init-2 gpsd
80
81 - if use python ; then
82 - distutils-r1_src_install
83 - # Delete all X related packages if user doesn't want them
84 - if ! use X && [[ -f "${ED%/}"/usr/bin/xgps ]]; then
85 - rm "${ED%/}"/usr/bin/xgps* || die
86 - fi
87 - fi
88 + use python && distutils-r1_src_install
89 }
90
91 pkg_preinst() {
92
93 diff --git a/sci-geosciences/gpsd/gpsd-9999.ebuild b/sci-geosciences/gpsd/gpsd-9999.ebuild
94 index 84668fd1c77..5b3bca138d4 100644
95 --- a/sci-geosciences/gpsd/gpsd-9999.ebuild
96 +++ b/sci-geosciences/gpsd/gpsd-9999.ebuild
97 @@ -93,6 +93,8 @@ python_prepare_all() {
98 # Extract python info out of SConstruct so we can use saner distribute
99 pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; }
100 local pybins=$(pyvar python_progs | tail -1)
101 + # Handle conditional tools manually. #666734
102 + use X && pybins+="+ ['xgps', 'xgpsspeed']"
103 local pysrcs=$(sed -n '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct)
104 local packet=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/packet'])")
105 local client=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/clienthelpers'])")