Skip to content

Commit

Permalink
genometools: import from homebrew/science
Browse files Browse the repository at this point in the history
Closes #21573.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
sjackman authored and ilovezfs committed Dec 14, 2017
1 parent 079b63e commit ad85126
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Formula/genometools.rb
@@ -0,0 +1,32 @@
class Genometools < Formula
desc "GenomeTools: The versatile open source genome analysis software"
homepage "http://genometools.org/"
url "http://genometools.org/pub/genometools-1.5.10.tar.gz"
sha256 "0208591333b74594bc219fb67f5a29b81bb2ab872f540c408ac1743716274e6a"
head "https://github.com/genometools/genometools.git"

depends_on "pkg-config" => :build
depends_on "cairo"
depends_on "pango"
depends_on :python if MacOS.version <= :snow_leopard

def install
system "make", "prefix=#{prefix}"
system "make", "install", "prefix=#{prefix}"

cd "gtpython" do
# Use the shared library from this specific version of genometools.
inreplace "gt/dlload.py",
"gtlib = CDLL(\"libgenometools\" + soext)",
"gtlib = CDLL(\"#{lib}/libgenometools\" + soext)"

system "python", *Language::Python.setup_install_args(prefix)
system "python", "-m", "unittest", "discover", "tests"
end
end

test do
system "#{bin}/gt", "-test"
system "python", "-c", "import gt"
end
end

0 comments on commit ad85126

Please sign in to comment.