dc80bb7862
- Convert to use %cmake macros - Start conversion to use cmake macros with now introduced compatibility for ninja - Reduce number of threads if we don't have enough memory - Add patch for the nonvoid returns: * llvm-nonvoid-return.patch OBS-URL: https://build.opensuse.org/request/show/424333 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=466
138 lines
4.1 KiB
RPMSpec
138 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package lldb
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define _revision 262553
|
|
Name: lldb
|
|
Version: 3.8.0
|
|
Release: 0
|
|
Summary: Software debugger built using LLVM libraries
|
|
License: NCSA
|
|
Group: Development/Tools/Debuggers
|
|
Url: http://lldb.llvm.org
|
|
Source: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
|
# PATCH-FIX-OPENSUSE lldb-cmake.patch -- Let us set LLDB_REVISION and fix ncurses include path.
|
|
Patch0: lldb-cmake.patch
|
|
# PATCH-FIX-UPSTREAM D15067.id41365.diff -- Patch from upstream review system to fix out of tree build (http://reviews.llvm.org/D15067)
|
|
Patch1: D15067.id41365.diff
|
|
# PATCH-FIX-OPENSUSE lldb-add-pthread-dl-libs.patch -- Add -lpthread and -ldl options to the end of LDFLAGS to fix linking problems.
|
|
Patch2: lldb-add-pthread-dl-libs.patch
|
|
BuildRequires: cmake
|
|
BuildRequires: fdupes
|
|
BuildRequires: libedit-devel
|
|
BuildRequires: libffi-devel
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: llvm-clang-devel = %{version}
|
|
BuildRequires: llvm-devel = %{version}
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: ninja
|
|
BuildRequires: python-devel
|
|
BuildRequires: swig
|
|
BuildRequires: zlib-devel
|
|
Requires: libLLVM = %{version}
|
|
Requires: libclang = %{version}
|
|
Requires: python
|
|
Requires: python-six
|
|
ExclusiveArch: arm x86_64
|
|
|
|
%description
|
|
LLDB is a next generation, high-performance debugger. It is built as a set
|
|
of reusable components which highly leverage existing libraries in the
|
|
larger LLVM Project, such as the Clang expression parser and LLVM
|
|
disassembler.
|
|
|
|
%package -n liblldb3_8
|
|
Summary: LLDB software debugger runtime library
|
|
Group: System/Libraries
|
|
|
|
%description -n liblldb3_8
|
|
This subpackage contains the main LLDB component.
|
|
|
|
%package devel
|
|
Summary: Development files for LLDB
|
|
Group: Development/Languages/Other
|
|
Requires: libedit-devel
|
|
Requires: liblldb3_8 = %{version}
|
|
Requires: zlib-devel
|
|
|
|
%description devel
|
|
This package contains the development files for LLDB.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}.src
|
|
%patch0 -p1
|
|
%patch1
|
|
%patch2 -p1
|
|
|
|
# Set LLDB revision
|
|
sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp #"
|
|
|
|
%build
|
|
%define __builder ninja
|
|
%cmake \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
%if "%{_lib}" == "lib64"
|
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
|
%endif
|
|
-DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \
|
|
-DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \
|
|
-DPYTHON_VERSION_MAJOR=%{py_major} \
|
|
-DPYTHON_VERSION_MINOR=%{py_minor}
|
|
%make_jobs
|
|
|
|
%install
|
|
%cmake_install
|
|
|
|
# Python: fix binary libraries location.
|
|
rm %{buildroot}%{py_sitedir}/lldb/_lldb.so
|
|
liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
|
|
ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/_lldb.so
|
|
ln -vsf "../../${liblldb}" %{buildroot}%{python_sitearch}/_lldb.so
|
|
|
|
# Remove bundled six.py.
|
|
rm -f %{buildroot}%{py_sitedir}/six.*
|
|
|
|
# Remove static libraries.
|
|
rm %{buildroot}%{_libdir}/liblldb*.a
|
|
|
|
# Fix duplicated files.
|
|
%fdupes %{_includedir}/%{name}/Host/
|
|
|
|
%post -n liblldb3_8 -p /sbin/ldconfig
|
|
%postun -n liblldb3_8 -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/lldb*
|
|
%{py_sitedir}/_lldb.so
|
|
%{py_sitedir}/lldb
|
|
%{py_sitedir}/readline.so
|
|
|
|
%files -n liblldb3_8
|
|
%defattr(-,root,root)
|
|
%{_libdir}/liblldb.so.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%{_includedir}/lldb
|
|
%{_libdir}/liblldb.so
|
|
|
|
%changelog
|