2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-08 17:33:03 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Sqlite < Formula
|
2011-04-12 16:15:31 +00:00
|
|
|
homepage 'http://sqlite.org/'
|
2011-04-14 15:21:15 +00:00
|
|
|
url 'http://www.sqlite.org/sqlite-autoconf-3070601.tar.gz'
|
|
|
|
sha256 '79b7de2483cbbfa79721c9414d4c7acda00ba98a8b1fe73460fe57c173651ad4'
|
|
|
|
version '3.7.6.1'
|
2009-08-08 17:33:03 +00:00
|
|
|
|
2010-04-08 02:41:07 +00:00
|
|
|
def options
|
2010-11-02 14:40:27 +00:00
|
|
|
[
|
|
|
|
["--with-rtree", "Enables the R*Tree index module"],
|
2010-11-16 05:35:28 +00:00
|
|
|
["--with-fts", "Enables the FTS Module"],
|
2010-11-02 14:40:27 +00:00
|
|
|
["--universal", "Build a universal binary."]
|
|
|
|
]
|
2010-04-08 02:41:07 +00:00
|
|
|
end
|
|
|
|
|
2009-08-08 17:33:03 +00:00
|
|
|
def install
|
2010-04-08 02:41:07 +00:00
|
|
|
ENV.append "CFLAGS", "-DSQLITE_ENABLE_RTREE=1" if ARGV.include? "--with-rtree"
|
2010-11-16 05:35:28 +00:00
|
|
|
ENV.append "CPPFLAGS","-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS" if ARGV.include? "--with-fts"
|
2010-10-17 15:52:14 +00:00
|
|
|
ENV.universal_binary if ARGV.include? "--universal"
|
2010-03-12 18:20:08 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
2009-08-08 17:33:03 +00:00
|
|
|
"--disable-dependency-tracking"
|
|
|
|
system "make install"
|
|
|
|
end
|
2010-04-08 02:41:07 +00:00
|
|
|
end
|