diff -pruN 1.1.10-2/README 1.1.12-1/README
--- 1.1.10-2/README	2024-11-27 19:02:40.000000000 +0000
+++ 1.1.12-1/README	2025-07-25 19:19:17.000000000 +0000
@@ -1,6 +1,6 @@
 README: tdbcpostgres
 
-    This is the 1.1.10 source distribution of the driver for Tcl
+    This is the 1.1.12 source distribution of the driver for Tcl
     Database Connectivity (TDBC) to access Postgres databases. TDBC and
     its drivers are available from a Fossil version control repository
     at http://tdbc.tcl.tk/
diff -pruN 1.1.10-2/configure 1.1.12-1/configure
--- 1.1.10-2/configure	2024-11-27 19:02:52.000000000 +0000
+++ 1.1.12-1/configure	2025-07-25 19:19:36.000000000 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for tdbcpostgres 1.1.10.
+# Generated by GNU Autoconf 2.72 for tdbcpostgres 1.1.12.
 #
 #
 # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
@@ -601,8 +601,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tdbcpostgres'
 PACKAGE_TARNAME='tdbcpostgres'
-PACKAGE_VERSION='1.1.10'
-PACKAGE_STRING='tdbcpostgres 1.1.10'
+PACKAGE_VERSION='1.1.12'
+PACKAGE_STRING='tdbcpostgres 1.1.12'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1335,7 +1335,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures tdbcpostgres 1.1.10 to adapt to many kinds of systems.
+'configure' configures tdbcpostgres 1.1.12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1397,7 +1397,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tdbcpostgres 1.1.10:";;
+     short | recursive ) echo "Configuration of tdbcpostgres 1.1.12:";;
    esac
   cat <<\_ACEOF
 
@@ -1500,7 +1500,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tdbcpostgres configure 1.1.10
+tdbcpostgres configure 1.1.12
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2061,7 +2061,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tdbcpostgres $as_me 1.1.10, which was
+It was created by tdbcpostgres $as_me 1.1.12, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3036,16 +3036,16 @@ printf "%s\n" "$as_me: WARNING: --with-t
 			`ls -d /usr/pkg/lib 2>/dev/null` \
 			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/lib64 2>/dev/null` \
+			`ls -d /usr/lib/tcl9.1 2>/dev/null` \
 			`ls -d /usr/lib/tcl9.0 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.7 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl/tcl9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
 			; do
@@ -4257,8 +4257,11 @@ printf "%s\n" "$TEA_PLATFORM" >&6; }
 
     # The BUILD_$pkg is to define the correct extern storage class
     # handling when making this package
+    # To be able to sefely use the package name in a #define, it must not
+    # contain anything other than alphanumeric characters and underscores
+    SAFE_PKG_NAME=tdbcpostgres
 
-printf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h
+printf "%s\n" "#define BUILD_${SAFE_PKG_NAME} /**/" >>confdefs.h
 
     # Do this here as we have fully defined TEA_PLATFORM now
     if test "${TEA_PLATFORM}" = "windows" ; then
@@ -7261,7 +7264,7 @@ fi
 		fi
 		case "x`echo \${VisualStudioVersion}`" in
 		    x1[4-9]*)
-			lflags="${lflags} -nodefaultlib:libucrt.lib"
+			lflags="${lflags} -nodefaultlib:ucrt.lib"
 
     vars="ucrt.lib"
     for i in $vars; do
@@ -7663,11 +7666,15 @@ fi
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    ;;
-	CYGWIN_*)
+	CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*)
 	    SHLIB_CFLAGS=""
 	    SHLIB_LD='${CC} -shared'
 	    SHLIB_SUFFIX=".dll"
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
+	    if test "${TEA_PLATFORM}" = "unix" -a  "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst cyg%.dll,lib%.dll,\$@).a"
+	    else
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
+	    fi
 	    EXEEXT=".exe"
 	    do64bit_ok=yes
 	    CC_SEARCH_FLAGS=""
@@ -9907,8 +9914,17 @@ rm -rf conftest*
     # substituted. (@@@ Might not be necessary anymore)
     #--------------------------------------------------------------------
 
-    PACKAGE_LIB_PREFIX8="${PACKAGE_LIB_PREFIX}"
-    PACKAGE_LIB_PREFIX9="${PACKAGE_LIB_PREFIX}tcl9"
+    if test "$TEA_PLATFORM" = "unix"; then
+	PACKAGE_LIB_PREFIX8="lib"
+	if test "$EXEEXT" = ".exe" -a "$SHARED_BUILD" != "0"; then
+	    PACKAGE_LIB_PREFIX9="cygtcl9"
+	else
+	    PACKAGE_LIB_PREFIX9="libtcl9"
+	fi
+    else
+	PACKAGE_LIB_PREFIX8=""
+	PACKAGE_LIB_PREFIX9="tcl9"
+    fi
     if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
 	PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX9}"
     else
@@ -9916,8 +9932,6 @@ rm -rf conftest*
 
 printf "%s\n" "#define TCL_MAJOR_VERSION 8" >>confdefs.h
 
-    fi
-    if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tk8}" != x; then
 
 printf "%s\n" "#define TK_MAJOR_VERSION 8" >>confdefs.h
 
@@ -9933,6 +9947,42 @@ printf "%s\n" "#define TK_MAJOR_VERSION
 	    if test "$GCC" = "yes"; then
 		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
 	    fi
+	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker understands --disable-high-entropy-va" >&5
+printf %s "checking if the linker understands --disable-high-entropy-va... " >&6; }
+if test ${tcl_cv_ld_high_entropy+y}
+then :
+  printf %s "(cached) " >&6
+else case e in #(
+  e)
+		hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  tcl_cv_ld_high_entropy=yes
+else case e in #(
+  e) tcl_cv_ld_high_entropy=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+		CFLAGS=$hold_cflags ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_high_entropy" >&5
+printf "%s\n" "$tcl_cv_ld_high_entropy" >&6; }
+	    if test $tcl_cv_ld_high_entropy = yes; then
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
+	    fi
 	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
@@ -9963,20 +10013,20 @@ printf "%s\n" "#define TK_MAJOR_VERSION
 	    if test x"${TK_BIN_DIR}" != x ; then
 		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
 	    fi
-	    eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    RANLIB=:
 	else
-	    eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
 	fi
 	# Some packages build their own stubs libraries
 	if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
-	    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
+	    eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
 	else
-	    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
 	fi
     fi
 
@@ -10593,7 +10643,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tdbcpostgres $as_me 1.1.10, which was
+This file was extended by tdbcpostgres $as_me 1.1.12, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10648,7 +10698,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-tdbcpostgres config.status 1.1.10
+tdbcpostgres config.status 1.1.12
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -pruN 1.1.10-2/configure.ac 1.1.12-1/configure.ac
--- 1.1.10-2/configure.ac	2024-11-27 19:02:49.000000000 +0000
+++ 1.1.12-1/configure.ac	2025-07-25 19:19:27.000000000 +0000
@@ -19,7 +19,7 @@ dnl	to configure the system for the loca
 # so that we create the export library with the dll.
 #-----------------------------------------------------------------------
 
-AC_INIT([tdbcpostgres],[1.1.10])
+AC_INIT([tdbcpostgres],[1.1.12])
 
 #--------------------------------------------------------------------
 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
diff -pruN 1.1.10-2/debian/changelog 1.1.12-1/debian/changelog
--- 1.1.10-2/debian/changelog	2025-04-09 15:57:49.000000000 +0000
+++ 1.1.12-1/debian/changelog	2025-08-21 05:24:55.000000000 +0000
@@ -1,3 +1,20 @@
+tdbcpostgres (1.1.12-1) unstable; urgency=medium
+
+  * New upstream release
+  * Closing a bug that actually was fixed with 1.1.10-2 but overlooked to
+    notify the BTS (Closes: 1046053)
+
+ -- Massimo Manghi <mxmanghi@apache.org>  Thu, 21 Aug 2025 07:24:55 +0200
+
+tdbcpostgres (1.1.10-3) unstable; urgency=medium
+
+  * We now generate binary package tcl-tdbc-mysql which ships both Tcl8.6 and
+    Tcl9.0 extension libraries.
+  * As per Debian Tcl/Tk policy we're moving the binary extensions into their
+    arch dependent directories
+
+ -- Massimo Manghi <mxmanghi@apache.org>  Sat, 19 Apr 2025 12:12:51 +0200
+
 tdbcpostgres (1.1.10-2) unstable; urgency=medium
 
   * Building both extension libraries for Tcl 8.6 and the Tcl9
diff -pruN 1.1.10-2/debian/control 1.1.12-1/debian/control
--- 1.1.10-2/debian/control	2025-04-09 15:57:41.000000000 +0000
+++ 1.1.12-1/debian/control	2025-04-19 10:12:51.000000000 +0000
@@ -2,15 +2,19 @@ Source: tdbcpostgres
 Section: libs
 Priority: optional
 Maintainer: Massimo Manghi <mxmanghi@apache.org>
-Build-Depends: debhelper-compat (=13), tcl8.6-dev, tcl9.0-dev, tcl8.6-tdbc (>=1.0.6~), postgresql-client
+Build-Depends: debhelper-compat (=13), tcl8.6-dev, tcl9.0-dev, tcl-tdbc (>=1.1.10-3~), postgresql-client
 Standards-Version: 4.7.2
 Rules-Requires-Root: binary-targets
 Homepage: http://core.tcl.tk/tdbcodbc
 
-Package: tcl8.6-tdbc-postgres
+Package: tcl-tdbc-postgres
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, tcl8.6 | tcl9.0, tcl8.6-tdbc (>=1.0.6), postgresql-client
+Depends: ${shlibs:Depends}, ${misc:Depends}, tcl-tdbc (>=1.1.10-3~), postgresql-client
+Conflicts: tcl8.6-tdbc-postgres (<< 1.1.10-3)
+Replaces: tcl8.6-tdbc-postgres (<< 1.1.10-3)
+Provides: tcl8.6-tdbc-postgres (= ${binary:Version}), tcl9.0-tdbc-postgres (= ${binary:Version})
 Description: Tcl Database Connectivity
  Tdbc is an interface standard for SQL databases and connectivity that aims to
  make it easy to write portable and secure Tcl scripts that access SQL
- databases. This package provides the driver for the PostgreSQL DBMS.
+ databases. This package provides the driver for the PostgreSQL DBMS. This package
+ currently provides both Tcl8.6 and Tcl9.0 extension libraries
diff -pruN 1.1.10-2/debian/rules 1.1.12-1/debian/rules
--- 1.1.10-2/debian/rules	2025-04-09 15:57:49.000000000 +0000
+++ 1.1.12-1/debian/rules	2025-04-19 10:12:51.000000000 +0000
@@ -14,53 +14,58 @@ TCLVERSIONS = 8.6 9.0
 DPKG_EXPORT_BUILDFLAGS = 1
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 include /usr/share/dpkg/buildflags.mk
+DIR = $(shell pwd)/debian/tcl-tdbc-postgres
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-DIR = $(shell pwd)/debian/tcl8.6-tdbc-postgres
-
-%:
-	dh $@
 
 clean:
 	echo "cleaning up source directory"; \
 	rm -fv debian/autoreconf.* ; \
-	for v in $(TCLVERSIONS) ; do \
-		rm -frv debian/$$v ; \
-	done
+	rm -frv debian/tcl-tdbc-postgres ; \
+	rm -frv debian/tdbcpostgres ; \
 	dh_clean
 
 override_dh_auto_configure:
 	for v in $(TCLVERSIONS) ; do \
+		BUILD_DIR="debian/tdbcpostgres/tcl$$v" ; \
+		echo "Configuring tdbcpostgres for Tcl$$v in $$BUILD_DIR" ;\
 		CFLAGS="-I/usr/include/tcl$$v";         \
-		dh_auto_configure -B$(CURDIR)/debian/$$v -- \
-			 --with-tcl=/usr/lib/tcl$$v	\
-                         --prefix=/usr                  \
-                         --includedir=/usr/include	\
-                         --mandir=/usr/share/man	\
-                         --infodir=/usr/share/info	\
-                         --sysconfdir=/etc              \
-                         --localstatedir=/var           \
-                         --libdir=/usr/lib/tcltk/	\
-                         --libexecdir=/usr/lib/tcltk	\
-			 --with-tdbc=$$(ls -dv /usr/lib/tcltk/tdbc1.* | tail -n 1) ; \
-	done ;
- 
-# running twice cleanup of empty directories as there are two of them nested
+		dh_auto_configure --builddir=$$BUILD_DIR -- \
+			--with-tcl=/usr/lib/tcl$$v	\
+			--prefix=/usr			\
+			--includedir=/usr/include	\
+			--mandir=/usr/share/man		\
+			--infodir=/usr/share/info	\
+			--sysconfdir=/etc		\
+			--localstatedir=/var		\
+			--libdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) 	\
+			--libexecdir=/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) \
+			--with-tdbc=$$(ls -dv /usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/tdbc1.* | tail -n 1) ; \
+	done
+
+override_dh_auto_build:
+	for v in $(TCLVERSIONS) ; do \
+		BUILD_DIR="debian/tdbcpostgres/tcl$$v" ; \
+		echo "Building tdbcpostgres for Tcl$$v in $$BUILD_DIR" ; \
+		dh_auto_build --builddir=$$BUILD_DIR --; \
+	done 
 
 override_dh_auto_install:
 	for v in $(TCLVERSIONS) ; do \
-	    dh_auto_install -B$(CURDIR)/debian/$$v ; \
-        done
-	mkdir $(DIR)/usr/share/man/man3
-	# Fix up the manpages.
+		BUILD_DIR="debian/tdbcpostgres/tcl$$v" ; \
+		echo "Install tdbcpostgres files for Tcl$$v version from $$BUILD_DIR" ; \
+		dh_auto_install --builddir=$$BUILD_DIR  -- ; \
+	done ; \
+	mkdir --parent $(DIR)/usr/share/man/man3 ;\
 	cd $(DIR)/usr/share/man/mann && \
-	for f in *.[n] ; do \
-		f2=$$(echo $$f | sed -e 's/\.[n]/.3tcl/') ; \
+	for f in *.[3n] ; do \
+	    f2=$$(echo $$f | sed -e 's/\.[3n]/.3tcl/') ; \
 	    if [ -L $$f ]; then \
-			l=$$(readlink -n $$f | sed -e 's/\.[n]/.3tcl/') ; \
+			l=$$(readlink -n $$f | sed -e 's/\.[3n]/.3tcl/') ; \
 			rm $$f ; \
 			ln -sf $$l $$f2 ; \
 	    else \
-			cat $$f | sed -e 's/^\.TH \([^ ]\+\|"[^"]\+"\) [n]/.TH \1 3tcl/' \
+			cat $$f | sed -e 's/^\.TH \([^ ]\+\|"[^"]\+"\) [3n]/.TH \1 3tcl/' \
 			       -e 's/\(Tk_[0-9A-Za-z]*\)(3)/\1(3tk)/g' \
 			       -e 's/\([A-Z][0-9A-Za-z_]*\)(3)/\1(3tcl)/g' \
 			       -e 's/send(n)/send(3tk)/g' \
@@ -75,3 +80,9 @@ override_dh_auto_install:
 		fi ; \
 	done ; \
 	find $(DIR) -empty -prune -exec rmdir -v \{\} \; ;
+
+
+%:
+	dh $@
+
+.PHONY: override_dh_auto_install override_dh_auto_configure
diff -pruN 1.1.10-2/manifest.uuid 1.1.12-1/manifest.uuid
--- 1.1.10-2/manifest.uuid	2024-12-04 15:54:42.000000000 +0000
+++ 1.1.12-1/manifest.uuid	2025-07-25 19:19:59.000000000 +0000
@@ -1 +1 @@
-fc3895b4482860944f988aa67241228e89f25912fb8433ac87ba351f17004977
+9553928a28534e87369e0637c2ad17c9a58b57548a0766f8b704820f6d84d44a
diff -pruN 1.1.10-2/tclconfig/README.txt 1.1.12-1/tclconfig/README.txt
--- 1.1.10-2/tclconfig/README.txt	2024-11-27 19:02:10.000000000 +0000
+++ 1.1.12-1/tclconfig/README.txt	2025-07-25 19:08:51.000000000 +0000
@@ -1,7 +1,7 @@
 These files comprise the basic building blocks for a Tcl Extension
 Architecture (TEA) extension.  For more information on TEA see:
 
-	http://www.tcl.tk/doc/tea/
+	https://wiki.tcl-lang.org/page/TEA
 
 This package is part of the Tcl project at SourceForge, but sources
 and bug/patch database are hosted on fossil here:
diff -pruN 1.1.10-2/tclconfig/tcl.m4 1.1.12-1/tclconfig/tcl.m4
--- 1.1.10-2/tclconfig/tcl.m4	2024-11-27 19:02:10.000000000 +0000
+++ 1.1.12-1/tclconfig/tcl.m4	2025-07-25 19:08:51.000000000 +0000
@@ -142,16 +142,16 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
 			`ls -d /usr/pkg/lib 2>/dev/null` \
 			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/lib64 2>/dev/null` \
+			`ls -d /usr/lib/tcl9.1 2>/dev/null` \
 			`ls -d /usr/lib/tcl9.0 2>/dev/null` \
-			`ls -d /usr/lib/tcl8.7 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
 			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl/tcl9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
 			; do
@@ -225,10 +225,6 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
 	    AS_HELP_STRING([--with-tk],
 		[directory containing tk configuration (tkConfig.sh)]),
 	    [with_tkconfig="${withval}"])
-	AC_ARG_WITH(tk8,
-	    AS_HELP_STRING([--with-tk8],
-		[Compile for Tk8 in Tk9 environment]),
-	    [with_tk8="${withval}"])
 	AC_MSG_CHECKING([for Tk configuration])
 	AC_CACHE_VAL(ac_cv_c_tkconfig,[
 
@@ -296,18 +292,18 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
 			`ls -d /usr/local/lib 2>/dev/null` \
 			`ls -d /usr/contrib/lib 2>/dev/null` \
 			`ls -d /usr/pkg/lib 2>/dev/null` \
+			`ls -d /usr/lib/tk9.1 2>/dev/null` \
 			`ls -d /usr/lib/tk9.0 2>/dev/null` \
-			`ls -d /usr/lib/tk8.7 2>/dev/null` \
 			`ls -d /usr/lib/tk8.6 2>/dev/null` \
 			`ls -d /usr/lib/tk8.5 2>/dev/null` \
 			`ls -d /usr/lib 2>/dev/null` \
 			`ls -d /usr/lib64 2>/dev/null` \
+			`ls -d /usr/local/lib/tk9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tk9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tk8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
+			`ls -d /usr/local/lib/tcl/tk9.1 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tk9.0 2>/dev/null` \
-			`ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
 			`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
 			; do
@@ -457,7 +453,10 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
 
     # The BUILD_$pkg is to define the correct extern storage class
     # handling when making this package
-    AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
+    # To be able to sefely use the package name in a #define, it must not
+    # contain anything other than alphanumeric characters and underscores
+    SAFE_PKG_NAME=patsubst(AC_PACKAGE_NAME, [[^A-Za-z0-9_]], [_])
+    AC_DEFINE_UNQUOTED(BUILD_${SAFE_PKG_NAME}, [],
 	    [Building extension source?])
     # Do this here as we have fully defined TEA_PLATFORM now
     if test "${TEA_PLATFORM}" = "windows" ; then
@@ -1204,7 +1203,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 		fi
 		case "x`echo \${VisualStudioVersion}`" in
 		    x1[[4-9]]*)
-			lflags="${lflags} -nodefaultlib:libucrt.lib"
+			lflags="${lflags} -nodefaultlib:ucrt.lib"
 			TEA_ADD_LIBS([ucrt.lib])
 		    ;;
 		    *)
@@ -1380,11 +1379,15 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    ;;
-	CYGWIN_*)
+	CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*)
 	    SHLIB_CFLAGS=""
 	    SHLIB_LD='${CC} -shared'
 	    SHLIB_SUFFIX=".dll"
-	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+	    if test "${TEA_PLATFORM}" = "unix" -a  "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$(patsubst cyg%.dll,lib%.dll,\$[@]).a"
+	    else
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
+	    fi
 	    EXEEXT=".exe"
 	    do64bit_ok=yes
 	    CC_SEARCH_FLAGS=""
@@ -3204,15 +3207,22 @@ print("manifest needed")
     # substituted. (@@@ Might not be necessary anymore)
     #--------------------------------------------------------------------
 
-    PACKAGE_LIB_PREFIX8="${PACKAGE_LIB_PREFIX}"
-    PACKAGE_LIB_PREFIX9="${PACKAGE_LIB_PREFIX}tcl9"
+    if test "$TEA_PLATFORM" = "unix"; then
+	PACKAGE_LIB_PREFIX8="lib"
+	if test "$EXEEXT" = ".exe" -a "$SHARED_BUILD" != "0"; then
+	    PACKAGE_LIB_PREFIX9="cygtcl9"
+	else
+	    PACKAGE_LIB_PREFIX9="libtcl9"
+	fi
+    else
+	PACKAGE_LIB_PREFIX8=""
+	PACKAGE_LIB_PREFIX9="tcl9"
+    fi
     if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
 	PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX9}"
     else
 	PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX8}"
 	AC_DEFINE(TCL_MAJOR_VERSION, 8, [Compile for Tcl8?])
-    fi
-    if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tk8}" != x; then
 	AC_DEFINE(TK_MAJOR_VERSION, 8, [Compile for Tk8?])
     fi
     if test "${TEA_PLATFORM}" = "windows" ; then
@@ -3226,6 +3236,14 @@ print("manifest needed")
 	    if test "$GCC" = "yes"; then
 		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
 	    fi
+	    AC_CACHE_CHECK([if the linker understands --disable-high-entropy-va],
+		tcl_cv_ld_high_entropy, [
+		hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
+		AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_ld_high_entropy=yes],[tcl_cv_ld_high_entropy=no])
+		CFLAGS=$hold_cflags])
+	    if test $tcl_cv_ld_high_entropy = yes; then
+		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
+	    fi
 	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
@@ -3256,20 +3274,20 @@ print("manifest needed")
 	    if test x"${TK_BIN_DIR}" != x ; then
 		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
 	    fi
-	    eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
 	    RANLIB=:
 	else
-	    eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
-	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
 	fi
 	# Some packages build their own stubs libraries
 	if test "${TCL_MAJOR_VERSION}" -gt 8 -a x"${with_tcl8}" = x; then
-	    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
+	    eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub.a"
 	else
-	    eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+	    eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
 	fi
     fi
 
