From a917c19e690adba6f7642350db0d43643f400041 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 31 Aug 2011 09:21:53 +0000 Subject: Rework python. --- contrib/crossrpms/gdb/build.add | 8 +------- contrib/crossrpms/gdb/gdb.add | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'contrib') diff --git a/contrib/crossrpms/gdb/build.add b/contrib/crossrpms/gdb/build.add index 8468d3d17f..7771f7f926 100644 --- a/contrib/crossrpms/gdb/build.add +++ b/contrib/crossrpms/gdb/build.add @@ -18,13 +18,7 @@ %{build_sim} \ %{?with_system_readline:--with-system-readline} \ --with-expat \ -%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-sysroot=%{_prefix}/@tool_target@/sys-root \ --prefix=%{_prefix} --bindir=%{_bindir} \ --includedir=%{_includedir} --libdir=%{_libdir} \ diff --git a/contrib/crossrpms/gdb/gdb.add b/contrib/crossrpms/gdb/gdb.add index 39b2480754..bf3d61f73d 100644 --- a/contrib/crossrpms/gdb/gdb.add +++ b/contrib/crossrpms/gdb/gdb.add @@ -18,6 +18,23 @@ BuildRequires: %{_host_rpmprefix}gcc # Default: yes %bcond_without system_readline +# Whether to build python support +%if "%{_build}" != "%{_host}" +# Can't build python Cdn-X +%bcond_with python +%else +%if "%{gdb_version}" >= "7.3" +# Python support is broken +%bcond_with python +%elseif "%{gdb_version}" >= "6.8.50" +%bcond_without python +%else +# python is unsupported +%bcond_with python +%endif +%endif +%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel} + %if "@tool_target@" == "powerpc-rtems@rtems_api@" %if "%{_build}" != "%{_host}" # psim doesn't support Cdn-X @@ -68,15 +85,6 @@ BuildRequires: %{_host_rpmprefix}expat-devel %{?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 -- cgit v1.2.3