2 # - Do not remove -lib package, it is required by FPC
5 # - change install msg to poldek in buildid-locate-rpm-pld.patch when poldek allows it. LP#493922
8 %bcond_without python # build without python support
10 Summary: A GNU source-level debugger for C, C++ and Fortran
11 Summary(de.UTF-8): Symbolischer Debugger für C und andere Sprachen
12 Summary(es.UTF-8): Depurador de programas C y otras lenguajes
13 Summary(fr.UTF-8): Débugger symbolique pour C et d'autres langages
14 Summary(pl.UTF-8): Symboliczny odpluskwiacz dla C i innych języków
15 Summary(pt_BR.UTF-8): Depurador de programas C e outras linguagens
16 Summary(ru.UTF-8): Символический отладчик для C и других языков
17 Summary(tr.UTF-8): C ve diğer diller için sembolik hata ayıklayıcı
18 Summary(uk.UTF-8): Символьний відладчик для С та інших мов
19 Summary(zh_CN.UTF-8): [开发]C和其他语言的调试器
20 Summary(zh_TW.UTF-8): [.-A開發]C和.$)B其.-A他語.$)B言的調試器
22 ###### /home/users/pluto/rpm/packages/../rpm-build-tools/rpm.groups: no such file
25 Release: 0.%{snap}.0.1
27 Group: Development/Debuggers
28 #Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.bz2
29 Source0: %{name}-%{version}.%{snap}.tar.bz2
30 # Source0-md5: 813b1d4f93e0eb56ff81d147de2286fb
31 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
32 # Source1-md5: 2e8a48939ae282c12bbacdd54e398247
33 Source3: %{name}-gstack.man
35 # FEDORA -- use the same numbering that they do
36 # don't ever modify these patches, apply secondary patch to alter it pld way
37 # use:'<,'>!grep -vE '^(\#|$)' in vim to filterout comments, spaces
39 Patch1: %{name}-6.3-rh-dummykfail-20041202.patch
40 Patch2: %{name}-6.3-rh-testversion-20041202.patch
41 Patch3: %{name}-6.3-rh-testlibunwind-20041202.patch
42 Patch105: %{name}-6.3-ppc64syscall-20040622.patch
43 Patch111: %{name}-6.3-ppc64displaysymbol-20041124.patch
44 Patch112: %{name}-6.6-scheduler_locking-step-sw-watchpoints2.patch
45 Patch260: %{name}-6.6-scheduler_locking-step-is-default.patch
46 Patch118: %{name}-6.3-gstack-20050411.patch
47 Patch122: %{name}-6.3-test-pie-20050107.patch
48 Patch389: %{name}-archer-pie-addons.patch
49 Patch394: %{name}-archer-pie-addons-keep-disabled.patch
50 Patch125: %{name}-6.3-test-self-20050110.patch
51 Patch133: %{name}-6.3-test-dtorfix-20050121.patch
52 Patch136: %{name}-6.3-test-movedir-20050125.patch
53 Patch140: %{name}-6.3-gcore-thread-20050204.patch
54 Patch145: %{name}-6.3-threaded-watchpoints2-20050225.patch
55 Patch153: %{name}-6.3-ia64-gcore-page0-20050421.patch
56 Patch158: %{name}-6.3-ia64-sigtramp-frame-20050708.patch
57 Patch160: %{name}-6.3-ia64-gcore-speedup-20050714.patch
58 Patch161: %{name}-6.3-inferior-notification-20050721.patch
59 Patch162: %{name}-6.3-ia64-info-frame-fix-20050725.patch
60 Patch163: %{name}-6.3-inheritancetest-20050726.patch
61 Patch164: %{name}-6.3-readnever-20050907.patch
62 Patch169: %{name}-6.3-ia64-sigill-20051115.patch
63 Patch188: %{name}-6.5-bz203661-emit-relocs.patch
64 Patch194: %{name}-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
65 Patch196: %{name}-6.5-sharedlibrary-path.patch
66 Patch199: %{name}-6.5-bz190810-gdbserver-arch-advice.patch
67 Patch211: %{name}-6.5-last-address-space-byte-test.patch
68 Patch208: %{name}-6.5-BEA-testsuite.patch
69 Patch213: %{name}-6.5-readline-long-line-crash-test.patch
70 Patch214: %{name}-6.5-bz216711-clone-is-outermost.patch
71 Patch216: %{name}-6.5-bz218379-ppc-solib-trampoline-test.patch
72 Patch217: %{name}-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
73 Patch225: %{name}-6.5-bz109921-DW_AT_decl_file-test.patch
74 Patch229: %{name}-6.3-bz140532-ppc-unwinding-test.patch
75 Patch231: %{name}-6.3-bz202689-exec-from-pthread-test.patch
76 Patch234: %{name}-6.6-bz230000-power6-disassembly-test.patch
77 Patch235: %{name}-6.3-bz231832-obstack-2gb.patch
78 Patch245: %{name}-6.6-bz229517-gcore-without-terminal.patch
79 Patch247: %{name}-6.6-bz235197-fork-detach-info.patch
80 Patch254: %{name}-6.6-testsuite-timeouts.patch
81 Patch258: %{name}-6.6-bz237572-ppc-atomic-sequence-test.patch
82 Patch263: %{name}-6.3-attach-see-vdso-test.patch
83 Patch271: %{name}-6.5-bz243845-stale-testing-zombie-test.patch
84 Patch274: %{name}-6.6-buildid-locate.patch
85 Patch659: %{name}-6.6-buildid-locate-solib-missing-ids.patch
86 Patch353: %{name}-6.6-buildid-locate-rpm.patch
87 Patch415: %{name}-6.6-buildid-locate-core-as-arg.patch
88 Patch519: %{name}-6.6-buildid-locate-rpm-librpm-workaround.patch
89 Patch276: %{name}-6.6-bfd-vdso8k.patch
90 Patch282: %{name}-6.7-charsign-test.patch
91 Patch284: %{name}-6.7-ppc-clobbered-registers-O2-test.patch
92 Patch287: %{name}-6.7-testsuite-stable-results.patch
93 Patch289: %{name}-6.5-ia64-libunwind-leak-test.patch
94 Patch290: %{name}-6.5-missed-trap-on-step-test.patch
95 Patch294: %{name}-6.7-bz426600-DW_TAG_interface_type-test.patch
96 Patch296: %{name}-6.5-gcore-buffer-limit-test.patch
97 Patch298: %{name}-6.6-threads-static-test.patch
98 Patch309: %{name}-6.3-mapping-zero-inode-test.patch
99 Patch311: %{name}-6.3-focus-cmd-prev-test.patch
100 Patch315: %{name}-6.8-bz442765-threaded-exec-test.patch
101 Patch317: %{name}-6.8-sparc64-silence-memcpy-check.patch
102 Patch320: %{name}-6.5-section-num-fixup-test.patch
103 Patch329: %{name}-6.8-bz254229-gcore-prpsinfo.patch
104 Patch330: %{name}-6.8-bz436037-reg-no-longer-active.patch
105 Patch331: %{name}-6.8-quit-never-aborts.patch
106 Patch335: %{name}-rhel5-compat.patch
107 Patch337: %{name}-6.8-attach-signalled-detach-stopped.patch
108 Patch343: %{name}-6.8-watchpoint-conditionals-test.patch
109 Patch348: %{name}-6.8-bz466901-backtrace-full-prelinked.patch
110 Patch349: %{name}-archer.patch
111 Patch360: %{name}-6.8-bz457187-largefile-test.patch
112 Patch381: %{name}-simultaneous-step-resume-breakpoint-test.patch
113 Patch382: %{name}-core-open-vdso-warning.patch
114 Patch391: %{name}-x86_64-i386-syscall-restart.patch
115 Patch392: %{name}-bz533176-fortran-omp-step.patch
116 Patch397: %{name}-follow-child-stale-parent.patch
117 Patch403: %{name}-ccache-workaround.patch
118 Patch404: %{name}-fortran-common-reduce.patch
119 Patch405: %{name}-fortran-common.patch
120 Patch407: %{name}-lineno-makeup-test.patch
121 Patch408: %{name}-ppc-power7-test.patch
122 Patch417: %{name}-bz541866-rwatch-before-run.patch
123 Patch459: %{name}-moribund-utrace-workaround.patch
124 Patch470: %{name}-archer-next-over-throw-cxx-exec.patch
125 Patch475: %{name}-bz601887-dwarf4-rh-test.patch
126 Patch490: %{name}-test-bt-cfi-without-die.patch
127 Patch491: %{name}-gdb-add-index-script.patch
128 Patch496: %{name}-bz568248-oom-is-error.patch
129 Patch504: %{name}-bz623749-gcore-relro.patch
130 Patch526: %{name}-bz634108-solib_address.patch
131 Patch542: %{name}-test-pid0-core.patch
132 Patch547: %{name}-test-dw2-aranges.patch
133 Patch548: %{name}-test-expr-cumulative-archer.patch
134 Patch579: %{name}-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
135 Patch618: %{name}-dlopen-stap-probe-1of7.patch
136 Patch717: %{name}-dlopen-stap-probe-2of7.patch
137 Patch718: %{name}-dlopen-stap-probe-3of7.patch
138 Patch719: %{name}-dlopen-stap-probe-4of7.patch
139 Patch720: %{name}-dlopen-stap-probe-5of7.patch
140 Patch721: %{name}-dlopen-stap-probe-6of7.patch
141 Patch722: %{name}-dlopen-stap-probe-7of7.patch
142 Patch619: %{name}-dlopen-stap-probe-test.patch
143 Patch723: %{name}-dlopen-stap-probe-test2.patch
144 Patch627: %{name}-glibc-vdso-workaround.patch
145 Patch634: %{name}-runtest-pie-override.patch
146 Patch643: %{name}-python-rdynamic.patch
147 Patch653: %{name}-attach-fail-reasons-5of5.patch
148 Patch657: %{name}-attach-fail-reasons-5of5configure.patch
149 Patch661: %{name}-stale-frame_info.patch
150 Patch690: %{name}-glibc-strstr-workaround.patch
151 Patch698: %{name}-rhel5.9-testcase-xlf-var-inside-mod.patch
152 Patch703: %{name}-rhbz-818343-set-solib-absolute-prefix-testcase.patch
153 Patch716: %{name}-minidebuginfo.patch
154 Patch725: %{name}-step-symless.patch
155 Patch726: %{name}-print-class.patch
156 Patch728: %{name}-check-type.patch
157 Patch729: %{name}-entryval-inlined.patch
160 Patch1000: %{name}-readline.patch
161 Patch1001: %{name}-info.patch
162 Patch1002: %{name}-passflags.patch
163 Patch1005: %{name}-pretty-print-by-default.patch
164 Patch1006: buildid-locate-rpm-pld.patch
166 URL: http://www.gnu.org/software/gdb/
167 BuildRequires: autoconf >= 2.69
168 BuildRequires: automake
170 BuildRequires: expat-devel
172 BuildRequires: gettext-devel
173 BuildRequires: libselinux-devel
174 BuildRequires: libtool
175 BuildRequires: libunwind-devel >= 0.97
176 BuildRequires: ncurses-devel >= 5.2
177 BuildRequires: pkgconfig
178 BuildRequires: readline-devel
179 BuildRequires: rpmbuild(macros) >= 1.219
180 BuildRequires: texinfo >= 4.4
181 BuildRequires: zlib-devel
183 BuildRequires: python-devel
184 BuildRequires: rpm-pythonprov
185 Obsoletes: python-gdb
186 # for traceback module
187 Requires: python-modules
189 Requires: libunwind >= 0.97
190 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
193 Gdb is a full featured, command driven debugger. Gdb allows you to
194 trace the execution of programs and examine their internal state at
195 any time. Gdb works for C and C++ compiled with the GNU C compiler
198 %description -l de.UTF-8
199 dem Sie die Ausführung von Programmen verfolgen und jederzeit den
200 inneren Zustand überprüfen können. Er funktioniert für C und mit GNU C
203 %description -l es.UTF-8
204 Este es un debugger orientado a comandos repleto de características.
205 Te permite rastrear la ejecución de programas y examinar su estado
206 interno a cualquier momento. Funciona para C y C++ compilado con el
209 %description -l fr.UTF-8
210 Débugger complet, piloté par commandes. Permet de tracer l'exécution
211 des programmes et d'examiner à tout moment leur état interne.
212 Fonctionne avec les binaires C et C++ compilés avec le compilateur C
215 %description -l pl.UTF-8
216 Gdb jest rozbudowanym odpluskwiaczem (debuggerem), pozwalającym
217 śledzić wykonywanie programu i badać jego stan wewnętrzny. Gdb
218 umożliwia odpluskwianie programów napisanych w C/C++ i skompilowanych
219 przy pomocy kompilatora GNU (gcc).
221 %description -l pt_BR.UTF-8
222 Este é um debugger orientado a comandos repleto de características.
223 Ele permite à você rastrear a execução de programas e examinar o seu
224 estado interno a qualquer momento. Ele funciona para para C e C++
225 compilado com o compilador GNU C.
227 %description -l ru.UTF-8
228 Это полноценный отладчик, управляемый командами. Он позволяет
229 трассировать исполнение программ и изучать их внутреннее состояние в
230 любой момент времени. Работает с программами на C и C++,
231 скомпилированными GNU компилятором C (gcc, egcs, pgcc).
233 %description -l tr.UTF-8
234 Bir komut arayüzü üzerinden programcıya programını adım adım izleme
235 (trace) ve herhangi bir anda programın durumunu inceleme olanağı
238 %description -l uk.UTF-8
239 Це повноцінний відладчик, що керується командами. Він дозволяє
240 трасувати виконання програм та вивчати їх внутрішній стан в довільний
241 момент часу. Працює з програмами на C та C++, зкомпільованими
242 компіляторами GNU C (gcc, egcs, pgcc).
245 Summary: A standalone server for GDB (the GNU source-level debugger)
246 Summary(pl.UTF-8): Samodzielny serwer GDB (debuggera GNU)
247 ###### /home/users/pluto/rpm/packages/../rpm-build-tools/rpm.groups: no such file
248 Group: Development/Debuggers
250 %description gdbserver
251 GDB, the GNU debugger, allows you to debug programs written in C, C++,
252 Java, and other languages, by executing them in a controlled fashion
253 and printing their data.
255 This package provides a program that allows you to run GDB on a
256 different machine than the one which is running the program being
259 %description gdbserver -l pl.UTF-8
260 GDB (GNU debugger) pozwala śledzić programy napisane w C, C++, Javie i
261 innych językach programowania poprzez wykonywanie ich w sposób
262 kontrolowany oraz wypisywanie ich danych.
264 Ten pakiet zawiera program pozwalający uruchamiać GDB na innej
265 maszynie niż ta, na której działa śledzony program.
268 Summary: GDB in the form of a static library
269 Summary(pl.UTF-8): GDB w postaci biblioteki statycznej
270 ###### /home/users/pluto/rpm/packages/../rpm-build-tools/rpm.groups: no such file
271 Group: Development/Debuggers
272 # libraries that needs to be linked to fulfill libgdb.a symbol requirements
273 Requires: binutils-devel >= 2.17.50
274 Requires: expat-devel
275 Requires: ncurses-devel
276 Requires: python-devel
277 Requires: readline-devel
281 GDB in the form of a static library.
283 %description lib -l pl.UTF-8
284 GDB w postaci biblioteki statycznej.
287 %setup -q -n %{name}-%{version}.%{snap}
289 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
290 rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
291 rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
293 # FEDORA PATCHES -- keep them in same order they do
294 # Apply patches defined above.
296 # Match the Fedora's version info.
424 # Change the version that gets printed at GDB startup, so it is PLD Linux specific.
425 cat > gdb/version.in << EOF
426 %{version}-%{release} (PLD Linux)
429 sed -i -e 's#_GCC_AUTOCONF_VERSION\], \[2\.64\]#_GCC_AUTOCONF_VERSION], [2.69]#g' config/override.m4
432 # omit hand-written gdb/testsuite aclocal.m4
433 for dir in gdb gdb/gdbserver ; do
437 %{__aclocal} $(grep '^ACLOCAL_AMFLAGS' Makefile.in | sed -e 's/.*=//')
440 for dir in $(find gdb -name 'configure.in' -o -name 'configure.ac'); do
441 dir=$(dirname "$dir")
445 grep -q AC_CONFIG_HEADER configure.* && %{__autoheader}
448 cp -f /usr/share/automake/config.* .
449 # don't --enable-shared here, there would be libs version mismatch with binutils
451 --with-gdb-datadir=%{_datadir}/gdb \
452 --with-separate-debug-dir=/usr/lib/debug \
455 --with-pythondir=%{py_sitescriptdir} \
467 --with-system-readline \
468 --with-cpu=%{_target_cpu} \
472 --without-included-gettext \
473 --without-included-regex \
479 # gdb/ChangeLog: Build gdb directly from *.o files not using libgdb.a.
480 %{__make} -j1 -C gdb libgdb.a
483 rm -rf $RPM_BUILD_ROOT
484 install -d $RPM_BUILD_ROOT%{_infodir}
486 %{__make} -j1 install install-info \
487 DESTDIR=$RPM_BUILD_ROOT
489 # gdbtui seems all identical to gdb except when invoked as gdbtio, ncurses
490 # window is created too.
491 echo ".so gdb.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gdbtui.1
492 ln -f $RPM_BUILD_ROOT%{_bindir}/{gdb,gdbtui}
494 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
495 cp -a gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
497 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
498 rm -f $RPM_BUILD_ROOT%{_mandir}/README.gdb-non-english-man-pages
502 for LIB in lib lib64; do
503 LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
507 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
508 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
512 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/gstack.1
514 install libdecnumber/libdecnumber.a $RPM_BUILD_ROOT%{_libdir}
516 # Remove the files that are part of a gdb build but that are owned and provided by other packages.
517 # These are part of binutils
518 rm -rf $RPM_BUILD_ROOT%{_localedir}
519 rm -f $RPM_BUILD_ROOT%{_infodir}/bfd*
520 rm -f $RPM_BUILD_ROOT%{_infodir}/standard*
521 rm -f $RPM_BUILD_ROOT%{_infodir}/mmalloc*
522 rm -f $RPM_BUILD_ROOT%{_infodir}/configure*
523 rm -rf $RPM_BUILD_ROOT%{_includedir}
524 rm -rf $RPM_BUILD_ROOT%{_libdir}/lib{bfd*,opcodes*,iberty*,mmalloc*}
527 rm -rf $RPM_BUILD_ROOT
529 %post -p /sbin/postshell
530 -/usr/sbin/fix-info-dir -c %{_infodir}
532 %postun -p /sbin/postshell
533 -/usr/sbin/fix-info-dir -c %{_infodir}
536 %defattr(644,root,root,755)
537 %doc gdb/{ChangeLog,NEWS,PROBLEMS,README}
538 %attr(755,root,root) %{_bindir}/gdb
539 %attr(755,root,root) %{_bindir}/gdbtui
540 %attr(755,root,root) %{_bindir}/gdb-add-index
541 %attr(755,root,root) %{_bindir}/gstack
543 %dir %{_datadir}/gdb/auto-load
544 %dir %{_datadir}/gdb/auto-load%{_prefix}
545 %dir %{_datadir}/gdb/auto-load%{_prefix}/lib
547 %dir %{_datadir}/gdb/auto-load%{_prefix}/lib64
549 %{_datadir}/gdb/syscalls
550 %{_datadir}/gdb/python
551 %{_mandir}/man1/gdb.1*
552 %{_mandir}/man1/gdbtui.1*
553 %{_mandir}/man1/gstack.1*
554 %lang(es) %{_mandir}/es/man1/*
555 %lang(fr) %{_mandir}/fr/man1/*
556 %lang(hu) %{_mandir}/hu/man1/*
557 %lang(ja) %{_mandir}/ja/man1/*
558 %lang(pl) %{_mandir}/pl/man1/*
559 %{_infodir}/annotate.info*
560 %{_infodir}/gdb.info*
561 %{_infodir}/gdbint.info*
562 %{_infodir}/stabs.info*
565 %defattr(644,root,root,755)
566 %attr(755,root,root) %{_bindir}/gdbserver
567 %{_mandir}/man1/gdbserver.1*
568 %attr(755,root,root) %{_libdir}/libinproctrace.so
571 %defattr(644,root,root,755)
572 %{_libdir}/libdecnumber.a