blob: 909332a84ef74f9c038a16d199f3b3e23f424e85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# 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.8.1.ebuild,v 1.4 2012/04/30 09:55:00 ago 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.gentooexperimental.org/~scarabeus/${P}-patchset-01.tar.xz"
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~ppc ~sparc ~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
}
|