| 1 |
# Copyright 1999-2007 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/insight/insight-6.6.ebuild,v 1.2 2007/07/30 07:47:55 vapier Exp $
|
| 4 |
|
| 5 |
inherit eutils flag-o-matic
|
| 6 |
|
| 7 |
export CTARGET=${CTARGET:-${CHOST}}
|
| 8 |
if [[ ${CTARGET} == ${CHOST} ]] ; then
|
| 9 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
| 10 |
export CTARGET=${CATEGORY/cross-}
|
| 11 |
fi
|
| 12 |
fi
|
| 13 |
|
| 14 |
DESCRIPTION="A graphical interface to the GNU debugger"
|
| 15 |
HOMEPAGE="http://sourceware.org/insight/"
|
| 16 |
SRC_URI="ftp://sources.redhat.com/pub/${PN}/releases/${P}.tar.bz2"
|
| 17 |
|
| 18 |
LICENSE="GPL-2 LGPL-2"
|
| 19 |
[[ ${CTARGET} != ${CHOST} ]] \
|
| 20 |
&& SLOT="${CTARGET}" \
|
| 21 |
|| SLOT="0"
|
| 22 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
|
| 23 |
IUSE="nls"
|
| 24 |
|
| 25 |
RDEPEND="sys-libs/ncurses
|
| 26 |
x11-libs/libX11"
|
| 27 |
DEPEND="${RDEPEND}
|
| 28 |
nls? ( sys-devel/gettext )"
|
| 29 |
|
| 30 |
src_unpack() {
|
| 31 |
unpack ${A}
|
| 32 |
cd "${S}"
|
| 33 |
epatch "${FILESDIR}"/${P}-DESTDIR.patch
|
| 34 |
epatch "${FILESDIR}"/${P}-burn-paths.patch
|
| 35 |
}
|
| 36 |
|
| 37 |
src_compile() {
|
| 38 |
append-flags -fno-strict-aliasing # tcl code sucks
|
| 39 |
strip-linguas -u bfd/po opcodes/po
|
| 40 |
econf \
|
| 41 |
--disable-werror \
|
| 42 |
$(use_enable nls) \
|
| 43 |
--enable-gdbtk \
|
| 44 |
--disable-tui \
|
| 45 |
--datadir=/usr/share/${PN} \
|
| 46 |
|| die
|
| 47 |
emake || die
|
| 48 |
}
|
| 49 |
|
| 50 |
src_install() {
|
| 51 |
# the tcl-related subdirs are not parallel safe
|
| 52 |
emake -j1 DESTDIR="${D}" install || die
|
| 53 |
|
| 54 |
# Don't install docs when building a cross-insight
|
| 55 |
if [[ ${CTARGET} == ${CHOST} ]] ; then
|
| 56 |
dodoc gdb/gdbtk/{README,TODO}
|
| 57 |
fi
|
| 58 |
|
| 59 |
# the gui tcl code does not consider any of the configure
|
| 60 |
# options given it ... instead, it requires the path to
|
| 61 |
# be /usr/share/redhat/...
|
| 62 |
mv "${D}"/usr/share/${PN}/redhat "${D}"/usr/share/ || die
|
| 63 |
|
| 64 |
# scrub all the cruft we dont want
|
| 65 |
local x
|
| 66 |
cd "${D}"/usr/bin
|
| 67 |
for x in * ; do
|
| 68 |
[[ ${x} != *insight ]] && rm -f ${x}
|
| 69 |
done
|
| 70 |
cd "${D}"
|
| 71 |
rm -rf usr/{include,man,share/{info,locale,man}}
|
| 72 |
rm -rf usr/lib*
|
| 73 |
}
|