diff options
| author | nibbles 2bits | 2012-05-07 01:46:24 -0700 |
|---|---|---|
| committer | Jack Nagel | 2012-05-08 22:48:54 -0500 |
| commit | 0235e587da10cd97ad60bf1b5f25904667b5189c (patch) | |
| tree | db923e0822004a91d73b0b2f173715c7af17cbfc /Library/Formula/simh.rb | |
| parent | 46b40d394d3b84843d48b179ff23a8945f4d093c (diff) | |
| download | homebrew-0235e587da10cd97ad60bf1b5f25904667b5189c.tar.bz2 | |
simh 3.9-0, add fails_with, adjust inreplace
Upgrade simh to version 3.9-0.
Add fails_with :clang.
Adjust inreplace because of a modified makefile.
Simh will be moving its development to GitHub after 3.9-0.
The new webiste is noted in the comments. Over there you can
see from the commits that they are supporting Clang. At
this time, though, the whole makefile is very closely tied to
gcc or llvm-gcc because it queries the `--help` to determine
which flags to add to the compile commands. To respect that,
and to avoid the dozen warnings from clang at every step,
a fails_with :clang is added along with a note to remove it at
the next revision. The two `inreplace` commands need to be
modified because the makefile changed a lot. This compiles on
Lion with XCode-4.3.2.
Closes #12121.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/simh.rb')
| -rw-r--r-- | Library/Formula/simh.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Library/Formula/simh.rb b/Library/Formula/simh.rb index 5d19d08f6..7bfd4b832 100644 --- a/Library/Formula/simh.rb +++ b/Library/Formula/simh.rb @@ -1,23 +1,23 @@ require 'formula' class Simh < Formula - url 'http://simh.trailing-edge.com/sources/simhv38-1.zip' - version '3.8-1' homepage 'http://simh.trailing-edge.com/' - md5 'e15f65a82e21ea49e14b438326d93d5c' + url 'http://simh.trailing-edge.com/sources/simhv39-0.zip' + sha1 '1de3938f0dcb51d55b0e53aea8ae9769ccc57bdb' + version '3.9-0' - def install - ENV['OSTYPE'] = 'darwin' - mkdir 'BIN' - inreplace "makefile" do |s| - # Note: change_make_var! doesn't work for this makefile - s.gsub! "NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a", - "NETWORK_OPT = -DUSE_NETWORK -lpcap" + # 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 + build 318 + cause 'The program is closely tied to gcc & llvm-gcc in this revision.' + end - # Use our compiler & flags, and don't create dSYMs. - s.gsub! "CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I .", - "CC = #{ENV.cc} #{ENV.cflags} -std=c99 -U__STRICT_ANSI__ $(OS_CCDEFS) -I ." - end + def install + inreplace 'makefile', 'GCC = gcc', "GCC = #{ENV.cc}" + inreplace 'makefile', 'CFLAGS_O = -O2', "CFLAGS_O = #{ENV.cflags}" system "make USE_NETWORK=1 all" bin.install Dir['BIN/*'] end |
