diff options
| author | Adam Vandenberg | 2013-08-06 21:40:48 -0700 | 
|---|---|---|
| committer | Adam Vandenberg | 2013-09-11 22:05:34 -0700 | 
| commit | aad393450a1298c2a991026ff468d6c31d4f8609 (patch) | |
| tree | d4386cb7a90fe5dee0ca8338ac1571961237179d | |
| parent | 7a47298256fa737d630eda48b13fe66081129c1b (diff) | |
| download | homebrew-aad393450a1298c2a991026ff468d6c31d4f8609.tar.bz2 | |
sqlite: use resources
| -rw-r--r-- | Library/Formula/sqlite.rb | 31 | 
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 | 
