blob: 4af1e09e80d587b52b240ff01d5b38ef87410cf4 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Embeddable SQL database engine"
2HOMEPAGE = "http://www.sqlite.org"
3SECTION = "libs"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05004
5PE = "3"
6
7def sqlite_download_version(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008 pvsplit = d.getVar('PV').split('.')
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05009 if len(pvsplit) < 4:
10 pvsplit.append('0')
11 return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
12
13SQLITE_PV = "${@sqlite_download_version(d)}"
14
15S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
16
17UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
18UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020CVE_PRODUCT = "sqlite"
21
Brad Bishop79641f22019-09-10 07:20:22 -040022inherit autotools pkgconfig siteinfo
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023
Brad Bishop19323692019-04-05 15:28:33 -040024# enable those which are enabled by default in configure
25PACKAGECONFIG ?= "fts4 fts5 json1 rtree dyn_ext"
26PACKAGECONFIG_class-native ?= "fts4 fts5 json1 rtree dyn_ext"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050027
28PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
29PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
Brad Bishop19323692019-04-05 15:28:33 -040030PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
31PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
32PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
33PACKAGECONFIG[json1] = "--enable-json1,--disable-json1"
34PACKAGECONFIG[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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050047CFLAGS_append = " -fPIC"
48
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Brad Bishop79641f22019-09-10 07:20:22 -040050CFLAGS_append = " -DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050052# Provide column meta-data API
Brad Bishop79641f22019-09-10 07:20:22 -040053CFLAGS_append = " -DSQLITE_ENABLE_COLUMN_METADATA"
54
55# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
56# huristics, which are not always correct
57CFLAGS_append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050058
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
60
61FILES_${PN} = "${bindir}/*"
62FILES_lib${BPN} = "${libdir}/*.so.*"
63FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050064 ${libdir}/pkgconfig ${includedir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050065FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
66FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050067
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
69
70BBCLASSEXTEND = "native nativesdk"