summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDror Levin <spatz@gentoo.org>2009-12-22 19:53:10 +0000
committerDror Levin <spatz@gentoo.org>2009-12-22 19:53:10 +0000
commitd093282ee85a6445c1080c84bfa775f526609f05 (patch)
tree36a5c3048a42cb286ed40b08e51077134adb833c /app-emulation/spim/spim-7.5.ebuild
parentVersion bump. (diff)
downloadgentoo-2-d093282ee85a6445c1080c84bfa775f526609f05.tar.gz
gentoo-2-d093282ee85a6445c1080c84bfa775f526609f05.tar.bz2
gentoo-2-d093282ee85a6445c1080c84bfa775f526609f05.zip
Version bump and ebuild overhaul. Respect CC, CFLAGS and LDFLAGS. Fix bugs 240005, 243588, 246447.
(Portage version: 2.2_rc60/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/spim/spim-7.5.ebuild')
-rw-r--r--app-emulation/spim/spim-7.5.ebuild81
1 files changed, 81 insertions, 0 deletions
diff --git a/app-emulation/spim/spim-7.5.ebuild b/app-emulation/spim/spim-7.5.ebuild
new file mode 100644
index 000000000000..273b1303d168
--- /dev/null
+++ b/app-emulation/spim/spim-7.5.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/spim/spim-7.5.ebuild,v 1.1 2009/12/22 19:53:09 spatz Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="MIPS Simulator"
+HOMEPAGE="http://www.cs.wisc.edu/~larus/spim.html"
+SRC_URI="http://www.cs.wisc.edu/~larus/SPIM/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libXaw
+ x11-libs/libXp )"
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-proto/xproto )
+ >=sys-apps/sed-4
+ sys-devel/bison"
+
+src_prepare() {
+ # fix bugs 240005 and 243588
+ epatch "${FILESDIR}/${P}-respect_env.patch"
+ tc-export CC
+
+ # Fix documentation files
+ cd "${S}/Documentation"
+ mv spim.man spim.1
+ mv xspim.man xspim.1
+}
+
+src_configure() {
+ cd "${S}/spim"
+ ./Configure || die "Configure Failed!"
+
+ if use X; then
+ cd "${S}/xspim"
+ ./Configure || die "Configure Failed!"
+ fi
+}
+
+src_compile() {
+ cd "${S}/spim"
+ emake || die
+
+ if use X; then
+ cd "${S}/xspim"
+ emake -j1 xspim || die
+ fi
+}
+
+src_install() {
+ dodir /var/lib/spim || die
+ dodoc README VERSION ChangeLog || die
+
+ cd "${S}/spim"
+ emake DESTDIR="${D}" install || die "Unable to install spim"
+
+ if use X; then
+ cd "${S}/xspim"
+ emake DESTDIR="${D}" install || die "Unable to install xspim"
+
+ doman "${S}/Documentation/xspim.1"
+ fi
+
+ cd "${S}/Documentation"
+ doman spim.1 || die
+
+ dohtml SPIM.html || die
+ dodoc BLURB || die
+}
+
+src_test() {
+ cd "${S}/spim"
+ make test || die "Failed to pass tests!"
+}