Update dtc to 1.7.0 (#7754)
Dtc's latest version is 1.7.0. Therefore, update to this version. To support this version, set the SETUPTOOLS_SCM_PRETEND_VERSION to properly register the version and alter the logic to setting the root directory. Additionally, add check section according to Makefile. Note that the SETUPTOOLS_SCM_PRETEND_VERSION is a workaround but will not be needed in future versions thanks to dtc commit cd3e2304f4a9c4f725dcc548082ccc6c89d078a4
This commit is contained in:
Родитель
495f3a714c
Коммит
c7872dfe1f
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"dtc-1.6.1.tar.gz": "38a6257f2c23cb9dfa1781ac4ad122d8358e1a22d33b2da0eb492c190644a376"
|
||||
"dtc-1.7.0.tar.gz": "44844eb5373f8780ca1b7b4f64c073b349da1746aaad76c531f65a9dd2483232"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Device Tree Compiler
|
||||
Name: dtc
|
||||
Version: 1.6.1
|
||||
Version: 1.7.0
|
||||
Release: 1%{?dist}
|
||||
License: BSD OR GPLv2+
|
||||
Vendor: Microsoft Corporation
|
||||
|
@ -12,6 +12,10 @@ BuildRequires: bison
|
|||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-setuptools_scm
|
||||
BuildRequires: python3-wheel
|
||||
BuildRequires: swig
|
||||
Provides: libfdt = %{name}-%{version}
|
||||
Provides: python3-libfdt = %{name}-%{version}
|
||||
|
@ -35,19 +39,31 @@ This package provides development files for libfdt
|
|||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
sed -i 's/python2/python3/' pylibfdt/setup.py
|
||||
sed -i 's/SUBLEVEL = 0/SUBLEVEL = 1/' Makefile
|
||||
# to prevent setuptools from installing an .egg, we need to pass --root to setup.py install
|
||||
# since $(PREFIX) already contains %%{buildroot}, we set root to /
|
||||
# .eggs are going to be deprecated, see https://github.com/pypa/pip/issues/11501
|
||||
sed -i 's@--prefix=$(PREFIX)@--prefix=$(PREFIX) --root=/@' pylibfdt/Makefile.pylibfdt
|
||||
|
||||
%build
|
||||
# Export version for setuptools-scm to prevent error:
|
||||
# "LookupError: setuptools-scm was unable to detect version"
|
||||
# due to using a tarball instead of a git repo. This will no longer be needed
|
||||
# once "pylibfdt: use fallback version in tarballs" (cd3e230) is released.
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
make %{?_smp_mflags} V=1 CC="gcc %{optflags} $LDFLAGS -Wno-error=missing-prototypes -Wno-error=cast-qual" NO_PYTHON=1
|
||||
|
||||
%install
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
%make_install \
|
||||
PREFIX=%{buildroot}%{_prefix} \
|
||||
LIBDIR=%{_libdir} \
|
||||
BINDIR=%{_bindir} \
|
||||
INCLUDEDIR=%{_includedir}
|
||||
|
||||
%check
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
||||
make %{?_smp_mflags} check
|
||||
|
||||
%files
|
||||
%license GPL
|
||||
%doc Documentation/manual.txt
|
||||
|
@ -62,6 +78,10 @@ make %{?_smp_mflags} V=1 CC="gcc %{optflags} $LDFLAGS -Wno-error=missing-prototy
|
|||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 01 2024 Rachel Menge <rachelmenge@microsoft.com> - 1.7.0-1
|
||||
- Update to version 1.7.0
|
||||
- Add %check section
|
||||
|
||||
* Tue Nov 09 2021 Andrew Phelps <anphel@microsoft.com> - 1.6.1-1
|
||||
- Update to version 1.6.1
|
||||
- Remove dtc-disable-warning.patch
|
||||
|
|
|
@ -2978,8 +2978,8 @@
|
|||
"type": "other",
|
||||
"other": {
|
||||
"name": "dtc",
|
||||
"version": "1.6.1",
|
||||
"downloadUrl": "https://kernel.org/pub/software/utils/dtc/dtc-1.6.1.tar.gz"
|
||||
"version": "1.7.0",
|
||||
"downloadUrl": "https://kernel.org/pub/software/utils/dtc/dtc-1.7.0.tar.gz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче