Blob Blame History Raw
%global ver	7.4.50
%global snap	20120403

#	CVS snapshots are produced as follows:
#
#	mkdir insight-snapshot
#	cd insight-snapshot
#	cvs -z9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
#	(Password: anonymous)
#	cvs -z9 -d :pserver:anoncvs@sourceware.org:/cvs/src export	\
#		-D '2012-04-03 09:00' insight
#	mv src insight-%{ver}
#	tar cJf insight-%{ver}.tar.xz insight-%{ver}

Name:		insight
Version:	%(echo %{ver} | tr - .)
Release:	10.%{snap}cvs%{?dist}
Summary:	Graphical debugger based on GDB
License:	GPLv3+
Group:		Development/Debuggers
Url:		http://sources.redhat.com/insight/
# Source0:	ftp://sourceware.org/pub/insight/releases/insight-%{ver}.tar.bz2
Source0:	insight-%{ver}.tar.xz
Source1:	insight.desktop
Source2:	insight.1
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:	iwidgets
Provides:	bundled(binutils) = %{snap}
Provides:	bundled(gnulib) = %{snap}
Provides:	bundled(libiberty) = %{snap}
Provides:	bundled(md5-gcc) = %{snap}
BuildRequires:	tcl-devel%{?_isa}
BuildRequires:	tk-devel%{?_isa}
BuildRequires:	itcl-devel%{?_isa} >= 3.3
BuildRequires:	itk-devel%{?_isa} >= 3.3
BuildRequires:	iwidgets
BuildRequires:	ncurses-devel%{?_isa}
BuildRequires:	readline-devel%{?_isa} >= 6.0
BuildRequires:	expat-devel%{?_isa}
BuildRequires:	python-devel%{?_isa}
BuildRequires:	ImageMagick%{?_isa}
BuildRequires:	desktop-file-utils%{?_isa}
BuildRequires:	autogen%{?_isa}
BuildRequires:	automake
BuildRequires:	autoconf
BuildRequires:	bison%{?_isa}
BuildRequires:	flex%{?_isa}
BuildRequires:	texinfo%{?_isa}
Patch1:		insight-7.4.50-relocate.patch
Patch2:		insight-7.4.50-readline-system.patch
Patch3:		insight-7.4.50-unbundle.patch
Patch4:		insight-7.4.50-acversion.patch
Patch5:		insight-7.4.50-sig2dead.patch
Patch6:		insight-7.4.50-sizesizet.patch
Patch7:		insight-7.4.50-objalloc.patch
Patch8:		insight-7.4.50-bz883591.patch
Patch9:		insight-7.4.50-nocygnus.patch
Patch10:	insight-7.4.50-texinfo5.patch

#	Some patches from gdb.

Patch100:	gdb-6.3-ppc64syscall-20040622.patch
Patch101:	gdb-6.3-ppc64displaysymbol-20041124.patch
Patch102:	gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
Patch103:	gdb-6.6-scheduler_locking-step-is-default.patch
Patch104:	gdb-6.3-gstack-20050411.patch
Patch105:	gdb-6.3-gcore-thread-20050204.patch
Patch106:	gdb-6.3-ia64-gcore-page0-20050421.patch
Patch107:	insight-7.4.50-security-errata-20050610.patch
Patch108:	gdb-6.3-ia64-sigtramp-frame-20050708.patch
Patch109:	gdb-6.3-ia64-gcore-speedup-20050714.patch
Patch110:	gdb-6.3-ia64-info-frame-fix-20050725.patch
Patch111:	insight-7.4.50-readnever-20050907.patch
Patch112:	gdb-6.3-ia64-sigill-20051115.patch
Patch113:	gdb-6.5-bz203661-emit-relocs.patch
Patch114:	gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
Patch115:	insight-7.4.50-bz216711-clone-is-outermost.patch
Patch116:	gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
Patch117:	gdb-6.3-bz231832-obstack-2gb.patch
Patch118:	gdb-6.6-bz235197-fork-detach-info.patch
Patch119:	gdb-6.6-bfd-vdso8k.patch
Patch120:	gdb-6.8-sparc64-silence-memcpy-check.patch
Patch121:	gdb-6.8-bz436037-reg-no-longer-active.patch
Patch122:	gdb-6.8-quit-never-aborts.patch
Patch123:	gdb-core-open-vdso-warning.patch
Patch124:	gdb-x86_64-i386-syscall-restart.patch
Patch125:	gdb-bz533176-fortran-omp-step.patch
Patch126:	gdb-follow-child-stale-parent.patch
Patch127:	insight-7.4.50-fortran-common-reduce.patch
Patch128:	insight-7.4.50-fortran-common.patch
Patch129:	insight-7.4.50-bz541866-rwatch-before-run.patch
Patch130:	gdb-moribund-utrace-workaround.patch
Patch131:	gdb-bz562763-pretty-print-2d-vectors.patch
Patch132:	gdb-gdb-add-index-script.patch
Patch133:	gdb-bz568248-oom-is-error.patch
Patch134:	gdb-bz623749-gcore-relro.patch
Patch135:	gdb-bz592031-siginfo-lost-4of5.patch
Patch136:	insight-7.4.50-bz592031-siginfo-lost-5of5.patch
Patch137:	gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Patch138:	gdb-glibc-vdso-workaround.patch
Patch139:	insight-7.4.50-x86-onstack-1of2.patch
Patch140:	gdb-x86-onstack-2of2.patch

#	Patches to apply after gdb patches.

Patch200:	insight-7.4.50-structsiginfo.patch


%description
 Insight is a tight graphical user interface to GDB written in Tcl/Tk.
It provides a comprehensive interface that enables users to harness
most of GDB's power. It's also probably the only up-to-date UI for
GDB version 6.x.


#-------------------------------------------------------------------------------
%prep 
#-------------------------------------------------------------------------------

%setup -q -n insight-%{ver}

%patch1 -p1 -b .relocate
%patch2 -p1 -b .readline-system
%patch3 -p1 -b .unbundle
%patch4 -p1 -b .acversion
%patch5 -p1 -b .sig2dead
%patch6 -p1 -b .sizesizet
%patch7 -p1 -b .objalloc
%patch8 -p1 -b .bz883591
%patch9 -p1 -b .nocygnus
%patch10 -p1 -b .texinfo5

%patch100 -p 1 -b .ppc64syscall
%patch101 -p 1 -b .ppc64displaysymbol
%patch102 -p 1 -b .scheduler_locking-step-sw-watchpoints2
%patch103 -p 1 -b .scheduler_locking-step-is-default
%patch104 -p 1 -b .gstack
%patch105 -p 1 -b .gcore-thread
%patch106 -p 1 -b .ia64-gcore-page0
%patch107 -p 1 -b .security-errata
%patch108 -p 1 -b .ia64-sigtramp-frame
%patch109 -p 1 -b .ia64-gcore-speedup
%patch110 -p 1 -b .ia64-info-frame-fix
%patch111 -p 1 -b .readnever
%patch112 -p 1 -b .ia64-sigill
%patch113 -p 1 -b .bz203661-emit-relocs
%patch114 -p 1 -b .bz185337-resolve-tls-without-debuginfo-v2
%patch115 -p 1 -b .bz216711-clone-is-outermost
%patch116 -p 1 -b .bz218379-solib-trampoline-lookup-lock-fix
%patch117 -p 1 -b .bz231832-obstack-2gb
%patch118 -p 1 -b .bz235197-fork-detach-info
%patch119 -p 1 -b .bfd-vdso8k
%patch120 -p 1 -b .sparc64-silence-memcpy-check
%patch121 -p 1 -b .bz436037-reg-no-longer-active
%patch122 -p 1 -b .quit-never-aborts
%patch123 -p 1 -b .core-open-vdso-warning
%patch124 -p 1 -b .x86_64-i386-syscall-restart
%patch125 -p 1 -b .bz533176-fortran-omp-step
%patch126 -p 1 -b .follow-child-stale-parent
%patch127 -p 1 -b .fortran-common-reduce
%patch128 -p 1 -b .fortran-common
%patch129 -p 1 -b .bz541866-rwatch-before-run
%patch130 -p 1 -b .moribund-utrace-workaround
%patch131 -p 1 -b .bz562763-pretty-print-2d-vectors
%patch132 -p 1 -b .gdb-add-index-script
%patch133 -p 1 -b .bz568248-oom-is-error
%patch134 -p 1 -b .bz623749-gcore-relro
%patch135 -p 1 -b .bz592031-siginfo-lost-4of5
%patch136 -p 1 -b .bz592031-siginfo-lost-5of5
%patch137 -p 1 -b .sparc-add-workaround-to-broken-debug-files
%patch138 -p 1 -b .glibc-vdso-workaround
%patch139 -p 1 -b .x86-onstack-1of2
%patch140 -p 1 -b .x86-onstack-2of2

%patch200 -p 1 -b .structsiginfo


#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------

TOPDIR=`pwd`
rm -rf itcl tcl tk readline

#	Need a complete reconfiguration after unbundling.

autogen Makefile.def
autoreconf

#	Patch requires some autotools rebuilds.

for location in gdb/gdbtk/plugins libgui
do	(
		cd $location
		aclocal -I "${TOPDIR}/config"
		automake
		autoconf
	)
done

#	Patch "readline-system" requires autoconf

(
	cd gdb
	aclocal -I "${TOPDIR}/config" -I gnulib/m4
	autoconf
)

#	Get inclusion paths.

. "%{_libdir}/tclConfig.sh"
. "%{_libdir}/tkConfig.sh"

%configure	--enable-gdbtk						\
		--enable-sim						\
		--disable-rpath						\
		--with-separate-debug-dir=/usr/lib/debug		\
		--with-system-readline					\
		--with-expat						\
		--with-tclinclude="${TCL_SRC_DIR}"			\
		--with-tkinclude="${TK_SRC_DIR}"			\
		--with-python=yes					\
%ifarch ia64
		--with-libunwind					\
%else
		--without-libunwind					\
%endif

make %{?_smp_mflags}


#-------------------------------------------------------------------------------
%install
#-------------------------------------------------------------------------------

rm -rf "${RPM_BUILD_ROOT}"

INSTALL="install -p"

make DESTDIR="${RPM_BUILD_ROOT}" INSTALL="${INSTALL}" install

#	Removes unnecessary stuff.

(
	cd	"${RPM_BUILD_ROOT}"

	rm -f .%{_bindir}/gdb-add-index
	rm -f .%{_bindir}/gdb
	rm -f .%{_bindir}/gdbtui
	rm -f .%{_bindir}/gdbserver
	rm -f .%{_bindir}/gstack
	rm -rf .%{_datadir}/gdb

	rm -rf .%{_includedir}

	rm -f .%{_libdir}/*.a
	rm -f .%{_libdir}/*.la
	rm -f .%{_libdir}/*.sh
	rm -f .%{_libdir}/libinproctrace.so

	rm -rf .%{_prefix}/man
	rm -rf .%{_datadir}/man

	rm -rf .%{_datadir}/info
	rm -rf .%{_datadir}/locale
)

#	Regenerate the libgui pkgIndex.tcl file.

echo "pkg_mkIndex \"${RPM_BUILD_ROOT}%{_datadir}/insight/gui\"" | tclsh

#	Install man file.

${INSTALL} -m 755 -d "${RPM_BUILD_ROOT}%{_mandir}/man1"
${INSTALL} -m 644 -p "%{SOURCE2}" "${RPM_BUILD_ROOT}%{_mandir}/man1/"

#	Create the menu entry.

${INSTALL} -m 755 -d "${RPM_BUILD_ROOT}%{_datadir}/applications"
desktop-file-install							\
	--dir		"${RPM_BUILD_ROOT}%{_datadir}/applications"	\
	"%{SOURCE1}"

#	Install icon.

${INSTALL} -m 755 -d "${RPM_BUILD_ROOT}%{_datadir}/pixmaps"
convert "gdb/gdbtk/library/images/gdbtk_icon.gif"			\
	"${RPM_BUILD_ROOT}%{_datadir}/pixmaps/%{name}.png"


#-------------------------------------------------------------------------------
%clean 
#-------------------------------------------------------------------------------

rm -rf "${RPM_BUILD_ROOT}"


#-------------------------------------------------------------------------------
%files
#-------------------------------------------------------------------------------

%defattr(-, root, root, -)
%doc gdb/NEWS gdb/gdbtk/README gdb/gdbtk/plugins/HOW-TO include/COPYING3
%{_bindir}/*
%{_datadir}/insight
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_mandir}/man*/*


#-------------------------------------------------------------------------------
%changelog
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.50-10.20120403cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

#-------------------------------------------------------------------------------

* Wed Jul  3 2013 Patrick Monnerat <pm@datasphere.ch> 7.4.50-9.20120403cvs
- Patch "texinfo5" to adapt doc to texinfo version 5.

* Wed Jul  3 2013 Patrick Monnerat <pm@datasphere.ch> 7.4.50-8.20120403cvs
- Compress snapshot tar archive with xz.
  https://bugzilla.redhat.com/show_bug.cgi?id=980597

* Fri Feb 15 2013 Patrick Monnerat <pm@datasphere.ch> 7.4.50-7.20120403cvs
- Patch "nocygnus" to replace automake option "cygnus" by "foreign no-dist".

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.50-6.20120403cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Dec  5 2012 Patrick Monnerat <pm@datasphere.ch> 7.4.50-5.20120403cvs
- Patch "bz883591" to fix a segmentation fault.
  https://bugzilla.redhat.com/show_bug.cgi?id=883591

* Thu Nov 15 2012 Patrick Monnerat <pm@datasphere.ch> 7.4.50-4.20120403cvs
- Path "objalloc" to fix libiberty security bug CVE-2012-3509.
  https://bugzilla.redhat.com/show_bug.cgi?id=877014
- Enable Python to support STL extensions.
  https://bugzilla.redhat.com/show_bug.cgi?id=865554

* Fri Jul 20 2012 Patrick Monnerat <pm@datasphere.ch> 7.4.50-3.20120403cvs
- Patch "structsiginfo" to replace occurrences of "struct siginfo" by
  "siginfo_t".

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4.50-2.20120403cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Apr  3 2012 Patrick Monnerat <pm@datasphere.ch> 7.4.50-1.20120403cvs
- New cvs snapshot.
- Patches imported or adapted from gdb package.
- Patch "sig2dead" to avoid a segfault while notifying a signal to a dead
  process.
  http://sourceware.org/ml/insight/2012-q2/msg00002.html
- Patch "sizesizet" to fix a type mismatch between print format descriptors and
  corresponding argument.
  http://sourceware.org/ml/insight/2012-q2/msg00003.html

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb  9 2011 Patrick Monnerat <pm@datasphere.ch> 6.8.1-4
- Patch "unused" to suppress "variable set but not used" errors.
- Patch "gcc45" to fix gcc 4.5 errors on incompatible enums.
  https://bugzilla.redhat.com/show_bug.cgi?id=631116

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jan 13 2010 Patrick Monnerat <pm@datasphere.ch> 6.8.1-2
- Patch "sbrk" to enable sbrk() prototype on F13.

* Wed Jan 13 2010 Patrick Monnerat <pm@datasphere.ch> 6.8.1-1
- New version.
- Patch "baseclassfield" to fix bug BZ 551126.
- Start a terminal for standard IO when invoked through desktop file.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 15 2009 Patrick Monnerat <pm@datasphere.ch> 6.8-8
- Fix bug #511501: combobox.tcl installed twice causes build failure.
- Patch "readline6" to use system readline version 6.

* Mon Mar  2 2009 Patrick Monnerat <pm@datasphere.ch> 6.8-7
- Removed libXft-devel build requirement.
- .desktop file categories fixed.

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 18 2009 Patrick Monnerat <pm@datasphere.ch> 6.8-5
- Patch "gcc44" to make it compilable with gcc 4.4.
- Build converts image format using ImageMagick instead of gif2png.
- Add build requirement of libXft-devel as a temporary workaround for missing
  dependence of tk-devel on it.

* Mon Oct 13 2008 Patrick Monnerat <pm@datasphere.ch> 6.8-4
- X-Fedora application category removed.
- Force option -p of install.

* Thu Oct  9 2008 Patrick Monnerat <pm@datasphere.ch> 6.8-3
- Patch "lib64" to enable tcl/tk/itcl/itk searches also in */lib64.

* Wed Oct  8 2008 Patrick Monnerat <pm@datasphere.ch> 6.8-2
- Patch "tclm4" to define tcl/tk autoconf macros in gdbtk/plugins directory.
- Use system readline.
- Force expat use.

* Thu Aug 14 2008 Patrick Monnerat <pm@datasphere.ch> 6.8-1
- Initial package.
- Patch "warnings" to suppress compilation warnings, since these abort rpmbuild.
- Patch "destdir" to properly install files when DESTDIR is defined.
- Patch "derefbug" to fix an address/value confusion bug.
- Patch "gcc43" to satisfy extra checks of gcc compiler version 4.3.
- Patch "ia64bound" to fix an array index out-of-bound bug in IA64
  specific code.
- Patch "itcl33" to migrate all code to itcl/itk version 3.3.
- Patch "syspackages" to use system-installed packages tck, tk, itcl, itk and
  iwidgets.
- Patch "relocate" to move all datadir/subdir stuff into datadir/insight (incl.
  libgui, that ought to be an external package). Non-binary libdir/* is also
  moved.