[tcl] Update to 9.0.3 (#51361)

This commit is contained in:
Kai Pastor 2026-05-11 08:36:24 +02:00 committed by GitHub
parent 361be7ab09
commit a0e4fcb703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 657 additions and 165 deletions

149
ports/tcl/dependencies.diff Normal file
View File

@ -0,0 +1,149 @@
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index d3f6969..2c7ad8d 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -10,7 +10,7 @@
*/
#include "tclInt.h"
-#include "tommath_private.h"
+#define MP_MIN(x, y) (((x) < (y)) ? (x) : (y))
#include "tclTomMath.h"
#ifdef __CYGWIN__
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index aa43e3d..31dbafc 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -76,10 +76,8 @@
} \
} while (0)
-#include "zlib.h"
-#include "crypt.h"
-#include "zutil.h"
-#include "crc32.h"
+#include <zlib.h>
+#include <minizip/crypt.h>
static const z_crc_t* crc32tab;
diff --git a/pkgs/sqlite3.51.0/Makefile.in b/pkgs/sqlite3.51.0/Makefile.in
index 20ab0fd..3f650e4 100644
--- a/pkgs/sqlite3.51.0/Makefile.in
+++ b/pkgs/sqlite3.51.0/Makefile.in
@@ -148,7 +148,7 @@ SHARED_BUILD = @SHARED_BUILD@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I. -I$(srcdir)/..
#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
-PKG_CFLAGS = @PKG_CFLAGS@ -DSQLITE_EXTERN=
+PKG_CFLAGS = @PKG_CFLAGS@
# TCL_DEFS is not strictly need here, but if you remove it, then you
# must make sure that configure.ac checks for the necessary components
diff --git a/pkgs/sqlite3.51.0/configure b/pkgs/sqlite3.51.0/configure
index e8bf713..c8299a6 100755
--- a/pkgs/sqlite3.51.0/configure
+++ b/pkgs/sqlite3.51.0/configure
@@ -601,8 +601,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.51.0'
-PACKAGE_STRING='sqlite 3.51.0'
+printf "%s\n" "Using ${PKG_CONFIG} for sqlite3" >&6
+PACKAGE_VERSION="$(${PKG_CONFIG} --modversion sqlite3)"
+PACKAGE_STRING="sqlite $PACKAGE_VERSION"
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -5736,6 +5737,7 @@ else case e in #(
esac
fi
+CFLAGS="$CFLAGS $(${PKG_CONFIG} --cflags sqlite3)"
if test x$with_system_sqlite != xno; then
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
@@ -5747,7 +5749,7 @@ then :
printf %s "(cached) " >&6
else case e in #(
e) ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsqlite3 $LIBS"
+LIBS="$(${PKG_CONFIG} --libs sqlite3) $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5787,7 +5789,7 @@ if test "x$ac_cv_lib_sqlite3_sqlite3_initialize" = xyes
then :
printf "%s\n" "#define USE_SYSTEM_SQLITE 1" >>confdefs.h
- LIBS="$LIBS -lsqlite3"
+ LIBS="$LIBS $(${PKG_CONFIG:pkg-config} --libs sqlite3)"
fi
fi
diff --git a/pkgs/thread3.0.4/Makefile.in b/pkgs/thread3.0.4/Makefile.in
index 5bdae04..33f6536 100644
--- a/pkgs/thread3.0.4/Makefile.in
+++ b/pkgs/thread3.0.4/Makefile.in
@@ -152,7 +152,7 @@ PKG_ENV = TCL_THREAD_LIBRARY=`@CYGPATH@ $(srcdir)/lib` \
TCLLIBPATH="$(TCLLIBPATH) $(top_builddir)/../lib"
TCLSH_PROG = @TCLSH_PROG@
-TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG)
+TCLSH = $(TCLSH_ENV) $(PKG_ENV) $${HOST_TCLSH:-$(TCLSH_PROG)}
#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
#WISH_PROG = @WISH_PROG@
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 53f7c28..6b7f739 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1,3 +1,5 @@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
#
# This file is a Makefile for Tcl. If it has the name "Makefile.in" then it is
# a template for a Makefile; to generate the actual Makefile, run
diff --git a/unix/configure.ac b/unix/configure.ac
index 80d676d..5eff9a2 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -158,10 +158,11 @@ AC_CHECK_HEADER([zlib.h],[
AC_CHECK_TYPE([gz_header],[],[zlib_ok=no],[#include <zlib.h>])],[
zlib_ok=no])
AS_IF([test $zlib_ok = yes], [
- AC_SEARCH_LIBS([deflateSetHeader],[z],[],[
+ AC_SEARCH_LIBS([deflateSetHeader],[z zs zlib zd zsd zlibd],[],[
zlib_ok=no
])])
AS_IF([test $zlib_ok = no], [
+ AC_MSG_ERROR([zlib not found])
AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
AC_SUBST(ZLIB_SRCS,[\${ZLIB_SRCS}])
AC_SUBST(ZLIB_INCLUDE,[-I\${ZLIB_DIR}])
@@ -185,10 +186,11 @@ if test x"${libtommath_ok}" = x -o x"${libtommath_ok}" != xno; then
libtommath_ok=no])])
fi
AS_IF([test $libtommath_ok = yes], [
- AC_SUBST(TCL_PC_REQUIRES_PRIVATE, ['libtommath >= 1.2.0,'])
+ AC_SUBST(TCL_PC_REQUIRES_PRIVATE, ['']) # -ltommath in Libs
AC_SUBST(TCL_PC_CFLAGS, ['-DTCL_WITH_EXTERNAL_TOMMATH'])
AC_DEFINE(TCL_WITH_EXTERNAL_TOMMATH, 1, [Tcl with external libtommath])
], [
+ AC_MSG_ERROR([libtommath not found])
AC_SUBST(TOMMATH_OBJS,[\${TOMMATH_OBJS}])
AC_SUBST(TOMMATH_SRCS,[\${TOMMATH_SRCS}])
AC_SUBST(TOMMATH_INCLUDE,[-I\${TOMMATH_DIR}])
@@ -964,6 +966,10 @@ AC_SUBST(EXTRA_TCLSH_LIBS)
AC_SUBST(DLTEST_LD)
AC_SUBST(DLTEST_SUFFIX)
+# For delayed configuration of extensions
+AC_SUBST(PKG_CONFIG)
+AC_SUBST(PKG_CONFIG_PATH)
+
dnl Disable the automake-friendly normalization of LIBOBJS
dnl performed by autoconf 2.53 and later. It's not correct for us.
define([_AC_LIBOBJS_NORMALIZE],[])

View File

@ -1,27 +0,0 @@
From 85842ba83b70d99f90ee3fff8c956e82d17759f2 Mon Sep 17 00:00:00 2001
From: Marek Roszko <mark.roszko@gmail.com>
Date: Tue, 18 Aug 2020 23:11:27 -0400
Subject: [PATCH] Remove broken exist check for shell install
---
win/makefile.vc | 2 --
1 file changed, 2 deletions(-)
diff --git a/win/makefile.vc b/win/makefile.vc
index f5d2f4a..6bffe32 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -869,10 +869,8 @@ install-binaries:
@$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
!endif
@$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
-!if exist($(TCLSH))
@echo Installing $(TCLSHNAME)
@$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\"
-!endif
@echo Installing $(TCLSTUBLIBNAME)
@$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
--
2.28.0.windows.1

333
ports/tcl/nmake.diff Normal file
View File

@ -0,0 +1,333 @@
diff --git a/pkgs/itcl4.3.5/win/rules-ext.vc b/pkgs/itcl4.3.5/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/itcl4.3.5/win/rules-ext.vc
+++ b/pkgs/itcl4.3.5/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/itcl4.3.5/win/rules.vc b/pkgs/itcl4.3.5/win/rules.vc
index b95e8c8..058d694 100644
--- a/pkgs/itcl4.3.5/win/rules.vc
+++ b/pkgs/itcl4.3.5/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/sqlite3.51.0/win/rules-ext.vc b/pkgs/sqlite3.51.0/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/sqlite3.51.0/win/rules-ext.vc
+++ b/pkgs/sqlite3.51.0/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/sqlite3.51.0/win/rules.vc b/pkgs/sqlite3.51.0/win/rules.vc
index b95e8c8..058d694 100644
--- a/pkgs/sqlite3.51.0/win/rules.vc
+++ b/pkgs/sqlite3.51.0/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbc1.1.13/win/rules-ext.vc b/pkgs/tdbc1.1.13/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/tdbc1.1.13/win/rules-ext.vc
+++ b/pkgs/tdbc1.1.13/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbc1.1.13/win/rules.vc b/pkgs/tdbc1.1.13/win/rules.vc
index b95e8c8..058d694 100644
--- a/pkgs/tdbc1.1.13/win/rules.vc
+++ b/pkgs/tdbc1.1.13/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcmysql1.1.13/win/rules-ext.vc b/pkgs/tdbcmysql1.1.13/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/tdbcmysql1.1.13/win/rules-ext.vc
+++ b/pkgs/tdbcmysql1.1.13/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcmysql1.1.13/win/rules.vc b/pkgs/tdbcmysql1.1.13/win/rules.vc
index 8ecce0e..3d4146c 100644
--- a/pkgs/tdbcmysql1.1.13/win/rules.vc
+++ b/pkgs/tdbcmysql1.1.13/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcodbc1.1.13/win/rules-ext.vc b/pkgs/tdbcodbc1.1.13/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/tdbcodbc1.1.13/win/rules-ext.vc
+++ b/pkgs/tdbcodbc1.1.13/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcodbc1.1.13/win/rules.vc b/pkgs/tdbcodbc1.1.13/win/rules.vc
index 8ecce0e..3d4146c 100644
--- a/pkgs/tdbcodbc1.1.13/win/rules.vc
+++ b/pkgs/tdbcodbc1.1.13/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcpostgres1.1.13/win/rules-ext.vc b/pkgs/tdbcpostgres1.1.13/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/tdbcpostgres1.1.13/win/rules-ext.vc
+++ b/pkgs/tdbcpostgres1.1.13/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcpostgres1.1.13/win/rules.vc b/pkgs/tdbcpostgres1.1.13/win/rules.vc
index 8ecce0e..3d4146c 100644
--- a/pkgs/tdbcpostgres1.1.13/win/rules.vc
+++ b/pkgs/tdbcpostgres1.1.13/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcsqlite3-1.1.13/win/rules-ext.vc b/pkgs/tdbcsqlite3-1.1.13/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/tdbcsqlite3-1.1.13/win/rules-ext.vc
+++ b/pkgs/tdbcsqlite3-1.1.13/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/tdbcsqlite3-1.1.13/win/rules.vc b/pkgs/tdbcsqlite3-1.1.13/win/rules.vc
index 8ecce0e..3d4146c 100644
--- a/pkgs/tdbcsqlite3-1.1.13/win/rules.vc
+++ b/pkgs/tdbcsqlite3-1.1.13/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/thread3.0.4/win/rules-ext.vc b/pkgs/thread3.0.4/win/rules-ext.vc
index 479720a..05133f5 100644
--- a/pkgs/thread3.0.4/win/rules-ext.vc
+++ b/pkgs/thread3.0.4/win/rules-ext.vc
@@ -31,7 +31,8 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
!else
diff --git a/pkgs/thread3.0.4/win/rules.vc b/pkgs/thread3.0.4/win/rules.vc
index b95e8c8..058d694 100644
--- a/pkgs/thread3.0.4/win/rules.vc
+++ b/pkgs/thread3.0.4/win/rules.vc
@@ -551,7 +551,8 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if 1
+!elseif 0
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
diff --git a/win/makefile.vc b/win/makefile.vc
index 491eff8..5ddaa22 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -1,3 +1,4 @@
+PATH=$(PATH);$(HOST_DLL_DIR);$(MAKEDIR)
#------------------------------------------------------------- -*- makefile -*-
#
# Microsoft Visual C++ makefile for building Tcl with nmake
@@ -476,7 +477,7 @@ PRJ_INCLUDES = -I"$(TOMMATHDIR)"
PRJ_DEFINES = /DMP_PREC=4 /Dinline=__inline /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS
!if $(STATIC_BUILD)
-PRJ_DEFINES = $(PRJ_DEFINES) /DTCL_WITH_INTERNAL_ZLIB
+PRJ_DEFINES = $(PRJ_DEFINES) /DTCL_WITH_EXTERNAL_TOMMATH
!endif
# Additional Link libraries needed beyond those in rules.vc
@@ -535,7 +536,7 @@ shell: libtclzip
@$(COPY) /b "$(TCLSHRAW)"+"$(TCLSCRIPTZIP)" "$(TCLSH)"
!endif
-dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll
+dlls: setup $(TCLREGLIB) $(TCLDDELIB)
libtclzip: $(TCLSCRIPTZIP)
tcltest: setup core $(TCLTEST) dlls
@@ -544,9 +545,11 @@ tcltest: libtclzip
@$(COPY) /b "$(TCLTESTRAW)"+"$(TCLSCRIPTZIP)" "$(TCLTEST)"
!endif
-install: install-binaries install-libraries install-docs install-pkgs
+# Run in submake in order to delay expansion of "!if exist()"
+install:
+ $(MAKE) -$(MAKEFLAGS) NMAKEHLPC=$(ROOT)\nmakehlp.exe -f makefile.vc install-binaries install-libraries install-docs install-pkgs
!if $(SYMBOLS)
-install: install-pdbs
+ $(MAKE) -$(MAKEFLAGS) NMAKEHLPC=$(ROOT)\nmakehlp.exe -f makefile.vc install-pdbs
!endif
setup: default-setup
@@ -676,7 +679,7 @@ pkgs:
@for /d %d in ($(PKGSDIR)\*) do \
@if exist "%~fd\win\makefile.vc" ( \
pushd "%~fd\win" & \
- $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) &\
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) NMAKEHLPC=$(ROOT)\nmakehlp.exe &\
popd \
)
@@ -692,7 +695,7 @@ install-pkgs:
@for /d %d in ($(PKGSDIR)\*) do \
@if exist "%~fd\win\makefile.vc" ( \
pushd "%~fd\win" & \
- $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) install &\
+ $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) NMAKEHLPC=$(ROOT)\nmakehlp.exe install &\
popd \
)
@@ -1049,11 +1052,7 @@ install-binaries:
@$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
!endif
@$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
- @$(CPY) "$(OUT_DIR)\zlib1.dll" "$(BIN_INSTALL_DIR)\"
- @$(CPY) "$(OUT_DIR)\libtommath.dll" "$(BIN_INSTALL_DIR)\"
!if !$(STATIC_BUILD)
- @$(CPY) "$(OUT_DIR)\zdll.lib" "$(LIB_INSTALL_DIR)\"
- @$(CPY) "$(OUT_DIR)\tommath.lib" "$(LIB_INSTALL_DIR)\"
!endif
!if exist($(TCLSH))
@echo Installing $(TCLSHNAME)
@@ -1073,7 +1072,6 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
@$(CPY) "$(GENERICDIR)\tclPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\"
@$(CPY) "$(GENERICDIR)\tclTomMath.h" "$(INCLUDE_INSTALL_DIR)\"
@$(CPY) "$(GENERICDIR)\tclTomMathDecls.h" "$(INCLUDE_INSTALL_DIR)\"
- @$(CPY) "$(TOMMATHDIR)\tommath.h" "$(INCLUDE_INSTALL_DIR)\"
!if !$(TCL_EMBED_SCRIPTS)
@echo Installing library files to $(SCRIPT_INSTALL_DIR)
@if not exist "$(SCRIPT_INSTALL_DIR)" \
@@ -1087,7 +1085,6 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
@$(CPY) "$(WIN_DIR)\rules.vc" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(WIN_DIR)\targets.vc" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(WIN_DIR)\nmakehlp.c" "$(LIB_INSTALL_DIR)\nmake\"
- @$(CPY) "$(WIN_DIR)\x86_64-w64-mingw32-nmakehlp.exe" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(OUT_DIR)\tcl.nmake" "$(LIB_INSTALL_DIR)\nmake\"
!if !$(TCL_EMBED_SCRIPTS)
@echo Installing package cookiejar $(PKG_COOKIEJAR_VER)
diff --git a/win/rules.vc b/win/rules.vc
index f709fd8..49482d0 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -551,11 +551,15 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+!if exist("$(MAKEDIR)\nmakehlp.exe")
+!message Reusing $(MAKEDIR)\nmakehlp.exe
+!elseif "$(NMAKEHLPC)" == "nmakehlp.c"
+!message Building nmakehlp.exe
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
!else
-!if [copy $(NMAKEHLPC:nmakehlp.c=x86_64-w64-mingw32-nmakehlp.exe) nmakehlp.exe >NUL]
+!message Copying $(NMAKEHLPC) to $(MAKEDIR)
+!if [copy $(NMAKEHLPC) $(MAKEDIR)\nmakehlp.exe >NUL]
!endif
!endif

View File

@ -1,155 +1,158 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tcltk/tcl
REF 0fa6a4e5aad821a5c34fdfa070c37c3f1ffc8c8e
SHA512 9d7f35309fe8b1a7c116639aaea50cc01699787c7afb432389bee2b9ad56a67034c45d90c9585ef1ccf15bdabf0951cbef86257c0c6aedbd2591bbfae3e93b76
PATCHES force-shell-install.patch
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/tcl/files/Tcl/${VERSION}/tcl${VERSION}-src.tar.gz/download"
FILENAME "tcl${VERSION}-src.tar.gz"
SHA512 a899333fd96f139d92ad74ee42cc402428677ab2cab8ed3eb1e6e7cb35c7ca7d39aac89b7755b2fb1786512c857c79486d71f49a7821470f669fb9e544dba532
)
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
dependencies.diff
nmake.diff
)
file(GLOB sqlite3_sources "${SOURCE_PATH}/pkgs/sqlite3.51.0/compat/sqlite3/*.c" "${SOURCE_PATH}/pkgs/sqlite3.51.0/compat/sqlite3/*.h")
file(GLOB precompiled_tools "${SOURCE_PATH}/win/*.exe" "${SOURCE_PATH}/pkgs/*/win/*.exe")
file(REMOVE_RECURSE
"${SOURCE_PATH}/compat/zlib"
"${SOURCE_PATH}/libtommath"
${sqlite3_sources}
${precompiled_tools}
)
if (VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
set(TCL_BUILD_MACHINE_STR MACHINE=AMD64)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
# Cf. https://core.tcl-lang.org/tips/doc/main/tip/477.md
set(OPTS pdbs)
set(TCLSH_SUFFIX "")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(OPTS ${OPTS},static)
string(APPEND TCLSH_SUFFIX "s")
endif()
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(OPTS ${OPTS},msvcrt)
else()
set(TCL_BUILD_MACHINE_STR MACHINE=IX86)
set(OPTS ${OPTS},nomsvcrt)
string(APPEND TCLSH_SUFFIX "x")
endif()
# Handle features
set(TCL_BUILD_OPTS OPTS=pdbs)
set(TCL_BUILD_STATS STATS=none)
set(TCL_BUILD_CHECKS CHECKS=none)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},static,staticpkg)
if("profile" IN_LIST FEATURES)
set(OPTS ${OPTS},profile)
endif()
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},msvcrt)
if("thrdalloc" IN_LIST FEATURES)
set(OPTS ${OPTS},thrdalloc)
endif()
if ("thrdalloc" IN_LIST FEATURES)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},thrdalloc)
if("time64bit" IN_LIST FEATURES)
set(OPTS ${OPTS},time64bit)
endif()
if ("profile" IN_LIST FEATURES)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},profile)
cmake_path(NATIVE_PATH CURRENT_HOST_INSTALLED_DIR CURRENT_HOST_INSTALLED_DIR_NATIVE)
vcpkg_list(SET OPTIONS)
if(VCPKG_CROSSCOMPILING)
file(GLOB HOST_TCLSH "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/bin/tclsh90*.exe")
cmake_path(NATIVE_PATH HOST_TCLSH HOST_TCLSH_NATIVE)
vcpkg_list(APPEND OPTIONS
"NMAKEHLPC=${CURRENT_HOST_INSTALLED_DIR_NATIVE}\\tools\\${PORT}\\bin\\nmakehlp.exe"
"TCLSH_NATIVE=${HOST_TCLSH_NATIVE}"
)
endif()
if ("unchecked" IN_LIST FEATURES)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},unchecked)
set(ZLIB_BASENAME "z")
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/zs.lib")
set(ZLIB_BASENAME "zs")
endif()
if ("utfmax" IN_LIST FEATURES)
set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},time64bit)
endif()
vcpkg_install_nmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH win
OPTIONS
${TCL_BUILD_MACHINE_STR}
${TCL_BUILD_STATS}
${TCL_BUILD_CHECKS}
STATS=none
CHECKS=none
${OPTIONS}
OPTIONS_DEBUG
${TCL_BUILD_OPTS},symbols
INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug
SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0
OPTS=${OPTS},symbols
"SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\tools\\${PORT}\\debug\\lib\\tcl9.0"
"SQLITE3_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib"
"TOMMATHOBJS=${CURRENT_INSTALLED_DIR}/debug/lib/tommath.lib"
"ZLIBOBJS=${CURRENT_INSTALLED_DIR}/debug/lib/${ZLIB_BASENAME}d.lib"
"HOST_DLL_DIR=${CURRENT_HOST_INSTALLED_DIR_NATIVE}\\debug\\bin"
OPTIONS_RELEASE
release
${TCL_BUILD_OPTS}
INSTALLDIR=${CURRENT_PACKAGES_DIR}
SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0
OPTS=${OPTS}
"SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\tools\\${PORT}\\lib\\tcl9.0"
"SQLITE3_LIBS=${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib"
"TOMMATHOBJS=${CURRENT_INSTALLED_DIR}/lib/tommath.lib"
"ZLIBOBJS=${CURRENT_INSTALLED_DIR}/lib/${ZLIB_BASENAME}.lib"
"HOST_DLL_DIR=${CURRENT_HOST_INSTALLED_DIR}\\bin"
)
# Install
# Note: tcl shell requires it to be in a folder adjacent to the /lib/ folder, i.e. in a /bin/ folder
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(GLOB_RECURSE TOOL_BIN
"${CURRENT_PACKAGES_DIR}/bin/*.exe"
"${CURRENT_PACKAGES_DIR}/bin/*.dll"
)
file(COPY ${TOOL_BIN} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/tcl/bin/")
# Remove .exes only after copying
file(GLOB_RECURSE TOOL_EXES
${CURRENT_PACKAGES_DIR}/bin/*.exe
)
file(REMOVE ${TOOL_EXES})
file(GLOB_RECURSE TOOLS
"${CURRENT_PACKAGES_DIR}/lib/dde1.4/*"
"${CURRENT_PACKAGES_DIR}/lib/nmake/*"
"${CURRENT_PACKAGES_DIR}/lib/reg1.3/*"
"${CURRENT_PACKAGES_DIR}/lib/tcl8/*"
"${CURRENT_PACKAGES_DIR}/lib/tcl8.6/*"
"${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0/*"
)
foreach(TOOL ${TOOLS})
get_filename_component(DST_DIR ${TOOL} PATH)
file(COPY "${TOOL}" DESTINATION ${DST_DIR})
endforeach()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/dde1.4"
"${CURRENT_PACKAGES_DIR}/lib/nmake"
"${CURRENT_PACKAGES_DIR}/lib/reg1.3"
"${CURRENT_PACKAGES_DIR}/lib/tcl8"
"${CURRENT_PACKAGES_DIR}/lib/tcl8.6"
"${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0"
)
file(CHMOD_RECURSE
"${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0/msgs" "${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0/tzdata"
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ GROUP_WRITE
WORLD_READ WORLD_WRITE
if(NOT VCPKG_BUILD_TYPE)
vcpkg_copy_tools(TOOL_NAMES tclsh90${TCLSH_SUFFIX}
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/debug/bin"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin"
)
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB_RECURSE TOOL_BIN
"${CURRENT_PACKAGES_DIR}/debug/bin/*.exe"
"${CURRENT_PACKAGES_DIR}/debug/bin/*.dll"
)
file(COPY ${TOOL_BIN} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin/")
# Remove .exes only after copying
file(GLOB_RECURSE EXES
"${CURRENT_PACKAGES_DIR}/debug/bin/*.exe"
)
file(REMOVE ${EXES})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4"
"${CURRENT_PACKAGES_DIR}/debug/lib/nmake"
"${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3"
"${CURRENT_PACKAGES_DIR}/debug/lib/tcl8"
"${CURRENT_PACKAGES_DIR}/debug/lib/tcl8.6"
"${CURRENT_PACKAGES_DIR}/debug/lib/tdbcsqlite31.1.0"
)
file(CHMOD_RECURSE
"${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0/msgs" "${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0/tzdata"
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ GROUP_WRITE
WORLD_READ WORLD_WRITE
vcpkg_copy_tools(TOOL_NAMES tclsh90${TCLSH_SUFFIX}
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
AUTO_CLEAN
)
if(NOT VCPKG_CROSSCOMPILING)
vcpkg_copy_tools(TOOL_NAMES nmakehlp
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/win"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
file(GLOB_RECURSE extensions "${CURRENT_PACKAGES_DIR}/lib/*/*.dll")
if(extensions)
file(COPY ${extensions} DESTINATION "${CURRENT_PACKAGES_DIR}/plugins/${PORT}")
file(REMOVE ${extensions})
if(NOT VCPKG_BUILD_TYPE)
file(GLOB_RECURSE extensions "${CURRENT_PACKAGES_DIR}/debug/lib/*/*.dll")
file(COPY ${extensions} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}")
file(REMOVE ${extensions})
endif()
endif()
file(GLOB_RECURSE tclconfigs "${CURRENT_PACKAGES_DIR}/lib/*Config.sh")
foreach(file IN LISTS tclconfigs)
cmake_path(GET file FILENAME filename)
file(COPY_FILE "${file}" "${CURRENT_BUILDTREES_DIR}/aaa-${TARGET_TRIPLET}-${filename}.log")
endforeach()
file(GLOB_RECURSE tclconfigs "${CURRENT_PACKAGES_DIR}/lib/*Config.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/*Config.sh")
file(REMOVE ${tclconfigs} PLACEHOLDER)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
else()
file(REMOVE "${SOURCE_PATH}/unix/configure")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH unix
if(VCPKG_CROSSCOMPILING)
vcpkg_host_path_list(PREPEND ENV{PATH} "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/bin")
set(ENV{HOST_TCLSH} "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/bin/tclsh9.0")
endif()
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}/unix"
AUTORECONF
DEFAULT_OPTIONS_EXCLUDE "^--(disable|enable)-static"
OPTIONS
"CFLAGS=-I${CURRENT_INSTALLED_DIR}/include \$CFLAGS"
--with-system-libtommath
--with-system-sqlite
)
vcpkg_install_make()
vcpkg_make_install()
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
endif()
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/tclConfig.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/tclConfig.sh")
file(GLOB_RECURSE config_scripts "${CURRENT_PACKAGES_DIR}/lib/*Config.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/*Config.sh")
file(REMOVE ${config_scripts})
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.terms")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/man1"
"${CURRENT_PACKAGES_DIR}/share/man3"
"${CURRENT_PACKAGES_DIR}/share/mann"
)
endif()
file(GLOB pkgs_license_files RELATIVE "${SOURCE_PATH}/pkgs" "${SOURCE_PATH}/pkgs/*/license.terms")
foreach(path IN LISTS pkgs_license_files)
string(REPLACE "/" " " filename "${path}")
file(COPY_FILE "${SOURCE_PATH}/pkgs/${path}" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${filename}")
string(REPLACE "${path}" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${filename}" pkgs_license_files "${pkgs_license_files}")
endforeach()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.terms" ${pkgs_license_files})

View File

@ -1,25 +1,52 @@
{
"name": "tcl",
"version-string": "core-9-0-a1",
"port-version": 8,
"version": "9.0.3",
"description": "Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications.",
"homepage": "https://github.com/tcltk/tcl",
"supports": "!android & !(windows & arm) & !uwp",
"license": null,
"dependencies": [
"libtommath",
"minizip",
{
"$comment": "cf. pkgs/sqlite3.51.0/win/makefile.vc",
"name": "sqlite3",
"features": [
"dbpage-vtab",
"dbstat",
"fts3",
"fts4",
"fts5",
"geopoly",
"json1",
"limit",
"math",
"rtree",
"soundex"
]
},
{
"name": "tcl",
"host": true
},
{
"name": "vcpkg-make",
"host": true,
"platform": "!windows"
},
"zlib"
],
"features": {
"profile": {
"description": "Adds profiling hooks. Map file is assumed."
"description": "Produce an image that can be used with the Windows Performance Tools profiler.",
"supports": "windows & !mingw"
},
"thrdalloc": {
"description": "Use the thread allocator (shared global free pool)."
"description": "Use the thread allocator (shared global free pool).",
"supports": "windows & !mingw"
},
"unchecked": {
"description": "Allows a symbols build to not use the debug enabled runtime (msvcrt.dll not msvcrtd.dll or libcmt.lib not libcmtd.lib)."
},
"utfmax": {
"description": "Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits"
"time64bit": {
"description": "Force 64-bit time_t.",
"supports": "windows & !mingw"
}
}
}

View File

@ -1111,6 +1111,8 @@ spaceland:x64-android=fail
spscqueue:arm-neon-android=fail
spscqueue:arm64-android=fail
spscqueue:x64-android=fail
sqlcipher:arm64-windows-static-md=fail # vendored host tool
sqlcipher:arm64-windows=fail # vendored host tool
suitesparse-graphblas:x86-windows=fail # _Interlocked* intrinsic functions are not available on x86
tdscpp:arm64-linux=fail
telnetpp:arm-neon-android=fail

View File

@ -9913,8 +9913,8 @@
"port-version": 0
},
"tcl": {
"baseline": "core-9-0-a1",
"port-version": 8
"baseline": "9.0.3",
"port-version": 0
},
"tclap": {
"baseline": "1.2.5",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ecf39d065f594ac59d91f1e2da8ac13e866dacb5",
"version": "9.0.3",
"port-version": 0
},
{
"git-tree": "e17d8c12a1c924cfd28ae1ad9e5fad178b63eee5",
"version-string": "core-9-0-a1",