Lines 67-83
DEPEND="${RDEPEND}
Link Here
|
67 |
virtual/pkgconfig |
67 |
virtual/pkgconfig |
68 |
test? ( sys-devel/bc )" |
68 |
test? ( sys-devel/bc )" |
69 |
|
69 |
|
70 |
# xml packages are for man page generation |
70 |
# asciidoctor package is for man page generation |
71 |
if [[ ${PV} == *9999* ]] ; then |
71 |
if [[ ${PV} == *9999* ]] ; then |
72 |
DEPEND+=" |
72 |
DEPEND+=" |
73 |
app-text/xmlto |
73 |
dev-ruby/asciidoctor" |
74 |
=app-text/docbook-xml-dtd-4.1*" |
|
|
75 |
fi |
74 |
fi |
76 |
|
75 |
|
77 |
src_prepare() { |
76 |
src_prepare() { |
78 |
# Make sure our list matches the source. |
77 |
# Make sure our list matches the source. |
79 |
local src_protocols=$(echo $( |
78 |
local src_protocols=$(echo $( |
80 |
sed -n '/# GPS protocols/,/# Time service/{s:#.*::;s:[(",]::g;p}' "${S}"/SConstruct | awk '{print $1}' | LC_ALL=C sort |
79 |
sed -n '/# GPS protocols/,/# Time service/{s:#.*::;s:[(",]::g;p}' "${S}"/SConscript | awk '{print $1}' | LC_ALL=C sort |
81 |
) ) |
80 |
) ) |
82 |
if [[ ${src_protocols} != ${GPSD_PROTOCOLS[*]} ]] ; then |
81 |
if [[ ${src_protocols} != ${GPSD_PROTOCOLS[*]} ]] ; then |
83 |
eerror "Detected protocols: ${src_protocols}" |
82 |
eerror "Detected protocols: ${src_protocols}" |
Lines 85-99
src_prepare() {
Link Here
|
85 |
die "please sync ebuild & source" |
84 |
die "please sync ebuild & source" |
86 |
fi |
85 |
fi |
87 |
|
86 |
|
88 |
# Avoid useless -L paths to the install dir |
|
|
89 |
sed -i \ |
90 |
-e 's:\<STAGING_PREFIX\>:SYSROOT:g' \ |
91 |
SConstruct || die |
92 |
|
93 |
#Fix systemd binary paths |
94 |
sed -i -e 's/local\///' 'systemd/gpsd.service' |
95 |
sed -i -e 's/local\///' 'systemd/gpsdctl@.service.in' |
96 |
|
97 |
default |
87 |
default |
98 |
|
88 |
|
99 |
use python && distutils-r1_src_prepare |
89 |
use python && distutils-r1_src_prepare |
Lines 102-109
src_prepare() {
Link Here
|
102 |
python_prepare_all() { |
92 |
python_prepare_all() { |
103 |
python_setup |
93 |
python_setup |
104 |
|
94 |
|
105 |
# Extract python info out of SConstruct so we can use saner distribute |
95 |
# Extract python info out of SConscript so we can use saner distribute |
106 |
pyarray() { sed -n "/^ *$1 *= *\\[/,/\\]/p" SConstruct ; } |
96 |
pyarray() { sed -n "/^ *$1 *= *\\[/,/\\]/p" SConscript ; } |
107 |
local pyprogs=$(pyarray python_progs) |
97 |
local pyprogs=$(pyarray python_progs) |
108 |
local pybins=$("${PYTHON}" -c "${pyprogs}; \ |
98 |
local pybins=$("${PYTHON}" -c "${pyprogs}; \ |
109 |
print(list(set(python_progs) - {'xgps', 'xgpsspeed', 'ubxtool', 'zerk'}))" || die "Unable to list pybins") |
99 |
print(list(set(python_progs) - {'xgps', 'xgpsspeed', 'ubxtool', 'zerk'}))" || die "Unable to list pybins") |
Lines 114-130
python_prepare_all() {
Link Here
|
114 |
local pysrcs=$(pyarray packet_ffi_extension) |
104 |
local pysrcs=$(pyarray packet_ffi_extension) |
115 |
local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)" || die "Unable to extract packet types") |
105 |
local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)" || die "Unable to extract packet types") |
116 |
|
106 |
|
117 |
pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; } |
107 |
pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConscript ; } |
118 |
# Post 3.19 the clienthelpers were merged into gps.packet |
108 |
# Post 3.19 the clienthelpers were merged into gps.packet |
119 |
sed \ |
109 |
sed \ |
120 |
-e "s|@VERSION@|$(pyvar gpsd_version)|" \ |
110 |
-e "s|@VERSION@|$(pyvar gpsd_version)|" \ |
121 |
-e "s|@URL@|$(pyvar website)|" \ |
111 |
-e "s|@URL@|$(pyvar website)|" \ |
122 |
-e "s|@EMAIL@|$(pyvar devmail)|" \ |
112 |
-e "s|@DEVMAIL@|$(pyvar devmail)|" \ |
123 |
-e "s|@SCRIPTS@|${pybins}|" \ |
113 |
-e "s|@SCRIPTS@|${pybins}|" \ |
124 |
-e "s|@GPS_PACKET_SOURCES@|${packet}|" \ |
|
|
125 |
-e "/@GPS_CLIENT_SOURCES@/d" \ |
126 |
-e "s|@SCRIPTS@|${pybins}|" \ |
114 |
-e "s|@SCRIPTS@|${pybins}|" \ |
127 |
"${FILESDIR}"/${PN}-3.3-setup.py > setup.py || die |
115 |
-e "s|@DOWNLOAD@|$(pyvar download)|" \ |
|
|
116 |
-e "s|@IRCCHAN@|$(pyvar ircchan)|" \ |
117 |
-e "s|@ISSUES@|$(pyvar bugtracker)|" \ |
118 |
-e "s|@MAILMAN@|$(pyvar mailman)|" \ |
119 |
-e "s|@PROJECTPAGE@|$(pyvar projectpage)|" \ |
120 |
-e "s|@SUPPORT@|https://gpsd.io/SUPPORT.html|" \ |
121 |
-e "s|@WEBSITE@|https://gpsd.io/|" \ |
122 |
"${S}"/packaging/gpsd-setup.py.in > setup.py || die |
128 |
distutils-r1_python_prepare_all |
123 |
distutils-r1_python_prepare_all |
129 |
} |
124 |
} |
130 |
|
125 |
|
Lines 138-144
src_configure() {
Link Here
|
138 |
gpsd_user=gpsd |
133 |
gpsd_user=gpsd |
139 |
gpsd_group=dialout |
134 |
gpsd_group=dialout |
140 |
nostrip=True |
135 |
nostrip=True |
141 |
manbuild=False |
|
|
142 |
shared=$(usex !static True False) |
136 |
shared=$(usex !static True False) |
143 |
bluez=$(usex bluetooth) |
137 |
bluez=$(usex bluetooth) |
144 |
libgpsmm=$(usex cxx) |
138 |
libgpsmm=$(usex cxx) |
Lines 156-164
src_configure() {
Link Here
|
156 |
qt=$(usex qt5) |
150 |
qt=$(usex qt5) |
157 |
shm_export=$(usex shm) |
151 |
shm_export=$(usex shm) |
158 |
socket_export=$(usex sockets) |
152 |
socket_export=$(usex sockets) |
|
|
153 |
systemd=yes |
154 |
unitdir="\$prefix/$(get_libdir)" |
159 |
usb=$(usex usb) |
155 |
usb=$(usex usb) |
160 |
) |
156 |
) |
161 |
|
157 |
|
|
|
158 |
if [[ ${PV} != *9999* ]] ; then |
159 |
myesconsargs+=( manbuild=False ) |
160 |
fi |
161 |
|
162 |
use X && scons_opts+=( xgps=1 xgpsspeed=1 ) |
162 |
use X && scons_opts+=( xgps=1 xgpsspeed=1 ) |
163 |
use qt5 && scons_opts+=( qt_versioned=5 ) |
163 |
use qt5 && scons_opts+=( qt_versioned=5 ) |
164 |
|
164 |
|