# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                spim
version             9.1.22
svn.revision        732
revision            0
license             BSD
categories          emulators devel lang x11
platforms           darwin
maintainers         {mails.ucas.ac.cn:chenguokai17 @chenguokai} openmaintainer

description         an assembly language MIPS R2000/R3000 simulator

long_description    SPIM S20 is a software simulator that runs assembly \
                    language programs for the MIPS R2000/R3000 RISC computers. \
                    SPIM can read and immediately run files containing \
                    assembly language statements. SPIM is a self-contained \
                    system for running these programs and contains a debugger \
                    and interface to the operating system. \
                    \
                    SPIM implements almost the entire MIPS assembler-extended \
                    instruction set for the R2000/R3000. (I've omitted some \
                    the complex floating point comparisons and details of the \
                    memory system page tables.) The MIPS architecture has \
                    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://spimsimulator.sourceforge.net
fetch.type          svn
svn.url             https://svn.code.sf.net/p/spimsimulator/code

depends_build       port:bison \
                    port:flex \
                    port:rman

worksrcdir          code/spim

use_configure       no

variant universal {}
build.env           "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
build.target        spim
build.args          CXX=${configure.cxx} \
                    MYLEX=${prefix}/bin/flex \
                    PREFIX=${prefix} \
                    YACC=${prefix}/bin/bison

destroot.target     install install-man
destroot.args       {*}${build.args}
