aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBjörn B. Brandenburg2009-12-09 14:14:23 -0500
committerMax Howell2010-01-23 10:48:45 +0000
commit2b6430dde2784a2c5a7ee673684a35e43dacf2dc (patch)
treeb5e3b7ab4aa3da04a62bfbb1689e3f73a1965ee9 /Library/Formula
parent70101b34d415edeaba38a54737bb6b6cfa488afe (diff)
downloadhomebrew-2b6430dde2784a2c5a7ee673684a35e43dacf2dc.tar.bz2
Spin model checker 5.2.4
A verification tool for models of concurrent systems. Manually installing spin on Mac OS X is somewhat cumbersome and requires edits to the makefile, as as detailed at http://spinroot.com/spin/Man/README.html. The included DATA patch automates this. (My thanks to adamv, who pointed out how to simplify this formula greatly.)
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/spin.rb46
1 files changed, 46 insertions, 0 deletions
diff --git a/Library/Formula/spin.rb b/Library/Formula/spin.rb
new file mode 100644
index 000000000..2c03b19e1
--- /dev/null
+++ b/Library/Formula/spin.rb
@@ -0,0 +1,46 @@
+require 'formula'
+
+class Spin <Formula
+ url 'http://spinroot.com/spin/Src/spin524.tar.gz'
+ homepage 'http://spinroot.com/spin/whatispin.html'
+ md5 'c869e7bd83c70be6565cf77c6a98b72c'
+
+ def patches
+ DATA
+ end
+
+ def install
+ version='5.2.4'
+
+ ENV.gcc_4_2
+ ENV.deparallelize
+
+ # Compile and install the binary.
+ FileUtils.cd("Src#{version}") do
+ system "make"
+ bin.install "spin"
+ end
+
+ # Copy the man page.
+ FileUtils.cd("Man") { man1.install "spin.1" }
+ end
+end
+__END__
+diff --git a/Src5.2.4/makefile b/Src5.2.4/makefile
+index 67f22aa..596c893 100755
+--- a/Src5.2.4/makefile
++++ b/Src5.2.4/makefile
+@@ -12,10 +12,10 @@
+
+ CC=gcc -DNXT # -DNXT enables the X operator in LTL
+ # CC=cc -m32 -DNXT # for 32bit compilation on a 64bit system
+-CFLAGS=-ansi -D_POSIX_SOURCE -Wno-format-security # on some systems add: -I/usr/include
++#CFLAGS=-ansi -D_POSIX_SOURCE -Wno-format-security # on some systems add: -I/usr/include
+
+-# for a more picky compilation:
+-# CFLAGS=-std=c99 -Wstrict-prototypes -pedantic -fno-strength-reduce -fno-builtin -W -Wshadow -Wpointer-arith -Wcast-qual -Winline -Wall -g
++# for a more picky compilation:
++CFLAGS=-std=c99 -Wstrict-prototypes -pedantic -fno-strength-reduce -fno-builtin -W -Wshadow -Wpointer-arith -Wcast-qual -Winline -Wall -g -DMAC -DCPP="\"gcc -E -x c -xassembler-with-cpp\""
+
+ # on PC: add -DPC to CFLAGS above
+ # on Solaris: add -DSOLARIS