Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Embeddable SQL database engine" |
| 2 | HOMEPAGE = "http://www.sqlite.org" |
| 3 | SECTION = "libs" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 4 | |
| 5 | PE = "3" |
| 6 | |
| 7 | def sqlite_download_version(d): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 8 | pvsplit = d.getVar('PV').split('.') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 9 | if len(pvsplit) < 4: |
| 10 | pvsplit.append('0') |
| 11 | return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]]) |
| 12 | |
| 13 | SQLITE_PV = "${@sqlite_download_version(d)}" |
| 14 | |
| 15 | S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}" |
| 16 | |
| 17 | UPSTREAM_CHECK_URI = "http://www.sqlite.org/" |
| 18 | UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | CVE_PRODUCT = "sqlite" |
| 21 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | inherit autotools pkgconfig |
| 23 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 24 | PACKAGECONFIG ?= "" |
| 25 | PACKAGECONFIG_class-native = "" |
| 26 | |
| 27 | PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit" |
| 28 | PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses" |
| 29 | |
| 30 | EXTRA_OECONF = " \ |
| 31 | --enable-shared \ |
| 32 | --enable-threadsafe \ |
| 33 | --disable-static-shell \ |
| 34 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | CFLAGS_append = " -fPIC" |
| 37 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | # pread() is in POSIX.1-2001 so any reasonable system must surely support it |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 39 | CFLAGS += "-DUSE_PREAD" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 41 | # Provide column meta-data API |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 42 | CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 43 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}" |
| 45 | |
| 46 | FILES_${PN} = "${bindir}/*" |
| 47 | FILES_lib${BPN} = "${libdir}/*.so.*" |
| 48 | FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 49 | ${libdir}/pkgconfig ${includedir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}" |
| 51 | FILES_lib${BPN}-staticdev = "${libdir}/lib*.a" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 52 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}" |
| 54 | |
| 55 | BBCLASSEXTEND = "native nativesdk" |