Sync with CVS-HEAD.

This commit is contained in:
Ralf Corsepius
2011-09-19 22:42:33 +00:00
parent a1bfb335c0
commit 84019c592b
4 changed files with 28 additions and 41 deletions

View File

@@ -17,16 +17,9 @@
--disable-werror \
%{build_sim} \
%{?with_system_readline:--with-system-readline} \
%if "%{gdb_version}" >= "6.6"
--with-expat \
%endif
%if "%{gdb_version}" >= "6.8.50"
%if %{with python}
--with-python \
%else
--without-python \
%endif
%endif
%{?with_python:--with-python}%{!?with_python:--without-python} \
--with-gdb-datadir=%{_datadir}/@tool_target@-gdb \
--with-sysroot=%{_prefix}/@tool_target@/sys-root \
--prefix=%{_prefix} --bindir=%{_bindir} \
--includedir=%{_includedir} --libdir=%{_libdir} \

View File

@@ -12,14 +12,27 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{_host_rpmprefix}gcc
%define build_sim --enable-sim
%global build_sim --enable-sim
# Whether to build against system readline
# Default: yes
%bcond_without system_readline
# Whether to build python support
%if "%{_build}" != "%{_host}"
# Can't build python Cdn-X
%bcond_with python
%else
%bcond_without python
%endif
%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
%if "@tool_target@" == "powerpc-rtems@rtems_api@"
%if "%{_build}" != "%{_host}"
# psim doesn't support Cdn-X
%define build_sim --disable-sim
%global build_sim --disable-sim
%else
%define build_sim --enable-sim --enable-sim-trace
%global build_sim --enable-sim --enable-sim-trace
%endif
%endif
%if "@tool_target@" == "sparc-rtems@rtems_api@"
@@ -53,7 +66,6 @@ BuildRequires: %{_host_rpmprefix}gcc
%endif
%endif
%if "%{gdb_version}" >= "6.6"
# suse
%if "%{?suse}" >= "10.3"
BuildRequires: libexpat-devel
@@ -61,40 +73,17 @@ BuildRequires: libexpat-devel
# Fedora/CentOS/Cygwin/MinGW
BuildRequires: %{_host_rpmprefix}expat-devel
%endif
%endif
%if "%{gdb_version}" < "6.7"
%if "%{_build}" != "%{_host}"
BuildRequires: %{_host_rpmprefix}termcap-devel
%endif
%bcond_with system_readline
%else
%bcond_without system_readline
%endif
%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
BuildRequires: %{_host_rpmprefix}ncurses-devel
%if "%{gdb_version}" >= "6.8.50"
%if "%{_build}" != "%{_host}"
# Can't build python Cdn-X
%bcond_with python
%else
%bcond_without python
%endif
%endif
%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
%if %build_infos
# Required for building the infos
BuildRequires: /sbin/install-info
BuildRequires: texinfo >= 4.2
%endif
%if %build_infos
Requires: @rpmprefix@gdb-common
%endif
%endif
@SOURCES@
%description

View File

@@ -26,19 +26,23 @@
# host library, installed to a bogus directory
rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib@tool_target@-sim.a
%if "%{gdb_version}" >= "7.0"
# Bug in gdb-7.0, bogusly installs linux-only files
somethinguseful=0
for f in ${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls/*.xml; do
for f in ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls/*.xml; do
case $f in
*linux.xml) rm -f $f;;
*.xml) somethinguseful=1;;
esac
done
if test $somethinguseful -eq 0; then
rm -rf "${RPM_BUILD_ROOT}%{_datadir}/gdb/syscalls"
rm -rf "${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls"
fi
%endif
%if "{gdb_version}" >= "7.3"
%if ! %{with python}
# gdb-7.3 doesn't honor --without-python correctly
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/python
%endif
%endif
cd ..

View File

@@ -15,6 +15,7 @@ GNU gdb targetting @tool_target@.
%defattr(-,root,root)
%sysdir %{_prefix}
%sysdir %{_prefix}/share
%{?with_python:%{_datadir}/@tool_target@-gdb}
%sysdir %{_mandir}
%sysdir %{_mandir}/man1