blob: 501c0e3e7782e1d8dc0db85cf4583ee42aa5b791 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "An Embeddable SQL Database Engine"
2HOMEPAGE = "http://www.sqlite.org/"
3SECTION = "libs"
4DEPENDS = "readline ncurses"
5LICENSE = "PD"
6LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96"
7
8PR = "r7"
9
10SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 file://mainmk_build_dynamic.patch \
12 file://mainmk_no_tcl.patch \
13 file://sqlite.pc \
14 file://0001-shell.c-Fix-format-not-a-string-literal-warning.patch \
15 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016
17SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \
18 expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \
19 parse.o pragma.o printf.o random.o select.o table.o tokenize.o \
20 trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o"
21
22inherit autotools pkgconfig
23
24do_configure() {
25 echo "main.mk is patched, no need to configure"
26 # make pkgconfig.bbclass pick this up
27 cp ${WORKDIR}/sqlite.pc ${S}
28}
29
30do_compile() {
31 oe_runmake -f ${S}/Makefile.linux-gcc \
32 TOP="${S}" \
33 BCC="${BUILD_CC}" \
34 TCC="${CC}" \
35 OPTS="-fPIC -D'INTPTR_TYPE=int'" \
36 TCL_FLAGS= LIBTCL= \
37 READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \
38 LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses"
39}
40
41do_install() {
42 install -d ${D}${libdir} ${D}${bindir}
43 install sqlite ${D}${bindir}
44 install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6
45 ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so
46 ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0
47 ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8
48 install -d ${D}${includedir}
49 install -m 0644 sqlite.h ${D}${includedir}/sqlite.h
50 install -d ${D}${libdir}/pkgconfig
51 install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc
52}
53
54PACKAGES += "${PN}-bin"
55FILES_${PN}-bin = "${bindir}/*"
56FILES_${PN} = "${libdir}/*.so.*"
57
58SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b"
59SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37"
60
61BBCLASSEXTEND = "native"