summaryrefslogtreecommitdiff
blob: 497a5d836df5e87199d8b9a4b1ff87f8e567aaba (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/mips64emul/mips64emul-0.3_pre.ebuild,v 1.1 2004/09/11 05:14:53 kumba Exp $

inherit eutils

STABLEVERSION="0.2"
SNAPSHOT="20040905"

DESCRIPTION="MIPS Machine Emulator, Emulates many machines/CPUs/OSes"
HOMEPAGE="http://www.mdstud.chalmers.se/~md1gavan/${PN}/index.html"
SRC_URI="http://www.mdstud.chalmers.se/~md1gavan/${PN}/src/${PN}-${STABLEVERSION}.tar.gz
	 mirror://gentoo/${PN}-snapshot-${SNAPSHOT}.diff.bz2"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~x86 ~sparc ~mips"
IUSE="X cacheemu delays mips16 userland"
DEPEND="X? ( virtual/x11 )"
RDEPEND=""
S="${WORKDIR}/${PN}-${STABLEVERSION}"

src_unpack() {
	unpack ${A}
	cd ${S}

	# Patch the stable version up to the snapshot
	epatch ${WORKDIR}/${PN}-snapshot-${SNAPSHOT}.diff
}

src_compile() {
	cd ${S}

	# See what configure options to pass
	local myconf
	use ! X && myconf="${myconf} --nox11"
	use cacheemu && myconf="${myconf} --caches"
	use delays && myconf="${myconf} --delays"
	use mips16 && myconf="${myconf} --mips16"
	use userland && myconf="${myconf} --userland"

	# Run configure
	einfo "Passing the following flags to configure: ${myconf}"
	echo -e ""
	./configure ${myconf}
	echo -e ""

	# Build
	emake
}

src_install() {
	cd ${S}
	dodoc BUGS HISTORY LICENSE README RELEASE TODO doc/index.html doc/technical.html
	doman doc/mips64emul.1
	dobin mips64emul
}