Arnout Vandecappelle (Essensium/Mind) | 1541d64 | 2012-01-23 21:23:25 +0100 | [diff] [blame] | 1 | ############################################################# |
| 2 | # |
| 3 | # Sqlcipher extension of sqlite |
| 4 | # http://sqlcipher.net |
| 5 | # |
| 6 | ############################################################# |
Alexandre Belloni | 7027040 | 2013-06-05 23:53:25 +0000 | [diff] [blame^] | 7 | |
Arnout Vandecappelle (Essensium/Mind) | 1541d64 | 2012-01-23 21:23:25 +0100 | [diff] [blame] | 8 | SQLCIPHER_VERSION = 1.1.9 |
| 9 | SQLCIPHER_SITE = http://github.com/sjlombardo/sqlcipher/tarball/v$(SQLCIPHER_VERSION) |
| 10 | SQLCIPHER_DEPENDENCIES = openssl host-tcl |
| 11 | SQLCIPHER_INSTALL_STAGING = YES |
| 12 | |
| 13 | SQLCIPHER_CONF_ENV = \ |
| 14 | CFLAGS+=" $(SQLCIPHER_CFLAGS)" \ |
| 15 | LDFLAGS+=" $(SQLCIPHER_LDFLAGS)" \ |
Peter Korsgaard | 16b17c9 | 2012-01-24 14:59:26 +0100 | [diff] [blame] | 16 | TCLSH_CMD=$(HOST_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) |
Arnout Vandecappelle (Essensium/Mind) | 1541d64 | 2012-01-23 21:23:25 +0100 | [diff] [blame] | 17 | |
| 18 | SQLCIPHER_CONF_OPT = \ |
| 19 | --enable-threadsafe \ |
| 20 | --localstatedir=/var |
| 21 | |
| 22 | SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README |
| 23 | SQLCIPHER_LDFLAGS += -lcrypto |
| 24 | |
| 25 | ifneq ($(BR2_LARGEFILE),y) |
| 26 | # the sqlite configure script fails to define SQLITE_DISABLE_LFS when |
| 27 | # --disable-largefile is passed, breaking the build. Work around it by |
| 28 | # simply adding it to CFLAGS for configure instead |
| 29 | SQLCIPHER_CFLAGS += -DSQLITE_DISABLE_LFS |
| 30 | endif |
| 31 | |
| 32 | ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y) |
| 33 | SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3 |
| 34 | endif |
| 35 | |
| 36 | ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y) |
| 37 | SQLCIPHER_DEPENDENCIES += ncurses readline |
| 38 | SQLCIPHER_CONF_OPT += --with-readline-inc="-I$(STAGING_DIR)/usr/include" |
| 39 | else |
| 40 | SQLCIPHER_CONF_OPT += --disable-readline |
| 41 | endif |
| 42 | |
| 43 | define SQLCIPHER_UNINSTALL_TARGET_CMDS |
| 44 | rm -f $(TARGET_DIR)/usr/bin/sqlite3 |
| 45 | rm -f $(TARGET_DIR)/usr/lib/libsqlite3* |
| 46 | rm -f $(TARGET_DIR)/usr/lib/pkgconfig/sqlite3.pc |
| 47 | rm -f $(TARGET_DIR)/usr/include/sqlite3*.h |
| 48 | endef |
| 49 | |
| 50 | define SQLCIPHER_UNINSTALL_STAGING_CMDS |
| 51 | rm -f $(STAGING_DIR)/usr/bin/sqlite3 |
| 52 | rm -f $(STAGING_DIR)/usr/lib/libsqlite3* |
| 53 | rm -f $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc |
| 54 | rm -f $(STAGING_DIR)/usr/include/sqlite3*.h |
| 55 | endef |
| 56 | |
Arnout Vandecappelle (Essensium/Mind) | e1502eb | 2012-07-03 00:07:32 +0200 | [diff] [blame] | 57 | $(eval $(autotools-package)) |