From 1b46cca6074ddb64c8fd816f54a84781eec478481a3a46e0af71ed6afe4cb2e7 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 15 Nov 2023 18:07:49 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jurand?expand=0&rev=3 --- jurand.changes | 5 +++++ jurand.spec | 21 ++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/jurand.changes b/jurand.changes index fb9ccb4..8b5fa02 100644 --- a/jurand.changes +++ b/jurand.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 15 18:07:06 UTC 2023 - Fridrich Strba + +- Use the %%gcc_version macro + ------------------------------------------------------------------- Wed Sep 27 07:04:00 UTC 2023 - Fridrich Strba diff --git a/jurand.spec b/jurand.spec index ab7b709..d060f1e 100644 --- a/jurand.spec +++ b/jurand.spec @@ -18,6 +18,9 @@ %{!?_rpmmacrodir:%global _rpmmacrodir %{_rpmconfigdir}/macros.d} %{!?make_build:%global make_build make %{?_smp_mflags}} +%if 0%{?gcc_version} < 11 +%define with_gcc 11 +%endif Name: jurand Version: 1.3.1 Release: 0 @@ -31,10 +34,10 @@ BuildRequires: asciidoc BuildRequires: diffutils BuildRequires: make BuildRequires: xmlto -%if 0%{?suse_version} > 1599 -BuildRequires: gcc-c++ +%if 0%{?with_gcc:1} +BuildRequires: gcc%{with_gcc}-c++ %else -BuildRequires: gcc11-c++ +BuildRequires: gcc-c++ %endif %description @@ -48,9 +51,9 @@ rather than applying simple regular expressions on the source code. %build -%if 0%{?suse_version} <= 1599 -export CXX=g++-11 -export CC=gcc-11 +%if 0%{?with_gcc:1} +export CXX=g++-%{with_gcc} +export CC=gcc-%{with_gcc} %endif %make_build test-compile manpages @@ -63,9 +66,9 @@ export mandir=%{_mandir}/man7 ./install.sh %check -%if 0%{?suse_version} <= 1599 -export CXX=g++-11 -export CC=gcc-11 +%if 0%{?with_gcc:1} +export CXX=g++-%{with_gcc} +export CC=gcc-%{with_gcc} %endif %make_build test