blob: 30847b958fbd3fd23b00972d8830065c30f92567 [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
39BUILD_CFLAGS += "-DUSE_PREAD"
Brad Bishopd5ae7d92018-06-14 09:52:03 -070040BUILDSDK_CFLAGS += "-DUSE_PREAD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041TARGET_CFLAGS += "-DUSE_PREAD"
42
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050043# Provide column meta-data API
44BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
Brad Bishopd5ae7d92018-06-14 09:52:03 -070045BUILDSDK_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
47
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
49
50FILES_${PN} = "${bindir}/*"
51FILES_lib${BPN} = "${libdir}/*.so.*"
52FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050053 ${libdir}/pkgconfig ${includedir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050054FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
55FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050056
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
58
59BBCLASSEXTEND = "native nativesdk"