diff options
Diffstat (limited to 'contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec')
-rw-r--r-- | contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec | 65 |
1 files changed, 27 insertions, 38 deletions
diff --git a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec index acfc61b455..421e6ca09b 100644 --- a/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec +++ b/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gdb.spec @@ -52,18 +52,30 @@ Name: rtems-4.10-arm-rtems4.10-gdb Summary: Gdb for target arm-rtems4.10 Group: Development/Tools Version: %{gdb_rpmvers} -Release: 1%{?dist} +Release: 2%{?dist} License: GPL/LGPL URL: http://sources.redhat.com/gdb BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc -%define build_sim --enable-sim +%global build_sim --enable-sim -%define build_sim --enable-sim --enable-sim-trace +# 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} + +%global build_sim --enable-sim --enable-sim-trace -%if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}" >= "10.3" BuildRequires: libexpat-devel @@ -71,34 +83,13 @@ 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} - # Required for building the infos BuildRequires: /sbin/install-info BuildRequires: texinfo >= 4.2 - - Requires: rtems-4.10-gdb-common %if "%{gdb_version}" == "7.2" @@ -140,16 +131,9 @@ cd .. --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}/arm-rtems4.10-gdb \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ --mandir=%{_mandir} --infodir=%{_infodir} @@ -179,20 +163,24 @@ cd .. # host library, installed to a bogus directory rm -f ${RPM_BUILD_ROOT}%{_libdir}/libarm-rtems4.10-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}/arm-rtems4.10-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}/arm-rtems4.10-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}/arm-rtems4.10-gdb/python +%endif +%endif cd .. # Extract %%__os_install_post into os_install_post~ @@ -243,6 +231,7 @@ GNU gdb targetting arm-rtems4.10. %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/share +%{?with_python:%{_datadir}/arm-rtems4.10-gdb} %dir %{_mandir} %dir %{_mandir}/man1 |