summaryrefslogtreecommitdiff
blob: 6382d1596a198e351f1c5e5e53c39148e0594066 (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/gdb-armulator/gdb-armulator-5.0.ebuild,v 1.4 2011/03/27 10:25:17 nirbheek Exp $

EAPI="1"

inherit flag-o-matic eutils

export CTARGET="arm-elf"

STAMP=20021127
DESCRIPTION="emulate armnommu/uClinux in GDB"
HOMEPAGE="http://www.uclinux.org/pub/uClinux/utilities/armulator/"
SRC_URI="http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.bz2
	http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-${PV}.tar.bz2
	http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-${PV}-uclinux-armulator-${STAMP}.patch.gz"

LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="-amd64 ~x86"
IUSE="nls"
RESTRICT="test"

RDEPEND="sys-libs/ncurses
	media-libs/freetype
	x11-libs/gtk+:2
	dev-libs/glib:2
	x11-libs/pango"
DEPEND="${RDEPEND}
	nls? ( sys-devel/gettext )
	dev-util/pkgconfig"

S=${WORKDIR}/gdb-${PV}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${WORKDIR}"/gdb-${PV}-uclinux-armulator-${STAMP}.patch
	epatch "${FILESDIR}"/${P}-objstack.patch #211463
	strip-linguas -u bfd/po opcodes/po

	# add a wrapper to fake gtk-1 with gtk-2
	mkdir "${T}"/path
	cp "${FILESDIR}"/gtk-config "${T}"/path/
}

src_compile() {
	export PATH=${T}/path:${PATH}
	replace-flags -O? -O2
	econf \
		--disable-werror \
		$(use_enable nls) \
		|| die
	emake || die
}

src_install() {
	newbin gdb/gdb ${PN} || die
}

pkg_postinst() {
	elog "For instructions on how to use this emulator, please see:"
	elog " ${HOMEPAGE}"
}