inherit autotools pkgconfig siteinfo
# enable those which are enabled by default in configure
-PACKAGECONFIG ?= "fts4 fts5 rtree dyn_ext"
-PACKAGECONFIG:class-native ?= "fts4 fts5 rtree dyn_ext"
+PACKAGECONFIG ?= "fts4 fts5 rtree"
+PACKAGECONFIG:class-native ?= "fts4 fts5 rtree"
PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
PACKAGECONFIG[fts5] = "--enable-fts5,--disable-fts5"
PACKAGECONFIG[rtree] = "--enable-rtree,--disable-rtree"
PACKAGECONFIG[session] = "--enable-session,--disable-session"
-PACKAGECONFIG[dyn_ext] = "--enable-dynamic-extensions,--disable-dynamic-extensions"
PACKAGECONFIG[zlib] = ",,zlib"
CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'zlib', '', 'ac_cv_search_deflate=no',d)}"
+# The configure options target, exec_prefix and oldincludedir
+# are not supported by sqlite3 anymore.
+CONFIGUREOPTS:remove = "--target=${TARGET_SYS}"
+CONFIGUREOPTS:remove = "--exec_prefix=${exec_prefix}"
+CONFIGUREOPTS:remove = "--oldincludedir=${includedir}"
+
EXTRA_OECONF = " \
--enable-shared \
--enable-threadsafe \
--disable-static-shell \
+ --soname=legacy \
+ --disable-rpath \
"
# pread() is in POSIX.1-2001 so any reasonable system must surely support it
CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
# Unless SQLITE_BYTEORDER is predefined, the code falls back to build time
-# huristics, which are not always correct
+# heuristics, which are not always correct
CFLAGS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DSQLITE_BYTEORDER=1234', '-DSQLITE_BYTEORDER=4321', d)}"
PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
--- /dev/null
+From 45ab3ac5efa7c08ba5ce3564a86bd348380ce70f Mon Sep 17 00:00:00 2001
+From: Anna-Lena Marx <anna-lena.marx@inovex.de>
+Date: Thu, 2 Oct 2025 20:30:08 +0200
+Subject: [PATCH] backport: reenable --disable-rpath configure flag
+
+Reenable support for `--disable-rpath`.
+This patch is backported and will be obsolete for version 3.51.
+
+Upstream-Status: Backport (https://sqlite.org/src/info/a59d9bb25e518f5d)
+Signed-off-by: Anna-Lena Marx <anna-lena.marx@inovex.de>
+---
+ autosetup/sqlite-config.tcl | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl
+index 85fe414..faff00b 100644
+--- a/autosetup/sqlite-config.tcl
++++ b/autosetup/sqlite-config.tcl
+@@ -334,8 +334,7 @@ proc sqlite-configure {buildMode configScript} {
+ => {Link the sqlite3 shell app against the DLL instead of embedding sqlite3.c}
+ }
+ {canonical autoconf} {
+- # A potential TODO without a current use case:
+- #rpath=1 => {Disable use of the rpath linker flag}
++ rpath=1 => {Disable use of the rpath linker flag}
+ # soname: https://sqlite.org/src/forumpost/5a3b44f510df8ded
+ soname:=legacy
+ => {SONAME for libsqlite3.so. "none", or not using this flag, sets no
+@@ -2119,7 +2118,6 @@ proc sqlite-handle-tcl {} {
+ ########################################################################
+ # Handle the --enable/disable-rpath flag.
+ proc sqlite-handle-rpath {} {
+- proj-check-rpath
+ # autosetup/cc-shared.tcl sets the rpath flag definition in
+ # [get-define SH_LINKRPATH], but it does so on a per-platform basis
+ # rather than as a compiler check. Though we should do a proper
+@@ -2128,12 +2126,14 @@ proc sqlite-handle-rpath {} {
+ # for which sqlite-env-is-unix-on-windows returns a non-empty
+ # string.
+
+-# if {[proj-opt-truthy rpath]} {
+-# proj-check-rpath
+-# } else {
+-# msg-result "Disabling use of rpath."
+-# define LDFLAGS_RPATH ""
+-# }
++ # https://sqlite.org/forum/forumpost/13cac3b56516f849
++ if {[proj-opt-truthy rpath]} {
++ proj-check-rpath
++ } else {
++ msg-result "Disabling use of rpath."
++ define LDFLAGS_RPATH ""
++
++ }
+ }
+
+ ########################################################################