diff --git a/lang/tcl85/files/patch-Makefile.in b/lang/tcl85/files/patch-Makefile.in index 5c08af2eff9b..a12d76e18109 100644 --- a/lang/tcl85/files/patch-Makefile.in +++ b/lang/tcl85/files/patch-Makefile.in @@ -1,175 +1,176 @@ ---- Makefile.in.orig 2016-01-26 17:50:13 UTC +--- Makefile.in.orig 2016-02-08 20:44:53 UTC +++ Makefile.in -@@ -54,6 +54,8 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TC +@@ -54,6 +54,8 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY) # Directory in which to install the include file tcl.h: INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) +GENERIC_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)/generic +UNIX_INCLUDE_INSTALL_DIR= $(INCLUDE_INSTALL_DIR)/unix # Path to the private tcl header dir: PRIVATE_INCLUDE_DIR = @PRIVATE_INCLUDE_DIR@ -@@ -546,7 +548,7 @@ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $ +@@ -546,7 +548,7 @@ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $( all: binaries libraries doc -binaries: ${LIB_FILE} ${TCL_EXE} +binaries: ${LIB_FILE} ${TCL_EXE} libtcl${SHORT_TCL_VER}.a libraries: -@@ -557,6 +559,15 @@ doc: +@@ -557,7 +559,16 @@ doc: ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS} rm -f $@ @MAKE_LIB@ + @ln -sf ${LIB_FILE} ./libtcl${SHORT_TCL_VER}.so + if test "x@DL_OBJS@" = "xtclLoadAout.o"; then \ + $(RANLIB) ${LIB_FILE}; \ + fi; -+ + +libtcl${SHORT_TCL_VER}.a: ${OBJS} + rm -f libtcl${SHORT_TCL_VER}.a + ar cr libtcl${SHORT_TCL_VER}.a ${OBJS} + $(RANLIB) libtcl${SHORT_TCL_VER}.a - ++ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} @if test "x${LIB_FILE}" = "xlibtcl${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \ + (cd ${TOP_DIR}/win; ${MAKE} winextensions); \ @@ -701,7 +712,7 @@ gentommath_h: dltest.marker: ${STUB_LIB_FILE} cd dltest ; $(MAKE) -INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@ +INSTALL_TARGETS = install-binaries install-libraries @EXTRA_INSTALL@ install: $(INSTALL_TARGETS) @@ -727,21 +738,29 @@ install-binaries: binaries @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" + @ln -sf $(LIB_FILE) "$(DLL_INSTALL_DIR)"/libtcl${SHORT_TCL_VER}.so + @echo "Installing libtcl${SHORT_TCL_VER}.a" + @$(INSTALL_DATA) libtcl${SHORT_TCL_VER}.a \ + "$(DLL_INSTALL_DIR)"/libtcl${SHORT_TCL_VER}.a + @(cd "$(DLL_INSTALL_DIR)"; $(RANLIB) libtcl${SHORT_TCL_VER}.a) + @chmod 555 "$(DLL_INSTALL_DIR)"/libtcl${SHORT_TCL_VER}.a @echo "Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh$(VERSION)@EXEEXT@" @$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)/tclsh$(VERSION)@EXEEXT@" - @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" - @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)/tclConfig.sh" + @echo "Installing tclConfig.sh to $(SCRIPT_INSTALL_DIR)/" + @mkdir -p "$(SCRIPT_INSTALL_DIR)" + @$(INSTALL_DATA) tclConfig.sh "$(SCRIPT_INSTALL_DIR)"/tclConfig.sh @if test "$(STUB_LIB_FILE)" != "" ; then \ echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ @INSTALL_STUB_LIB@ ; \ fi @EXTRA_INSTALL_BINARIES@ - @echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/" - @mkdir -p $(LIB_INSTALL_DIR)/pkgconfig - @$(INSTALL_DATA) tcl.pc $(LIB_INSTALL_DIR)/pkgconfig/tcl.pc + @echo "Installing pkg-config file to $(DESTDIR)$(prefix)/libdata/pkgconfig/" + @mkdir -p $(DESTDIR)$(prefix)/libdata/pkgconfig + @$(INSTALL_DATA) tcl.pc $(DESTDIR)$(prefix)/libdata/pkgconfig/tcl85.pc install-libraries: libraries $(INSTALL_TZDATA) install-msgs - @for i in "$(INCLUDE_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"; \ + @for i in "$(GENERIC_INCLUDE_INSTALL_DIR)" \ + "$(UNIX_INCLUDE_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"; \ do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ -@@ -749,7 +768,7 @@ install-libraries: libraries $(INSTALL_T +@@ -749,7 +768,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install else true; \ fi; \ done; - @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \ + @for i in encoding; \ do \ if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \ echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \ -@@ -758,50 +777,64 @@ install-libraries: libraries $(INSTALL_T +@@ -758,50 +777,64 @@ install-libraries: libraries $(INSTALL_TZDATA) install fi; \ done; @echo "Installing header files to $(INCLUDE_INSTALL_DIR)/"; - @for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h \ - $(GENERIC_DIR)/tclPlatDecls.h \ - $(GENERIC_DIR)/tclTomMath.h \ - $(GENERIC_DIR)/tclTomMathDecls.h ; \ + @for i in $(GENERIC_DIR)/*.h ; \ do \ - $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)"; \ + $(INSTALL_DATA) $$i "$(GENERIC_INCLUDE_INSTALL_DIR)"; \ done; + @for i in $(UNIX_DIR)/*.h ; \ + do \ + $(INSTALL_DATA) $$i "$(UNIX_INCLUDE_INSTALL_DIR)"; \ + done; + @ln -sf generic/tcl.h "$(INCLUDE_INSTALL_DIR)"/tcl.h + @ln -sf generic/tclDecls.h "$(INCLUDE_INSTALL_DIR)"/tclDecls.h + @ln -sf generic/tclPlatDecls.h "$(INCLUDE_INSTALL_DIR)"/tclPlatDecls.h + @ln -sf generic/tclTomMath.h "$(INCLUDE_INSTALL_DIR)"/tclTomMath.h + @ln -sf generic/tclTomMathDecls.h "$(INCLUDE_INSTALL_DIR)"/tclTomMathDecls.h @echo "Installing library files to $(SCRIPT_INSTALL_DIR)/"; @for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex \ $(UNIX_DIR)/tclAppInit.c @LDAIX_SRC@ @DTRACE_SRC@; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ done; + @echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding/"; + @for i in $(TOP_DIR)/library/encoding/*.enc ; do \ + $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/encoding; \ + done; + @echo "Customizing tcl module path"; + @echo "::tcl::tm::path add {$(TCL_LIBRARY)}" >> \ + "$(SCRIPT_INSTALL_DIR)"/tm.tcl; + +install-tm: + @for i in opt0.4 http1.0; \ + do \ + if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \ + echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \ + $(INSTALL_DATA_DIR) "$(SCRIPT_INSTALL_DIR)"/$$i; \ + else true; \ + fi; \ + done; @echo "Installing package http1.0 files to $(SCRIPT_INSTALL_DIR)/http1.0/"; @for i in $(TOP_DIR)/library/http1.0/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; @echo "Installing package http 2.7.13 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.13.tm; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/http-2.7.13.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; @echo "Installing package msgcat 1.5.2 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.5.2.tm; + @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/msgcat-1.5.2.tm; @echo "Installing package tcltest 2.3.8 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.8.tm; + @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/tcltest-2.3.8.tm; @echo "Installing package platform 1.0.14 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/platform-1.0.14.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; - - @echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding/"; - @for i in $(TOP_DIR)/library/encoding/*.enc ; do \ - $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/encoding; \ - done; - @if [ -n "$(TCL_MODULE_PATH)" -a -f $(TOP_DIR)/library/tm.tcl ]; then \ - echo "Customizing tcl module path"; \ - echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \ - "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \ - fi + @$(INSTALL_DATA_DIR) "$(SCRIPT_INSTALL_DIR)"/platform; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/platform/shell-1.1.4.tm; install-tzdata: @for i in tzdata; \ diff --git a/lang/tcl85/files/patch-bug214205 b/lang/tcl85/files/patch-bug214205 index 8f07de9e947c..d3176230cc9e 100644 --- a/lang/tcl85/files/patch-bug214205 +++ b/lang/tcl85/files/patch-bug214205 @@ -1,46 +1,16 @@ -Index: ../generic/tclListObj.c -================================================================== ---- ../generic/tclListObj.c +--- ../generic/tclListObj.c.orig 2021-09-10 06:40:10 UTC +++ ../generic/tclListObj.c -@@ -853,12 +853,15 @@ - */ - count = numElems - first; - } - - if (objc > LIST_MAX - (numElems - count)) { -- Tcl_SetObjResult(interp, Tcl_ObjPrintf( -- "max length of a Tcl list (%d elements) exceeded", LIST_MAX)); -+ if (interp != NULL) { -+ Tcl_SetObjResult(interp, Tcl_ObjPrintf( -+ "max length of a Tcl list (%d elements) exceeded", -+ LIST_MAX)); -+ } - return TCL_ERROR; - } - isShared = (listRepPtr->refCount > 1); - numRequired = numElems - count + objc; /* Known <= LIST_MAX */ - - -Index: ../generic/tclListObj.c -================================================================== ---- ../generic/tclListObj.c -+++ ../generic/tclListObj.c -@@ -844,15 +844,12 @@ - if (first >= numElems) { - first = numElems; /* So we'll insert after last element. */ +@@ -846,11 +846,8 @@ } if (count < 0) { count = 0; - } else if (numElems < first+count || first+count < 0) { - /* - * The 'first+count < 0' condition here guards agains integer - * overflow in determining 'first+count' - */ + } else if (first > INT_MAX - count /* Handle integer overflow */ + || numElems < first+count) { count = numElems - first; } - if (objc > LIST_MAX - (numElems - count)) { - if (interp != NULL) { - diff --git a/lang/tcl85/files/patch-configure b/lang/tcl85/files/patch-configure index 73ba15164141..aa0b8f1b9ee1 100644 --- a/lang/tcl85/files/patch-configure +++ b/lang/tcl85/files/patch-configure @@ -1,19 +1,19 @@ ---- configure.orig 2014-08-29 15:40:10.000000000 +0200 -+++ configure 2014-08-29 15:40:23.000000000 +0200 -@@ -7764,15 +7764,11 @@ +--- configure.orig 2016-02-08 20:44:53 UTC ++++ configure +@@ -7669,15 +7669,11 @@ fi LDFLAGS="$LDFLAGS $PTHREAD_LIBS" fi - case $system in - FreeBSD-3.*) # Version numbers are dot-stripped by system policy. TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1' TCL_LIB_VERSIONS_OK=nodots - ;; - esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" diff --git a/lang/tcl85/files/patch-tclUnixInit.c b/lang/tcl85/files/patch-tclUnixInit.c index a7774fb92b2e..cf6fa33aa36a 100644 --- a/lang/tcl85/files/patch-tclUnixInit.c +++ b/lang/tcl85/files/patch-tclUnixInit.c @@ -1,17 +1,17 @@ ---- tclUnixInit.c.orig 2016-09-08 20:22:10.064101000 -0400 -+++ tclUnixInit.c 2016-09-08 20:22:42.345592000 -0400 -@@ -391,14 +391,6 @@ +--- tclUnixInit.c.orig 2015-10-23 11:50:57 UTC ++++ tclUnixInit.c +@@ -452,14 +452,6 @@ TclpInitPlatform(void) #endif /* SIGPIPE */ #if defined(__FreeBSD__) && defined(__GNUC__) - /* - * Adjust the rounding mode to be more conventional. Note that FreeBSD - * only provides the __fpsetreg() used by the following two for the GNU - * Compiler. When using, say, Intel's icc they break. (Partially based on - * patch in BSD ports system from root@celsius.bychok.com) - */ - - fpsetround(FP_RN); (void) fpsetmask(0L); #endif diff --git a/lang/tcl85/files/patch-tclUnixPort.h b/lang/tcl85/files/patch-tclUnixPort.h index d91d22a955e8..362a94a49b14 100644 --- a/lang/tcl85/files/patch-tclUnixPort.h +++ b/lang/tcl85/files/patch-tclUnixPort.h @@ -1,13 +1,13 @@ ---- tclUnixPort.h.orig 2015-02-12 15:13:16 UTC +--- tclUnixPort.h.orig 2015-10-23 11:50:57 UTC +++ tclUnixPort.h -@@ -625,7 +625,9 @@ typedef int socklen_t; +@@ -622,7 +622,9 @@ typedef int socklen_t; # include /* #define localtime(x) TclpLocaltime(x) * #define gmtime(x) TclpGmtime(x) */ -# undef inet_ntoa +# ifdef inet_ntoa +# undef inet_ntoa +# endif # define inet_ntoa(x) TclpInetNtoa(x) # ifdef HAVE_PTHREAD_ATTR_GET_NP # define TclpPthreadGetAttrs pthread_attr_get_np