diff options
| author | Michael Lapinsky | 2010-08-08 20:10:13 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-10-30 19:19:04 -0700 |
| commit | 128f5b6a64101f160d52479e5e0df4d6f63f6817 (patch) | |
| tree | 1a0e0ad4e2201264d08948edca61ac3773cee17f /Library/Formula | |
| parent | 81ddaf22f0939fa241ec0ac2154ff13af07b7524 (diff) | |
| download | homebrew-128f5b6a64101f160d52479e5e0df4d6f63f6817.tar.bz2 | |
Added formula: gnu-shogi 1.3.2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gnu-shogi.rb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Library/Formula/gnu-shogi.rb b/Library/Formula/gnu-shogi.rb new file mode 100644 index 000000000..03d05f88a --- /dev/null +++ b/Library/Formula/gnu-shogi.rb @@ -0,0 +1,45 @@ +require 'formula' + +class GnuShogi <Formula + url 'http://www.cs.caltech.edu/~mvanier/hacking/gnushogi/gnushogi-1.3.2.tar.gz' + homepage 'http://www.cs.caltech.edu/~mvanier/hacking/gnushogi/gnushogi.html' + md5 'a18eae93afc89bfd368ed5f6768be791' + + def patches + # gcc 4.2.1 flags the following error + # In file included from attacks.c:32: + # gnushogi.h:144: error: conflicting types for ‘setlinebuf’ + # /usr/include/stdio.h:351: error: previous declaration of ‘setlinebuf’ was here + # + # My patch fixes this by changing the declared return type of setlinebuf in + # gnushogi.h to int to match up with stdio.h's declaration + # It was returning void anyway, so unless something errantly relies on it not + # leaving something in the return register, this shouldn't break anything + DATA + end + + def install + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--x-include=/usr/X11/include", + "--x-lib=/usr/X11/lib" + system "make" + system "make", "install", "MANDIR=#{man6}", "INFODIR=#{info}" + end +end + + +__END__ +diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h +index 423a864..1d930c2 100644 +--- a/gnushogi/gnushogi.h ++++ b/gnushogi/gnushogi.h +@@ -141,7 +141,7 @@ typedef unsigned long ULONG; + + #ifdef HAVE_SETLINEBUF + /* Not necessarily included in <stdio.h> */ +-extern void setlinebuf(FILE *__stream); ++extern int setlinebuf(FILE *__stream); + #endif + + #define RWA_ACC "r+" |
