From 205655f866534b843b7543995825a252c798f0e9 Mon Sep 17 00:00:00 2001
From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org>
Date: Tue, 14 Jan 2025 15:14:55 +0000
Subject: [PATCH] main/sqlite-tools: upgrade to 3.48.0

---
 main/sqlite-tools/APKBUILD                       | 14 +++++---------
 main/sqlite-tools/tclsqlite-tcl_size-macro.patch | 15 ---------------
 2 files changed, 5 insertions(+), 24 deletions(-)
 delete mode 100644 main/sqlite-tools/tclsqlite-tcl_size-macro.patch

diff --git a/main/sqlite-tools/APKBUILD b/main/sqlite-tools/APKBUILD
index e09ec3a1ca1c..e3e816b4d61b 100644
--- a/main/sqlite-tools/APKBUILD
+++ b/main/sqlite-tools/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: Celeste <cielesti@protonmail.com>
 maintainer="Celeste <cielesti@protonmail.com>"
 pkgname=sqlite-tools
-pkgver=3.47.1
+pkgver=3.48.0
 pkgrel=0
 pkgdesc="Helper tools for SQLite"
 url="https://www.sqlite.org/"
@@ -38,11 +38,10 @@ esac
 _ver=${_a}${_b}${_c}$_d
 
 # these variables depend on _ver being set
-source="https://www.sqlite.org/2024/sqlite-src-$_ver.zip
+source="https://www.sqlite.org/2025/sqlite-src-$_ver.zip
 	date4-test-musl.patch
 	stdout-invalid-argument.patch
 	tclsqlite-include-stdint.patch
-	tclsqlite-tcl_size-macro.patch
 	"
 builddir="$srcdir/sqlite-src-$_ver"
 
@@ -50,7 +49,6 @@ _tools="showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer"
 
 prepare() {
 	default_prepare
-	update_config_sub
 
 	if [ -f "$startdir"/../sqlite/APKBUILD ]; then
 	_amalgamation=$(
@@ -96,16 +94,15 @@ build() {
 		--prefix=/usr \
 		--enable-threadsafe \
 		--enable-readline \
+		--enable-session \
 		--enable-static \
-		--enable-dynamic-extensions \
 		--enable-fts3 \
 		--enable-fts4 \
 		--enable-fts5
 
 	msg "Building sqlite3_analyzer"
 	make sqlite3_analyzer \
-		CFLAGS="$CFLAGS -DUSE_EXTERNAL_SQLITE" \
-		LTLINK_EXTRAS="-lsqlite3"
+		LINK_TOOLS_DYNAMICALLY=1
 
 	local tool; for tool in ${_tools//sqlite3_analyzer}; do
 		msg "Building $tool"
@@ -180,9 +177,8 @@ _tcl_doc() {
 }
 
 sha512sums="
-a7f82a91e1f694d446c9c12398e082074c2c5374a00f1b7e382f077a956bc1e0171abfdb84172605b31e4e61cf1b7ed22adbf7196d41637916c508d12aa1196a  sqlite-src-3470100.zip
+854832e9a5dc486a81934e36c1f1678ce50db55b8bd3c48ed2d569fb0bb7ce23d4b490c0a0f699274ff11ddf2000db4a620e064557084c54b217e7fdd836f4e1  sqlite-src-3480000.zip
 6eb41417c4279702e420846f234f04176d2d2b9a81b3e14ed6e080e9698954cc36f1011fce2a87750b83beeb7633e259aa51a98bac475b2598772c686fd220ec  date4-test-musl.patch
 cd976a64a3721dec1fb465bf337f30bb14e35ee94f4fec3d2667630853f30f9f489ef60c96a8789de4ceb05463396c529ee03a0b8aa3745ea161aac008425059  stdout-invalid-argument.patch
 16cf491de20c2eb2188ce9f99363e597cb6580a32ab340963429368f5746c04f130874c6abdd021c5db95e2e8f780670371b2ce7158ec484226352b169933d59  tclsqlite-include-stdint.patch
-6712b045ed296d47547dedb4b00eb5b960859c0180942815dfec64709a2ea967de0b30c7d5274e627842f3a0615c12a22a9d5e96300db37c7de8ac5c06fd29b3  tclsqlite-tcl_size-macro.patch
 "
diff --git a/main/sqlite-tools/tclsqlite-tcl_size-macro.patch b/main/sqlite-tools/tclsqlite-tcl_size-macro.patch
deleted file mode 100644
index 3153c7237596..000000000000
--- a/main/sqlite-tools/tclsqlite-tcl_size-macro.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-`typedef int Tcl_Size` in src/tclsqlite.c conflicts with `-DTcl_Size=int`.
-
---- a/autoconf/tea/tclconfig/tcl.m4
-+++ b/autoconf/tea/tclconfig/tcl.m4
-@@ -3139,10 +3139,6 @@
- 	fi
-     fi
- 
--    if test "${TCL_MAJOR_VERSION}" -lt 9 -a "${TCL_MINOR_VERSION}" -lt 7; then
--	    AC_DEFINE(Tcl_Size, int, [Is 'Tcl_Size' in <tcl.h>?])
--	fi
--
-     #--------------------------------------------------------------------
-     # Common compiler flag setup
-     #--------------------------------------------------------------------
-- 
GitLab