Accepting request 656930 from home:adkorte:branches:Application:Geo

- Correct flag to disable stripping (nostrip=True)
- Add gpsd-declaration-in-for-loop.patch to remove c99 construction
  (backport from upstream)
- Upstream changed location of gpsd in systemd gpsd.service file
  (change it back to {_sbindir})

OBS-URL: https://build.opensuse.org/request/show/656930
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gpsd?expand=0&rev=123
This commit is contained in:
Martin Pluskal 2018-12-12 08:34:43 +00:00 committed by Git OBS Bridge
parent cdbb3dd43a
commit 837d657667
3 changed files with 41 additions and 3 deletions

View File

@ -0,0 +1,19 @@
--- gpsd-3.18.1.orig/driver_ubx.c
+++ gpsd-3.18.1/driver_ubx.c
@@ -813,6 +813,7 @@
int8_t leapS;
uint8_t numMeas;
uint8_t recStat;
+ int i;
if (16 > data_len) {
gpsd_log(&session->context->errout, LOG_WARN,
@@ -830,7 +831,7 @@
"UBX_RXM_RAWX: rcvTow %f week %u leapS %d numMeas %u recStat %d\n",
rcvTow, week, leapS, numMeas, recStat);
- for (int i = 0; i < numMeas; i++) {
+ for (i = 0; i < numMeas; i++) {
int off = 32 * i;
double prMes = getled64((const char *)buf, off + 16);
double cpMes = getled64((const char *)buf, off + 24);

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Dec 10 19:12:14 UTC 2018 - Arjen de Korte <suse+build@de-korte.org>
- Correct flag to disable stripping (nostrip=True)
- Add gpsd-declaration-in-for-loop.patch to remove c99 construction
(backport from upstream)
- Upstream changed location of gpsd in systemd gpsd.service file
(change it back to {_sbindir})
-------------------------------------------------------------------
Sun Nov 25 16:07:56 UTC 2018 - mardnh@gmx.de

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -33,6 +33,7 @@ Source2: udev.gpsd
Source3: sysconfig.gpsd
Source98: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz.sig
Source99: %{name}.keyring
Source100: gpsd-declaration-in-for-loop.patch
BuildRequires: chrpath
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -160,6 +161,12 @@ mkdir -p %{name}-%{version}/python2
mkdir -p %{name}-%{version}/python3
tar -xf %{SOURCE0} -C %{name}-%{version}/python2
tar -xf %{SOURCE0} -C %{name}-%{version}/python3
pushd %{name}-%{version}/python2/%{name}-%{version}
patch -p1 < %{SOURCE100}
popd
pushd %{name}-%{version}/python3/%{name}-%{version}
patch -p1 < %{SOURCE100}
popd
cd %{name}-%{version}
# fix systemd path
@ -171,6 +178,9 @@ sed -i 's|systemctl daemon-reload|true|' python*/%{name}-%{version}/SConstruct
# don't set RPATH
sed -i 's|env.Prepend.*RPATH.*|pass #\0|' python*/%{name}-%{version}/SConstruct
# fix gpsd path
sed -i 's|ExecStart=.*/gpsd|ExecStart=%{_sbindir}/gpsd|' python*/%{name}-%{version}/systemd/gpsd.service
%build
# The SCons description does not handle CXXFLAGS correctly, pass C++ flags also in CFLAGS
export CFLAGS="%{optflags}"
@ -221,7 +231,7 @@ export CPPFLAGS="%{optflags}"
# Install python2 first
pushd %{name}-%{version}/python2/%{name}-%{version}
DESTDIR=%{buildroot} scons strip=False install
DESTDIR=%{buildroot} scons nostrip=True install
# Now delete all the installed files except the python2 files
find %{buildroot} \( -not -type d -a -not -path "*/python2.*/*" \) -delete
@ -229,7 +239,7 @@ find %{buildroot} \( -not -type d -a -not -path "*/python2.*/*" \) -delete
popd
pushd %{name}-%{version}/python3/%{name}-%{version}
DESTDIR=%{buildroot} scons strip=False install
DESTDIR=%{buildroot} scons nostrip=True install
install -d -m 755 %{buildroot}%{_udevdir}
install -d -m 755 %{buildroot}%{_udevdir}/rules.d