This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
/
spin.rb
48 lines (38 loc) 路 1.42 KB
/
spin.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'formula'
class Spin < Formula
url 'http://spinroot.com/spin/Src/spin525.tar.gz'
homepage 'http://spinroot.com/spin/whatispin.html'
md5 '03345f9713e7b4f82d2d8ec319802b9c'
version '5.2.5'
fails_with_llvm
def patches
DATA
end
def install
ENV.deparallelize
# Compile and install the binary.
cd("Src#{version}") do
system "make"
bin.install "spin"
end
# Copy the man page.
man1.install "Man/spin.1"
end
end
# manual patching is required by the spin install process
__END__
diff --git a/Src5.2.5/makefile b/Src5.2.5/makefile
index 67f22aa..596c893 100755
--- a/Src5.2.5/makefile
+++ b/Src5.2.5/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