diff --git a/lldb-cmake.patch b/lldb-cmake.patch index fe7d97c..f4f1a3b 100644 --- a/lldb-cmake.patch +++ b/lldb-cmake.patch @@ -1,8 +1,8 @@ -Index: lldb/source/CMakeLists.txt +Index: lldb-3.5.0.src/source/CMakeLists.txt =================================================================== ---- lldb/source/CMakeLists.txt -+++ lldb/source/CMakeLists.txt -@@ -342,5 +342,5 @@ endif () +--- lldb-3.5.0.src.orig/source/CMakeLists.txt ++++ lldb-3.5.0.src/source/CMakeLists.txt +@@ -349,5 +349,5 @@ endif () install(TARGETS liblldb RUNTIME DESTINATION bin @@ -10,10 +10,10 @@ Index: lldb/source/CMakeLists.txt - ARCHIVE DESTINATION lib) + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) -Index: lldb/scripts/Python/modules/readline/CMakeLists.txt +Index: lldb-3.5.0.src/scripts/Python/modules/readline/CMakeLists.txt =================================================================== ---- lldb/scripts/Python/modules/readline/CMakeLists.txt -+++ lldb/scripts/Python/modules/readline/CMakeLists.txt +--- lldb-3.5.0.src.orig/scripts/Python/modules/readline/CMakeLists.txt ++++ lldb-3.5.0.src/scripts/Python/modules/readline/CMakeLists.txt @@ -13,7 +13,7 @@ add_library(readline SHARED readline.cpp # python finds it when loading the python readline module. set_target_properties(readline PROPERTIES @@ -24,11 +24,11 @@ Index: lldb/scripts/Python/modules/readline/CMakeLists.txt # Install the readline module. -install(TARGETS readline LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PYTHON_DIRECTORY}) +install(TARGETS readline LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/${PYTHON_DIRECTORY}) -Index: lldb/source/lldb.cpp +Index: lldb-3.5.0.src/source/lldb.cpp =================================================================== ---- lldb/source/lldb.cpp -+++ lldb/source/lldb.cpp -@@ -287,11 +287,7 @@ extern "C" const unsigned char liblldb_c +--- lldb-3.5.0.src.orig/source/lldb.cpp ++++ lldb-3.5.0.src/source/lldb.cpp +@@ -263,11 +263,7 @@ extern "C" const unsigned char liblldb_c static const char * GetLLDBRevision() { @@ -40,10 +40,10 @@ Index: lldb/source/lldb.cpp } static const char * -Index: lldb/source/Core/IOHandler.cpp +Index: lldb-3.5.0.src/source/Core/IOHandler.cpp =================================================================== ---- lldb/source/Core/IOHandler.cpp -+++ lldb/source/Core/IOHandler.cpp +--- lldb-3.5.0.src.orig/source/Core/IOHandler.cpp ++++ lldb-3.5.0.src/source/Core/IOHandler.cpp @@ -29,8 +29,8 @@ #include "lldb/Target/ThreadPlan.h" diff --git a/lldb-underlink.patch b/lldb-underlink.patch new file mode 100644 index 0000000..dc0c652 --- /dev/null +++ b/lldb-underlink.patch @@ -0,0 +1,12 @@ +Index: lldb-3.5.0.src/source/CMakeLists.txt +=================================================================== +--- lldb-3.5.0.src.orig/source/CMakeLists.txt ++++ lldb-3.5.0.src/source/CMakeLists.txt +@@ -161,6 +161,7 @@ set( CLANG_USED_LIBS + clangRewriteFrontend + clangSema + clangSerialization ++ LLVMSupport + ) + + set(LLDB_SYSTEM_LIBS) diff --git a/lldb.changes b/lldb.changes index 6bb1324..191cd2b 100644 --- a/lldb.changes +++ b/lldb.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Sep 6 14:59:58 UTC 2014 - idonmez@suse.com + +- Update to version 3.5.0 + * No changelog upstream +- Add lldb-underlink.patch to link to LLVMSupport + ------------------------------------------------------------------- Mon Mar 17 09:02:51 UTC 2014 - idonmez@suse.com diff --git a/lldb.spec b/lldb.spec index d346c46..1a479e6 100644 --- a/lldb.spec +++ b/lldb.spec @@ -25,17 +25,24 @@ Group: Development/Languages Url: http://lldb.llvm.org/ Source: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz Patch1: lldb-cmake.patch +Patch2: lldb-underlink.patch BuildRequires: cmake BuildRequires: libedit-devel BuildRequires: llvm-clang-devel = %{version} BuildRequires: llvm-devel = %{version} +BuildRequires: ninja BuildRequires: python-devel BuildRequires: swig BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: libLLVM = %{version} +Requires: libclang = %{version} Requires: python-base ExclusiveArch: arm x86_64 +%define py_major $(python -c "import sys; print sys.version_info[0];") +%define py_minor $(python -c "import sys; print sys.version_info[1];") + %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 @@ -58,10 +65,13 @@ disassembler. %prep %setup -q -n %{name}-%{version}.src %patch1 -p1 +%patch2 -p1 %build mkdir build pushd build + +export SUSE_ASNEEDED=0 cmake -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ @@ -69,11 +79,18 @@ cmake -DCMAKE_C_COMPILER=clang \ -DLLVM_LIBDIR_SUFFIX=64 \ %endif -DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \ - -DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} .. + -DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} \ + -DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \ + -DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \ + -DPYTHON_VERSION_MAJOR=%{py_major} \ + -DPYTHON_VERSION_MINOR=%{py_minor} \ + -G "Ninja" \ + .. +ninja %install pushd build -make DESTDIR=%{buildroot} install %{?_smp_mflags} +DESTDIR=%{buildroot} ninja install rm %{buildroot}%{_libdir}/liblldb*.a @@ -85,7 +102,8 @@ rm %{buildroot}%{_libdir}/liblldb*.a %defattr(-,root,root,-) %{_libdir}/liblldb.so.* %{_bindir}/lldb* -%{_libdir}/python*/site-packages/lldb +%{py_sitedir}/readline.so +%{py_sitedir}/lldb %files devel %defattr(-,root,root,-)