This commit is contained in:
Alexander Stefanov 2023-10-19 08:21:03 +00:00
parent a01fdf01e4
commit e5759d5123
2 changed files with 15 additions and 8 deletions

View file

@ -1,2 +1,2 @@
sources:
dtc-1.6.1.tar.xz: 6273fa9cdd51e7fd83d0467e21c788e3a5d3cd5d
dtc-1.7.0.tar.xz: 19a95204dd787b4809886db15655082cb28718e9

View file

@ -5,8 +5,8 @@
%define devnamestatic %mklibname -d fdt_static %{api}
Name: dtc
Version: 1.6.1
Release: 2
Version: 1.7.0
Release: 1
Summary: Device Tree Compiler
Group: Development/Other
License: GPLv2+
@ -60,7 +60,8 @@ This package provides python3 bindings for %{name}.
%prep
%setup -q
%autopatch -p1
sed -i 's/python2/python3/' pylibfdt/setup.py
sed -i 's@--prefix=$(PREFIX)@--prefix=$(PREFIX) --root=/@' pylibfdt/Makefile.pylibfdt
%ifarch %{e2k}
# -MG is an unrecognized option for lcc
@ -69,7 +70,8 @@ echo '#define DTC_VERSION "DTC %{version}"' > version_gen.h
%endif
%build
%setup_compile_flags
%set_build_flags
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
sed -i \
-e '/^CFLAGS =/s:=:+= %{optflags}:' \
@ -81,11 +83,16 @@ sed -i \
# no-macro-redefined is a workaround for flex bug
# https://github.com/westes/flex/issues/155
%make CC=%{__cc} LDFLAGS="%{optflags}" WARNINGS+=-Wno-macro-redefined
%make_build CC=%{__cc} LDFLAGS="%{optflags}" WARNINGS+=-Wno-macro-redefined
%install
%make_install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} V=1
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{make_install} DESTDIR=%{buildroot} PREFIX=%{buildroot}/%{_prefix} \
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir}
# we don't want ftdump and it conflicts with freetype-demos, so drop it (rhbz 797805)
rm -f %{buildroot}/%{_bindir}/ftdump
%files
%{_bindir}/*