sqlite3: Update to 3.50.4

0005-dont-require-dlopen-on-windows.patch: replace with upstream change
This commit is contained in:
Christoph Reiter 2025-08-06 22:37:32 +02:00 committed by Dirk Stolle
parent e0b5033c07
commit 82c354a840
2 changed files with 77 additions and 25 deletions

View File

@ -1,40 +1,91 @@
--- sqlite-src-3500300/autosetup/sqlite-config.tcl.orig 2025-07-17 15:33:03.000000000 +0200
+++ sqlite-src-3500300/autosetup/sqlite-config.tcl 2025-07-30 08:04:33.581819200 +0200
@@ -1410,7 +1410,7 @@
From 11ba513fe5fb8313748fed3490bcb4b4d34375cc Mon Sep 17 00:00:00 2001
From: stephan <stephan@noemail.net>
Date: Wed, 6 Aug 2025 19:16:16 +0000
Subject: [PATCH] Skip checking for dlopen() on mingw builds and those which
include "windows" in their host tuple, as suggested in [forum:2436c8ffed |
forum post 2436c8ffed]. Those environments identify as Windows for SQLite's
purposes so use LoadLibrary().
FossilOrigin-Name: 69b87d4fa8089ef6101e976131dfd5c47dbc3d8c01a7e7d90a444b7a4794f78b
---
autosetup/sqlite-config.tcl | 53 ++++++++++++++++++++++---------------
manifest | 14 +++++-----
manifest.uuid | 2 +-
3 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl
index 4dd065095e..f58c691250 100644
--- a/autosetup/sqlite-config.tcl
+++ b/autosetup/sqlite-config.tcl
@@ -1412,39 +1412,50 @@ proc sqlite-handle-icu {} {
# Makes the following environment changes:
#
# - defines LDFLAGS_DLOPEN to any linker flags needed for this
# feature. It may legally be empty on some systems where dlopen()
-# feature. It may legally be empty on some systems where dlopen()
-# is in libc.
+# is in libc or on Windows where LoadLibrary is used.
+# feature. It may legally be empty on (A) some systems where
+# dlopen() is in libc and (B) certain Unix-esque Windows
+# environments which identify as Windows for SQLite's purposes so
+# use LoadLibrary().
#
# - If the feature is not available, adds
# -DSQLITE_OMIT_LOAD_EXTENSION=1 to the feature flags list.
@@ -1418,11 +1418,23 @@
proc sqlite-handle-load-extension {} {
define LDFLAGS_DLOPEN ""
set found 0
+ set suffix ""
proj-if-opt-truthy load-extension {
- set found [proj-check-function-in-lib dlopen dl]
- if {$found} {
- define LDFLAGS_DLOPEN [get-define lib_dlopen]
- undefine lib_dlopen
- } else {
- if {[proj-opt-was-provided load-extension]} {
- # Explicit --enable-load-extension: fail if not found
- proj-indented-notice -error {
- --enable-load-extension was provided but dlopen()
- not found. Use --disable-load-extension to bypass this
- check.
- }
- } else {
- # It was implicitly enabled: warn if not found
- proj-indented-notice {
- WARNING: dlopen() not found, so loadable module support will
- be disabled. Use --disable-load-extension to bypass this
- check.
+ switch -glob -- [get-define host] {
+ *-*-mingw* - *windows* {
+ # Windows uses LoadLibrary/GetProcAddress which are always available
+ set found 1
+ msg-result "Using Windows LoadLibrary for loadable extensions."
+ incr found
+ set suffix "Using LoadLibrary()"
+ }
+ default {
+ # Unix-like systems use dlopen
+ set found [proj-check-function-in-lib dlopen dl]
+ if {$found} {
+ define LDFLAGS_DLOPEN [get-define lib_dlopen]
+ set suffix [define LDFLAGS_DLOPEN [get-define lib_dlopen]]
+ undefine lib_dlopen
+ }
+ }
+ }
+
+ if {!$found} {
if {[proj-opt-was-provided load-extension]} {
# Explicit --enable-load-extension: fail if not found
proj-indented-notice -error {
+ } else {
+ if {[proj-opt-was-provided load-extension]} {
+ # Explicit --enable-load-extension: fail if not found
+ proj-indented-notice -error {
+ --enable-load-extension was provided but dlopen()
+ not found. Use --disable-load-extension to bypass this
+ check.
+ }
+ } else {
+ # It was implicitly enabled: warn if not found
+ proj-indented-notice {
+ WARNING: dlopen() not found, so loadable module support will
+ be disabled. Use --disable-load-extension to bypass this
+ check.
+ }
+ }
}
}
}
}
if {$found} {
- msg-result "Loadable extension support enabled."
+ msg-result "Loadable extension support enabled. $suffix"
} else {
msg-result "Disabling loadable extension support. Use --enable-load-extension to enable them."
sqlite-add-feature-flag -DSQLITE_OMIT_LOAD_EXTENSION=1

View File

@ -7,10 +7,10 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
$([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-sqlite-docs"))
_sqlite_year=2025
_amalgamationver=3500300
_amalgamationver=3500400
_docver=${_amalgamationver}
pkgver=3.50.3
pkgrel=3
pkgver=3.50.4
pkgrel=1
pkgdesc="A C library that implements an SQL database engine (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
@ -35,13 +35,13 @@ source=(https://www.sqlite.org/${_sqlite_year}/sqlite-src-${_amalgamationver}.zi
Makefile.ext.in
README.md.in
LICENSE)
sha256sums=('119862654b36e252ac5f8add2b3d41ba03f4f387b48eb024956c36ea91012d3f'
'bdbd4e47d52c64c7acc332d1294aa67ad6251ef370abeb0b086ee0cbec91186d'
sha256sums=('b7b4dc060f36053902fb65b344bbbed592e64b2291a26ac06fe77eec097850e9'
'f8a03cf461500310c7a785c9d6f86121ac9465601982cdcac6de0c5987dbfc2f'
'6518119034ceb2820d058afcb099d11f636271f55a41ffae22855af66a369166'
'cf5c47c30e97f5493d2fad730a9bfcd33d20a0a052571e8e35b88f388d368724'
'a500428a3434075932de84247b1405f3d73e7ed0a8b664eb20a736bd02d6ed29'
'8dd2377afaad17fa85049be90bfc2bd757350343b3f64ff9bfbbcf3736593a34'
'a6ffc29cc0612c48145a9296532d60a6e571ab5ef13aefba52abf79fa0e3e2ab'
'bc0dd65d11e96a9b4399ca69803220199adbb3c03a158f45170817125d827d98'
'84b64569978dde5b63799099b0fbb3336943ef877170beb84483020c67e25b3c'
'5ca42f1f92abfb61bacc9ff60f5836cc56e2ce2af52264f918cb06c3d566d562'
'0b76663a90e034f3d7f2af5bfada4cedec5ebc275361899eccc5c18e6f01ff1f')
@ -54,6 +54,7 @@ prepare() {
patch -p1 -i "${srcdir}/0001-sqlite-pcachetrace-include-sqlite3.patch"
patch -p1 -i "${srcdir}/0002-fix-building-sqldiff.patch"
patch -p1 -i "${srcdir}/0004-dont-misuse-tcl-extern.patch"
# https://github.com/sqlite/sqlite/commit/11ba513fe5fb8313748fed3490bcb4b4d34375cc
patch -p1 -i "${srcdir}/0005-dont-require-dlopen-on-windows.patch"
}