From 96a8c3331e4fa3c5fd2416fbe471e240dae4cffe Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Wed, 24 Sep 2014 07:12:20 +0100 Subject: Sqlcipher: fts option & openssl dep Closes #32656. Signed-off-by: Jack Nagel --- Library/Formula/sqlcipher.rb | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'Library') diff --git a/Library/Formula/sqlcipher.rb b/Library/Formula/sqlcipher.rb index be4ae0191..9936e5277 100644 --- a/Library/Formula/sqlcipher.rb +++ b/Library/Formula/sqlcipher.rb @@ -7,11 +7,27 @@ class Sqlcipher < Formula head "https://github.com/sqlcipher/sqlcipher.git" + option "with-fts", "Build with full-text search enabled" + + depends_on "openssl" + def install - system "./configure", "--prefix=#{prefix}", "--enable-tempstore=yes", - "CFLAGS=-DSQLITE_HAS_CODEC", "LDFLAGS=-lcrypto", - "--disable-tcl" + + args = %W[ + --prefix=#{prefix} + --enable-tempstore=yes + --with-crypto-lib=#{Formula["openssl"].opt_prefix} + --disable-tcl + ] + + if build.with?("fts") + args << "CFLAGS=-DSQLITE_HAS_CODEC -DSQLITE_ENABLE_FTS3" + else + args << "CFLAGS=-DSQLITE_HAS_CODEC" + end + + system "./configure", *args system "make" - system "make install" + system "make", "install" end end -- cgit v1.2.3