Skip to content

Commit

Permalink
Update spim to latest release and drop xspim
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@125878 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jeremyhu committed Sep 29, 2014
1 parent cc93e12 commit c38eb61
Showing 1 changed file with 22 additions and 31 deletions.
53 changes: 22 additions & 31 deletions emulators/spim/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

PortSystem 1.0
name spim
version 7.4
revision 2
version 9.1.13
categories emulators devel lang x11
maintainers nomaintainer
description an assembly language MIPS R2000/R3000 simulator
Expand All @@ -20,41 +19,33 @@ long_description \
evolved considerably since then (in particular the 64 bit extensions), which \
means that SPIM will not run programs compiled for recent MIPS or SGI \
processors.
homepage http://pages.cs.wisc.edu/~larus/spim.html
homepage http://spimsimulator.sourceforge.net
platforms darwin

master_sites http://pages.cs.wisc.edu/~larus/SPIM
checksums md5 4aae83509d47a5a98d37db5b469cbe9e \
sha1 7c0772389dc7db54854681bceae432ea0e4c1587 \
rmd160 e134bb9271a65e4324375d4aa5b4f81d4d6b9963

depends_lib port:xorg-libXaw port:xorg-libXp
fetch.type svn
svn.revision 643
svn.url http://svn.code.sf.net/p/spimsimulator/code

depends_build port:rman port:flex port:bison path:bin/xmkmf:imake
depends_build port:rman port:flex port:bison

worksrcdir ${name}-${version}
worksrcdir code/spim

patchfiles patch-spim_Makefile.diff patch-xspim_Imakefile.diff patch-Lion.diff
use_configure no

configure {
system "cd ${worksrcpath}/spim && ./Configure"
system "cd ${worksrcpath}/xspim && xmkmf && ./Configure"
}
post-configure {
reinplace {s|$(DESTDIR)$(MAN_DIR)/$(DOC_DIR)/xspim.$(MANSUFFIX)|$(DESTDIR)$(MAN_DIR)/xspim.$(MANSUFFIX)|} ${worksrcpath}/xspim/Makefile
}

build {
system "cd ${worksrcpath}/spim && make prefix=${prefix} spim"
system "cd ${worksrcpath}/xspim && make prefix=${prefix} xspim"
}
build.target spim
destroot.target install install-man

test {
system "cd ${worksrcpath}/spim && make test"
# Yeah... fail build system
set cxx_stdlibflags {}
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

destroot {
system "cd ${worksrcpath}/spim && make DESTDIR=${destroot} prefix=${prefix} install install-man"
system "cd ${worksrcpath}/xspim && make DESTDIR=${destroot} prefix=${prefix} install install.man"
}

build.post_args \
CC="${configure.cxx} ${cxx_stdlibflags}" \
EXCEPTION_DIR=${prefix}/share/spim

destroot.post_args \
BIN_DIR=${destroot}${prefix}/bin \
EXCEPTION_DIR=${destroot}${prefix}/share/spim \
MAN_DIR=${destroot}${prefix}/share/man/man1

0 comments on commit c38eb61

Please sign in to comment.