SPECS/gdb/gdb.spec
8c7e6e9f
 Summary:        C debugger
 Name:           gdb
 Version:        7.12.1
bf65ba3d
 Release:        8%{?dist}
8c7e6e9f
 License:        GPLv2+
 URL:            http://www.gnu.org/software/%{name}
 Source0:        http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
 %define sha1    gdb=ef77c5345d6f9fdcdf7a5d8503301242b701936e
 Group:          Development/Tools
 Vendor:         VMware, Inc.
 Distribution:   Photon
a2f16028
 Patch0:         gdb-7.12-pstack.patch
8c7e6e9f
 Requires:       expat
 Requires:       ncurses
bf65ba3d
 Requires:       python3
 Requires:       xz-libs
8c7e6e9f
 BuildRequires:  expat-devel
 BuildRequires:  ncurses-devel
 BuildRequires:  python3-devel
 BuildRequires:  python3-libs
bf65ba3d
 BuildRequires:  xz-devel
0580825e
 %if %{with_check}
 BuildRequires:  dejagnu
16e76bee
 BuildRequires:  systemtap-sdt-devel
0580825e
 %endif
 
f4d17450
 %description
 GDB, the GNU Project debugger, allows you to see what is going on 
 `inside' another program while it executes -- or what 
 another program was doing at the moment it crashed. 
 %prep
 %setup -q
a2f16028
 %patch0 -p1
a796b2ce
 
f4d17450
 %build
 ./configure \
8c7e6e9f
     --prefix=%{_prefix} \
     --with-python=/usr/bin/python3
f4d17450
 make %{?_smp_mflags}
 %install
 make DESTDIR=%{buildroot} install
 find %{buildroot} -name '*.la' -delete
 rm %{buildroot}%{_infodir}/dir
 
3bc2015d
 # following files conflicts with binutils-2.24-1.x86_64
f4d17450
 rm %{buildroot}%{_includedir}/ansidecl.h
 rm %{buildroot}%{_includedir}/bfd.h
 rm %{buildroot}%{_includedir}/bfdlink.h 
 rm %{buildroot}%{_includedir}/dis-asm.h 
 rm %{buildroot}%{_libdir}/libbfd.a 
 rm %{buildroot}%{_libdir}/libopcodes.a 
 # following files conflicts with binutils-2.25-1.x86_64
 rm %{buildroot}%{_datadir}/locale/de/LC_MESSAGES/opcodes.mo
 rm %{buildroot}%{_datadir}/locale/fi/LC_MESSAGES/bfd.mo
 rm %{buildroot}%{_datadir}/locale/fi/LC_MESSAGES/opcodes.mo
f36af574
 %ifarch aarch64
 rm %{buildroot}%{_libdir}/libaarch64-unknown-linux-gnu-sim.a
 %endif
5258b786
 %find_lang %{name} --all-name
 
f4d17450
 %check
16e76bee
 # disable security hardening for tests
 rm -f $(dirname $(gcc -print-libgcc-file-name))/../specs
 # fix typo in test
 sed -i 's/hex in)/hex in )/g' gdb/testsuite/gdb.arch/i386-signal.exp
 # ignore exit code and check for expected number of failures
ba2f92e6
 make %{?_smp_mflags} check || tail gdb/testsuite/gdb.sum  | grep "# of unexpected failures.*1219\|# of unexpected failures.*1220"
ea701479
 
5258b786
 %files -f %{name}.lang
f4d17450
 %defattr(-,root,root)
aa6f74ce
 %exclude %{_datadir}/locale
 %exclude %{_includedir}/*.h
f4d17450
 %{_includedir}/gdb/*.h
 %{_libdir}/*.so
 %{_infodir}/*.gz
 %{_datadir}/gdb/python/*
 %{_datadir}/gdb/syscalls/*
 %{_datadir}/gdb/system-gdbinit/*
 %{_bindir}/*
 %{_mandir}/*/*
5258b786
 
f4d17450
 %changelog
bf65ba3d
 *   Thu Dec 07 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-8
 -   Enable LZMA support
f36af574
 *   Tue Nov 14 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-7
 -   Aarch64 support
ba2f92e6
 *   Mon Sep 11 2017 Rui Gu <ruig@vmware.com> 7.12.1-6
 -   Enable make check in docker with part of checks disabled
16e76bee
 *   Thu Aug 10 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-5
 -   Make check improvements
a2f16028
 *   Fri Jul 21 2017 Rui Gu <ruig@vmware.com> 7.12.1-4
 -   Add pstack wrapper which will invoke gdb.
0580825e
 *   Wed Jul 12 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-3
 -   Get tcl, expect and dejagnu from packages
8c7e6e9f
 *   Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 7.12.1-2
 -   Build gdb with python3.
aa6f74ce
 *   Wed Mar 22 2017 Alexey Makhalov <amakhalov@vmware.com> 7.12.1-1
 -   Version update
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 7.8.2-3
 -   GA - Bump release of all rpms
 *   Tue Nov 10 2015 Xiaolin Li <xiaolinl@vmware.com> 7.8.2-2
 -   Handled locale files with macro find_lang
 *   Wed Apr 08 2015 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 7.8.2-1
 -   Initial build. First version