[auto-pkg-updater] Update dev-db/sqlite

Upgraded dev-db/sqlite to v3.47.1

BUG=b/383474803
TEST=presubmit
RELEASE_NOTE=Upgraded dev-db/sqlite to v3.47.1.

Change-Id: I2594129f919647b91dbf695e36e15f74c344afd7
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/portage-stable/+/88344
Reviewed-by: He Gao <hegao@google.com>
Reviewed-by: Nandhini Rengaraj <nrengaraj@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index ed269ba..e7ed43f 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,4 +1,6 @@
 DIST sqlite-doc-3460100.zip 10851427 BLAKE2B 7462e83ca84e3e9aac7236f575fd2bdddac7744ae700a63fe8fdc9d2df3157c59fd374d99a0526bd4d9f742005ee7a90f3d78057861d3c3fcba9f897630e48db SHA512 1ad7dfc938d182f69ea9367b4f5ead1d48b991626521249e8b58c9fb4c2553e348ce402de9cc81b0ad699d4c45c467de56a98ee39f9c3555c6fafff15fba41ce
 DIST sqlite-doc-3470000.zip 10937359 BLAKE2B 3fc349e4b2b0cd3fc59147519062133261463e09933419f330cd18e6b120d3498c10a1864c85c2de144430f1dbf7f9a867aba47ab77dbe2aa0b5128e0742dddf SHA512 20c126551a95905e63e99930e3f7964b6e3fc8b72fbbedf5484f669817af2a8384f05fce89d6117a5e232ba71f5469894d4bb22ba7abd796b24fd624372c7c17
+DIST sqlite-doc-3470100.zip 10945765 BLAKE2B 10181e3c5d35f76edf40b6fbda1d5505eb0a6996ff7ca2eebb39140c7e167493377ff66e746b42d543d8040d6f87b4a7960711ad8e12ff419b1a36cb2d15542d SHA512 7d02f4aa5e1c49670b15cdbc013bbdd713b3dac574f2d8a71d0eed2ecf5785c7dc64039079bcff6f872d3a9cf798977468b4147e5a166c9fa49b9d5c6ef2e9d8
 DIST sqlite-src-3460100.zip 14276926 BLAKE2B df16ea944e317df8ed64fdfab289e3699ec71725ce55e2b30450adaeb41c061b4fba1eb8c41ba638b0edcd12b23264a1f9e413b69fd593c2b65fb1037d3fc8b2 SHA512 6d32a0db9f95d3cec34f02f3fd45b453bf7c422d4d4d9570790f641e7d190b8b31be8e8715afacc1b6e4417f15a4d15a0b28e608ae0b4b5f3054b075783b916e
 DIST sqlite-src-3470000.zip 14408459 BLAKE2B c8e883410fdf9f020bc55ef01d7c2c5b7f1744d3475e7755f2395b24b2d5397302aac2eb7912161cbc2a705a1d7a94b1fa5e8f4e5dbf374c31de56228cbc9e5d SHA512 294d718fb1ebb23e2a4d6e8b7f498d7a7d922e6af5e36452fae075c0d48f4d4f64b5f235ab561b1e47fb7722efc647dfe541164cc385ddc0e2ec0dbce1f40b01
+DIST sqlite-src-3470100.zip 14415832 BLAKE2B 0f238a263c00da5e388fd56080a2a9e7fd64177f0bc59868b52dac96ab4615841500f6dc0b294ae54dd7415217b3a8720db28a354be622a7dcc0c162dbe1c161 SHA512 a7f82a91e1f694d446c9c12398e082074c2c5374a00f1b7e382f077a956bc1e0171abfdb84172605b31e4e61cf1b7ed22adbf7196d41637916c508d12aa1196a
diff --git a/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch b/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch
deleted file mode 100644
index 153dd82..0000000
--- a/dev-db/sqlite/files/sqlite-3.45.2-tests-x86.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://sqlite.org/forum/forumpost/7dfd585ce1
-https://sqlite.org/src/info/d0fbe779bc2460e1
-
-Index: test/func4.test
-==================================================================
---- a/test/func4.test
-+++ b/test/func4.test
-@@ -1,6 +1,6 @@
--# 2013 March 10
-+# 2023-03-10
- #
- # The author disclaims copyright to this source code.  In place of
- # a legal notice, here is a blessing:
- #
- #    May you do good and not evil.
-@@ -7,11 +7,14 @@
- #    May you find forgiveness for yourself and forgive others.
- #    May you share freely, never taking more than you give.
- #
- #***********************************************************************
- # This file implements regression tests for SQLite library. The focus of
--# this file is testing the tointeger() and toreal() functions.
-+# this file is testing the tointeger() and toreal() functions that are
-+# part of the "totype.c" extension.  This file does not test the core
-+# SQLite library.  Failures of tests in this file are related to the
-+# ext/misc/totype.c extension.
- #
- # Several of the toreal() tests are disabled on platforms where floating
- # point precision is not high enough to represent their constant integer
- # expression arguments as double precision floating point values.
- #
-@@ -21,10 +24,24 @@
- set tcl_precision 0
- load_static_extension db totype
- 
- set highPrecision(1) [expr \
-     {[db eval {SELECT tointeger(9223372036854775807 + 1);}] eq {{}}}]
-+set highPrecision(2) [expr \
-+    {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}]
-+
-+# highPrecision(3) is only known to be false on i586 with gcc-13 and -O2.
-+# It is true on the exact same platform with -O0.  Both results seem
-+# reasonable, so we'll just very the expectation accordingly.
-+#
-+set highPrecision(3) [expr \
-+    {[db eval {SELECT toreal(9007199254740992 + 1);}] eq {{}}}]
-+
-+if {!$highPrecision(1) || !$highPrecision(2) || !$highPrecision(3)} {
-+  puts "NOTICE: use_long_double: [use_long_double] \
-+        highPrecision: $highPrecision(1) $highPrecision(2) $highPrecision(3)"
-+}
- 
- do_execsql_test func4-1.1 {
-   SELECT tointeger(NULL);
- } {{}}
- do_execsql_test func4-1.2 {
-@@ -193,12 +210,10 @@
- do_execsql_test func4-1.55 {
-   SELECT tointeger(18446744073709551616 + 1);
- } {{}}
- 
- ifcapable floatingpoint {
--  set highPrecision(2) [expr \
--      {[db eval {SELECT toreal(-9223372036854775808 + 1);}] eq {{}}}]
- 
-   do_execsql_test func4-2.1 {
-     SELECT toreal(NULL);
-   } {{}}
-   do_execsql_test func4-2.2 {
-@@ -339,14 +354,18 @@
-     SELECT toreal(9007199254740992 - 1);
-   } {9007199254740991.0}
-   do_execsql_test func4-2.45 {
-     SELECT toreal(9007199254740992);
-   } {9007199254740992.0}
--  if {$highPrecision(2)} {
-+  if {$highPrecision(3)} {
-+    do_execsql_test func4-2.46 {
-+      SELECT toreal(9007199254740992 + 1);
-+    } {{}}
-+  } else {
-     do_execsql_test func4-2.46 {
-       SELECT toreal(9007199254740992 + 1);
--    } {{}}
-+    } {9007199254740992.0}
-   }
-   do_execsql_test func4-2.47 {
-     SELECT toreal(9007199254740992 + 2);
-   } {9007199254740994.0}
-   do_execsql_test func4-2.48 {
-@@ -624,14 +643,18 @@
-     SELECT tointeger(toreal(9007199254740992 - 1));
-   } {9007199254740991}
-   do_execsql_test func4-5.22 {
-     SELECT tointeger(toreal(9007199254740992));
-   } {9007199254740992}
--  if {$highPrecision(2)} {
-+  if {$highPrecision(3)} {
-     do_execsql_test func4-5.23 {
-       SELECT tointeger(toreal(9007199254740992 + 1));
-     } {{}}
-+  } else {
-+    do_execsql_test func4-5.23 {
-+      SELECT tointeger(toreal(9007199254740992 + 1));
-+    } {9007199254740992}
-   }
-   do_execsql_test func4-5.24 {
-     SELECT tointeger(toreal(9007199254740992 + 2));
-   } {9007199254740994}
-   if {$highPrecision(1)} {
-
-
diff --git a/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch b/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch
new file mode 100644
index 0000000..d7a95ec
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.47.1-buildtclext.patch
@@ -0,0 +1,33 @@
+# https://bugs.gentoo.org/945906
+# https://www.sqlite.org/src/info?name=e24a3efec8c168b6
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -107,7 +107,7 @@ if {$tcl_platform(platform)=="windows"} {
+   set fd [open $LIBDIR/tclConfig.sh rb]
+   set tclConfig [read $fd]
+   close $fd
+-  
++
+   # Extract parameter we will need from the tclConfig.sh file
+   #
+   set TCLMAJOR 8
+@@ -140,14 +140,17 @@ if {$tcl_platform(platform)=="windows"} {
+   if {[string length $OPTS]>1} {
+     append LDFLAGS $OPTS
+   }
+-  set CMD [subst $cmd]
+   if {$TCLMAJOR>8} {
+     set OUT libtcl9sqlite$VERSION.$SUFFIX
+   } else {
+     set OUT libsqlite$VERSION.$SUFFIX
+   }
++  set @ $OUT; # Workaround for https://sqlite.org/forum/forumpost/0683a49cb02f31a1
++              # in which Gentoo edits their tclConfig.sh to include an soname
++              # linker flag which includes ${@} (the target file's name).
++  set CMD [subst $cmd]
+ }
+-  
++
+ # Show information about prior installs
+ #
+ if {$infoonly} {
diff --git a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild b/dev-db/sqlite/sqlite-3.47.1.ebuild
similarity index 98%
rename from dev-db/sqlite/sqlite-3.47.0-r1.ebuild
rename to dev-db/sqlite/sqlite-3.47.1.ebuild
index a6fb8cb..23a4a1f 100644
--- a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
+++ b/dev-db/sqlite/sqlite-3.47.1.ebuild
@@ -52,9 +52,7 @@
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
-	"${FILESDIR}"/${PN}-3.47.0-nonbash.patch
-	"${FILESDIR}"/${PN}-3.47.0-allocator-mismatch.patch
-	"${FILESDIR}"/${PN}-3.47.0-buildtclext.patch
+	"${FILESDIR}"/${PN}-3.47.1-buildtclext.patch
 )
 
 _fossil_fetch() {