blob: 07614bdb3e36c5b0528a75f10ca730bc8aadcafe [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
47# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Brad Bishop79641f22019-09-10 07:20:22 -040048CFLAGS_append = " -DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050# Provide column meta-data API
Brad Bishop79641f22019-09-10 07:20:22 -040051CFLAGS_append = " -DSQLITE_ENABLE_COLUMN_METADATA"
52
53# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
54# huristics, which are not always correct
55CFLAGS_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
59FILES_${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 Williamsc124f4f2015-09-15 14:41:29 -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"