From 8e2f789de1c0340b7af11a492ff350df0ee8a1e6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 8 May 2012 00:26:26 -0500 Subject: sqlite 3.7.11 - use buildpath instead of Pathname.pwd - put conditional inside of caveats Signed-off-by: Jack Nagel --- Library/Formula/sqlite.rb | 52 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'Library/Formula/sqlite.rb') diff --git a/Library/Formula/sqlite.rb b/Library/Formula/sqlite.rb index 90a76f9d7..964053628 100644 --- a/Library/Formula/sqlite.rb +++ b/Library/Formula/sqlite.rb @@ -7,16 +7,16 @@ class SqliteFunctions < Formula end class SqliteDocs < Formula - url 'http://www.sqlite.org/sqlite-doc-3071000.zip' - sha1 '9957b9f2e955d82b2484cb44cc6fb4a53313d085' - version '3.7.10' + url 'http://www.sqlite.org/sqlite-doc-3071100.zip' + sha1 '87cbed1918c2604daefd3588a8555067e55e53cf' + version '3.7.11' end class Sqlite < Formula homepage 'http://sqlite.org/' - url 'http://www.sqlite.org/sqlite-autoconf-3071000.tar.gz' - sha1 '0442d5a1bff50153039951b09db649864d8af0bb' - version '3.7.10' + url 'http://www.sqlite.org/sqlite-autoconf-3071100.tar.gz' + sha1 'a768f76b10df84d6a2c66178544d42725a8fdaf0' + version '3.7.11' depends_on 'readline' => :optional @@ -48,8 +48,7 @@ class Sqlite < Formula system "make install" if ARGV.include? "--with-functions" - d=Pathname.getwd - SqliteFunctions.new.brew { mv 'extension-functions.c?get=25', d + 'extension-functions.c' } + SqliteFunctions.new.brew { mv 'extension-functions.c?get=25', buildpath/'extension-functions.c' } system ENV.cc, "-fno-common", "-dynamiclib", "extension-functions.c", "-o", "libsqlitefunctions.dylib", *ENV.cflags.split lib.install "libsqlitefunctions.dylib" end @@ -57,25 +56,24 @@ class Sqlite < Formula SqliteDocs.new.brew { doc.install Dir['*'] } if ARGV.include? "--with-docs" end - if ARGV.include? "--with-functions" - def caveats - <<-EOS.undent - Usage instructions for applications calling the sqlite3 API functions: - - In your application, call sqlite3_enable_load_extension(db,1) to - allow loading external libraries. Then load the library libsqlitefunctions - using sqlite3_load_extension; the third argument should be 0. - See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. - Select statements may now use these functions, as in - SELECT cos(radians(inclination)) FROM satsum WHERE satnum = 25544; - - Usage instructions for the sqlite3 program: - - If the program is built so that loading extensions is permitted, - the following will work: - sqlite> SELECT load_extension('#{lib}/libsqlitefunctions.dylib'); - sqlite> select cos(radians(45)); - 0.707106781186548 + def caveats + if ARGV.include? '--with-functions' then <<-EOS.undent + Usage instructions for applications calling the sqlite3 API functions: + + In your application, call sqlite3_enable_load_extension(db,1) to + allow loading external libraries. Then load the library libsqlitefunctions + using sqlite3_load_extension; the third argument should be 0. + See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. + Select statements may now use these functions, as in + SELECT cos(radians(inclination)) FROM satsum WHERE satnum = 25544; + + Usage instructions for the sqlite3 program: + + If the program is built so that loading extensions is permitted, + the following will work: + sqlite> SELECT load_extension('#{lib}/libsqlitefunctions.dylib'); + sqlite> select cos(radians(45)); + 0.707106781186548 EOS end end -- cgit v1.2.3