2010-08-09 03:10:13 +00:00
|
|
|
|
require 'formula'
|
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
|
class GnuShogi < Formula
|
2010-08-09 03:10:13 +00:00
|
|
|
|
homepage 'http://www.cs.caltech.edu/~mvanier/hacking/gnushogi/gnushogi.html'
|
2013-01-28 02:55:58 +00:00
|
|
|
|
url 'http://www.cs.caltech.edu/~mvanier/hacking/gnushogi/gnushogi-1.3.2.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
|
sha1 '6135ec3eb84917d0dc2cab9ac982818ed41aad87'
|
2010-08-09 03:10:13 +00:00
|
|
|
|
|
2012-06-07 01:35:12 +00:00
|
|
|
|
depends_on :x11
|
|
|
|
|
|
2010-08-09 03:10:13 +00:00
|
|
|
|
def patches
|
2013-01-28 02:55:58 +00:00
|
|
|
|
# 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
|
2010-08-09 03:10:13 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def install
|
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
|
"--prefix=#{prefix}",
|
2012-08-06 05:33:36 +00:00
|
|
|
|
"--x-include=#{MacOS::X11.include}",
|
|
|
|
|
"--x-lib=#{MacOS::X11.lib}"
|
2010-08-09 03:10:13 +00:00
|
|
|
|
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+"
|