2010-05-01 22:21:23 +00:00
|
|
|
require 'formula'
|
2012-09-02 20:16:16 +00:00
|
|
|
require 'set'
|
2010-05-01 22:21:23 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Simh < Formula
|
2010-05-01 22:21:23 +00:00
|
|
|
homepage 'http://simh.trailing-edge.com/'
|
2012-05-07 08:46:24 +00:00
|
|
|
url 'http://simh.trailing-edge.com/sources/simhv39-0.zip'
|
|
|
|
sha1 '1de3938f0dcb51d55b0e53aea8ae9769ccc57bdb'
|
|
|
|
version '3.9-0'
|
2012-09-02 20:16:16 +00:00
|
|
|
|
2012-08-31 02:34:05 +00:00
|
|
|
head 'https://github.com/simh/simh.git'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-05-07 08:46:24 +00:00
|
|
|
# After 3.9-0 the project moves to https://github.com/simh/simh
|
|
|
|
# It doesn't actually fail, but the makefile queries llvm-gcc -v --help a lot
|
|
|
|
# to determine what flags to throw. It is simply not designed for clang.
|
|
|
|
# Remove at the next revision that will support clang (see github site).
|
|
|
|
fails_with :clang do
|
2012-08-31 02:34:05 +00:00
|
|
|
build 421
|
2012-05-07 08:46:24 +00:00
|
|
|
cause 'The program is closely tied to gcc & llvm-gcc in this revision.'
|
|
|
|
end
|
2010-05-01 22:21:23 +00:00
|
|
|
|
2012-05-07 08:46:24 +00:00
|
|
|
def install
|
2012-08-31 02:34:05 +00:00
|
|
|
ENV.deparallelize unless build.head?
|
2012-05-07 08:46:24 +00:00
|
|
|
inreplace 'makefile', 'GCC = gcc', "GCC = #{ENV.cc}"
|
|
|
|
inreplace 'makefile', 'CFLAGS_O = -O2', "CFLAGS_O = #{ENV.cflags}"
|
2010-05-01 22:21:23 +00:00
|
|
|
system "make USE_NETWORK=1 all"
|
|
|
|
bin.install Dir['BIN/*']
|
2012-09-02 20:16:16 +00:00
|
|
|
docs = Dir['**/*.txt']
|
|
|
|
Set.new(docs.map {|f| File.dirname(f) }).each do |d|
|
|
|
|
mkpath doc+d
|
|
|
|
end
|
|
|
|
docs.each do |f|
|
|
|
|
cp f, doc+f
|
|
|
|
end
|
|
|
|
(share+'simh/vax').install Dir['VAX/*.{bin,exe}']
|
2010-05-01 22:21:23 +00:00
|
|
|
end
|
|
|
|
end
|