%global ver 6.8-1 Name: insight Version: %(echo %{ver} | tr - .) Release: 3%{?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 Source1: insight.desktop Source2: insight.1 Patch1: insight-6.8-warnings.patch Patch2: insight-6.8-destdir.patch Patch3: insight-6.8-derefbug.patch Patch4: insight-6.8-gcc43.patch Patch5: insight-6.8-ia64bound.patch Patch6: insight-6.8-itcl33.patch Patch7: insight-6.8-syspackages.patch Patch8: insight-6.8-relocate.patch Patch9: insight-6.8-readline-system.patch Patch10: insight-6.8-tclm4.patch Patch11: insight-6.8-lib64.patch Patch12: insight-6.8-gcc44.patch Patch13: insight-6.8-doubleinstall.patch Patch14: insight-6.8-readline6.patch Patch15: insight-6.8.1-baseclassfield.patch Patch16: insight-6.8.1-sbrk.patch Patch17: insight-6.8.1-gcc45.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: iwidgets BuildRequires: tcl-devel BuildRequires: tk-devel BuildRequires: itcl-devel >= 3.3 BuildRequires: itk-devel >= 3.3 BuildRequires: iwidgets BuildRequires: ncurses-devel BuildRequires: readline-devel >= 6.0 BuildRequires: expat-devel BuildRequires: ImageMagick BuildRequires: desktop-file-utils BuildRequires: automake BuildRequires: autoconf BuildRequires: bison %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 .warnings %patch2 -p1 -b .destdir %patch3 -p1 -b .derefbug %patch4 -p1 -b .gcc43 %patch5 -p1 -b .ia64bound %patch6 -p1 -b .itcl33 %patch7 -p1 -b .syspackages %patch8 -p1 -b .relocate %patch9 -p1 -b .readline-system %patch10 -p1 -b .tclm4 %patch11 -p1 -b .lib64 %patch12 -p1 -b .gcc44 %patch13 -p1 -b .doubleinstall %patch14 -p1 -b .readline6 %patch15 -p1 -b .baseclassfield %patch16 -p1 -b .sbrk %patch17 -p1 -b .gcc45 #------------------------------------------------------------------------------- %build #------------------------------------------------------------------------------- rm -rf itcl tcl tk readline # Patches "syspackages" and "relocate" requires some autotools rebuilds. for location in gdb/gdbtk/plugins libgui do ( cd $location aclocal automake autoconf ) done # Patch "readline-system" requires autoconf ( cd gdb autoconf ) # Get inclusion paths. . "%{_libdir}/tclConfig.sh" . "%{_libdir}/tkConfig.sh" # Bug in itcl/itk >= 3.3: no way to determine the include path. # Hack configure here. export ac_cv_c_itclh="%{_includedir}" export ac_cv_c_itkh="%{_includedir}" # We do our best here to have host=target, since this enables native mode, # thus local unix process debugging. We also try not to # cross-compile. # The ix86 processor family is the problem here. %ifarch %{ix86} %define test1 "%{_host_cpu}" == "i386" || "%{_host_cpu}" == "i486" %define test2 "%{_host_cpu}" == "i686" || "%{_host_cpu}" == "pentium3" %define test3 "%{_host_cpu}" == "pentium4" || "%{_host_cpu}" == "athlon" %if %{test1} || %{test2} || %{test3} %define test1 "%{_build_cpu}" == "i386" || "%{_build_cpu}" == "i486" %define test2 "%{_build_cpu}" == "i686" || "%{_build_cpu}" == "pentium3" %define test3 "%{_build_cpu}" == "pentium4" || "%{_build_cpu}" == "athlon" %if %{test1} || %{test2} || %{test3} %define _build %{_target_platform} %endif %define _host %{_target_platform} %endif %endif %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}" \ %ifarch ia64 --with-libunwind \ %else --without-libunwind \ %endif %{_target_platform} 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 rm -f .%{_bindir}/gdbtui rm -f .%{_bindir}/gdbserver rm -rf .%{_includedir} rm -f .%{_libdir}/*.a rm -f .%{_libdir}/*.la rm -f .%{_libdir}/*.sh 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 \ --vendor "fedora" \ --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 #------------------------------------------------------------------------------- * Mon Sep 27 2010 Patrick Monnerat <pm@datasphere.ch> 6.8.1-3 - Patch "gcc45" to fix gcc 4.5 errors on incompatible enums. https://bugzilla.redhat.com/show_bug.cgi?id=631116 * 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.