From 73ceac881f5dd3e42e08d3c40388263f0c10c37e Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 20 Feb 2024 15:56:27 +0100 Subject: [PATCH] internalize scons (RHEL-14750) Add scons to sources and use it for building instead of requiring a system package. Resolves: RHEL-14750 --- .gitignore | 1 + gpsd.spec | 11 ++++++++--- sources | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fb6a1aa..8d0feaf 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /gpsd-3.23.1.tar.gz /gpsd-3.24.tar.gz /gpsd-3.25.tar.gz +/scons-4.6.0.tar.gz diff --git a/gpsd.spec b/gpsd.spec index 64062dd..a4dde75 100644 --- a/gpsd.spec +++ b/gpsd.spec @@ -7,6 +7,9 @@ %global with_qt 1 %endif +%global scons_ver 4.6.0 +%global scons python3 scons-%{scons_ver}/scripts/scons.py + Name: gpsd Version: 3.25 Release: 10%{?dist} @@ -16,6 +19,8 @@ Summary: Service daemon for mediating access to a GPS License: BSD-2-Clause URL: https://gpsd.gitlab.io/gpsd/index.html Source0: https://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz +# used only for building +Source1: https://github.com/SCons/scons/archive/%{scons_ver}/scons-%{scons_ver}.tar.gz Source11: gpsd.sysconfig # add missing IPv6 support @@ -141,7 +146,7 @@ package split. It will be removed after one distribution release cycle, please do not reference it or depend on it in any way. %prep -%setup -q +%setup -q -a 1 %patch -P 1 -p1 -b .ipv6 %patch -P 2 -p1 -b .scanfixes %patch -P 3 -p1 -b .busywait @@ -158,7 +163,7 @@ export CCFLAGS="%{optflags}" export LINKFLAGS="%{__global_ldflags}" # breaks with %%{_smp_mflags} -scons \ +%{scons} \ dbus_export=yes \ systemd=yes \ %if %{with_qt} @@ -192,7 +197,7 @@ scons \ export CCFLAGS="%{optflags}" export LINKFLAGS="%{__global_ldflags}" -DESTDIR=%{buildroot} scons install systemd_install udev-install +DESTDIR=%{buildroot} %{scons} install systemd_install udev-install # use the old name for udev rules mv %{buildroot}%{_udevrulesdir}/{25,99}-gpsd.rules diff --git a/sources b/sources index 6e72aca..81531cf 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (gpsd-3.25.tar.gz) = 0684cbd30defa1a328898589e1d61b2431462a774aff56c588bd00c1fbd92ac94cf6fc1f2b981debac78c34ab09fa24f48ed6334f3ecd09e6b8f5faa92ae1085 +SHA512 (scons-4.6.0.tar.gz) = d7dd30bbc94ec014b12b37a106aa536dd5c8b16e9f1605b68cad6721cf6e3959add1f75a42693fd8499734ca19eb76f648800d7cc8081fe334282841cd406954