xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/sqlite/sqlite3.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Embeddable SQL database engine"
2*4882a593SmuzhiyunDESCRIPTION = "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"
3*4882a593SmuzhiyunHOMEPAGE = "http://www.sqlite.org"
4*4882a593SmuzhiyunSECTION = "libs"
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunPE = "3"
7*4882a593Smuzhiyun
8*4882a593Smuzhiyundef sqlite_download_version(d):
9*4882a593Smuzhiyun    pvsplit = d.getVar('PV').split('.')
10*4882a593Smuzhiyun    if len(pvsplit) < 4:
11*4882a593Smuzhiyun        pvsplit.append('0')
12*4882a593Smuzhiyun    return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSQLITE_PV = "${@sqlite_download_version(d)}"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunS = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "http://www.sqlite.org/"
19*4882a593SmuzhiyunUPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunCVE_PRODUCT = "sqlite"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyuninherit autotools pkgconfig siteinfo
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun# enable those which are enabled by default in configure
26*4882a593SmuzhiyunPACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
27*4882a593SmuzhiyunPACKAGECONFIG:class-native ?= "fts4 fts5 rtree dyn_ext"
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunPACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
30*4882a593SmuzhiyunPACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
31*4882a593SmuzhiyunPACKAGECONFIG[fts3] = "--enable-fts3,--disable-fts3"
32*4882a593SmuzhiyunPACKAGECONFIG[fts4] = "--enable-fts4,--disable-fts4"
33*4882a593SmuzhiyunPACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
34*4882a593SmuzhiyunPACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
35*4882a593SmuzhiyunPACKAGECONFIG[session] = "--enable-session,--disable-session"
36*4882a593SmuzhiyunPACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
37*4882a593SmuzhiyunPACKAGECONFIG[zlib] = ",,zlib"
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunCACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunEXTRA_OECONF = " \
42*4882a593Smuzhiyun    --enable-shared \
43*4882a593Smuzhiyun    --enable-threadsafe \
44*4882a593Smuzhiyun    --disable-static-shell \
45*4882a593Smuzhiyun"
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun# pread() is in POSIX.1-2001 so any reasonable system must surely support it
48*4882a593SmuzhiyunCFLAGS:append = " -DUSE_PREAD"
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun# Provide column meta-data API
51*4882a593SmuzhiyunCFLAGS:append = " -DSQLITE_ENABLE_COLUMN_METADATA"
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
54*4882a593Smuzhiyun# huristics, which are not always correct
55*4882a593SmuzhiyunCFLAGS:append = " ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunPACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunFILES:${PN} = "${bindir}/*"
60*4882a593SmuzhiyunFILES:lib${BPN} = "${libdir}/*.so.*"
61*4882a593SmuzhiyunFILES:lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
62*4882a593Smuzhiyun                       ${libdir}/pkgconfig ${includedir}"
63*4882a593SmuzhiyunFILES:lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
64*4882a593SmuzhiyunFILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
65*4882a593Smuzhiyun
66*4882a593SmuzhiyunAUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
69