2011-10-19 14:11:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-06-10 21:32:29 +00:00
|
|
|
class PostgresqlInstalled < Requirement
|
|
|
|
def message; <<-EOS.undent
|
2012-10-07 01:02:43 +00:00
|
|
|
PostgreSQL is required to install.
|
2012-06-10 21:32:29 +00:00
|
|
|
|
|
|
|
You can install this with:
|
|
|
|
brew install postgresql
|
|
|
|
|
|
|
|
Or you can use an official installer from:
|
|
|
|
http://www.postgresql.org/
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
def satisfied?
|
|
|
|
which 'pg_config'
|
|
|
|
end
|
|
|
|
def fatal?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-10-19 14:11:38 +00:00
|
|
|
class SagaCore < Formula
|
|
|
|
homepage 'http://saga-project.org'
|
2012-02-10 07:01:21 +00:00
|
|
|
url 'http://download.saga.cct.lsu.edu/saga-core/saga-core-1.6.tgz'
|
2012-06-10 21:32:29 +00:00
|
|
|
sha1 '89cc089b4feb5aae01ae5d371477d2d9a5204f1d'
|
2011-10-19 14:11:38 +00:00
|
|
|
|
2012-05-10 14:10:12 +00:00
|
|
|
head 'https://svn.cct.lsu.edu/repos/saga/core/trunk/'
|
2012-02-10 07:01:21 +00:00
|
|
|
|
2011-10-19 14:11:38 +00:00
|
|
|
depends_on 'boost'
|
2012-06-10 21:32:29 +00:00
|
|
|
depends_on PostgresqlInstalled.new
|
2011-10-19 14:11:38 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-10 07:01:21 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-boost=#{HOMEBREW_PREFIX}",
|
|
|
|
"--with-postgresql=#{HOMEBREW_PREFIX}"
|
2011-10-19 14:11:38 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|