From 39cd4f4da75a6b894225628baf45712632f60946 Mon Sep 17 00:00:00 2001
From: Nick D'Ademo <nickdademo@gmail.com>
Date: Tue, 17 Dec 2024 03:27:38 +1100
Subject: [PATCH] [sqlcipher] fix windows build (#42675)

Co-authored-by: Nick D'Ademo <dademo.n@duerr-ndt.com>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
---
 ports/sqlcipher/portfile.cmake | 4 ++--
 ports/sqlcipher/vcpkg.json     | 1 +
 versions/baseline.json         | 2 +-
 versions/s-/sqlcipher.json     | 5 +++++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ports/sqlcipher/portfile.cmake b/ports/sqlcipher/portfile.cmake
index f2131e32724f2d..10cd171ea1e2c2 100644
--- a/ports/sqlcipher/portfile.cmake
+++ b/ports/sqlcipher/portfile.cmake
@@ -18,9 +18,9 @@ file(GLOB TCLSH_CMD
 file(TO_NATIVE_PATH "${TCLSH_CMD}" TCLSH_CMD)
 file(TO_NATIVE_PATH "${SOURCE_PATH}" SOURCE_PATH_NAT)
 
-# Determine TCL version (e.g. [path]tclsh90s.exe -> 90)
+# Determine TCL version (e.g. [path]tclsh90sx.exe -> 90)
 string(REGEX REPLACE ^.*tclsh "" TCLVERSION ${TCLSH_CMD})
-string(REGEX REPLACE [A-Za-z]?${VCPKG_HOST_EXECUTABLE_SUFFIX}$ "" TCLVERSION ${TCLVERSION})
+string(REGEX REPLACE [A-Za-z]*${VCPKG_HOST_EXECUTABLE_SUFFIX}$ "" TCLVERSION ${TCLVERSION})
 
 list(APPEND NMAKE_OPTIONS
 		TCLSH_CMD="${TCLSH_CMD}"
diff --git a/ports/sqlcipher/vcpkg.json b/ports/sqlcipher/vcpkg.json
index dcb1e30e28027b..358bcb689dce7b 100644
--- a/ports/sqlcipher/vcpkg.json
+++ b/ports/sqlcipher/vcpkg.json
@@ -1,6 +1,7 @@
 {
   "name": "sqlcipher",
   "version": "4.6.1",
+  "port-version": 1,
   "description": "SQLCipher extends the SQLite database library to add security enhancements that make it more suitable for encrypted local data storage.",
   "homepage": "https://www.zetetic.net/sqlcipher",
   "license": null,
diff --git a/versions/baseline.json b/versions/baseline.json
index 99a8d38148c794..74a44ad1f29327 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -8650,7 +8650,7 @@
     },
     "sqlcipher": {
       "baseline": "4.6.1",
-      "port-version": 0
+      "port-version": 1
     },
     "sqlite-modern-cpp": {
       "baseline": "2023-12-03",
diff --git a/versions/s-/sqlcipher.json b/versions/s-/sqlcipher.json
index aebb83f4b249c9..1b33482ed3d270 100644
--- a/versions/s-/sqlcipher.json
+++ b/versions/s-/sqlcipher.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "11732bd26171c4420ce06505e0ab52dfb841714e",
+      "version": "4.6.1",
+      "port-version": 1
+    },
     {
       "git-tree": "50e124ac105168dff2cbe199adf15e1d13f5562f",
       "version": "4.6.1",