From d3bcbd29691955b6fac5978c0aa565596ba91b5cb141a717966e29174f24f5e6 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 23 Sep 2022 12:44:57 +0000 Subject: [PATCH] - Add generic mechanism to pin to latest supported LLVM version. OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql13?expand=0&rev=57 --- postgresql13.changes | 7 +++++++ postgresql13.spec | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/postgresql13.changes b/postgresql13.changes index 69238d0..64ccef7 100644 --- a/postgresql13.changes +++ b/postgresql13.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 22 21:26:36 UTC 2022 - Aaron Puchert + +- Create mechanism to specify the latest supported LLVM version. + Automatically pin to that version if the distribution has a newer + unsupported default version. + ------------------------------------------------------------------- Mon Sep 12 07:52:42 UTC 2022 - Andreas Schwab diff --git a/postgresql13.spec b/postgresql13.spec index 3e9c078..3e3e428 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -97,6 +97,7 @@ BuildRequires: %libpq %bcond_with llvm %endif %endif +%global latest_supported_llvm_ver 14 %ifnarch %arm %bcond_without check @@ -118,10 +119,15 @@ BuildRequires: libicu-devel BuildRequires: libselinux-devel %endif %if %{with llvm} -BuildRequires: clang BuildRequires: gcc-c++ +%if 0%{?product_libs_llvm_ver} > %{latest_supported_llvm_ver} +BuildRequires: clang%{latest_supported_llvm_ver} +BuildRequires: llvm%{latest_supported_llvm_ver}-devel +%else +BuildRequires: clang BuildRequires: llvm-devel %endif +%endif BuildRequires: libxslt-devel BuildRequires: openldap2-devel BuildRequires: openssl-devel