2012-06-15 17:55:32 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Sga < Formula
|
|
|
|
homepage 'https://github.com/jts/sga'
|
2012-10-17 17:51:07 +00:00
|
|
|
url 'https://github.com/jts/sga/tarball/v0.9.35'
|
|
|
|
sha1 'e505f46fc6ba0e991096d7d9a9d50d37c94e4d4c'
|
2012-06-15 17:55:32 +00:00
|
|
|
|
|
|
|
head 'https://github.com/jts/sga.git'
|
|
|
|
|
2012-10-17 17:51:07 +00:00
|
|
|
depends_on :autoconf => :build
|
|
|
|
depends_on :automake => :build
|
2012-06-15 17:55:32 +00:00
|
|
|
# Only header files are used, so :build is appropriate
|
|
|
|
depends_on 'google-sparsehash' => :build
|
|
|
|
depends_on 'bamtools'
|
|
|
|
|
2012-10-17 17:51:07 +00:00
|
|
|
# Fix two compiler errors. Both fixed upstream.
|
|
|
|
def patches
|
|
|
|
['http://github.com/jts/sga/commit/b4efb323ed.diff',
|
|
|
|
'https://github.com/jts/sga/commit/dfe74633fb.diff'] unless build.head?
|
|
|
|
end
|
|
|
|
|
2012-06-15 17:55:32 +00:00
|
|
|
def install
|
2012-10-17 17:51:07 +00:00
|
|
|
cd 'src' do
|
2012-06-15 17:55:32 +00:00
|
|
|
system "./autogen.sh"
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
2012-10-17 17:51:07 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-bamtools=#{HOMEBREW_PREFIX}"
|
2012-06-15 17:55:32 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/sga", "--version"
|
|
|
|
end
|
|
|
|
end
|