b6ce653
Name:		lldb
649dc81
Version:	3.8.0
22c21bf
Release:	1%{?dist}
b6ce653
Summary:	Next generation high-performance debugger
b6ce653
b6ce653
License:	NCSA
b6ce653
URL:		http://llvm.org
22c21bf
Source0:	http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
649dc81
649dc81
# hack patch from upstream review systems to fix out of tree builds.
649dc81
Patch0: D15067.id41365.diff
b6ce653
b6ce653
BuildRequires:	cmake
b6ce653
BuildRequires:  llvm-devel = %{version}
b6ce653
BuildRequires:  clang-devel = %{version}
b6ce653
BuildRequires:	libedit-devel
b6ce653
BuildRequires:  swig
b336c16
BuildRequires:  llvm-static = %{version}
b703659
BuildRequires:  libffi-devel
3848e6c
BuildRequires:  zlib-devel
3848e6c
BuildRequires:  libxml2-devel
b6ce653
b6ce653
%description
b6ce653
LLDB is a next generation, high-performance debugger. It is built as a set
b6ce653
of reusable components which highly leverage existing libraries in the
b6ce653
larger LLVM Project, such as the Clang expression parser and LLVM
b6ce653
disassembler.
b6ce653
b6ce653
%package devel
b6ce653
Summary:	Development header files for LLDB
b6ce653
Requires:	%{name}%{?_isa} = %{version}-%{release}
b6ce653
b6ce653
%description devel
b6ce653
The package contains header files for the LLDB debugger.
b6ce653
b6ce653
%package -n python-lldb
b6ce653
Summary:	Python module for LLDB
b6ce653
BuildRequires:	python2-devel
649dc81
Requires:	python2-six
b6ce653
b6ce653
%description -n python-lldb
b6ce653
The package contains the LLDB Python module.
b6ce653
b6ce653
%prep
22c21bf
%setup -q -n %{name}-%{version}.src
b6ce653
649dc81
%patch0 -p1 -b .dave
b6ce653
%build
b6ce653
mkdir -p _build
b6ce653
cd _build
b6ce653
b6ce653
# Python version detection is broken
b6ce653
b6ce653
LDFLAGS="%{__global_ldflags} -lpthread -ldl"
b6ce653
649dc81
CFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security"
649dc81
CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=format-security"
b6ce653
b6ce653
%cmake .. \
b6ce653
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
6729b69
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
b6ce653
	-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
b6ce653
	\
b6ce653
	-DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \
b6ce653
	-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} \
b6ce653
	\
b6ce653
	-DLLDB_DISABLE_CURSES:BOOL=OFF \
b6ce653
	-DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
b6ce653
	-DLLDB_DISABLE_PYTHON:BOOL=OFF \
b6ce653
	\
b6ce653
	-DPYTHON_EXECUTABLE:STRING=%{__python} \
b6ce653
	-DPYTHON_VERSION_MAJOR:STRING=$(%{__python} -c "import sys; print sys.version_info.major") \
b6ce653
	-DPYTHON_VERSION_MINOR:STRING=$(%{__python} -c "import sys; print sys.version_info.minor")
b6ce653
b6ce653
make %{?_smp_mflags}
b6ce653
b6ce653
%install
b6ce653
cd _build
b6ce653
make install DESTDIR=%{buildroot}
b6ce653
b6ce653
# remove static libraries
b6ce653
rm -fv %{buildroot}%{_libdir}/*.a
b6ce653
b6ce653
# python: fix binary libraries location
b6ce653
liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
b6ce653
ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/_lldb.so
b6ce653
mv -v %{buildroot}%{python_sitearch}/readline.so %{buildroot}%{python_sitearch}/lldb/readline.so
649dc81
649dc81
# remove bundled six.py
649dc81
rm -f %{buildroot}%{python_sitearch}/six.*
b6ce653
b6ce653
%post -p /sbin/ldconfig
b6ce653
%postun -p /sbin/ldconfig
b6ce653
b6ce653
%files
b6ce653
%{_bindir}/lldb*
b6ce653
%{_libdir}/liblldb.so.*
b6ce653
b6ce653
%files devel
b6ce653
%{_includedir}/lldb
b6ce653
%{_libdir}/*.so
b6ce653
b6ce653
%files -n python-lldb
b6ce653
%{python_sitearch}/lldb
b6ce653
b6ce653
%changelog
22c21bf
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
22c21bf
- lldb 3.8.0
22c21bf
1c60079
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.3
1c60079
- lldb 3.8.0 rc3
1c60079
6729b69
* Wed Feb 24 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.2
6729b69
- dynamically link to llvm
6729b69
649dc81
* Thu Feb 18 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.1
649dc81
- lldb 3.8.0 rc2
649dc81
b66265d
* Sun Feb 14 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
b66265d
- rebuild lldb against latest llvm
b66265d
f8aa6a2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
f8aa6a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f8aa6a2
b6ce653
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
b6ce653
- initial version using cmake build system