b6ce653
Name:		lldb
f471dad
Version:	7.0.0
30ee05f
Release:	1%{?dist}
b6ce653
Summary:	Next generation high-performance debugger
b6ce653
b6ce653
License:	NCSA
8d3d3b0
URL:		http://lldb.llvm.org/
f471dad
Source0:	http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{name}-%{version}%{?rc_ver:rc%{rc_ver}}.src.tar.xz
649dc81
b6ce653
BuildRequires:	cmake
b6ce653
BuildRequires:  llvm-devel = %{version}
b6ce653
BuildRequires:  clang-devel = %{version}
4b948d0
BuildRequires:  ncurses-devel
b6ce653
BuildRequires:  swig
b336c16
BuildRequires:  llvm-static = %{version}
b703659
BuildRequires:  libffi-devel
3848e6c
BuildRequires:  zlib-devel
3848e6c
BuildRequires:  libxml2-devel
Jan Kratochvil 683e84e
BuildRequires:  libedit-devel
b6ce653
cec2081
Requires: python2-lldb
cec2081
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
269f7d5
%package -n python2-lldb
269f7d5
%{?python_provide:%python_provide python2-lldb}
b6ce653
Summary:	Python module for LLDB
b6ce653
BuildRequires:	python2-devel
649dc81
Requires:	python2-six
b6ce653
269f7d5
%description -n python2-lldb
b6ce653
The package contains the LLDB Python module.
b6ce653
b6ce653
%prep
763e371
%setup -q -n %{name}-%{version}%{?rc_ver:rc%{rc_ver}}.src
b6ce653
be64a97
# HACK so that lldb can find its custom readline.so, because we move it
be64a97
# after install.
b0dee0d
sed -i -e "s~import sys~import sys\nsys.path.insert\(1, '%{python2_sitearch}/lldb'\)~g" source/Interpreter/embedded_interpreter.py
be64a97
b6ce653
%build
Dave Airlie 26e4c25
b6ce653
mkdir -p _build
b6ce653
cd _build
b6ce653
b6ce653
# Python version detection is broken
b6ce653
b6ce653
LDFLAGS="%{__global_ldflags} -lpthread -ldl"
b6ce653
866111a
CFLAGS="%{optflags} -Wno-error=format-security"
866111a
CXXFLAGS="%{optflags} -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 \
Jan Kratochvil 683e84e
	-DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
b6ce653
	-DLLDB_DISABLE_PYTHON:BOOL=OFF \
964e9c6
%if 0%{?__isa_bits} == 64
964e9c6
        -DLLVM_LIBDIR_SUFFIX=64 \
964e9c6
%else
964e9c6
        -DLLVM_LIBDIR_SUFFIX= \
964e9c6
%endif
b6ce653
	\
b0dee0d
	-DPYTHON_EXECUTABLE:STRING=%{__python2} \
b0dee0d
	-DPYTHON_VERSION_MAJOR:STRING=$(%{__python2} -c "import sys; print sys.version_info.major") \
b0dee0d
	-DPYTHON_VERSION_MINOR:STRING=$(%{__python2} -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))
b0dee0d
ln -vsf "../../../${liblldb}" %{buildroot}%{python2_sitearch}/lldb/_lldb.so
b0dee0d
mv -v %{buildroot}%{python2_sitearch}/readline.so %{buildroot}%{python2_sitearch}/lldb/readline.so
649dc81
649dc81
# remove bundled six.py
b0dee0d
rm -f %{buildroot}%{python2_sitearch}/six.*
b6ce653
b6ce653
%post -p /sbin/ldconfig
b6ce653
%postun -p /sbin/ldconfig
b6ce653
b6ce653
%files
b6ce653
%{_bindir}/lldb*
b6ce653
%{_libdir}/liblldb.so.*
763e371
%{_libdir}/liblldbIntelFeatures.so.*
b6ce653
b6ce653
%files devel
b6ce653
%{_includedir}/lldb
b6ce653
%{_libdir}/*.so
b6ce653
269f7d5
%files -n python2-lldb
b0dee0d
%{python2_sitearch}/lldb
b6ce653
b6ce653
%changelog
30ee05f
* Tue Sep 25 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
30ee05f
- 7.0.0 Release
30ee05f
cec2081
* Fri Sep 21 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.5.rc3
cec2081
- lldb should depend on python2-lldb
cec2081
f163e5e
* Mon Sep 17 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
f163e5e
- 7.0.0-rc3 Release
f163e5e
7308715
* Wed Sep 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc2
7308715
- Enable build on s390x
7308715
b90a327
* Fri Aug 31 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc2
b90a327
- 7.0.0-rc2 Release
b90a327
f471dad
* Tue Aug 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
f471dad
- 7.0.1-rc1 Release
f471dad
43ce403
* Tue Aug 07 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-3
43ce403
- Enable ppc64le arch
43ce403
48d88ca
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
48d88ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
48d88ca
928da30
* Mon May 21 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
928da30
- 6.0.1 Release
928da30
cb0ac89
* Mon May 21 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
cb0ac89
- 6.0.1-rc1 Release
cb0ac89
b0dee0d
* Sat May 05 2018 Miro Hrončok <mhroncok@redhat.com> - 6.0.0-4
b0dee0d
- Update Python macros to new packaging standards
b0dee0d
  (See https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build)
b0dee0d
a2b98ea
* Tue Mar 20 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-3
a2b98ea
- Rebuild against llvm with the rhbz#1558657 fix
a2b98ea
Tilmann Scheller 44958ca
* Wed Mar 14 2018 Tilmann Scheller <tschelle@redhat.com> - 6.0.0-2
Tilmann Scheller 44958ca
- Restore LLDB SB API headers, fixes rhbz#1548758
Tilmann Scheller 44958ca
6f4f23f
* Fri Mar 09 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
6f4f23f
- 6.0.0 Release
6f4f23f
3496185
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
3496185
- 6.0.0-rc2 release
3496185
587e506
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
587e506
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
587e506
763e371
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
763e371
- 6.0.1-rc1 Release
50b8628
2c45db9
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
2c45db9
- 5.0.1 Release
2c45db9
c3523b3
* Fri Oct 06 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
c3523b3
- 5.0.0 Release
c3523b3
269f7d5
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.0.1-4
269f7d5
- Python 2 binary package renamed to python2-lldb
269f7d5
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
269f7d5
Jan Kratochvil 683e84e
* Mon Jul 31 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 4.0.1-3
Jan Kratochvil 683e84e
- Backport lldb r303907
Jan Kratochvil 683e84e
  Resolves rhbz #1356140
Jan Kratochvil 683e84e
851a3f5
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
851a3f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
851a3f5
740adb6
* Mon Jun 26 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
740adb6
- 4.0.1 Release
740adb6
6c004cd
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
6c004cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
6c004cd
866111a
* Fri Mar 24 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
866111a
- lldb 4.0.0
866111a
71df412
* Tue Mar 21 2017 Tom Stellard <tstellar@redhat.com> - 3.9.1-4
71df412
- Add explicit Requires for llvm-libs and clang-libs
71df412
be64a97
* Fri Mar 17 2017 Tom Stellard <tstellar@redhat.org> - 3.9.1-3
be64a97
- Adjust python sys.path so lldb can find readline.so
be64a97
7391dd6
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 3.9.1-2
7391dd6
- Fix build with gcc 7
7391dd6
1da0c1e
* Thu Mar 02 2017 Dave Airlie 
1da0c1e
- lldb 3.9.1
1da0c1e
e3b8942
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-4
e3b8942
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e3b8942
d6f326a
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 3.9.0-3
d6f326a
- Disable libedit support until upstream fixes it (#1356140)
d6f326a
8d3d3b0
* Wed Nov  2 2016 Peter Robinson <pbrobinson@fedoraproject.org> 3.9.0-2
8d3d3b0
- Set upstream supported architectures in an ExclusiveArch
8d3d3b0
964e9c6
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
964e9c6
- lldb 3.9.0
Dave Airlie 26e4c25
- fixup some issues with MIUtilParse by removing it
Dave Airlie 26e4c25
- build with -fno-rtti
964e9c6
a0d9136
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.0-2
a0d9136
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a0d9136
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