vp-build/srcpkgs/spim/template

34 lines
1.0 KiB
Bash

# Template file for spim
pkgname=spim
version=8.0
revision=2
build_wrksrc=spim
build_style=configure
configure_script="./Configure"
make_install_target="install install-man"
homepage="http://spimsimulator.sourceforge.net/"
license="BSD"
distfiles="http://pages.cs.wisc.edu/~larus/SPIM/spim-${version}.tar.gz"
checksum="6f205776cb9fa112729507008843b289012190ed3131cbd426c610a58387ee4b"
maintainer="Toyam Cox <vaelatern@gmail.com>"
hostmakedepends="flex"
short_desc="Self-contained simulator/debugger that runs MIPS32 programs"
pre_configure() {
sed '/Copyright (c) 1990-2010, James R. Larus./,+26!d' README > LICENSE
sed -i Makefile \
-e 's:CFLAGS =:CFLAGS +=:' \
-e 's:LDFLAGS =:LDFLAGS +=:' \
-e 's:CC = gcc:CC ?= gcc:' \
-e 's:EXCEPTION_DIR = .*:EXCEPTION_DIR = /usr/share/spim:' \
-e 's:spim.man:spim.1:'
# EXCEPTION_DIR affects DEFAULT_EXCEPTION_HANDLER in spim.c
}
do_install() {
vbin spim
vman ../Documentation/spim.man spim.1
vlicense LICENSE LICENSE.BSD
vinstall ../CPU/exceptions.s 644 /usr/share/spim/
}