blob: daf3db5e9fbb8f42013ffadc5417dd9252ea4e55 [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
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022inherit autotools pkgconfig
23
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"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037
38EXTRA_OECONF = " \
39 --enable-shared \
40 --enable-threadsafe \
41 --disable-static-shell \
42"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043
Brad Bishop6e60e8b2018-02-01 10:27:11 -050044CFLAGS_append = " -fPIC"
45
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047CFLAGS += "-DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049# Provide column meta-data API
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080050CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
53
54FILES_${PN} = "${bindir}/*"
55FILES_lib${BPN} = "${libdir}/*.so.*"
56FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057 ${libdir}/pkgconfig ${includedir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050058FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
59FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050060
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
62
63BBCLASSEXTEND = "native nativesdk"