You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bitcoin/depends/packages/sqlite.mk

36 lines
1.3 KiB

package=sqlite
$(package)_version=3380500
$(package)_download_path=https://sqlite.org/2022/
$(package)_file_name=sqlite-autoconf-$($(package)_version).tar.gz
$(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c
define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking
build: use more recommended sqlite3 compile options See https://www.sqlite.org/compile.html. DSQLITE_DQS > This setting disables the double-quoted string literal misfeature. DSQLITE_DEFAULT_MEMSTATUS > This setting causes the sqlite3_status() interfaces that track > memory usage to be disabled. > This helps the sqlite3_malloc() routines run much faster, and since > SQLite uses sqlite3_malloc() internally, this helps to make the > entire library faster. DSQLITE_OMIT_DEPRECATED > Omitting deprecated interfaces and features will not help SQLite > to run any faster. > It will reduce the library footprint, however. And it is the > right thing to do. DSQLITE_OMIT_SHARED_CACHE > Omitting the possibility of using shared cache allows many > conditionals in performance-critical sections of the code to be > eliminated. This can give a noticeable improvement in performance. Also: https://www.sqlite.org/sharedcache.html > Shared-cache mode is an obsolete feature. > The use of shared-cache mode is discouraged. > Most use cases for shared-cache are better served by WAL mode. > Applications that build their own copy of SQLite from source code > are encouraged to use the -DSQLITE_OMIT_SHARED_CACHE compile-time > option, as the resulting binary will be both smaller and faster. DSQLITE_OMIT_JSON Starting with sqlite 3.38.0 the JSON extension became opt-out rather than opt-in, so we disable it here. --disable-rtree > An R-Tree is a special index that is designed for doing range queries. > R-Trees are most commonly used in geospatial systems... https://www.sqlite.org/rtree.html --disable-fts4 --disable-fts5 > FTS5 is an SQLite virtual table module that provides full-text > search functionality to database applications. DSQLITE_LIKE_DOESNT_MATCH_BLOBS > simplifies the implementation of the LIKE optimization and allows > queries that use the LIKE optimization to run faster. DSQLITE_OMIT_DECLTYPE > By omitting the (seldom-needed) ability to return the declared type of > columns from the result set of query, prepared statements can be made > to consume less memory. DSQLITE_OMIT_PROGRESS_CALLBACK > By omitting this interface, a single conditional is removed from the > inner loop of the bytecode engine, helping SQL statements to run slightly > faster. DSQLITE_OMIT_AUTOINIT > with the SQLITE_OMIT_AUTOINIT option, the automatic initialization is omitted. > This helps many API calls to run a little faster > it also means that the application must call sqlite3_initialize() manually.
2 years ago
$(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5
# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent.
$(package)_cppflags_debug += -DSQLITE_DEBUG
$(package)_cppflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED
$(package)_cppflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS
$(package)_cppflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE) libsqlite3.la
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef