From babf4ef2104405c76afd2528591b5baabdadd49a7c7eb1eb636a927d40681fcc Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Mon, 19 Mar 2018 12:44:36 +0000 Subject: [PATCH] Accepting request 588560 from home:michalsrb:branches:fix-leap-llvm:devel:tools:compiler - Build lldb and python3-lldb metapackages if and only if the real packages are built. Fixes build on Leap 42.3. OBS-URL: https://build.opensuse.org/request/show/588560 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=506 --- llvm.changes | 6 ++++++ llvm.spec | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/llvm.changes b/llvm.changes index 8a1ce63..2d3f6c2 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 19 12:38:56 UTC 2018 - msrb@suse.com + +- Build lldb and python3-lldb metapackages if and only if the real + packages are built. Fixes build on Leap 42.3. + ------------------------------------------------------------------- Wed Jan 24 13:07:14 UTC 2018 - msrb@suse.com diff --git a/llvm.spec b/llvm.spec index 445bfaf..7302972 100644 --- a/llvm.spec +++ b/llvm.spec @@ -16,6 +16,13 @@ # +%ifarch x86_64 +%define has_lldb 1 +%if 0%{?suse_version} > 1320 # python3-lldb%{_sonum} is only built with these distributions (see llvm%{_sonum} package) +%define has_lldb_python 1 +%endif +%endif + %define _sonum 5 Name: llvm Version: 5.0.1 @@ -37,9 +44,11 @@ BuildRequires: llvm%{_sonum}-devel = %{version} BuildRequires: llvm%{_sonum}-emacs-plugins = %{version} BuildRequires: llvm%{_sonum}-gold = %{version} BuildRequires: llvm%{_sonum}-vim-plugins = %{version} -%ifarch arm x86_64 +%if 0%{?has_lldb} BuildRequires: lldb%{_sonum} = %{version} BuildRequires: lldb%{_sonum}-devel = %{version} +%endif +%if 0%{?has_lldb_python} BuildRequires: python3-lldb%{_sonum} = %{version} %endif Requires: llvm%{_sonum} = %{version} @@ -274,7 +283,7 @@ echo "This is a dummy package to provide a dependency on the system compiler." > %defattr(-,root,root,-) %doc README -%ifarch arm x86_64 +%if 0%{?has_lldb} %files -n lldb %defattr(-,root,root) @@ -284,6 +293,10 @@ echo "This is a dummy package to provide a dependency on the system compiler." > %defattr(-,root,root) %doc README +%endif + +%if 0%{?has_lldb_python} + %files -n python3-lldb %defattr(-,root,root) %doc README