summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/gdb/gdb.add
blob: 7c869f55029d9b95c4e16dfdf8b2cb859989bc08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
%define gdb_version @GDB_VERS@
%define gdb_rpmvers %{expand:%(echo @GDB_VERS@ | tr - _)} 

Name:		@rpmprefix@@tool_target@-gdb
Summary:	Gdb for target @tool_target@
Group:		Development/Tools
Version:	%{gdb_rpmvers}
Release:	@GDB_RPMREL@
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
%if "%{_build}" != "%{_host}"
# psim doesn't support Cdn-X
%if "@tool_target@" == "powerpc-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%endif

%ifos mingw mingw32
# Mingw lacks functions required by the simulator
%if "@tool_target@" == "sparc-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%if "@tool_target@" == "h8300-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%if "%{gdb_version}" >= "6.8.50"
%if "@tool_target@" == "m32c-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%endif
%if "@tool_target@" == "lm32-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%if "@tool_target@" == "mipstx39-rtems@rtems_api@"
%define build_sim --disable-sim
%endif
%endif

%if "%{gdb_version}" >= "6.6"
# suse
%if "%{?suse}" >= "10.3"
BuildRequires: libexpat-devel
%else
# 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
%if 0%{?fedora} >= 12
%bcond_with system_readline
%else
%bcond_without system_readline
%endif
%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

@SOURCES@

%description
GDB for target @tool_target@