Summary: An X Window System graphical interface for the GNU gdb debugger.
Summary(ja): GNU gdbデバッガ用 Xウィンドウシステム・グラフィカルインタフェース
Name: xxgdb
Version: 1.12
Release: 18%{?_dist_release}
License: MIT
Source0: ftp://ftp.x.org/contrib/utilities/xxgdb-1.12.tar.gz
Source1: xxgdb.png
Patch100: xxgdb-1.12-I18N_mb-1.1.patch
Patch101: xxgdb-1.12-I18N_mb-1.2.patch
Patch103: xxgdb-1.12-Unix98.patch
Patch104: xxgdb-1.12-SYSV.patch

Group: Applications/Development
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glibc-common
BuildRequires: imake
BuildRequires: libX11-devel, libICE-devel, libSM-devel, libXext-devel
BuildRequires: libXmu-devel, libXt-devel
BuildRequires: libXaw-devel >= 1.0.5
Requires: gdb

%description
Xxgdb is an X Window System graphical interface to the GNU gdb
debugger.  Xxgdb provides visual feedback and supports a mouse
interface for the user who wants to perform debugging tasks like the
following: controlling program execution through breakpoints,
examining and traversing the function call stack, displaying values of
variables and data structures, and browsing source files and
functions.

Install the xxgdb package if you'd like to use a graphical interface
with the GNU gdb debugger.  You'll also need to have the gdb package
installed.

%description -l ja
Xxgdb は GNU gdb デバッガに対応する X ウィンドウシステム・グラフィカル
インタフェースです。Xxgdb ではビジュアルに応答を調べることができ、そし
て、以下のようなデバック処理を行いたいユーザに対しマウスインタフェース
をサポートします; 
 - ブレークポイントを通してプログラムの実行を制御する、
 - 関数呼出のスタックを試験、移動する
 - 変数やデータ構造体の値を表示する
 - ソースファイルや関数をブラウズする

もし GNU gdb デバッガと一緒にそのグラフィカルなインタフェースを利用した
いなら、xxgdb パッケージをインストールして下さい。また、gdb パッケージ
を別にインストールする必要があります。

%prep
%setup -q -n xxgdb-1.12
%patch100 -p1 -b .I18N_mb
%patch101 -p1 -b .I18N-mb2
%patch103 -p1 -b .Unix98
%patch104 -p1 -b .SYSV


%build
xmkmf
make

%install
rm -rf $RPM_BUILD_ROOT
make install install.man \
	DESTDIR=$RPM_BUILD_ROOT \
	CONFDIR=%{_datadir}/X11 \
	XAPPLOADDIR=%{_datadir}/X11/app-defaults \
	MANPATH=%{_mandir} \

cat > %{name}.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=xxgdb
Name[ja]=xxgdb C/C++ デバッガ
Comment=X11 gdb wrapper
Comment[ja]=日本語ソースを扱える C/C++ デバッガです
Icon=xxgdb.xpm
Terminal=false
Exec=xxgdb %F
Type=Application
Categories=Application;Development;
EOF

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
install -m644 %{name}.desktop $RPM_BUILD_ROOT%{_datadir}/applications/

mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
cp %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/pixmaps/

rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/X11

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/xxgdb
%{_datadir}/X11/app-defaults/XDbx
%{_mandir}/man1/xxgdb.*
%{_datadir}/pixmaps/xxgdb.png
%config(missingok) %{_datadir}/applications/xxgdb.desktop

%changelog
* Sat Apr 23 2011 Shu KONNO <owa@bg.wakwak.com> 1.12-18
- rebuilt with rpm-4.8.1-3

* Wed Feb 17 2010 Shu KONNO <owa@bg.wakwak.com> 1.12-17
- rebuilt with new environment

* Sun Apr 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.12-16
- changed Group to Applications/Development

* Sun Nov 09 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.12-15
- rebuild with libXaw.so.7 (libXaw-1.0.5)

* Sun Jun 08 2008 Shu KONNO <owa@bg.wakwak.com> 1.12-14vl5
- applied new versioning policy and utf-8
- added BuildRequires: xorg-x11-devel imake
- dropt Patch0: xxgdb-1.08-glibc.patch
- dropt Patch1: xxgdb-1.12-sysv.patch
- dropt Patch2: xxgdb-1.12-compat21.patch
- added Patch104: xxgdb-1.12-SYSV.patch

* Sat Jan 05 2008 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl10
- updated xxgdb.desktop
- add xxgdb.png

* Wed Jul 12 2006 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl9
- rebuild

* Sat Jul 30 2005 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl8
- rebuilt with kernel-2.6.12
- dropt xxgdb-1.12-cannot-open.patch
- added xxgdb-1.12-Unix98.patch

* Wed Dec 01 2004 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl7
- rebuilt

* Sun May 02 2004 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl6
- changed url to 'ftp://ftp.x.org/contrib/utilities/'
- replaced specs, 'Copyright' to 'License'
- added xxgdb-1.12-cannot-open.patch

* Sun Jan  6 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 1.12-13vl4
- rebuilt for VineSeed

* Sat Jan 05 2002 Shu KONNO <owa@bg.wakwak.com> 1.12-13vl3
- added xxgdb-1.12-I18N_mb-1.2.patch

* Thu Jul 13 2000 Masato Bito <masato@nets.ce.hiroshima-cu.ac.jp>
- 1.12-13vl2
- modified %patch1 -p1 -> %patch1 -p0
- modified BuildRoot:

* Fri May 19 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- sync with RH 6.2
- added I18N patch

* Mon Feb 07 2000 Preston Brown <pbrown@redhat.com>
- wmconfig -> desktop

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix description

* Fri Jan 14 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for Red Hat 6.2.

* Wed Mar 23 1999 Michael Maher <mike@redhat.com>
- added requires for gdb

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 9)

* Sun Jan 17 1999 Jeff Johnson <jbj@redhat.com>
- patch around i386 wchar_t glibc-2.1 typedef.

* Wed Jul 29 1998 Jeff Johnson <jbj@redhat.com>
- change wmconfig group to utilities
- build root

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Mon Feb  9 1998 Otto Hammersmith <otto@redhat.com>
- fixed wmconfig entry

* Tue Oct 21 1997 Otto Hammersmith <otto@redhat.com>
- fixed src url
- added wmconfig entries
- removed prefix line ... can't have it with wmconfig file :(

* Fri Aug 22 1997 Erik Troan <ewt@redhat.com>
- built against glibc
