From cdca87f2700756828cbb6f1ffdb96173e8e5cf5a Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 2 Nov 2021 20:40:40 +0100 Subject: [PATCH] move fedora versions for comparisons into dedicated globals --- zig.spec | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/zig.spec b/zig.spec index cd999eb..d685f32 100644 --- a/zig.spec +++ b/zig.spec @@ -2,22 +2,28 @@ # 32 bit builds currently run out of memory https://github.com/ziglang/zig/issues/6485 %global zig_arches x86_64 aarch64 riscv64 %{mips64} -%if %{fedora} >= 35 +# note here at which Fedora release we need to deal with LLVM and glibc differences +%global fedora_llvm 35 +# Bump to 36 once LLVM 13 is in 35 +%global fedora_glibc 35 + +%if %{fedora} >= %{fedora_llvm} %bcond_without llvm13 - -# documentation and tests do not build due to an unsupported glibc version -%bcond_with test -%bcond_with docs - %global llvm_version 13.0.0 %else %bcond_with llvm13 - -%bcond_without test -%bcond_without docs - %global llvm_version 12.0.0 %endif + +%if %{fedora} >= %{fedora_glibc} +# documentation and tests do not build due to an unsupported glibc version +%bcond_with test +%bcond_with docs +%else +%bcond_without test +%bcond_without docs +%endif + %bcond_without macro