2011-01-09 18:37:30 +01:00
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
2016-01-02 17:29:56 +01:00
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
2011-01-09 18:37:30 +01:00
#
2013-12-21 21:51:48 +01:00
# OpenELEC is free software: you can redistribute it and/or modify
2011-01-09 18:37:30 +01:00
# it under the terms of the GNU General Public License as published by
2013-12-21 21:51:48 +01:00
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
2011-01-09 18:37:30 +01:00
#
2013-12-21 21:51:48 +01:00
# OpenELEC is distributed in the hope that it will be useful,
2011-01-09 18:37:30 +01:00
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2013-12-21 21:51:48 +01:00
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2011-01-09 18:37:30 +01:00
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2013-12-21 21:51:48 +01:00
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
2011-01-09 18:37:30 +01:00
################################################################################
2013-07-21 18:06:00 +02:00
PKG_NAME = "sqlite"
2017-08-07 00:58:54 +01:00
PKG_VERSION = "autoconf-3200000"
PKG_SHA256 = "3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0"
2013-07-21 18:06:00 +02:00
PKG_ARCH = "any"
PKG_LICENSE = "PublicDomain"
2015-09-16 16:39:45 +02:00
PKG_SITE = "https://www.sqlite.org/"
2017-08-07 00:58:54 +01:00
PKG_URL = " https://www.sqlite.org/2017/ $PKG_NAME - $PKG_VERSION .tar.gz "
2014-01-30 14:41:45 +01:00
PKG_DEPENDS_TARGET = "toolchain"
2013-07-21 18:06:00 +02:00
PKG_SECTION = "database"
PKG_SHORTDESC = "sqlite: An Embeddable SQL Database Engine"
PKG_LONGDESC = "SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library. SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk."
2009-04-06 13:29:18 +02:00
2010-06-13 22:56:09 +02:00
# sqlite fails to compile with fast-math link time optimization.
2012-05-28 22:14:39 +02:00
CFLAGS = ` echo $CFLAGS | sed -e "s|-Ofast|-O3|g" `
CFLAGS = ` echo $CFLAGS | sed -e "s|-ffast-math||g" `
2010-05-30 22:54:04 +02:00
2012-05-27 02:38:37 +02:00
# This option adds additional logic to the ANALYZE command and to the query planner
2011-12-10 22:13:22 +01:00
# that can help SQLite to chose a better query plan under certain situations. The
# ANALYZE command is enhanced to collect histogram data from each index and store
# that data in the sqlite_stat3 table. The query planner will then use the histogram
# data to help it make better index choices.
CFLAGS = " $CFLAGS -DSQLITE_ENABLE_STAT3 "
2012-05-27 02:38:37 +02:00
# When this C-preprocessor macro is defined, SQLite includes some additional APIs
# that provide convenient access to meta-data about tables and queries. The APIs that
# are enabled by this option are:
# - sqlite3_column_database_name()
# - sqlite3_column_database_name16()
# - sqlite3_column_table_name()
# - sqlite3_column_table_name16()
# - sqlite3_column_origin_name()
# - sqlite3_column_origin_name16()
# - sqlite3_table_column_metadata()
CFLAGS = " $CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 "
2013-06-12 04:28:43 +02:00
# This macro sets the default limit on the amount of memory that will be used for
# memory-mapped I/O for each open database file. If the N is zero, then memory
# mapped I/O is disabled by default. This compile-time limit and the
# SQLITE_MAX_MMAP_SIZE can be modified at start-time using the
# sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) call, or at run-time using the
# mmap_size pragma.
2014-02-24 19:45:34 +02:00
CFLAGS = " $CFLAGS -DSQLITE_TEMP_STORE=3 -DSQLITE_DEFAULT_MMAP_SIZE=268435456 "
2013-06-12 04:28:43 +02:00
2017-06-14 22:34:43 -07:00
# libsqlite3.a(sqlite3.o): requires dynamic R_X86_64_PC32 reloc against 'sqlite3_stricmp' which may overflow at runtime
CFLAGS = " $CFLAGS -fPIC "
2015-05-16 17:26:48 +03:00
p r e _ m a k e _ t a r g e t ( ) {
# dont build parallel
MAKEFLAGS = -j1
}
2010-12-10 11:00:50 +01:00
2013-07-21 18:06:00 +02:00
PKG_CONFIGURE_OPTS_TARGET = " --enable-static \
--disable-shared \
--disable-readline \
--enable-threadsafe \
--enable-dynamic-extensions \
--with-gnu-ld"