2 # - Do not remove -lib package, it is required by FPC
3 # - does not build with -j2 - use -j1
7 # - remove hacks in python, use sys.lib, use standard python dirs
8 # - gdbtui is as big as gdb, but different md5, some kind of duplicate?
9 # - change yum install msg to poldek one in buildid-locate-rpm.patch
12 %bcond_without python # build without python support
15 Summary: A GNU source-level debugger for C, C++ and Fortran
16 Summary(de.UTF-8): Symbolischer Debugger für C und andere Sprachen
17 Summary(es.UTF-8): Depurador de programas C y otras lenguajes
18 Summary(fr.UTF-8): Débugger symbolique pour C et d'autres langages
19 Summary(pl.UTF-8): Symboliczny odpluskwiacz dla C i innych języków
20 Summary(pt_BR.UTF-8): Depurador de programas C e outras linguagens
21 Summary(ru.UTF-8): Символический отладчик для C и других языков
22 Summary(tr.UTF-8): C ve diğer diller için sembolik hata ayıklayıcı
23 Summary(uk.UTF-8): Символьний відладчик для С та інших мов
24 Summary(zh_CN.UTF-8): [开发]C和其他语言的调试器
25 Summary(zh_TW.UTF-8): [.-A開發]C和.$)B其.-A他語.$)B言的調試器
30 Group: Development/Debuggers
31 Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.bz2
32 # Source0-md5: 3386a7b69c010785c920ffc1e9cb890a
33 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
34 # Source1-md5: 2e8a48939ae282c12bbacdd54e398247
35 Source4: libstdc++-v3-python-r151798.tar.bz2
36 # Source4-md5: 7507540c50a1edeb2fc22a37bc4a08b8
39 Patch1000: %{name}-readline.patch
40 Patch1001: %{name}-info.patch
41 Patch1002: %{name}-passflags.patch
42 Patch1005: %{name}-pretty-print-by-default.patch
44 # FEDORA -- use the same numbering that they do
45 # use:'<,'>!grep -vE '^(\#|$)' in vim to filterout comments, spaces
46 Patch1: %{name}-6.3-rh-dummykfail-20041202.patch
47 Patch2: %{name}-6.3-rh-testversion-20041202.patch
48 Patch3: %{name}-6.3-rh-testlibunwind-20041202.patch
49 Patch104: %{name}-6.3-ppcdotsolib-20041022.patch
50 Patch105: %{name}-6.3-ppc64syscall-20040622.patch
51 Patch106: %{name}-6.3-framepczero-20040927.patch
52 Patch111: %{name}-6.3-ppc64displaysymbol-20041124.patch
53 Patch112: %{name}-6.6-scheduler_locking-step-sw-watchpoints2.patch
54 Patch260: %{name}-6.6-scheduler_locking-step-is-default.patch
55 Patch118: %{name}-6.3-gstack-20050411.patch
56 Patch122: %{name}-6.3-test-pie-20050107.patch
57 Patch124: %{name}-6.3-pie-20050110.patch
58 Patch125: %{name}-6.3-test-self-20050110.patch
59 Patch128: %{name}-6.3-nonthreaded-wp-20050117.patch
60 Patch133: %{name}-6.3-test-dtorfix-20050121.patch
61 Patch136: %{name}-6.3-test-movedir-20050125.patch
62 Patch140: %{name}-6.3-gcore-thread-20050204.patch
63 Patch141: %{name}-6.6-step-thread-exit.patch
64 Patch259: %{name}-6.3-step-thread-exit-20050211-test.patch
65 Patch142: %{name}-6.3-terminal-fix-20050214.patch
66 Patch145: %{name}-6.3-threaded-watchpoints2-20050225.patch
67 Patch148: %{name}-6.3-inheritance-20050324.patch
68 Patch153: %{name}-6.3-ia64-gcore-page0-20050421.patch
69 Patch157: %{name}-6.3-security-errata-20050610.patch
70 Patch158: %{name}-6.3-ia64-sigtramp-frame-20050708.patch
71 Patch160: %{name}-6.3-ia64-gcore-speedup-20050714.patch
72 Patch161: %{name}-6.3-inferior-notification-20050721.patch
73 Patch162: %{name}-6.3-ia64-info-frame-fix-20050725.patch
74 Patch163: %{name}-6.3-inheritancetest-20050726.patch
75 Patch164: %{name}-6.3-readnever-20050907.patch
76 Patch169: %{name}-6.3-ia64-sigill-20051115.patch
77 Patch170: %{name}-6.3-bt-past-zero-20051201.patch
78 Patch176: %{name}-6.3-large-core-20051206.patch
79 Patch177: %{name}-6.3-gstack-without-path-20060414.patch
80 Patch188: %{name}-6.5-bz203661-emit-relocs.patch
81 Patch190: %{name}-6.5-dwarf-stack-overflow.patch
82 Patch194: %{name}-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
83 Patch195: %{name}-6.5-tls-of-separate-debuginfo.patch
84 Patch196: %{name}-6.5-sharedlibrary-path.patch
85 Patch199: %{name}-6.5-bz190810-gdbserver-arch-advice.patch
86 Patch201: %{name}-6.5-gcore-i386-on-amd64.patch
87 Patch211: %{name}-6.5-last-address-space-byte-test.patch
88 Patch208: %{name}-6.5-BEA-testsuite.patch
89 Patch209: %{name}-6.5-readline-long-line-crash.patch
90 Patch213: %{name}-6.5-readline-long-line-crash-test.patch
91 Patch214: %{name}-6.5-bz216711-clone-is-outermost.patch
92 Patch215: %{name}-6.5-bz218379-ppc-solib-trampoline-fix.patch
93 Patch216: %{name}-6.5-bz218379-ppc-solib-trampoline-test.patch
94 Patch217: %{name}-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
95 Patch225: %{name}-6.5-bz109921-DW_AT_decl_file-test.patch
96 Patch229: %{name}-6.3-bz140532-ppc-unwinding-test.patch
97 Patch231: %{name}-6.3-bz202689-exec-from-pthread-test.patch
98 Patch232: %{name}-7.0-upstream.patch
99 Patch234: %{name}-6.6-bz230000-power6-disassembly-test.patch
100 Patch235: %{name}-6.3-bz231832-obstack-2gb.patch
101 Patch240: %{name}-6.6-bz225783-prelink-path.patch
102 Patch241: %{name}-6.6-bz225783-gdb-debuginfo-paths.patch
103 Patch245: %{name}-6.6-bz229517-gcore-without-terminal.patch
104 Patch247: %{name}-6.6-bz235197-fork-detach-info.patch
105 Patch249: %{name}-6.6-gcore32-test.patch
106 Patch254: %{name}-6.6-testsuite-timeouts.patch
107 Patch258: %{name}-6.6-bz237572-ppc-atomic-sequence-test.patch
108 Patch261: %{name}-6.6-readline-system.patch
109 Patch263: %{name}-6.3-attach-see-vdso-test.patch
110 Patch265: %{name}-6.6-bz247354-leader-exit-fix.patch
111 Patch266: %{name}-6.6-bz247354-leader-exit-test.patch
112 Patch271: %{name}-6.5-bz243845-stale-testing-zombie-test.patch
113 Patch274: %{name}-6.6-buildid-locate.patch
114 Patch353: %{name}-6.6-buildid-locate-rpm.patch
115 Patch282: %{name}-6.7-charsign-test.patch
116 Patch284: %{name}-6.7-ppc-clobbered-registers-O2-test.patch
117 Patch287: %{name}-6.7-testsuite-stable-results.patch
118 Patch289: %{name}-6.5-ia64-libunwind-leak-test.patch
119 Patch290: %{name}-6.5-missed-trap-on-step-test.patch
120 Patch293: %{name}-6.7-bz426600-DW_TAG_interface_type-fix.patch
121 Patch294: %{name}-6.7-bz426600-DW_TAG_interface_type-test.patch
122 Patch296: %{name}-6.5-gcore-buffer-limit-test.patch
123 Patch298: %{name}-6.6-threads-static-test.patch
124 Patch304: %{name}-6.7-kernel-headers-compat.patch
125 Patch309: %{name}-6.3-mapping-zero-inode-test.patch
126 Patch311: %{name}-6.3-focus-cmd-prev-test.patch
127 Patch314: %{name}-6.3-watchpoint-cond-gone-test.patch
128 Patch315: %{name}-6.8-bz442765-threaded-exec-test.patch
129 Patch317: %{name}-6.8-sparc64-silence-memcpy-check.patch
130 Patch318: %{name}-6.8-gcc35998-ada-memory-trash.patch
131 Patch320: %{name}-6.5-section-num-fixup-test.patch
132 Patch322: %{name}-6.8-constant-watchpoints.patch
133 Patch324: %{name}-6.8-glibc-headers-compat.patch
134 Patch326: %{name}-6.8-tui-singlebinary.patch
135 Patch350: %{name}-6.8-inlining-addon.patch
136 Patch328: %{name}-6.8-inlining-by-name.patch
137 Patch329: %{name}-6.8-bz254229-gcore-prpsinfo.patch
138 Patch330: %{name}-6.8-bz436037-reg-no-longer-active.patch
139 Patch331: %{name}-6.8-quit-never-aborts.patch
140 Patch332: %{name}-6.8-fortran-tag-constant.patch
141 Patch337: %{name}-6.8-attach-signalled-detach-stopped.patch
142 Patch343: %{name}-6.8-watchpoint-conditionals-test.patch
143 Patch348: %{name}-6.8-bz466901-backtrace-full-prelinked.patch
144 Patch349: %{name}-archer.patch
145 Patch352: %{name}-6.8-bz457187-largefile.patch
146 Patch360: %{name}-6.8-bz457187-largefile-test.patch
147 Patch375: %{name}-readline-6.0.patch
148 Patch376: libstdc++-v3-python-common-prefix.patch
149 Patch381: %{name}-simultaneous-step-resume-breakpoint-test.patch
150 Patch382: %{name}-core-open-vdso-warning.patch
151 Patch383: %{name}-bz528668-symfile-sepcrc.patch
152 Patch384: %{name}-bz528668-symfile-cleanup.patch
153 Patch385: %{name}-bz528668-symfile-multi.patch
154 Patch387: %{name}-bz539590-gnu-ifunc.patch
155 Patch388: %{name}-bz538626-bp_location-accel-bp-cond.patch
157 URL: http://www.gnu.org/software/gdb/
158 BuildRequires: autoconf >= 2.53
159 BuildRequires: automake
162 BuildRequires: libtool
163 BuildRequires: ncurses-devel >= 5.2
164 BuildRequires: python-devel
165 BuildRequires: readline-devel >= 6.0
166 BuildRequires: rpm-pythonprov
167 BuildRequires: texinfo >= 4.4
168 BuildRequires: zlib-devel
169 %{?with_python:Requires: python-libs}
170 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
173 Gdb is a full featured, command driven debugger. Gdb allows you to
174 trace the execution of programs and examine their internal state at
175 any time. Gdb works for C and C++ compiled with the GNU C compiler
178 %description -l de.UTF-8
179 dem Sie die Ausführung von Programmen verfolgen und jederzeit den
180 inneren Zustand überprüfen können. Er funktioniert für C und mit GNU C
183 %description -l es.UTF-8
184 Este es un debugger orientado a comandos repleto de características.
185 Te permite rastrear la ejecución de programas y examinar su estado
186 interno a cualquier momento. Funciona para C y C++ compilado con el
189 %description -l fr.UTF-8
190 Débugger complet, piloté par commandes. Permet de tracer l'exécution
191 des programmes et d'examiner à tout moment leur état interne.
192 Fonctionne avec les binaires C et C++ compilés avec le compilateur C
195 %description -l pl.UTF-8
196 Gdb jest rozbudowanym odpluskwiaczem (debuggerem), pozwalającym
197 śledzić wykonywanie programu i badać jego stan wewnętrzny. Gdb
198 umożliwia odpluskwianie programów napisanych w C/C++ i skompilowanych
199 przy pomocy kompilatora GNU (gcc).
201 %description -l pt_BR.UTF-8
202 Este é um debugger orientado a comandos repleto de características.
203 Ele permite à você rastrear a execução de programas e examinar o seu
204 estado interno a qualquer momento. Ele funciona para para C e C++
205 compilado com o compilador GNU C.
207 %description -l ru.UTF-8
208 Это полноценный отладчик, управляемый командами. Он позволяет
209 трассировать исполнение программ и изучать их внутреннее состояние в
210 любой момент времени. Работает с программами на C и C++,
211 скомпилированными GNU компилятором C (gcc, egcs, pgcc).
213 %description -l tr.UTF-8
214 Bir komut arayüzü üzerinden programcıya programını adım adım izleme
215 (trace) ve herhangi bir anda programın durumunu inceleme olanağı
218 %description -l uk.UTF-8
219 Це повноцінний відладчик, що керується командами. Він дозволяє
220 трасувати виконання програм та вивчати їх внутрішній стан в довільний
221 момент часу. Працює з програмами на C та C++, зкомпільованими
222 компіляторами GNU C (gcc, egcs, pgcc).
225 Summary: A standalone server for GDB (the GNU source-level debugger)
226 Group: Development/Debuggers
228 %description gdbserver
229 GDB, the GNU debugger, allows you to debug programs written in C, C++,
230 Java, and other languages, by executing them in a controlled fashion
231 and printing their data.
233 This package provides a program that allows you to run GDB on a
234 different machine than the one which is running the program being
238 Summary: GDB in the form of a static library
239 Summary(pl.UTF-8): GDB w postaci biblioteki statycznej
240 Group: Development/Debuggers
241 #Requires: binutils-devel >= 2.17.50
244 GDB in the form of a static library.
246 %description lib -l pl.UTF-8
247 GDB w postaci biblioteki statycznej.
252 # libstdc++ pretty printers.
253 bzip2 -dc %{SOURCE4} | tar xf -
260 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
261 rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
262 rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
264 # FEDORA PATCHES -- keep them in same order they do
375 mv $(basename %{SOURCE4} .tar.bz2) libstdcxxpython
378 for dir in $(find gdb -name 'configure.in'); do
379 dir=$(dirname "$dir")
388 cp -f /usr/share/automake/config.* .
389 # don't --enable-shared here, there would be libs version mismatch with binutils
391 --with-gdb-datadir=%{_datadir}/gdb \
392 --with-separate-debug-dir=/usr/lib/debug \
395 --with-pythondir=%{py_sitescriptdir} \
407 --with-cpu=%{_target_cpu} \
411 --without-included-gettext \
412 --without-included-regex \
419 rm -rf $RPM_BUILD_ROOT
420 install -d $RPM_BUILD_ROOT%{_infodir}
422 %{__make} -j1 install install-info \
423 DESTDIR=$RPM_BUILD_ROOT
425 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
426 cp -a gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
428 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
429 rm -f $RPM_BUILD_ROOT%{_mandir}/README.gdb-non-english-man-pages
433 for LIB in lib lib64; do
434 LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
436 # basename is being run only for the native (non-biarch) file.
437 sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
438 -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
439 < libstdcxxpython/hook.in \
440 > $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
442 test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
443 install -d $RPM_BUILD_ROOT%{_datadir}/gdb/python
444 cp -a libstdcxxpython/libstdcxx $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
447 # Remove the files that are part of a gdb build but that are owned and provided by other packages.
448 # These are part of binutils
449 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
450 rm -f $RPM_BUILD_ROOT%{_infodir}/bfd*
451 rm -f $RPM_BUILD_ROOT%{_infodir}/standard*
452 rm -f $RPM_BUILD_ROOT%{_infodir}/mmalloc*
453 rm -f $RPM_BUILD_ROOT%{_infodir}/configure*
454 rm -rf $RPM_BUILD_ROOT%{_includedir}
455 rm -rf $RPM_BUILD_ROOT%{_libdir}/lib{bfd*,opcodes*,iberty*,mmalloc*}
458 rm -rf $RPM_BUILD_ROOT
460 %post -p /sbin/postshell
461 -/usr/sbin/fix-info-dir -c %{_infodir}
463 %postun -p /sbin/postshell
464 -/usr/sbin/fix-info-dir -c %{_infodir}
467 %defattr(644,root,root,755)
468 %doc gdb/{ChangeLog,NEWS,PROBLEMS,README}
469 %attr(755,root,root) %{_bindir}/gdb
470 %attr(755,root,root) %{_bindir}/gdbtui
471 %attr(755,root,root) %{_bindir}/gstack
473 %{_datadir}/gdb/syscalls
474 %{_mandir}/man1/gdb.1*
475 %{_mandir}/man1/gdbtui.1*
476 %lang(es) %{_mandir}/es/man1/*
477 %lang(fr) %{_mandir}/fr/man1/*
478 %lang(hu) %{_mandir}/hu/man1/*
479 %lang(ja) %{_mandir}/ja/man1/*
480 %lang(pl) %{_mandir}/pl/man1/*
481 %{_infodir}/annotate.info*
482 %{_infodir}/gdb.info*
483 %{_infodir}/gdbint.info*
484 %{_infodir}/stabs.info*
487 %{py_sitescriptdir}/gdb
488 %{_datadir}/gdb/auto-load
489 %{_datadir}/gdb/python
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_bindir}/gdbserver
495 %{_mandir}/man1/gdbserver.1*
498 %defattr(644,root,root,755)