+#
+# NOTE: Do not remove -lib package, it is required by FPC
+#
Summary: A GNU source-level debugger for C, C++ and Fortran
Summary(de): Symbolischer Debugger für C und andere Sprachen
Summary(es): Depurador de programas C y otras lenguajes
Summary(zh_CN): [¿ª·¢]CºÍÆäËûÓïÑԵĵ÷ÊÔÆ÷
Summary(zh_TW): [.-A¶}µo]C©M.$)B¨ä.-A¥L»y.$)B¨¥ªº½Õ¸Õ¾¹
Name: gdb
-Version: 6.0
-Release: 0.1
+Version: 6.5
+Release: 3
License: GPL
Group: Development/Debuggers
-Source0: ftp://ftp.gnu.org/pub/gnu/gdb/%{name}-%{version}.tar.gz
-# Source0-md5: e2314b7c9c7670b5384deb90701446f4
+Source0: ftp://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.bz2
+# Source0-md5: af6c8335230d7604aee0803b1df14f54
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: 2e8a48939ae282c12bbacdd54e398247
-Patch0: %{name}-gettext.patch
-Patch1: %{name}-ncurses.patch
-Patch2: %{name}-readline.patch
-Patch3: %{name}-info.patch
-Patch4: %{name}-procfs.patch
-Patch5: %{name}-passflags.patch
-BuildRequires: XFree86-devel
+Patch0: %{name}-readline.patch
+Patch1: %{name}-info.patch
+Patch2: %{name}-passflags.patch
+# updated from http://www.math.uni.wroc.pl/~hebisch/gpc/gdb-6.1.diff
+Patch3: %{name}-gpc.patch
+Patch4: %{name}-gdbinit-stat.patch
+Patch5: %{name}-pretty-print-by-default.patch
+Patch6: %{name}-absolute-gnu_debuglink-path.patch
+Patch7: %{name}-gnu_hash.patch
BuildRequires: autoconf >= 2.53
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex
BuildRequires: libtool
BuildRequires: ncurses-devel >= 5.2
-BuildRequires: readline-devel >= 4.2
+BuildRequires: readline-devel >= 4.3
+BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
ÍÏÍÅÎÔ ÞÁÓÕ. ðÒÁÃÀ¤ Ú ÐÒÏÇÒÁÍÁÍÉ ÎÁ C ÔÁ C++, ÚËÏÍЦÌØÏ×ÁÎÉÍÉ
ËÏÍЦÌÑÔÏÒÁÍÉ GNU C (gcc, egcs, pgcc).
+%package lib
+Summary: GDB in the form of a static library
+Summary(pl): GDB w postaci biblioteki statycznej
+Group: Development/Debuggers
+#Requires: binutils-static >= 2.17.50
+
+%description lib
+GDB in the form of a static library.
+
+%description lib -l pl
+GDB w postaci biblioteki statycznej.
+
%prep
%setup -q
-#%patch0 -p1
-#%patch1 -p1
-#%patch2 -p1
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%patch3 -p1
-%patch4 -p1
+%patch4 -p0
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
%build
-cd gdb
-%{__autoconf}
-cd doc
-%{__autoconf}
-cd ../testsuite
-%{__autoconf}
-cd gdb.arch
-%{__autoconf}
-cd ../gdb.asm
-%{__autoconf}
-cd ../gdb.base
-%{__autoconf}
-cd ../gdb.c++
-%{__autoconf}
-cd ../gdb.chill
-%{__autoconf}
-cd ../gdb.disasm
-%{__autoconf}
-#cd ../gdb.fortran
-#%%{__autoconf}
-cd ../gdb.java
-%{__autoconf}
-cd ../gdb.mi
-%{__autoconf}
-cd ../gdb.stabs
-%{__autoconf}
-cd ../gdb.threads
-%{__autoconf}
-cd ../gdb.trace
-%{__autoconf}
-cd ../../gdbserver
-%{__autoconf}
-cd ../..
+for dir in `find gdb/ -name 'configure.in'`; do
+ dir=$(dirname "$dir")
+ olddir=$(pwd)
+ cd $dir
+ rm -f aclocal.m4
+ %{__aclocal}
+ %{__autoconf}
+ cd $olddir
+done
+cp -f /usr/share/automake/config.* .
# !! Don't enable shared here !!
# This will cause serious problems --misiek
%configure2_13 \
+ --disable-gdbtk \
--disable-shared \
- --enable-nls \
- --without-included-gettext \
- --without-included-regex \
- --enable-gdcli \
+ --enable-gdbcli \
--enable-gdbmi \
--enable-multi-ice \
--enable-netrom \
- --with-cpu=%{_target_cpu} \
+ --enable-nls \
--enable-tui \
+ --with-cpu=%{_target_cpu} \
+ --without-included-gettext \
+ --without-included-regex \
+ --without-x \
%ifnarch alpha
--with-mmalloc
%endif
-# something is wrong after above - e.g. $exeext=="no" - fix it:
-cd gdb
-%configure
-cd ..
-
%{__make}
%{__make} info
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+install gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
+%doc gdb/{ChangeLog,NEWS,PROBLEMS,README}
%attr(755,root,root) %{_bindir}/*
-
%{_mandir}/man1/*
%lang(es) %{_mandir}/es/man1/*
%lang(fr) %{_mandir}/fr/man1/*
%lang(pl) %{_mandir}/pl/man1/*
%{_infodir}/gdb*.info*
%{_infodir}/stabs*.info*
+
+%files lib
+%defattr(644,root,root,755)
+%{_libdir}/libgdb.a