summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2013-02-04 07:16:04 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2013-02-04 07:16:04 +0000
commit14b2d8f50abc0dff761c011882eba6647070faa6 (patch)
tree611fabb0265b3fba38bede0fae6a0c572e6bd74b /dev-util
parentsci-libs/minfx: Bump to new python eclasses (diff)
downloadgentoo-2-14b2d8f50abc0dff761c011882eba6647070faa6.tar.gz
gentoo-2-14b2d8f50abc0dff761c011882eba6647070faa6.tar.bz2
gentoo-2-14b2d8f50abc0dff761c011882eba6647070faa6.zip
Fix building with tcl-6.0 and glibc-2.16. Fixes #452820, #441036. Thanks to Helmut Jarausch <jarausch@igpm.rwth-aachen.de> and Ian Abbott <ian@abbott.org> for their patches. Drop old
(Portage version: 2.2.0_alpha150/cvs/Linux x86_64, signed Manifest commit with key 0x5D21B852895192F9)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/insight/ChangeLog11
-rw-r--r--dev-util/insight/files/insight-6.6-DESTDIR.patch187
-rw-r--r--dev-util/insight/files/insight-6.6-burn-paths.patch11
-rw-r--r--dev-util/insight/files/tkImgGIF.patch63
-rw-r--r--dev-util/insight/insight-6.7.1-r1.ebuild76
-rw-r--r--dev-util/insight/insight-6.8.1-r1.ebuild107
6 files changed, 117 insertions, 338 deletions
diff --git a/dev-util/insight/ChangeLog b/dev-util/insight/ChangeLog
index 080c2cd81972..83958f891ff9 100644
--- a/dev-util/insight/ChangeLog
+++ b/dev-util/insight/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-util/insight
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/insight/ChangeLog,v 1.55 2013/02/03 11:41:12 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/insight/ChangeLog,v 1.56 2013/02/04 07:16:04 xarthisius Exp $
+
+*insight-6.8.1-r1 (04 Feb 2013)
+
+ 04 Feb 2013; Kacper Kowalik <xarthisius@gentoo.org> +insight-6.8.1-r1.ebuild,
+ -files/insight-6.6-DESTDIR.patch, -files/insight-6.6-burn-paths.patch,
+ -files/tkImgGIF.patch, -insight-6.7.1-r1.ebuild:
+ Fix building with tcl-6.0 and glibc-2.16. Fixes #452820, #441036. Thanks to
+ Helmut Jarausch <jarausch@igpm.rwth-aachen.de> and Ian Abbott <ian@abbott.org>
+ for their patches. Drop old
03 Feb 2013; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Cleanup due #453094
diff --git a/dev-util/insight/files/insight-6.6-DESTDIR.patch b/dev-util/insight/files/insight-6.6-DESTDIR.patch
deleted file mode 100644
index 50db957f54e6..000000000000
--- a/dev-util/insight/files/insight-6.6-DESTDIR.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-Index: itcl/itcl/Makefile.in
-===================================================================
-RCS file: /cvs/src/src/itcl/itcl/Makefile.in,v
-retrieving revision 1.5
-diff -u -p -r1.5 Makefile.in
---- itcl/itcl/Makefile.in 1 Sep 2005 05:32:08 -0000 1.5
-+++ itcl/itcl/Makefile.in 7 Mar 2007 23:26:29 -0000
-@@ -272,16 +272,16 @@ install-binaries: binaries install-lib-b
- #========================================================================
-
- install-libraries: libraries
-- $(mkinstalldirs) $(includedir)
-- @echo "Installing header files in $(includedir)"
-+ $(mkinstalldirs) $(DESTDIR)$(includedir)
-+ @echo "Installing header files in $(DESTDIR)$(includedir)"
- @for i in $(GENERIC_HDRS) ; do \
- echo "Installing $$i" ; \
-- $(INSTALL_DATA) $$i $(includedir) ; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
- done;
-- @echo "Installing library files in $(ITCL_LIBRARY)"
-+ @echo "Installing library files in $(DESTDIR)$(ITCL_LIBRARY)"
- @for i in $(srcdir)/library/*.tcl ; do \
- echo "Installing $$i" ; \
-- $(INSTALL_DATA) $$i $(ITCL_LIBRARY) ; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(ITCL_LIBRARY) ; \
- done;
-
- #========================================================================
-@@ -290,14 +290,14 @@ install-libraries: libraries
- #========================================================================
-
- install-doc: doc
-- $(mkinstalldirs) $(mandir)/mann
-- @echo "Installing man pages in $(mandir)"
-+ $(mkinstalldirs) $(DESTDIR)$(mandir)/mann
-+ @echo "Installing man pages in $(DESTDIR)$(mandir)"
- @cd $(srcdir)/doc; for i in *.n; \
- do \
- echo "Installing $$i"; \
- sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-- $$i > $(mandir)/mann/$$i; \
-- chmod 444 $(mandir)/mann/$$i; \
-+ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
-+ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
- done
-
- test: $(TCLSH_PROG)
-@@ -447,7 +447,7 @@ install-lib-binaries: installdirs
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
-+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
-
- #========================================================================
- # Install binary executables (e.g. .exe files)
-@@ -485,7 +485,7 @@ installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
-- $(mkinstalldirs) $(ITCL_LIBRARY)
-+ $(mkinstalldirs) $(DESTDIR)$(ITCL_LIBRARY)
-
- .PHONY: all binaries clean depend distclean doc install installdirs \
- libraries test
-Index: itcl/itk/Makefile.in
-===================================================================
-RCS file: /cvs/src/src/itcl/itk/Makefile.in,v
-retrieving revision 1.5
-diff -u -p -r1.5 Makefile.in
---- itcl/itk/Makefile.in 1 Sep 2005 05:32:09 -0000 1.5
-+++ itcl/itk/Makefile.in 7 Mar 2007 23:26:29 -0000
-@@ -267,16 +267,16 @@ install-binaries: binaries install-lib-b
- #========================================================================
-
- install-libraries: libraries
-- $(mkinstalldirs) $(includedir)
-- @echo "Installing header files in $(includedir)"
-+ $(mkinstalldirs) $(DESTDIR)$(includedir)
-+ @echo "Installing header files in $(DESTDIR)$(includedir)"
- @for i in $(GENERIC_HDRS) ; do \
- echo "Installing $$i" ; \
-- $(INSTALL_DATA) $$i $(includedir) ; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
- done;
-- @echo "Installing library files in $(ITK_LIBRARY)"
-+ @echo "Installing library files in $(DESTDIR)$(ITK_LIBRARY)"
- @for i in $(srcdir)/library/*.* $(srcdir)/library/tclIndex ; do \
- echo "Installing $$i" ; \
-- $(INSTALL_DATA) $$i $(ITK_LIBRARY) ; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(ITK_LIBRARY) ; \
- done;
-
- #========================================================================
-@@ -285,14 +285,14 @@ install-libraries: libraries
- #========================================================================
-
- install-doc: doc
-- $(mkinstalldirs) $(mandir)/mann
-- @echo "Installing man pages in $(mandir)"
-+ $(mkinstalldirs) $(DESTDIR)$(mandir)/mann
-+ @echo "Installing man pages in $(DESTDIR)$(mandir)"
- @cd $(srcdir)/doc; for i in *.n; \
- do \
- echo "Installing $$i info $(mandir)/mann"; \
- sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
-- $$i > $(mandir)/mann/$$i; \
-- chmod 444 $(mandir)/mann/$$i; \
-+ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
-+ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
- done
-
- test: $(TCLSH_PROG)
-@@ -421,7 +421,7 @@ install-lib-binaries: installdirs
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
-- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
-+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
-
- #========================================================================
- # Install binary executables (e.g. .exe files)
-@@ -459,7 +459,7 @@ installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
-- $(mkinstalldirs) $(ITK_LIBRARY)
-+ $(mkinstalldirs) $(DESTDIR)$(ITK_LIBRARY)
-
- .PHONY: all binaries clean depend distclean doc install installdirs \
- libraries test
-Index: itcl/iwidgets/Makefile.in
-===================================================================
-RCS file: /cvs/src/src/itcl/iwidgets/Makefile.in,v
-retrieving revision 1.2
-diff -u -p -r1.2 Makefile.in
---- itcl/iwidgets/Makefile.in 25 Feb 2003 00:42:12 -0000 1.2
-+++ itcl/iwidgets/Makefile.in 7 Mar 2007 23:26:29 -0000
-@@ -36,13 +36,13 @@ bindir = @bindir@
- # to be different than those used for actually reference files at
- # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
- # when installing files.
--INSTALL_ROOT =
-+INSTALL_ROOT = $(DESTDIR)
-
- # Path name to use when installing library scripts:
-
- # REDHAT LOCAL
- #SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION)
--SCRIPT_INSTALL_DIR = @datadir@/iwidgets$(IWIDGETS_VERSION)
-+SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)@datadir@/iwidgets$(IWIDGETS_VERSION)
- # END REDHAT LOCAL
-
- # Directory in which to install the archive libtcl.a:
-Index: tcl/unix/Makefile.in
-===================================================================
-RCS file: /cvs/src/src/tcl/unix/Makefile.in,v
-retrieving revision 1.7
-diff -u -p -r1.7 Makefile.in
---- tcl/unix/Makefile.in 21 Jan 2003 19:40:18 -0000 1.7
-+++ tcl/unix/Makefile.in 7 Mar 2007 23:26:29 -0000
-@@ -38,7 +38,7 @@ mandir = @mandir@
- # to be different than those used for actually reference files at
- # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
- # when installing files.
--INSTALL_ROOT =
-+INSTALL_ROOT = $(DESTDIR)
-
- # Path for the platform independent Tcl scripting libraries:
- # REDHAT LOCAL
-Index: tk/unix/Makefile.in
-===================================================================
-RCS file: /cvs/src/src/tk/unix/Makefile.in,v
-retrieving revision 1.8
-diff -u -p -r1.8 Makefile.in
---- tk/unix/Makefile.in 21 Jan 2003 20:24:51 -0000 1.8
-+++ tk/unix/Makefile.in 7 Mar 2007 23:26:30 -0000
-@@ -41,7 +41,7 @@ mandir = @mandir@
- # to be different than those used for actually reference files at
- # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
- # when installing files.
--INSTALL_ROOT =
-+INSTALL_ROOT = $(DESTDIR)
-
- # Directory from which applications will reference the library of Tcl
- # scripts (note: you can set the TK_LIBRARY environment variable at
diff --git a/dev-util/insight/files/insight-6.6-burn-paths.patch b/dev-util/insight/files/insight-6.6-burn-paths.patch
deleted file mode 100644
index 261370640b16..000000000000
--- a/dev-util/insight/files/insight-6.6-burn-paths.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- tcl/unix/Makefile.in.orig 2007-03-07 19:36:22.000000000 -0500
-+++ tcl/unix/Makefile.in 2007-03-07 19:36:36.000000000 -0500
-@@ -1051,7 +1051,7 @@
- # END REDHAT LOCAL
-
- tclUnixInit.o: $(UNIX_DIR)/tclUnixInit.c $(GENERIC_DIR)/tclInitScript.h tclConfig.sh
-- $(CC) -c $(CC_SWITCHES) -DTCL_LIBRARY=\"\" \
-+ $(CC) -c $(CC_SWITCHES) -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \
- -DTCL_PACKAGE_PATH="\"${TCL_PACKAGE_PATH}\"" \
- $(UNIX_DIR)/tclUnixInit.c
-
diff --git a/dev-util/insight/files/tkImgGIF.patch b/dev-util/insight/files/tkImgGIF.patch
deleted file mode 100644
index e8a81f384f28..000000000000
--- a/dev-util/insight/files/tkImgGIF.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Index: generic/tkImgGIF.c
-===================================================================
-RCS file: /cvsroot/tktoolkit/tk/generic/tkImgGIF.c,v
-retrieving revision 1.24.2.5
-diff -u -r1.24.2.5 tkImgGIF.c
---- generic/tkImgGIF.c 11 Sep 2007 18:01:45 -0000 1.24.2.5
-+++ generic/tkImgGIF.c 25 Jan 2008 19:23:01 -0000
-@@ -826,6 +826,12 @@
- Tcl_PosixError(interp), (char *) NULL);
- return TCL_ERROR;
- }
-+
-+ if (initialCodeSize > MAX_LWZ_BITS) {
-+ Tcl_SetResult(interp, "malformed image", TCL_STATIC);
-+ return TCL_ERROR;
-+ }
-+
- if (transparent != -1) {
- cmap[transparent][CM_RED] = 0;
- cmap[transparent][CM_GREEN] = 0;
-Index: tests/imgPhoto.test
-===================================================================
-RCS file: /cvsroot/tktoolkit/tk/tests/imgPhoto.test,v
-retrieving revision 1.15.2.5
-diff -u -r1.15.2.5 imgPhoto.test
---- tests/imgPhoto.test 11 Sep 2007 18:01:46 -0000 1.15.2.5
-+++ tests/imgPhoto.test 25 Jan 2008 19:23:01 -0000
-@@ -681,6 +681,35 @@
- image delete $i
- }
-
-+test imgPhoto-14.4 {GIF buffer overflow} -setup {
-+ set i [image create photo]
-+} -body {
-+ # This crashes Tk up to 8.4.17 and 8.5.0
-+ $i configure -data {
-+ R0lGODlhCgAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/
-+ AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+ AAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBm
-+ mQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/
-+ AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMz
-+ mTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPM
-+ ADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYA
-+ mWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZ
-+ AGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/
-+ mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lm
-+ AJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnM
-+ mZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wz
-+ AMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZ
-+ mcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8A
-+ AP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9m
-+ mf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////
-+ AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAKAAoAABUSAAD/HEiwoMGD
-+ CBMqXMiwYcKAADs=
-+ }
-+} -cleanup {
-+ image delete $i
-+} -returnCodes error -result {malformed image}
-+
- test imgPhoto-15.1 {photo images can fail to allocate memory gracefully} \
- {nonPortable} {
- # This is not portable to very large machines with more around
diff --git a/dev-util/insight/insight-6.7.1-r1.ebuild b/dev-util/insight/insight-6.7.1-r1.ebuild
deleted file mode 100644
index 10329c1382a8..000000000000
--- a/dev-util/insight/insight-6.7.1-r1.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/insight/insight-6.7.1-r1.ebuild,v 1.6 2012/07/29 16:27:39 armin76 Exp $
-
-inherit eutils flag-o-matic
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-DESCRIPTION="A graphical interface to the GNU debugger"
-HOMEPAGE="http://sourceware.org/insight/"
-SRC_URI="ftp://sources.redhat.com/pub/${PN}/releases/${P}.tar.bz2"
-
-LICENSE="GPL-2 LGPL-2"
-[[ ${CTARGET} != ${CHOST} ]] \
- && SLOT="${CTARGET}" \
- || SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="nls"
-
-RDEPEND="sys-libs/ncurses
- x11-libs/libX11"
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${PN}-6.6-DESTDIR.patch
- epatch "${FILESDIR}"/${PN}-6.6-burn-paths.patch
-
- cd "${S}/tk"
- epatch "${FILESDIR}"/tkImgGIF.patch
-}
-
-src_compile() {
- append-flags -fno-strict-aliasing # tcl code sucks
- strip-linguas -u bfd/po opcodes/po
- econf \
- --disable-werror \
- $(use_enable nls) \
- --enable-gdbtk \
- --disable-tui \
- --datadir=/usr/share/${PN} \
- || die
- emake || die
-}
-
-src_install() {
- # the tcl-related subdirs are not parallel safe
- emake -j1 DESTDIR="${D}" install || die
-
- # Don't install docs when building a cross-insight
- if [[ ${CTARGET} == ${CHOST} ]] ; then
- dodoc gdb/gdbtk/{README,TODO}
- fi
-
- # the gui tcl code does not consider any of the configure
- # options given it ... instead, it requires the path to
- # be /usr/share/redhat/...
- mv "${D}"/usr/share/${PN}/redhat "${D}"/usr/share/ || die
-
- # scrub all the cruft we dont want
- local x
- cd "${D}"/usr/bin
- for x in * ; do
- [[ ${x} != *insight ]] && rm -f ${x}
- done
- cd "${D}"
- rm -rf usr/{include,man,share/{info,locale,man}}
- rm -rf usr/lib*
-}
diff --git a/dev-util/insight/insight-6.8.1-r1.ebuild b/dev-util/insight/insight-6.8.1-r1.ebuild
new file mode 100644
index 000000000000..21f21334c5cf
--- /dev/null
+++ b/dev-util/insight/insight-6.8.1-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/insight/insight-6.8.1-r1.ebuild,v 1.1 2013/02/04 07:16:04 xarthisius Exp $
+
+EAPI=4
+
+inherit eutils autotools versionator
+
+MY_P="${PN}-$(replace_version_separator 2 -)"
+
+DESCRIPTION="A graphical interface to the GNU debugger"
+HOMEPAGE="http://sourceware.org/insight/"
+SRC_URI="ftp://sources.redhat.com/pub/${PN}/releases/${MY_P}a.tar.bz2
+ http://dev.gentoo.org/~xarthisius/distfiles/${P}-patchset-02.tar.xz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="nls"
+
+RDEPEND="
+ dev-libs/expat
+ dev-tcltk/iwidgets
+ sys-libs/ncurses
+ sys-libs/readline
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}
+ dev-lang/tcl
+ dev-lang/tk
+ dev-tcltk/itcl
+ dev-tcltk/itk
+ sys-devel/bison
+ nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ local location
+
+ EPATCH_FORCE="yes" \
+ EPATCH_SOURCE="${WORKDIR}/patches" \
+ EPATCH_SUFFIX="patch" \
+ epatch
+
+ # remove bundled stuff
+ rm -rf "${S}"/{itcl,tcl,tk,readline} || die
+
+ for location in gdb/gdbtk/plugins libgui; do
+ pushd ${location} > /dev/null
+ eautoreconf
+ popd > /dev/null
+ done
+
+ cd gdb
+ eautoconf
+
+ sed -i \
+ -e 's:tk.h:tkInt.h:g' \
+ -e 's:ITCL_BUILD_LIB_SPEC:ITCL_LIB_SPEC:g' \
+ -e 's:ITK_BUILD_LIB_SPEC:ITK_LIB_SPEC:g' \
+ "${S}/gdb/configure" || die
+}
+
+src_configure() {
+ export ac_cv_c_itclh="${EPREFIX}/usr/include/"
+ export ac_cv_c_itkh="${EPREFIX}/usr/include/"
+
+ . "${EPREFIX}/usr/$(get_libdir)/tclConfig.sh"
+ . "${EPREFIX}/usr/$(get_libdir)/tkConfig.sh"
+ . "${EPREFIX}/usr/$(get_libdir)/itclConfig.sh"
+
+ # there will be warning about undefined options
+ # because it is passed only to some subdir configures
+ econf \
+ --disable-static \
+ --with-system-readline \
+ --disable-rpath \
+ --disable-werror \
+ $(use_enable nls) \
+ --enable-gdbtk \
+ --enable-sim \
+ --with-expat \
+ --datadir=/usr/share \
+ --with-tclinclude="${TCL_SRC_DIR}" \
+ --with-tkinclude="${TK_SRC_DIR}"
+}
+
+src_install() {
+ # the tcl-related subdirs are not parallel safe
+ emake -j1 DESTDIR="${D}" install
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc gdb/gdbtk/{README,TODO}
+
+ # scrub all the cruft we dont want
+ rm -f "${ED}"/usr/bin/{gdb,gdbtui,gdbserver} || die
+ rm -f "${ED}"/usr/$(get_libdir)/*.a || die
+ rm -f "${ED}"/usr/$(get_libdir)/*.sh || die
+ rm -rf "${ED}"/usr/include || die
+ rm -rf "${ED}"/usr/man || die
+ rm -rf "${ED}"/usr/share/{man,info,locale} || die
+
+ # regen pkgIndex.tcl
+ echo "pkg_mkIndex \"${ED}/usr/share/${PN}/gui\"" | tclsh
+}