diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-10-27 08:14:33 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-10-27 08:14:33 +0000 |
commit | 0688de0f98024ffe6ec8ae7f599c0f50b91b7539 (patch) | |
tree | 284db8069b860028b8c71acfc2ff064bdefb3dd1 /app-emulation/spim/spim-7.2.1-r2.ebuild | |
parent | make sure we declare our libdir (diff) | |
download | historical-0688de0f98024ffe6ec8ae7f599c0f50b91b7539.tar.gz historical-0688de0f98024ffe6ec8ae7f599c0f50b91b7539.tar.bz2 historical-0688de0f98024ffe6ec8ae7f599c0f50b91b7539.zip |
Added another patch (sent/accepted upstream) which allows the user to list multiple exception handler/libraries rather than require it to be in just one file.
Package-Manager: portage-2.0.53_rc6
Diffstat (limited to 'app-emulation/spim/spim-7.2.1-r2.ebuild')
-rw-r--r-- | app-emulation/spim/spim-7.2.1-r2.ebuild | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/app-emulation/spim/spim-7.2.1-r2.ebuild b/app-emulation/spim/spim-7.2.1-r2.ebuild new file mode 100644 index 000000000000..89cd8ff6568e --- /dev/null +++ b/app-emulation/spim/spim-7.2.1-r2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/spim/spim-7.2.1-r2.ebuild,v 1.1 2005/10/27 08:14:33 eradicator Exp $ + +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 ~ppc-macos ~sparc ~x86" +IUSE="X" + +RDEPEND="X? ( virtual/x11 )" +DEPEND="${RDEPEND} + sys-devel/bison + >=sys-apps/sed-4" + +src_unpack() { + unpack ${A} + cd ${S} + + # Patches from eradicator submitted upstream. Fixes amd64 and others... + epatch ${FILESDIR}/${PN}-7.2.1-envvar-exception.patch + epatch ${FILESDIR}/${PN}-7.2.1-c99.patch + epatch ${FILESDIR}/${PN}-7.2.1-ptrsize.patch + epatch ${FILESDIR}/${PN}-7.2.1-string-stream.patch + epatch ${FILESDIR}/${PN}-7.2.1-multiple-exception.patch + + # Fix documentation files + cd ${S}/Documentation + mv spim.man spim.1 + mv xspim.man xspim.1 +} + +src_compile() { + cd ${S}/spim + + ./Configure || die "Configure Failed!" + + sed -i \ + -e 's:@make:@$(MAKE):' \ + -e 's:\(BIN_DIR = \).*$:\1\$(DESTDIR)/usr/bin:' \ + -e 's:\(MAN_DIR = \).*$:\1\$(DESTDIR)/usr/share/man:' \ + -e 's:\(EXCEPTION_DIR = \).*$:\1$(DESTDIR)/var/lib/spim:' \ + -e 's:\(^\W*install.*\) exceptions.s \(.*$\):\1 \$(CPU_DIR)/exceptions.s \2:' \ + -e "s:^\W*install.* spim.man .*$::" \ + -e "s:tail -2:tail -n2:" \ + Makefile + + emake CC="$(tc-getCC)" || die + + if use X ; then + cd ${S}/xspim + + ./Configure || die "Configure Failed!" + + xmkmf || die + + sed -i \ + -e 's:@make:@$(MAKE):' \ + -e "s:\(BIN_DIR = \).*$:\1/usr/bin:" \ + -e "s:\(MAN_DIR = \).*$:\1/usr/share/man:" \ + -e "s:\(EXCEPTION_PATH = \).*$:\1/var/lib/spim/exceptions.s:" \ + Makefile + + emake CC="$(tc-getCC)" -j1 xspim || die + fi +} + +src_test() { + cd ${S}/spim + make test || die "Failed to pass tests!" +} + +src_install() { + dodir /usr/bin + dodir /usr/share/man + dodir /var/lib/spim + + cd ${S}/spim + make install DESTDIR=${D} || die "Unable to install spim" + + if use X ; then + cd ${S}/xspim + make DESTDIR=${D} install || die "Unable to install xspim" + fi + + cd ${S}/Documentation + doman spim.1 + use X && doman xspim.1 + + dohtml SPIM.html + dodoc BLURB + + cd ${S} + dodoc README VERSION ChangeLog +} |