aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/sqlite.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/sqlite.rb')
-rw-r--r--Library/Formula/sqlite.rb31
1 files changed, 15 insertions, 16 deletions
diff --git a/Library/Formula/sqlite.rb b/Library/Formula/sqlite.rb
index 4feba3df6..d2c1ff2a5 100644
--- a/Library/Formula/sqlite.rb
+++ b/Library/Formula/sqlite.rb
@@ -1,23 +1,13 @@
require 'formula'
-class SqliteFunctions < Formula
- url 'http://www.sqlite.org/contrib/download/extension-functions.c?get=25', :using => :nounzip
- sha1 'c68fa706d6d9ff98608044c00212473f9c14892f'
- version '2010-02-06'
-end
-
-class SqliteDocs < Formula
- url 'http://www.sqlite.org/2013/sqlite-doc-3080002.zip'
- version '3.8.0.2'
- sha1 '43e314880cee7c97c240131625f6442c2ca7b109'
-end
-
class Sqlite < Formula
homepage 'http://sqlite.org/'
url 'http://www.sqlite.org/2013/sqlite-autoconf-3080002.tar.gz'
version '3.8.0.2'
sha1 '294c30e882a0d45877bce09afe72d08ccfc6b650'
+ keg_only :provided_by_osx, "OS X provides an older sqlite3."
+
option :universal
option 'with-docs', 'Install HTML documentation'
option 'without-rtree', 'Disable the R*Tree index module'
@@ -26,7 +16,17 @@ class Sqlite < Formula
depends_on 'readline' => :recommended
- keg_only :provided_by_osx, "OS X provides an older sqlite3."
+ resource 'functions' do
+ url 'http://www.sqlite.org/contrib/download/extension-functions.c?get=25', :using => :nounzip
+ version '2010-01-06'
+ sha1 'c68fa706d6d9ff98608044c00212473f9c14892f'
+ end
+
+ resource 'docs' do
+ url 'http://www.sqlite.org/2013/sqlite-doc-3080002.zip'
+ version '3.8.0.2'
+ sha1 '43e314880cee7c97c240131625f6442c2ca7b109'
+ end
def install
ENV.append 'CPPFLAGS', "-DSQLITE_ENABLE_RTREE" unless build.without? "rtree"
@@ -42,7 +42,7 @@ class Sqlite < Formula
system "make install"
if build.with? "functions"
- SqliteFunctions.new.brew { buildpath.install 'extension-functions.c' }
+ buildpath.install resource('functions')
system ENV.cc, "-fno-common",
"-dynamiclib",
"extension-functions.c",
@@ -50,8 +50,7 @@ class Sqlite < Formula
*ENV.cflags.split
lib.install "libsqlitefunctions.dylib"
end
-
- SqliteDocs.new.brew { doc.install Dir['*'] } if build.with? "docs"
+ doc.install resource('docs') if build.with? "docs"
end
def caveats