summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@gentoo.org>2006-01-22 08:30:24 +0000
committerSaleem Abdulrasool <compnerd@gentoo.org>2006-01-22 08:30:24 +0000
commitd89b6670ef1cf121420e67a093511b3513bc7dd3 (patch)
treedc747967c7d5cd18bd59d5fadf33f703e4f2da00 /app-emulation
parentppc stable, bug #113818 (diff)
downloadgentoo-2-d89b6670ef1cf121420e67a093511b3513bc7dd3.tar.gz
gentoo-2-d89b6670ef1cf121420e67a093511b3513bc7dd3.tar.bz2
gentoo-2-d89b6670ef1cf121420e67a093511b3513bc7dd3.zip
Fixing bugs 105542, 110644
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/spim/ChangeLog8
-rw-r--r--app-emulation/spim/Manifest31
-rw-r--r--app-emulation/spim/files/digest-spim-7.2.1-r31
-rw-r--r--app-emulation/spim/files/spim-7.2.1-string-handling-fix.patch36
-rw-r--r--app-emulation/spim/spim-7.2.1-r3.ebuild104
5 files changed, 165 insertions, 15 deletions
diff --git a/app-emulation/spim/ChangeLog b/app-emulation/spim/ChangeLog
index b14d982eb570..671e41521286 100644
--- a/app-emulation/spim/ChangeLog
+++ b/app-emulation/spim/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/spim
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/spim/ChangeLog,v 1.32 2006/01/14 11:23:14 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/spim/ChangeLog,v 1.33 2006/01/22 08:30:24 compnerd Exp $
+
+*spim-7.2.1-r3 (22 Jan 2006)
+
+ 22 Jan 2006; Saleem Abdulrasool <compnerd@gentoo.org>
+ +files/spim-7.2.1-string-handling-fix.patch, +spim-7.2.1-r3.ebuild:
+ Fixing bugs #110644, #105542
14 Jan 2006; Fabian Groffen <grobian@gentoo.org> spim-7.2.1-r2.ebuild:
Marked last version stable ppc-macos. Removing keyword from older ebuilds
diff --git a/app-emulation/spim/Manifest b/app-emulation/spim/Manifest
index bf0356a0bc3d..8fa9ebbc39b1 100644
--- a/app-emulation/spim/Manifest
+++ b/app-emulation/spim/Manifest
@@ -1,22 +1,25 @@
-MD5 72c275207f182803574d6b2642209d9d spim-7.2.1-r2.ebuild 2301
-MD5 50993cc657c27f597fb7b1323d3a7c39 spim-7.0.ebuild 1472
-MD5 548deb7d9eca69a650ca06890c86669e spim-7.2.1.ebuild 2245
-MD5 9a055d12390dbbce3523f2f315da72db spim-6.5-r1.ebuild 1445
-MD5 8ed1d835da9d4ff0791af455d5a625cf spim-7.1.ebuild 1380
-MD5 7d13a182bc51e8c8cad4b35f5e5c8e67 ChangeLog 4718
-MD5 f180f948f41e347de9ebca387391018e metadata.xml 476
-MD5 54351d3e666c30c161818777d2cb5746 files/digest-spim-7.2.1-r2 62
-MD5 687579cae8dc43834d01a92be664c826 files/spim-6.5-font.patch 362
+MD5 0c2cbc54fe5e1767f953d7d480044d55 ChangeLog 4906
MD5 d71d66b98121e4e42ca59fa94310ed1e files/6.5-parser.patch 266
MD5 3962179c22e4349945b01edbadfac9a5 files/digest-spim-6.5-r1 60
+MD5 e2af6a0e5ca4267cfad9f1bf5e954655 files/digest-spim-7.0 60
+MD5 1e56da59f31f01ba293a6c05cc257a5a files/digest-spim-7.1 60
MD5 54351d3e666c30c161818777d2cb5746 files/digest-spim-7.2.1 62
+MD5 54351d3e666c30c161818777d2cb5746 files/digest-spim-7.2.1-r2 62
+MD5 54351d3e666c30c161818777d2cb5746 files/digest-spim-7.2.1-r3 62
+MD5 687579cae8dc43834d01a92be664c826 files/spim-6.5-font.patch 362
MD5 d07cf1bbff97319734f9f85a3395ffa8 files/spim-7.0-font.patch 441
-MD5 12aa5d2009bfce93f35bc5b5845fe9b0 files/spim-7.2.1-string-stream.patch 488
MD5 df8dcbb83771ccb4cccb7006b9a9d1ff files/spim-7.1-font.patch 436
-MD5 e2af6a0e5ca4267cfad9f1bf5e954655 files/digest-spim-7.0 60
-MD5 1e56da59f31f01ba293a6c05cc257a5a files/digest-spim-7.1 60
MD5 0323f7eab0a1497289beb7246d3b5f9b files/spim-7.2.1-c99.patch 17070
+MD5 8943ac49b31f6df6c679b4ce740514fc files/spim-7.2.1-envvar-exception.patch 991
MD5 a1da7be88dc0cab1e55ec1862aa3f338 files/spim-7.2.1-font.patch 430
-MD5 7fdc53102c71df807c81f19ce98f2e08 files/spim-7.2.1-ptrsize.patch 458
MD5 b93adb065232f3d9579481eb66c7a47f files/spim-7.2.1-multiple-exception.patch 2375
-MD5 8943ac49b31f6df6c679b4ce740514fc files/spim-7.2.1-envvar-exception.patch 991
+MD5 7fdc53102c71df807c81f19ce98f2e08 files/spim-7.2.1-ptrsize.patch 458
+MD5 f94999b1ba664cfac49b983a9ac12de0 files/spim-7.2.1-string-handling-fix.patch 1304
+MD5 12aa5d2009bfce93f35bc5b5845fe9b0 files/spim-7.2.1-string-stream.patch 488
+MD5 f180f948f41e347de9ebca387391018e metadata.xml 476
+MD5 9a055d12390dbbce3523f2f315da72db spim-6.5-r1.ebuild 1445
+MD5 50993cc657c27f597fb7b1323d3a7c39 spim-7.0.ebuild 1472
+MD5 8ed1d835da9d4ff0791af455d5a625cf spim-7.1.ebuild 1380
+MD5 72c275207f182803574d6b2642209d9d spim-7.2.1-r2.ebuild 2301
+MD5 c3ad4dbf86c810358242318b9616582f spim-7.2.1-r3.ebuild 2522
+MD5 548deb7d9eca69a650ca06890c86669e spim-7.2.1.ebuild 2245
diff --git a/app-emulation/spim/files/digest-spim-7.2.1-r3 b/app-emulation/spim/files/digest-spim-7.2.1-r3
new file mode 100644
index 000000000000..58ae70868914
--- /dev/null
+++ b/app-emulation/spim/files/digest-spim-7.2.1-r3
@@ -0,0 +1 @@
+MD5 0fe5696659364d38660f5610ef380ad0 spim-7.2.1.tar.gz 534388
diff --git a/app-emulation/spim/files/spim-7.2.1-string-handling-fix.patch b/app-emulation/spim/files/spim-7.2.1-string-handling-fix.patch
new file mode 100644
index 000000000000..660ab78c65b9
--- /dev/null
+++ b/app-emulation/spim/files/spim-7.2.1-string-handling-fix.patch
@@ -0,0 +1,36 @@
+--- CPU/spim-utils.c 2006-01-22 01:15:11.000000000 -0600
++++ CPU/spim-utils.c 2006-01-22 01:35:59.000000000 -0600
+@@ -105,14 +105,25 @@
+ bare_machine = 0; /* Exception handler uses extended machine */
+ accept_pseudo_insts = 1;
+
+- for(filename = strtok_r(exception_file_names, ":", &state);
+- filename;
+- filename = strtok_r(NULL, ":", &state)) {
+-
+- if (read_assembly_file (filename))
+- fatal_error ("Cannot read exception handler: %s\n", filename);
+- write_output (message_out, "Loaded: %s\n", filename);
+- }
++ /*
++ * strtok_r does not guarantee to keep the string usable, so we must back
++ * up the string prior to use
++ */
++ char *files;
++ if ((files = strdup(exception_file_names)) == NULL)
++ fatal_error("Insufficient memory to complete.\n");
++
++ for (filename = strtok_r (files, ":", &state);
++ filename;
++ filename = strtok_r (NULL, ":", &state))
++ {
++ if (read_assembly_file (filename))
++ fatal_error ("Cannot read exception handler: %s\n", filename);
++
++ write_output (message_out, "Loaded: %s\n", filename);
++ }
++
++ free (files);
+
+ bare_machine = old_bare;
+ accept_pseudo_insts = old_accept;
diff --git a/app-emulation/spim/spim-7.2.1-r3.ebuild b/app-emulation/spim/spim-7.2.1-r3.ebuild
new file mode 100644
index 000000000000..ef397d5e471a
--- /dev/null
+++ b/app-emulation/spim/spim-7.2.1-r3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2006 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-r3.ebuild,v 1.1 2006/01/22 08:30:24 compnerd 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? ( || ( ( x11-libs/libXaw x11-libs/libXp ) virtual/x11 ) )"
+DEPEND="${RDEPEND}
+ X? ( || ( ( x11-misc/imake x11-proto/xproto ) virtual/x11 ) )
+ >=sys-apps/sed-4
+ sys-devel/bison"
+
+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 string handling on multiple exceptions patch
+ epatch ${FILESDIR}/${PN}-7.2.1-string-handling-fix.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
+}