From c4da6199f0f37018e2273d02f9fef1072da7f873 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 3 Mar 2009 20:23:18 +0000 Subject: sqlite: bump version and convert to Makefile.autotools.in format Patch by Gustavo Zacarias Closes #139. --- package/database/sqlite/Config.in | 11 +++- package/database/sqlite/sqlite.mk | 103 ++++++++++++-------------------------- 2 files changed, 41 insertions(+), 73 deletions(-) (limited to 'package/database/sqlite') diff --git a/package/database/sqlite/Config.in b/package/database/sqlite/Config.in index c445c1e30..f9b12ae9f 100644 --- a/package/database/sqlite/Config.in +++ b/package/database/sqlite/Config.in @@ -1,9 +1,16 @@ config BR2_PACKAGE_SQLITE bool "sqlite" - select BR2_PACKAGE_NCURSES - select BR2_PACKAGE_READLINE help SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. http://www.sqlite.org/ + +config BR2_PACKAGE_SQLITE_READLINE + bool "Command-line editing" + depends on BR2_PACKAGE_SQLITE + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + Enable command-line editing. This requires ncurses and readline. + diff --git a/package/database/sqlite/sqlite.mk b/package/database/sqlite/sqlite.mk index ff1d4d25b..5d6616f28 100644 --- a/package/database/sqlite/sqlite.mk +++ b/package/database/sqlite/sqlite.mk @@ -4,77 +4,38 @@ # ############################################################# -SQLITE_VERSION:=3.6.10 -SQLITE_SOURCE:=sqlite-$(SQLITE_VERSION).tar.gz -SQLITE_SITE:=http://www.sqlite.org -SQLITE_DIR:=$(BUILD_DIR)/sqlite-$(SQLITE_VERSION) -SQLITE_CAT:=$(ZCAT) - -$(DL_DIR)/$(SQLITE_SOURCE): - $(call DOWNLOAD,$(SQLITE_SITE),$(SQLITE_SOURCE)) - -$(SQLITE_DIR)/.unpacked: $(DL_DIR)/$(SQLITE_SOURCE) - $(SQLITE_CAT) $(DL_DIR)/$(SQLITE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(SQLITE_DIR)/.unpacked - -$(SQLITE_DIR)/.configured: $(SQLITE_DIR)/.unpacked - (cd $(SQLITE_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - config_BUILD_CC="$(HOSTCC)" \ - config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_CC="$(TARGET_CC)" \ - config_TARGET_READLINE_LIBS="-L$(TARGET_DIR)/usr/lib -L$(TARGET_DIR)/lib -lncurses -lreadline" \ - config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-shared \ - --enable-static \ - --disable-tcl \ - --enable-tempstore \ - --enable-threadsafe \ - --enable-releasemode \ - ) - touch $(SQLITE_DIR)/.configured - -$(SQLITE_DIR)/sqlite3: $(SQLITE_DIR)/.configured - $(MAKE) -C $(SQLITE_DIR) - -$(STAGING_DIR)/usr/bin/sqlite3: $(SQLITE_DIR)/sqlite3 - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SQLITE_DIR) install - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libsqlite3.la - -$(TARGET_DIR)/usr/bin/sqlite3: $(STAGING_DIR)/usr/bin/sqlite3 - $(INSTALL) -m 0755 -D $^ $@ - $(STRIPCMD) $(STRIP_STRIP_ALL) $@ - cp -dpf $(STAGING_DIR)/usr/lib/libsqlite3*.so* $(TARGET_DIR)/usr/lib/ - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libsqlite3.so - -sqlite: uclibc ncurses $(TARGET_DIR)/usr/bin/sqlite3 +SQLITE_VERSION = 3.6.11 +SQLITE_SOURCE = sqlite-$(SQLITE_VERSION).tar.gz +SQLITE_SITE = http://www.sqlite.org +SQLITE_INSTALL_STAGING = YES +SQLITE_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install +SQLITE_LIBTOOL_PATCH = NO +SQLITE_DEPENDENCIES = uclibc + +SQLITE_CONF_OPT = --enable-shared \ + --enable-static \ + --enable-tempstore=yes \ + --enable-threadsafe \ + --enable-releasemode \ + --disable-tcl \ + --localstatedir=/var + +ifeq ($(BR2_PACKAGE_SQLITE_READLINE),y) +SQLITE_DEPENDENCIES += ncurses readline +SQLITE_CONF_OPT += --with-readline-inc="-I$(STAGING_DIR)/usr/include" +else +SQLITE_CONF_OPT += --disable-readline +endif -sqlite-source: $(DL_DIR)/$(SQLITE_SOURCE) +$(eval $(call AUTOTARGETS,package,sqlite)) -sqlite-clean: - -$(MAKE) -C $(SQLITE_DIR) clean - -rm -rf $(STAGING_DIR)/usr/lib/libsqlite* - -rm -rf $(STAGING_DIR)/usr/bin/sqlite3 - -rm -rf $(STAGING_DIR)/usr/include/sqlite* - -rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/sqlite* - -rm -rf $(TARGET_DIR)/usr/lib/libsqlite* - -rm -rf $(TARGET_DIR)/usr/bin/sqlite3 +$(SQLITE_TARGET_UNINSTALL): + $(call MESSAGE,"Uninstalling") + rm -f $(TARGET_DIR)/usr/bin/sqlite3 + rm -f $(TARGET_DIR)/usr/lib/libsqlite3* + rm -f $(STAGING_DIR)/usr/bin/sqlite3 + rm -f $(STAGING_DIR)/usr/lib/libsqlite3* + rm -f $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc + rm -f $(STAGING_DIR)/usr/include/sqlite3*.h + rm -f $(SQLITE_TARGET_INSTALL_TARGET) $(SQLITE_HOOK_POST_INSTALL) -sqlite-dirclean: - rm -rf $(SQLITE_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_SQLITE),y) -TARGETS+=sqlite -endif -- cgit v1.2.3