blob: c246d42fdf3fbc2937ad336d18997da11acc21db [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
Andrew Geissler3eeda902023-05-19 10:14:02 -050021CVE_PRODUCT = "sqlite sqlite3"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022
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
Andrew Geissler9aee5002022-03-30 16:27:02 +000026PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
27PACKAGECONFIG:class-native ?= "fts4 fts5 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"
Brad Bishop19323692019-04-05 15:28:33 -040034PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
35PACKAGECONFIG[session] = "--enable-session,--disable-session"
36PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
Brad Bishop08902b02019-08-20 09:16:51 -040037PACKAGECONFIG[zlib] = ",,zlib"
38
39CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050040
41EXTRA_OECONF = " \
42 --enable-shared \
43 --enable-threadsafe \
44 --disable-static-shell \
45"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046
47# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Patrick Williams213cb262021-08-07 19:21:33 -050048CFLAGS:append = " -DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050# Provide column meta-data API
Patrick Williams213cb262021-08-07 19:21:33 -050051CFLAGS:append = " -DSQLITE_ENABLE_COLUMN_METADATA"
Brad Bishop79641f22019-09-10 07:20:22 -040052
53# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
54# huristics, which are not always correct
Patrick Williams213cb262021-08-07 19:21:33 -050055CFLAGS:append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050056
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
58
Patrick Williams213cb262021-08-07 19:21:33 -050059FILES:${PN} = "${bindir}/*"
60FILES:lib${BPN} = "${libdir}/*.so.*"
61FILES:lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050062 ${libdir}/pkgconfig ${includedir}"
Patrick Williams213cb262021-08-07 19:21:33 -050063FILES:lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
64FILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
67
68BBCLASSEXTEND = "native nativesdk"