From 921f61e0f23f9dda73e2b96862bfeb146a2f0de6 Mon Sep 17 00:00:00 2001 From: Joel Capitao Date: Jan 16 2025 17:07:48 +0000 Subject: Import ninja-build-1.12.1-3.el10s in CloudSIG Epoxy --- diff --git a/.ninja-build.metadata b/.ninja-build.metadata index 2dee138..6327f1e 100644 --- a/.ninja-build.metadata +++ b/.ninja-build.metadata @@ -1 +1 @@ -17219deb34dd816363e37470f77ff7231509143a SOURCES/ninja-1.8.2.tar.gz +f3a1a28e0e427be58b4f2ff2e61b7a4a0e4f0c24 SOURCES/ninja-1.12.1.tar.gz diff --git a/SPECS/ninja-build.spec b/SPECS/ninja-build.spec index 067154d..b43b0c6 100644 --- a/SPECS/ninja-build.spec +++ b/SPECS/ninja-build.spec @@ -1,23 +1,30 @@ +# Set to bcond_without or use --with bootstrap, +# when bootstrapping a new architecture. +%bcond_with bootstrap + Name: ninja-build -Version: 1.8.2 -Release: 1%{?dist} -Summary: A small build system with a focus on speed -License: ASL 2.0 -URL: http://martine.github.com/ninja/ -Source0: https://github.com/martine/ninja/archive/v%{version}/ninja-%{version}.tar.gz +Version: 1.12.1 +Release: 3%{?dist} +Summary: Small build system with a focus on speed +License: Apache-2.0 +URL: https://ninja-build.org/ +Source0: https://github.com/ninja-build/ninja/archive/v%{version}/ninja-%{version}.tar.gz Source1: ninja.vim Source2: macros.ninja BuildRequires: gcc-c++ -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python2-devel -%else BuildRequires: python3-devel -%endif +%if %{without bootstrap} BuildRequires: asciidoc BuildRequires: gtest-devel +BuildRequires: cmake +%endif +%if !0%{?rhel} BuildRequires: re2c >= 0.11.3 +%endif +%if %{without bootstrap} Requires: emacs-filesystem Requires: vim-filesystem +%endif %description Ninja is a small build system with a focus on speed. It differs from other @@ -25,49 +32,201 @@ build systems in two major respects: it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible. +%package -n python3-ninja +Summary: Python metadata for packages depending on ninja +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch + +%description -n python3-ninja +Package provides metadata only for Python packages depending on ninja. +This is to make automatic dependency resolution work. The package is NOT +using anything from the PyPI package called ninja. + %prep %autosetup -n ninja-%{version} -p1 %build -CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \ -%if 0%{?rhel} && 0%{?rhel} <= 7 -%{__python2} \ -%else -%{__python3} \ -%endif - configure.py --bootstrap --verbose +%set_build_flags +%python3 configure.py --bootstrap --verbose ./ninja -v all +%if %{without bootstrap} ./ninja -v manual +# For testing with the ninja we just built, we need to add current +# directory to PATH, otherwise CMake fails to find the ninja binary. +PATH=$(pwd):"$PATH" %cmake \ + -G Ninja \ + -B cmake-build \ + -DCMAKE_BUILD_TYPE=Release +./ninja -C cmake-build ninja_test +%endif + +# Provide Python metadata +%global ninja_distinfo ninja-%{version}.dist-info +mkdir %{ninja_distinfo} +cat > %{ninja_distinfo}/METADATA << EOF +Metadata-Version: 2.1 +Name: ninja +Version: %{version} +Summary: %{summary} +Description-Content-Type: text/plain + +Metadata only package for automatic dependency resolution in the RPM +ecosystem. This package is separate from the PyPI package called ninja. +EOF +echo rpm > %{ninja_distinfo}/INSTALLER %install -# TODO: Install ninja_syntax.py? install -Dpm0755 ninja -t %{buildroot}%{_bindir}/ +%if %{without bootstrap} install -Dpm0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja install -Dpm0644 misc/ninja-mode.el %{buildroot}%{_datadir}/emacs/site-lisp/ninja-mode.el install -Dpm0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/ninja.vim install -Dpm0644 %{S:1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/ninja.vim install -Dpm0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja -install -Dpm0644 %{S:2} %{buildroot}%{rpmmacrodir}/macros.ninja +install -Dpm0644 misc/ninja_syntax.py %{buildroot}%{python3_sitelib}/ninja_syntax.py +%endif +install -Dpm0644 %{S:2} %{buildroot}%{_rpmmacrodir}/macros.ninja + +# Macro should not change when we are redefining bindir +sed -i -e "/^%%__ninja /s| .*$| %{_bindir}/ninja|" %{buildroot}%{_rpmmacrodir}/macros.ninja ln -s ninja %{buildroot}%{_bindir}/ninja-build +# Install Python metadata +cp -a %{ninja_distinfo} %{buildroot}%{python3_sitelib} + +%if %{without bootstrap} %check -./ninja_test --gtest_filter=-SubprocessTest.SetWithLots +./cmake-build/ninja_test +%endif %files %license COPYING -%doc HACKING.md README doc/manual.html +%doc README.md +%if %{without bootstrap} +%doc doc/manual.html +%endif %{_bindir}/ninja %{_bindir}/ninja-build +%if %{without bootstrap} %{_datadir}/bash-completion/completions/ninja %{_datadir}/emacs/site-lisp/ninja-mode.el %{_datadir}/vim/vimfiles/syntax/ninja.vim %{_datadir}/vim/vimfiles/ftdetect/ninja.vim # zsh does not have a -filesystem package -%{_datadir}/zsh/ -%{rpmmacrodir}/macros.ninja +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_ninja +%pycached %{python3_sitelib}/ninja_syntax.py +%endif +%{_rpmmacrodir}/macros.ninja + +%files -n python3-ninja +%{python3_sitelib}/%{ninja_distinfo} + %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.12.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 1.12.1-2 +- Rebuilt for Python 3.13 + +* Mon May 27 2024 Byoungchan Lee - 1.12.1-1 +- Update to 1.12.1 + +* Wed May 15 2024 Sandro +- Add python3-ninja sub package providing metadata for Python packages + depending on ninja to facilitate automatic dependency resolution. + +* Thu Jan 25 2024 Fedora Release Engineering - 1.11.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.11.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Oct 23 2023 Ben Boeckel - 1.11.1-5 +- Handle Python 3.13 removal of `pipes`, resolves rhbz#2245655 + +* Thu Jul 20 2023 Fedora Release Engineering - 1.11.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 15 2023 Python Maint - 1.11.1-3 +- Rebuilt for Python 3.12 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Sep 06 2022 Carl George - 1.11.1-1 +- Latest upstream, resolves rhbz#2086337 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.10.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.10.2-8 +- Rebuilt for Python 3.11 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.10.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 1.10.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 1.10.2-5 +- Rebuilt for Python 3.10 + +* Tue May 04 2021 Richard Hughes - 1.10.2-4 +- Do not BR re2c on RHEL. It is NTH, and one less package dep to maintain. + +* Fri Mar 05 2021 Igor Raits - 1.10.2-3 +- Cleanup from unneeded conditions + +* Tue Jan 26 2021 Fedora Release Engineering - 1.10.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 21 2021 Kalev Lember - 1.10.2-1 +- Update to 1.10.2 + +* Wed Aug 19 2020 Björn Esser - 1.10.1-2 +- Add ninja_syntax.py + +* Wed Aug 19 2020 Igor Raits - 1.10.1-1 +- Update to 1.10.1 + +* Tue Jul 28 2020 Fedora Release Engineering - 1.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Feb 05 2020 Björn Esser - 1.10.0-1 +- Update to 1.10.0 + +* Wed Feb 05 2020 Björn Esser - 1.9.0-5 +- Add conditional for bootstrapping new architectures +- Use %%set_build_flags macro to export buildflags, if available + +* Wed Jan 29 2020 Fedora Release Engineering - 1.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jan 31 2019 Igor Gnatenko - 1.9.0-1 +- Update to 1.9.0 + +* Thu Aug 16 2018 Owen Taylor - 1.8.2-5 +- Fix binddir usage in macros.ninja + +* Fri Jul 13 2018 Fedora Release Engineering - 1.8.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.8.2-3 +- Rebuilt for Python 3.7 + +* Thu Feb 08 2018 Fedora Release Engineering - 1.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Sep 12 2017 Igor Gnatenko - 1.8.2-1 - Update to 1.8.2