forked from pool/ninja
Accepting request 1172521 from home:mathletic:branches:devel:tools:building
- Move testing and its dependency google-test into a separate package OBS-URL: https://build.opensuse.org/request/show/1172521 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/ninja?expand=0&rev=63
This commit is contained in:
parent
9459e65261
commit
eea9890191
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 13:45:10 UTC 2024 - Christoph G <foss@grueninger.de>
|
||||
|
||||
- Move testing and its dependency google-test into a separate
|
||||
package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 4 21:31:20 UTC 2024 - Christoph G <foss@grueninger.de>
|
||||
|
||||
|
22
ninja.spec
22
ninja.spec
@ -15,21 +15,31 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define name_ext -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define name_ext %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
Name: ninja
|
||||
Name: ninja%{name_ext}
|
||||
Version: 1.12.0
|
||||
Release: 0
|
||||
Summary: A small build system closest in spirit to Make
|
||||
License: Apache-2.0
|
||||
Group: Development/Tools/Building
|
||||
URL: https://ninja-build.org/
|
||||
Source0: https://github.com/ninja-build/ninja/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/ninja-build/ninja/archive/v%{version}/ninja-%{version}.tar.gz
|
||||
Source1: macros.ninja
|
||||
Patch1: ninja-disable-maxprocs-test.patch
|
||||
Patch2: ninja-re2c-g.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
%if %{with test}
|
||||
BuildRequires: googletest-devel
|
||||
%endif
|
||||
BuildRequires: python3-base
|
||||
BuildRequires: re2c
|
||||
|
||||
@ -39,7 +49,7 @@ of files (typically source code and output executables) and orchestrates
|
||||
building them, quickly.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -p1 -n ninja-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
@ -47,7 +57,11 @@ export CFLAGS="%{optflags}"
|
||||
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
%endif
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
%if %{without test}
|
||||
%cmake -DBUILD_TESTING=OFF
|
||||
%else
|
||||
%cmake
|
||||
%endif
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
@ -58,7 +72,9 @@ install -D -p -m 0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completi
|
||||
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ninja
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%ctest
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
|
Loading…
Reference in New Issue
Block a user