blob: 1834867d1020f547dd6b5b706b56d1466166a76a [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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024PACKAGECONFIG ?= ""
25PACKAGECONFIG_class-native = ""
26
27PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
28PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
29
30EXTRA_OECONF = " \
31 --enable-shared \
32 --enable-threadsafe \
33 --disable-static-shell \
34"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036CFLAGS_append = " -fPIC"
37
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038# pread() is in POSIX.1-2001 so any reasonable system must surely support it
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039CFLAGS += "-DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041# Provide column meta-data API
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050043
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
45
46FILES_${PN} = "${bindir}/*"
47FILES_lib${BPN} = "${libdir}/*.so.*"
48FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049 ${libdir}/pkgconfig ${includedir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
51FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050052
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
54
55BBCLASSEXTEND = "native nativesdk"