2014-03-18 22:13:41 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Rcssserver < Formula
|
|
|
|
homepage "http://sserver.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/sserver/rcssserver/15.2.2/rcssserver-15.2.2.tar.gz"
|
|
|
|
sha1 "43012eb5301716e457e93ec42c0c00727e600c84"
|
|
|
|
|
2014-03-19 18:59:57 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "72e049b25605887a54b941a388ad16bd50baad69" => :mavericks
|
|
|
|
sha1 "9a398073a7e711b49ba39b2da09c0f7a29ed19af" => :mountain_lion
|
|
|
|
sha1 "ab94f23eae47b48ce2f9ed3d94e727f2d7387289" => :lion
|
|
|
|
end
|
|
|
|
|
2014-04-20 23:28:41 +00:00
|
|
|
head do
|
|
|
|
url "svn://svn.code.sf.net/p/sserver/code/rcss/trunk/rcssserver"
|
|
|
|
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2014-03-18 22:13:41 +00:00
|
|
|
depends_on "flex" => :build
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "boost"
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.j1
|
|
|
|
|
2014-04-20 23:28:41 +00:00
|
|
|
if build.head?
|
2014-05-09 04:23:52 +00:00
|
|
|
# These inreplaces are artifacts of the upstream packaging process:
|
|
|
|
# http://sourceforge.net/p/sserver/discussion/76439/thread/bd3ad6e4
|
2014-04-20 23:28:41 +00:00
|
|
|
inreplace "src/Makefile.am" do |s|
|
|
|
|
s.gsub! "coach_lang_parser.h", "coach_lang_parser.hpp"
|
|
|
|
s.gsub! "player_command_parser.h", "player_command_parser.hpp"
|
|
|
|
end
|
|
|
|
|
|
|
|
inreplace "src/coach_lang_tok.lpp", "coach_lang_parser.h", "coach_lang_parser.hpp"
|
|
|
|
inreplace "src/player_command_tok.lpp", "player_command_parser.h", "player_command_parser.hpp"
|
|
|
|
|
|
|
|
system "./bootstrap"
|
|
|
|
end
|
|
|
|
|
2014-03-18 22:13:41 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/rcssserver help | head -1 | grep 'rcssserver-#{version}'"
|
|
|
|
end
|
|
|
|
end
|