diff --git a/lldb.spec b/lldb.spec index 7ed1569b2172caf8fa7e249ffc5d40252104a647..ac735099c239576558016508ba2f9cf53d0c5de7 100644 --- a/lldb.spec +++ b/lldb.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global toolchain clang %undefine _include_frame_pointers @@ -8,31 +8,21 @@ %global cmake_srcdir cmake-%{lldb_version}.src Name: lldb +Summary: Next generation high-performance debugger Version: %{lldb_version} Release: %{anolis_release}%{?dist} -Summary: Next generation high-performance debugger - License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{lldb_version}/%{lldb_srcdir}.tar.xz -Patch0: 0001-lldb-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch +Patch0001: 0001-lldb-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch -BuildRequires: clang -BuildRequires: cmake -BuildRequires: ninja-build +BuildRequires: clang cmake ninja-build +BuildRequires: ncurses-devel swig doxygen BuildRequires: llvm-devel = %{version} BuildRequires: llvm-test = %{version} BuildRequires: clang-devel = %{version} -BuildRequires: ncurses-devel -BuildRequires: swig BuildRequires: llvm-static = %{version} -BuildRequires: libffi-devel -BuildRequires: zlib-devel -BuildRequires: libxml2-devel -BuildRequires: libedit-devel -BuildRequires: python3-lit -BuildRequires: doxygen - +BuildRequires: libffi-devel zlib-devel libxml2-devel libedit-devel python3-lit Requires: python3-lldb = %{version} %description @@ -41,71 +31,66 @@ of reusable components which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression parser and LLVM disassembler. +LLDB is the default debugger in Xcode on macOS and supports debugging C, +Objective-C and C++ on the desktop and iOS devices and simulator. + +All of the code in the LLDB project is available under the “Apache 2.0 +License with LLVM exceptions”. + %package devel Summary: Development header files for LLDB -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description devel -The package contains header files for the LLDB debugger. +The package contains header files for the %{name} debugger. %package -n python3-lldb %{?python_provide:%python_provide python3-lldb} Summary: Python module for LLDB -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python3-devel python3-setuptools Requires: python3-six -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description -n python3-lldb The package contains the LLDB Python module. %prep -%autosetup -n %{lldb_srcdir} -p2 +%autosetup -p2 -n %{lldb_srcdir} %build %global _lto_cflags -flto=thin -%cmake -GNinja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ - -DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \ +%cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \ -DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm/ \ - \ - -DLLDB_DISABLE_CURSES:BOOL=OFF \ - -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ - -DLLDB_DISABLE_PYTHON:BOOL=OFF \ - -DLLVM_LIBDIR_SUFFIX=64 \ - \ + -DLLDB_DISABLE_CURSES:BOOL=OFF -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ + -DLLDB_DISABLE_PYTHON:BOOL=OFF -DLLVM_LIBDIR_SUFFIX=64 \ -DPYTHON_EXECUTABLE:STRING=%{__python3} \ -DPYTHON_VERSION_MAJOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.major)") \ -DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \ - -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ - -DCLANG_LINK_CLANG_DYLIB=ON \ - -DLLVM_LIT_ARGS="-sv \ - --path %{_libdir}/llvm" \ + -DLLVM_EXTERNAL_LIT=%{_bindir}/lit -DCLANG_LINK_CLANG_DYLIB=ON \ + -DLLVM_LIT_ARGS="-sv --path %{_libdir}/llvm" \ %cmake_build %install %cmake_install -# remove static libraries -rm -fv %{buildroot}%{_libdir}/*.a +%{__rm} -fv %{buildroot}%{_libdir}/*.a -# python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb -# remove bundled six.py -rm -f %{buildroot}%{python3_sitearch}/six.* +%{__rm} -f %{buildroot}%{python3_sitearch}/six.* + +%generate_compatibility_deps %files %license LICENSE.TXT -%{_bindir}/lldb* -%{_libdir}/liblldb.so.* %{_libdir}/liblldbIntelFeatures.so.* +%{_libdir}/liblldb.so.* +%{_bindir}/lldb* %files devel %{_includedir}/lldb @@ -115,6 +100,9 @@ rm -f %{buildroot}%{python3_sitearch}/six.* %{python3_sitearch}/lldb %changelog +* Sat Apr 15 2023 Heng Qi - 16.0.1-2 +- Refactor the spec file + * Fri Apr 14 2023 Funda Wang - 16.0.1-1 - New version 16.0.1