From 4ade273625cea25c9fec3f1ede1010e19afcefc13065b699eec5d563cd8d0733 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 20 Mar 2024 07:24:27 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-22-openjdk?expand=0&rev=5 --- java-22-openjdk.spec | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/java-22-openjdk.spec b/java-22-openjdk.spec index 480a8ff..9591fd5 100644 --- a/java-22-openjdk.spec +++ b/java-22-openjdk.spec @@ -100,6 +100,9 @@ %global package_version %{featurever}.%{interimver}.%{?updatever:%{updatever}}%{!?updatever:0}.%{?patchver:%{patchver}}%{!?patchver:0}~%{buildver} %endif %global NSS_LIBDIR %(pkg-config --variable=libdir nss) +%if 0%{?gcc_version} < 7 +%global with_gcc 7 +%endif %bcond_with zero %if ! %{with zero} %global with_systemtap 1 @@ -178,6 +181,8 @@ BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: fontconfig-devel BuildRequires: freetype2-devel +BuildRequires: gcc%{?with_gcc} +BuildRequires: gcc%{?with_gcc}-c++ BuildRequires: giflib-devel BuildRequires: hicolor-icon-theme BuildRequires: java-ca-certificates @@ -231,13 +236,6 @@ Provides: jre1.7.x Provides: jre1.8.x Provides: jre1.9.x %endif -%if 0%{?suse_version} < 1500 -BuildRequires: gcc7 -BuildRequires: gcc7-c++ -%else -BuildRequires: gcc >= 7 -BuildRequires: gcc-c++ >= 7 -%endif %if %{with_system_lcms} BuildRequires: liblcms2-devel %endif @@ -450,11 +448,11 @@ mkdir -p %{buildoutputdir} pushd %{buildoutputdir} bash ../configure \ -%if 0%{?suse_version} < 1500 - CPP=cpp-7 \ - CXX=g++-7 \ - CC=gcc-7 \ - NM=gcc-nm-7 \ +%if 0%{?with_gcc} + CPP="cpp-%{with_gcc}" \ + CXX="g++-%{with_gcc}" \ + CC="gcc-%{with_gcc}" \ + NM="gcc-nm-%{with_gcc}" \ %endif %if %{is_release} --with-version-pre="" \