SHA256
1
0
forked from pool/llvm
Ismail Dönmez 2014-03-17 10:04:25 +00:00 committed by Git OBS Bridge
parent 1eb9a793c6
commit 61cd5f986e
2 changed files with 62 additions and 19 deletions

47
lldb-cmake.patch Normal file
View File

@ -0,0 +1,47 @@
--- lldb.orig/scripts/CMakeLists.txt 2013-06-13 09:05:41.000000000 -0700
+++ lldb.orig/scripts/CMakeLists.txt 2014-03-08 00:59:09.089734896 -0800
@@ -16,5 +16,16 @@
# Install the LLDB python module on all operating systems (except Windows)
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
- install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\")
+ install(CODE "
+ include(FindPythonInterp)
+
+ SET(PYTHON_DIRECTORY python\${PYTHON_VERSION_MAJOR}.\${PYTHON_VERSION_MINOR})
+
+ SET(lldb_module_src ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/\${PYTHON_DIRECTORY})
+ SET(lldb_module_dest \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX})
+
+ MESSAGE(STATUS \"Installing LLDB python module from: \${lldb_module_src} to \${lldb_module_dest}\")
+ FILE(COPY \${lldb_module_src} DESTINATION \${lldb_module_dest})
+ "
+ )
endif()
--- lldb.orig/scripts/lldb_python_module.cmake 2013-06-13 09:05:41.000000000 -0700
+++ /dev/null 2014-02-14 05:57:02.719999980 -0800
@@ -1,14 +0,0 @@
-# This CMake script installs the LLDB python module from the build directory
-# to the install directory.
-
-# FIXME: if a non-standard version of python is requested, the cmake macro
-# below will need Python_ADDITIONAL_VERSIONS set in order to find it.
-include(FindPythonInterp)
-
-SET(PYTHON_DIRECTORY python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
-
-SET(lldb_module_src ${CMAKE_CURRENT_BINARY_DIR}/lib/${PYTHON_DIRECTORY})
-SET(lldb_module_dest ${CMAKE_INSTALL_PREFIX}/lib)
-
-MESSAGE(STATUS "Installing LLDB python module from: ${lldb_module_src} to ${lldb_module_dest}")
-FILE(COPY "${lldb_module_src}" DESTINATION "${lldb_module_dest}")
--- lldb.orig/source/CMakeLists.txt 2013-11-15 06:15:10.000000000 -0800
+++ lldb/source/CMakeLists.txt 2014-03-08 03:38:38.480795021 -0800
@@ -225,5 +225,5 @@
install(TARGETS liblldb
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})

View File

@ -24,12 +24,16 @@ License: NCSA
Group: Development/Languages Group: Development/Languages
Url: http://lldb.llvm.org/ Url: http://lldb.llvm.org/
Source: lldb-%{version}.tar.bz2 Source: lldb-%{version}.tar.bz2
Patch1: lldb-cmake.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: libedit-devel BuildRequires: libedit-devel
BuildRequires: llvm-clang-devel BuildRequires: llvm-clang-devel
BuildRequires: llvm-devel BuildRequires: llvm-devel
BuildRequires: python-base
BuildRequires: swig BuildRequires: swig
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: python-base
ExclusiveArch: arm x86_64 ExclusiveArch: arm x86_64
%description %description
@ -38,26 +42,12 @@ of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM larger LLVM Project, such as the Clang expression parser and LLVM
disassembler. disassembler.
%package
Summary: Next generation high-performance debugger
Group: Development/Languages
BuildRequires: libedit-devel
BuildRequires: python-devel
BuildRequires: swig
%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 devel %package devel
Summary: Next generation high-performance debugger (devel package) Summary: Next generation high-performance debugger (devel package)
Group: Development/Languages Group: Development/Languages
BuildRequires: libedit-devel Requires: libedit-devel
BuildRequires: python-devel
BuildRequires: swig
Requires: lldb = %{version} Requires: lldb = %{version}
Requires: zlib-devel
%description devel %description devel
LLDB is a next generation, high-performance debugger. It is built as a set LLDB is a next generation, high-performance debugger. It is built as a set
@ -67,13 +57,19 @@ disassembler.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
mkdir build mkdir build
pushd build pushd build
CC=clang CXX=clang++ \ cmake -DCMAKE_C_COMPILER=clang \
%cmake -DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \ -DCMAKE_CXX_COMPILER=clang++ \
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
%endif
-DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} ..
%install %install
pushd build pushd build