summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-support/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/sqlite')
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc53
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb11
3 files changed, 125 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
new file mode 100644
index 000000000..5bff33b85
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
@@ -0,0 +1,53 @@
+SUMMARY = "Embeddable SQL database engine"
+HOMEPAGE = "http://www.sqlite.org"
+SECTION = "libs"
+
+PE = "3"
+
+def sqlite_download_version(d):
+ pvsplit = d.getVar('PV', True).split('.')
+ if len(pvsplit) < 4:
+ pvsplit.append('0')
+ return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
+
+SQLITE_PV = "${@sqlite_download_version(d)}"
+
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+
+UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
+UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG_class-native = ""
+
+PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
+PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --enable-threadsafe \
+ --disable-static-shell \
+"
+
+# pread() is in POSIX.1-2001 so any reasonable system must surely support it
+BUILD_CFLAGS += "-DUSE_PREAD"
+TARGET_CFLAGS += "-DUSE_PREAD"
+
+# Provide column meta-data API
+BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+
+PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
+
+FILES_${PN} = "${bindir}/*"
+FILES_lib${BPN} = "${libdir}/*.so.*"
+FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
+ ${libdir}/pkgconfig ${includedir}"
+FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
+FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
+
+AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
new file mode 100644
index 000000000..6f39ae266
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
@@ -0,0 +1,61 @@
+From ede5db83e38cc8ad8c9be291cd8985f7ad99f291 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 16 Feb 2016 14:00:00 -0800
+Subject: [PATCH] fix --disable-static-shell
+
+Upstream sqlite seems to be moving further and further away from
+allowing the sqlite3 command line tool to be dynamically linked with
+sqlite.
+
+The --disable-static-shell configure option added in 3.10.0 no longer
+has any effect in 3.11.0. For now patch things up and make it work.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ Makefile.am | 13 +++++++++++--
+ configure.ac | 2 +-
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0e09cfc..608c0fd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,9 +6,18 @@ libsqlite3_la_SOURCES = sqlite3.c
+ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+
+ bin_PROGRAMS = sqlite3
+-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
+-sqlite3_LDADD = @READLINE_LIBS@
++sqlite3_SOURCES = shell.c sqlite3.h
++EXTRA_sqlite3_SOURCES = sqlite3.c
++sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
+ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
++
++# Warning: Adding SQLITE_ENABLE_EXPLAIN_COMMENTS to sqlite3_CFLAGS doesn't
++# actually have any effect if we link the sqlite3 command line tool with the
++# libsqlite3.so shared library (which will contain a version of sqlite3.c
++# compiled with the default AM_CFLAGS above). If SQLITE_ENABLE_EXPLAIN_COMMENTS
++# debug is required, then sqlite3 must not be configured with
++# --disable-static-shell
++
+ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ include_HEADERS = sqlite3.h sqlite3ext.h
+diff --git a/configure.ac b/configure.ac
+index 8e7fd69..ada559e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -130,7 +130,7 @@ AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
+ [statically link libsqlite3 into shell tool [default=yes]])],
+ [], [enable_static_shell=yes])
+ if test x"$enable_static_shell" == "xyes"; then
+- EXTRA_SHELL_OBJ=sqlite3.$OBJEXT
++ EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT
+ else
+ EXTRA_SHELL_OBJ=libsqlite3.la
+ fi
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
new file mode 100644
index 000000000..992d20cd5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
@@ -0,0 +1,11 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
+
+SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+ file://fix-disable-static-shell.patch \
+"
+
+SRC_URI[md5sum] = "a6cdc3e0a6e5087d620037ae0c48720d"
+SRC_URI[sha256sum] = "508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb"
OpenPOWER on IntegriCloud