aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-10-21 12:54:36 -0700
committerAdam Vandenberg2012-10-21 13:24:03 -0700
commita8345b244bfc66467c7b7fbafc8b2f246dc60e6d (patch)
tree1a17d32508a35c76597c999aaf168f3eb92135c2 /Library
parentf797747b458b00f7441f27f09c5ffddea631b62f (diff)
downloadhomebrew-a8345b244bfc66467c7b7fbafc8b2f246dc60e6d.tar.bz2
libzdb: fix audit
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libzdb.rb34
1 files changed, 9 insertions, 25 deletions
diff --git a/Library/Formula/libzdb.rb b/Library/Formula/libzdb.rb
index 6138476af..921dd6e5c 100644
--- a/Library/Formula/libzdb.rb
+++ b/Library/Formula/libzdb.rb
@@ -48,43 +48,27 @@ class PostgresInstalled < Requirement
end
end
-def no_mysql?
- ARGV.include? '--without-mysql'
-end
-
-def no_postgresql?
- ARGV.include? '--without-postgresql'
-end
-
-def no_sqlite?
- ARGV.include? '--without-sqlite'
-end
-
class Libzdb < Formula
homepage 'http://tildeslash.com/libzdb/'
url 'http://tildeslash.com/libzdb/dist/libzdb-2.10.5.tar.gz'
sha1 '30f975e73caf58f1fa02260ed7136185a3ba2d27'
- depends_on PostgresInstalled.new unless no_postgresql?
- depends_on MySqlInstalled.new unless no_mysql?
- depends_on 'sqlite' unless no_sqlite?
+ option 'without-sqlite', "Compile without SQLite support"
+ option 'without-postgresql', "Compile without PostgreSQL support"
+ option 'without-mysql', "Compile without MySQL support"
- def options
- [
- ['--without-sqlite', "Compile without SQLite support."],
- ['--without-postgresql', "Compile without PostgreSQL support."],
- ['--without-mysql', "Compile without MySQL support."]
- ]
- end
+ depends_on PostgresInstalled.new unless build.include? 'without-postgresql'
+ depends_on MySqlInstalled.new unless build.include? 'without-mysql'
+ depends_on 'sqlite' unless build.include? 'without-sqlite'
def install
args = ["--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"]
- args << "--without-sqlite" if no_sqlite?
- args << "--without-mysql" if no_mysql?
- args << "--without-postgresql" if no_postgresql?
+ args << "--without-sqlite" if build.include? 'without-sqlite'
+ args << "--without-mysql" if build.include? 'without-mysql'
+ args << "--without-postgresql" if build.include? 'without-postgresql'
system "./configure", *args
system "make install"