blob: 1adc0eba6656b9f859308290598d4d8c147cc69f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Embeddable SQL database engine"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "A library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003HOMEPAGE = "http://www.sqlite.org"
4SECTION = "libs"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005
6PE = "3"
7
8def sqlite_download_version(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009 pvsplit = d.getVar('PV').split('.')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010 if len(pvsplit) < 4:
11 pvsplit.append('0')
12 return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
13
14SQLITE_PV = "${@sqlite_download_version(d)}"
15
16S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
17
18UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
19UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021CVE_PRODUCT = "sqlite"
22
Brad Bishop79641f22019-09-10 07:20:22 -040023inherit autotools pkgconfig siteinfo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024
Brad Bishop19323692019-04-05 15:28:33 -040025# enable those which are enabled by default in configure
26PACKAGECONFIG ?= "fts4 fts5 json1 rtree dyn_ext"
27PACKAGECONFIG_class-native ?= "fts4 fts5 json1 rtree dyn_ext"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050028
29PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
30PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
Brad Bishop19323692019-04-05 15:28:33 -040031PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
32PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
33PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
34PACKAGECONFIG[json1] = "--enable-json1,--disable-json1"
35PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
36PACKAGECONFIG[session] = "--enable-session,--disable-session"
37PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
Brad Bishop08902b02019-08-20 09:16:51 -040038PACKAGECONFIG[zlib] = ",,zlib"
39
40CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041
42EXTRA_OECONF = " \
43 --enable-shared \
44 --enable-threadsafe \
45 --disable-static-shell \
46"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047
48# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Brad Bishop79641f22019-09-10 07:20:22 -040049CFLAGS_append = " -DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051# Provide column meta-data API
Brad Bishop79641f22019-09-10 07:20:22 -040052CFLAGS_append = " -DSQLITE_ENABLE_COLUMN_METADATA"
53
54# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
55# huristics, which are not always correct
56CFLAGS_append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057
Patrick Williamsc124f4f2015-09-15 14:41:29 -050058PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
59
60FILES_${PN} = "${bindir}/*"
61FILES_lib${BPN} = "${libdir}/*.so.*"
62FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050063 ${libdir}/pkgconfig ${includedir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
65FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066
Patrick Williamsc124f4f2015-09-15 14:41:29 -050067AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
68
69BBCLASSEXTEND = "native nativesdk"