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): |
| 8 | pvsplit = d.getVar('PV', True).split('.') |
| 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 | |
| 20 | inherit autotools pkgconfig |
| 21 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 22 | PACKAGECONFIG ?= "" |
| 23 | PACKAGECONFIG_class-native = "" |
| 24 | |
| 25 | PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit" |
| 26 | PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses" |
| 27 | |
| 28 | EXTRA_OECONF = " \ |
| 29 | --enable-shared \ |
| 30 | --enable-threadsafe \ |
| 31 | --disable-static-shell \ |
| 32 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | |
| 34 | # pread() is in POSIX.1-2001 so any reasonable system must surely support it |
| 35 | BUILD_CFLAGS += "-DUSE_PREAD" |
| 36 | TARGET_CFLAGS += "-DUSE_PREAD" |
| 37 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 38 | # Provide column meta-data API |
| 39 | BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA" |
| 40 | TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA" |
| 41 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 42 | PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}" |
| 43 | |
| 44 | FILES_${PN} = "${bindir}/*" |
| 45 | FILES_lib${BPN} = "${libdir}/*.so.*" |
| 46 | FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 47 | ${libdir}/pkgconfig ${includedir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}" |
| 49 | FILES_lib${BPN}-staticdev = "${libdir}/lib*.a" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 50 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}" |
| 52 | |
| 53 | BBCLASSEXTEND = "native nativesdk" |