Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Embeddable SQL database engine" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "A library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | HOMEPAGE = "http://www.sqlite.org" |
| 4 | SECTION = "libs" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | |
| 6 | PE = "3" |
| 7 | |
| 8 | def sqlite_download_version(d): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | pvsplit = d.getVar('PV').split('.') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 10 | if len(pvsplit) < 4: |
| 11 | pvsplit.append('0') |
| 12 | return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]]) |
| 13 | |
| 14 | SQLITE_PV = "${@sqlite_download_version(d)}" |
| 15 | |
| 16 | S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}" |
| 17 | |
| 18 | UPSTREAM_CHECK_URI = "http://www.sqlite.org/" |
| 19 | UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | CVE_PRODUCT = "sqlite" |
| 22 | |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 23 | inherit autotools pkgconfig siteinfo |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | # enable those which are enabled by default in configure |
| 26 | PACKAGECONFIG ?= "fts4 fts5 json1 rtree dyn_ext" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 27 | PACKAGECONFIG:class-native ?= "fts4 fts5 json1 rtree dyn_ext" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | |
| 29 | PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit" |
| 30 | PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | PACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3" |
| 32 | PACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4" |
| 33 | PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5" |
| 34 | PACKAGECONFIG[json1] = "--enable-json1,--disable-json1" |
| 35 | PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree" |
| 36 | PACKAGECONFIG[session] = "--enable-session,--disable-session" |
| 37 | PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 38 | PACKAGECONFIG[zlib] = ",,zlib" |
| 39 | |
| 40 | CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 41 | |
| 42 | EXTRA_OECONF = " \ |
| 43 | --enable-shared \ |
| 44 | --enable-threadsafe \ |
| 45 | --disable-static-shell \ |
| 46 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | |
| 48 | # pread() is in POSIX.1-2001 so any reasonable system must surely support it |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | CFLAGS:append = " -DUSE_PREAD" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 51 | # Provide column meta-data API |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | CFLAGS:append = " -DSQLITE_ENABLE_COLUMN_METADATA" |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 53 | |
| 54 | # Unless SQLITE_BYTEORDER is predefined, the code falls back to build time |
| 55 | # huristics, which are not always correct |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | CFLAGS:append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 57 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}" |
| 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | FILES:${PN} = "${bindir}/*" |
| 61 | FILES:lib${BPN} = "${libdir}/*.so.*" |
| 62 | FILES:lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 63 | ${libdir}/pkgconfig ${includedir}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | FILES:lib${BPN}-doc = "${docdir} ${mandir} ${infodir}" |
| 65 | FILES:lib${BPN}-staticdev = "${libdir}/lib*.a" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 66 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 67 | AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}" |
| 68 | |
| 69 | BBCLASSEXTEND = "native nativesdk" |