From b52f0d6dbc672ff61d05e5b6072110691bc1475b Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 17 Aug 2021 13:04:57 +0200 Subject: [PATCH] Use bootstrap bcond instead of global This has a nice side effect of automatically adding ~bootstrap suffix to the dist tag. --- ldc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ldc.spec b/ldc.spec index ba8c1fc..6bb4713 100644 --- a/ldc.spec +++ b/ldc.spec @@ -11,7 +11,7 @@ # older, working LDC compiler in the buildroot, which is then used to build a # new intermediate LDC version, and finally this in turn is used to build the # final compiler that gets installed in the rpm. -%global bootstrap_stage2 0 +%bcond_with bootstrap %undefine _hardened_build @@ -128,7 +128,7 @@ mkdir geany_config %global optflags %{optflags} -fno-strict-aliasing -%if 0%{?bootstrap_stage2} +%if %{with bootstrap} tar xf %{SOURCE0} mkdir build-bootstrap pushd build-bootstrap @@ -142,7 +142,7 @@ popd -DINCLUDE_INSTALL_DIR:PATH=%{_prefix}/lib/ldc/%{_target_platform}/include/d \ -DBASH_COMPLETION_COMPLETIONSDIR:PATH=%{_datadir}/bash-completion/completions \ -DLLVM_CONFIG:PATH=llvm-config%{?llvm_version:-%{llvm_version}} \ -%if 0%{?bootstrap_stage2} +%if %{with bootstrap} -DD_COMPILER:PATH=`pwd`/build-bootstrap/bin/ldmd2 \ %endif %{nil}