Skip to contentSkip to conversation

sqlite3: misc fixes, cleanup + update 3.10.0 -> 3.10.2

PATCH New Andre McCurdy 1 participant 8 messages Jan 23, 2016

lore
Share & tools
lore
#0 lore raw

cover sqlite3: misc fixes, cleanup + update 3.10.0 -> 3.10.2

Andre McCurdy (7):
sqlite3: fix the parallel build fix patch
sqlite3.inc: fix readline PACKAGECONFIG
sqlite3.inc: drop obsolete config_BUILD_CC, etc exports
sqlite: formatting improvements, move more stuff into sqlite3.inc sqlite3.inc: dynamically link the sqlite3 command-line utility sqlite3.inc: add PACKAGECONFIG to support building against libedit
sqlite3: update 3.10.0 -> 3.10.2

 meta/recipes-support/sqlite/sqlite3.inc            | 45 ++++++++++++++-------
 meta/recipes-support/sqlite/sqlite3/parallel.patch | 46 +++++++++++++---------
 meta/recipes-support/sqlite/sqlite3_3.10.0.bb      | 27 -------------
 meta/recipes-support/sqlite/sqlite3_3.10.2.bb      | 11 ++++++
 4 files changed, 69 insertions(+), 60 deletions(-)
 delete mode 100644 meta/recipes-support/sqlite/sqlite3_3.10.0.bb
 create mode 100644 meta/recipes-support/sqlite/sqlite3_3.10.2.bb
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/7 sqlite3: fix the parallel build fix patch

The previous parallel.patch broke dynamically linking sqlite3 with libsqlite3.so (ie using the --disable-static-shell configure option).

---
 meta/recipes-support/sqlite/sqlite3/parallel.patch | 46 +++++++++++++---------
 1 file changed, 27 insertions(+), 19 deletions(-)
meta/recipes-support/sqlite/sqlite3/parallel.patch +27 -19
index 87471f0..7b886a6 100644
@@ -1,24 +1,32 @@
-build: Fix parallel build problems
+From 140476c3e6a6f497bdd95c0c039cb9a680f5a414 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <[email protected]>
+Date: Fri, 22 Jan 2016 15:53:04 -0800
+Subject: [PATCH] parallel build fix
 
-Avoid parallel build errors related to sqlite3.o target.
+When statically linking the sqlite3 binary, ensure that it depends on
+its own version of sqlite3.o, instead of the version being built (in
+parallel) for use in the libsqlite3.a static library.
 
 Upstream-Status: Pending
 
-Signed-off-by: Maxin B. John <[email protected]>
+Signed-off-by: Andre McCurdy <[email protected]>
 ---
-diff -Naur sqlite-autoconf-3100000-orig/Makefile.am sqlite-autoconf-3100000/Makefile.am
---- sqlite-autoconf-3100000-orig/Makefile.am	2016-01-06 14:03:00.000000000 +0200
-+++ sqlite-autoconf-3100000/Makefile.am	2016-01-12 13:14:03.620117514 +0200
-@@ -6,10 +6,8 @@
- libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
- 
- bin_PROGRAMS = sqlite3
--sqlite3_SOURCES = shell.c sqlite3.h
--EXTRA_sqlite3_SOURCES = sqlite3.c
--sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
--sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
-+sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
-+sqlite3_LDADD = @READLINE_LIBS@
- sqlite3_CFLAGS = $(AM_CFLAGS)
- 
- include_HEADERS = sqlite3.h sqlite3ext.h
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e9b3950..0e8f043 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,7 +129,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
+
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/7 sqlite3.inc: fix readline PACKAGECONFIG

In reply to Andre McCurdy

Make it clearer that readline support for the target build is now disabled by default.

Since readline dependencies and configure options are now handled by PACKAGECONFIG, avoid duplicating readline in DEPENDS or duplicating --disable-readline in EXTRA_OECONF.

Also add --disable-editline to EXTRA_OECONF to avoid a potential floating dependency, since the configure script checks for libedit before it checks for libreadline.

---
 meta/recipes-support/sqlite/sqlite3.inc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
meta/recipes-support/sqlite/sqlite3.inc +6 -5
index 5eb5de3..7245285 100644
@@ -1,15 +1,16 @@
 SUMMARY = "Embeddable SQL database engine"
 HOMEPAGE = "http://www.sqlite.org"
 SECTION = "libs"
-DEPENDS = "readline ncurses"
-DEPENDS_class-native = ""
 LICENSE = "PD"
 
 inherit autotools pkgconfig
 
-EXTRA_OECONF = "--enable-shared --enable-threadsafe"
-EXTRA_OECONF_class-native = "--enable-shared --enable-threadsafe --disable-readline"
-PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline"
+PACKAGECONFIG ?= ""
+PACKAGECONFIG_class-native = ""
+
+PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
+
+EXTRA_OECONF = "--enable-shared --enable-threadsafe --disable-editline"
 
 export config_BUILD_CC = "${BUILD_CC}"
 export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/7 sqlite3.inc: drop obsolete config_BUILD_CC, etc exports

In reply to Andre McCurdy

These exports date back to 2007, when sqlite needed patching in order to cross compile:

http://git.openembedded.org/openembedded-core/commit/?id=4ffe8f6b1ff640722880cf2cd88990956de87e30

---
 meta/recipes-support/sqlite/sqlite3.inc | 8 --------
 1 file changed, 8 deletions(-)
meta/recipes-support/sqlite/sqlite3.inc +0 -8
index 7245285..ac19be9 100644
@@ -12,14 +12,6 @@ PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses
 
 EXTRA_OECONF = "--enable-shared --enable-threadsafe --disable-editline"
 
-export config_BUILD_CC = "${BUILD_CC}"
-export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
-export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
-export config_TARGET_CC = "${CC}"
-export config_TARGET_LINK = "${CCLD}"
-export config_TARGET_CFLAGS = "${CFLAGS}"
-export config_TARGET_LFLAGS = "${LDFLAGS}"
-
 # pread() is in POSIX.1-2001 so any reasonable system must surely support it
 BUILD_CFLAGS += "-DUSE_PREAD"
 TARGET_CFLAGS += "-DUSE_PREAD"
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/7 sqlite: formatting improvements, move more stuff into sqlite3.inc

In reply to Andre McCurdy

Reformatting only, no functional changes.

---
 meta/recipes-support/sqlite/sqlite3.inc       | 23 +++++++++++++++++++++--
 meta/recipes-support/sqlite/sqlite3_3.10.0.bb | 20 ++------------------
 2 files changed, 23 insertions(+), 20 deletions(-)
meta/recipes-support/sqlite/sqlite3.inc +21 -2
index ac19be9..540d2b6 100644
@@ -1,7 +1,21 @@
 SUMMARY = "Embeddable SQL database engine"
 HOMEPAGE = "http://www.sqlite.org"
 SECTION = "libs"
-LICENSE = "PD"
+
+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
 
@@ -16,14 +30,19 @@ EXTRA_OECONF = "--enable-shared --enable-threadsafe --disable-editline"
 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}"
+                       ${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"
meta/recipes-support/sqlite/sqlite3_3.10.0.bb +2 -18
index 092f782..c183692 100644
@@ -1,27 +1,11 @@
 require sqlite3.inc
 
+LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
 
-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:]])
-
-PE = "3"
-SQLITE_PV = "${@sqlite_download_version(d)}"
 SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
            file://parallel.patch \
-          "
+"
 
 SRC_URI[md5sum] = "274364e6ca5c1104d42912f11e61ed26"
 SRC_URI[sha256sum] = "43cc292d70711fa7580250c8a1cd7c64813a4a0a479dbd502cce5f10b5d91042"
-
-UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
-UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
-
-S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
-
-# Provide column meta-data API
-BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
-TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/7 sqlite3.inc: dynamically link the sqlite3 command-line utility

In reply to Andre McCurdy

By default, the sqlite3 command-line utility will be statically linked with sqlite3. For OE, dynamic linking is probably more appropriate and can be enabled by configuring with "--disable-static-shell".

---
 meta/recipes-support/sqlite/sqlite3.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-support/sqlite/sqlite3.inc +6 -1
index 540d2b6..87cdf26 100644
@@ -24,7 +24,12 @@ PACKAGECONFIG_class-native = ""
 
 PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
 
-EXTRA_OECONF = "--enable-shared --enable-threadsafe --disable-editline"
+EXTRA_OECONF = " \
+    --enable-shared \
+    --enable-threadsafe \
+    --disable-editline \
+    --disable-static-shell \
+"
 
 # pread() is in POSIX.1-2001 so any reasonable system must surely support it
 BUILD_CFLAGS += "-DUSE_PREAD"
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/7 sqlite3.inc: add PACKAGECONFIG to support building against libedit

In reply to Andre McCurdy
---
 meta/recipes-support/sqlite/sqlite3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/sqlite/sqlite3.inc +1 -1
index 87cdf26..5bff33b 100644
@@ -22,12 +22,12 @@ 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-editline \
     --disable-static-shell \
 "
 
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/7 sqlite3: update 3.10.0 -> 3.10.2

In reply to Andre McCurdy
---
 meta/recipes-support/sqlite/{sqlite3_3.10.0.bb => sqlite3_3.10.2.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/sqlite/{sqlite3_3.10.0.bb => sqlite3_3.10.2.bb} (62%)
meta/recipes-support/sqlite/sqlite3_3.10.2.bb renamed from meta/recipes-support/sqlite/sqlite3_3.10.0.bb +2 -2
similarity index 62%
rename from meta/recipes-support/sqlite/sqlite3_3.10.0.bb
rename to meta/recipes-support/sqlite/sqlite3_3.10.2.bb
index c183692..75fabc6 100644
@@ -7,5 +7,5 @@ SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
            file://parallel.patch \
 "
 
-SRC_URI[md5sum] = "274364e6ca5c1104d42912f11e61ed26"
-SRC_URI[sha256sum] = "43cc292d70711fa7580250c8a1cd7c64813a4a0a479dbd502cce5f10b5d91042"
+SRC_URI[md5sum] = "adaa31593bb5605ec6d6f34f81b43008"
+SRC_URI[sha256sum] = "a2b3b4bd1291ea7d6c8252f7edff36a4362f2f0e5d5370444ba6cbe313ae2971"
Signature · 1 line
1.9.1