--- /dev/null
+diff --git a/unix/Makefile.in b/unix/Makefile.in
+index 99bdf05..0b2f660 100644
+--- a/unix/Makefile.in
++++ b/unix/Makefile.in
+@@ -788,7 +788,7 @@ topDirName:
+ # This keeps tcltest from picking up an already installed version of the Tcl
+ # library.
+ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \
+- TCLLIBPATH="@abs_builddir@/pkgs" \
++ TCLLIBPATH="@abs_builddir@/pkgs @abs_builddir@/../tests" \
+ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"
+
+ ${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST}
---- tcl8.6.10/unix/configure.in.orig 2020-01-15 20:42:45.382933027 +0100
-+++ tcl8.6.10/unix/configure.in 2020-01-15 21:03:28.699530737 +0100
-@@ -870,9 +870,9 @@
+--- tcl8.6.12/unix/configure.in~ 2021-11-09 16:27:34.000000000 +0100
++++ tcl8.6.12/unix/configure.in 2021-11-09 16:30:31.236276242 +0100
+@@ -870,9 +870,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then
-- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
-+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir} ${libdir}/tcl8.6 ${prefix}/lib ${prefix}/lib/tcl8.6 ${prefix}/share/tcl8.6 ${TCL_PACKAGE_PATH}"
+- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib} ${TCL_PACKAGE_PATH}"
++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${libdir}/tcl8.6} {${prefix}/lib} {${prefix}/lib/tcl8.6} {${prefix}/share/tcl8.6} ${TCL_PACKAGE_PATH}"
else
-- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
-+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir} ${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${TCL_PACKAGE_PATH}"
+- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${prefix}/lib} ${TCL_PACKAGE_PATH}"
++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${libdir}/tcl8.6} {${prefix}/share/tcl8.6} ${TCL_PACKAGE_PATH}"
fi
#--------------------------------------------------------------------
-diff -up tcl8.5.1/library/init.tcl.autopath tcl8.5.1/library/init.tcl
---- tcl8.5.1/library/init.tcl.autopath 2008-02-04 18:29:11.000000000 +0100
-+++ tcl8.5.1/library/init.tcl 2008-02-19 09:11:51.000000000 +0100
-@@ -48,16 +48,11 @@ if {![info exists auto_path]} {
- }
+--- tcl8.6.12/library/init.tcl~ 2021-10-29 19:08:07.000000000 +0200
++++ tcl8.6.12/library/init.tcl 2021-11-09 16:32:24.629609514 +0100
+@@ -52,16 +52,11 @@ if {![info exists auto_path]} {
namespace eval tcl {
- variable Dir
-- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
-+ foreach Dir [list $::tcl_library] {
- if {$Dir ni $::auto_path} {
- lappend ::auto_path $Dir
- }
- }
-- set Dir [file join [file dirname [file dirname \
-- [info nameofexecutable]]] lib]
-- if {$Dir ni $::auto_path} {
-- lappend ::auto_path $Dir
-- }
- catch {
- foreach Dir $::tcl_pkgPath {
+ if {![interp issafe]} {
+ variable Dir
+- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
++ foreach Dir [list $::tcl_library] {
if {$Dir ni $::auto_path} {
-diff -up tcl8.5.1/library/auto.tcl.autopath tcl8.5.1/library/auto.tcl
---- tcl8.5.1/library/auto.tcl.autopath 2006-11-03 01:34:52.000000000 +0100
-+++ tcl8.5.1/library/auto.tcl 2008-02-19 09:11:51.000000000 +0100
-@@ -85,6 +85,13 @@ proc tcl_findLibrary {basename version p
- lappend dirs $value
+ lappend ::auto_path $Dir
+ }
+ }
+- set Dir [file join [file dirname [file dirname \
+- [info nameofexecutable]]] lib]
+- if {$Dir ni $::auto_path} {
+- lappend ::auto_path $Dir
+- }
+ if {[info exists ::tcl_pkgPath]} { catch {
+ foreach Dir $::tcl_pkgPath {
+ if {$Dir ni $::auto_path} {
+--- tcl8.6.12/library/auto.tcl~ 2021-10-29 19:08:07.000000000 +0200
++++ tcl8.6.12/library/auto.tcl 2021-11-09 16:33:51.629609462 +0100
+@@ -81,6 +81,13 @@ proc tcl_findLibrary {basename version p
+ lappend dirs [::${basename}::pkgconfig get scriptdir,runtime]
}
-+ # 2a. As a sibling of Tcl's script directory
-+ if {[catch {
-+ ::tcl::pkgconfig get scriptdir,runtime
-+ } value] == 0} {
-+ lappend dirs [file join [file dirname $value] $basename$version]
-+ }
++ # 2a. As a sibling of Tcl's script directory
++ if {[catch {
++ ::tcl::pkgconfig get scriptdir,runtime
++ } value] == 0} {
++ lappend dirs [file join [file dirname $value] $basename$version]
++ }
+
# 3. Relative to auto_path directories. This checks relative to the
# Tcl library as well as allowing loading of libraries added to the
# auto_path that is not relative to the core library or binary paths.
+
---- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
-+++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
-@@ -1403,11 +1403,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+--- tcl8.6.12/unix/tcl.m4~ 2021-11-09 16:34:23.000000000 +0100
++++ tcl8.6.12/unix/tcl.m4 2021-11-09 16:36:35.869609358 +0100
+@@ -1382,7 +1382,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ # get rid of the warnings.
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
- SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
+- SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
+ SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared -fPIC -Wl,-soname,${@}'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+@@ -1398,7 +1398,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ esac
+
AS_IF([test $doRpath = yes], [
-- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+- CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
+ CC_SEARCH_FLAGS=''])
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
AS_IF([test $do64bit = yes], [
-
---- tcl8.5.9/unix/installManPage.orig 2010-09-08 19:40:48.000000000 +0200
-+++ tcl8.5.9/unix/installManPage 2010-10-02 08:14:15.348556463 +0200
-@@ -108,7 +108,7 @@
- chmod 444 $Dir/$First
- $Gzip $Dir/$First
+--- tcl8.6.12/unix/installManPage~ 2021-10-29 19:08:08.000000000 +0200
++++ tcl8.6.12/unix/installManPage 2021-11-09 16:21:07.102943217 +0100
+@@ -117,7 +117,7 @@ for Target in $Names; do
+ chmod 644 "$Dir/$First"
+ $Gzip "$Dir/$First"
else
-- ln $SymOrLoc$First$Gz $Dir/$Target$Gz
+- ln $SymOrLoc"$First$Gz" "$Dir/$Target$Gz"
+ echo ".so $First" > $Dir/$Target
fi
done
---- tcl8.6.1/unix/Makefile.in~ 2014-05-31 18:42:07.000000000 +0200
-+++ tcl8.6.1/unix/Makefile.in 2014-05-31 18:42:50.235198470 +0200
-@@ -176,7 +176,7 @@
+--- tcl8.6.12/unix/Makefile.in~ 2021-11-09 16:26:26.000000000 +0100
++++ tcl8.6.12/unix/Makefile.in 2021-11-09 16:27:13.079609680 +0100
+@@ -175,7 +175,7 @@ NATIVE_TCLSH = @TCLSH_PROG@
# need to modify any of these definitions by hand.
STLIB_LD = @STLIB_LD@
+SHLIB_LD = @SHLIB_LD@ ${CFLAGS}
SHLIB_CFLAGS = @SHLIB_CFLAGS@ -DBUILD_tcl
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
- TCL_SHLIB_LD_EXTRAS = @TCL_SHLIB_LD_EXTRAS@
+ SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
# The following symbol is defined to "$(DLTEST_TARGETS)" if dynamic loading is
# available; this causes everything in the "dltest" subdirectory to be built
---- tcl8.5.13/unix/tcl.m4.orig 2012-11-28 21:29:42.223960573 +0100
-+++ tcl8.5.13/unix/tcl.m4 2012-11-28 21:31:03.440627511 +0100
-@@ -2048,7 +2048,7 @@ dnl # preprocessing tests use only CPPFL
+--- tcl8.6.12/unix/tcl.m4~ 2021-11-09 16:25:05.000000000 +0100
++++ tcl8.6.12/unix/tcl.m4 2021-11-09 16:25:58.082943053 +0100
+@@ -1991,7 +1991,7 @@ dnl # preprocessing tests use only CPPFL
AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
-+ MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS}'
+- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
++ MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${LDFLAGS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS}'
AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)";if test -f $(LIB_FILE).a; then $(INSTALL_DATA) $(LIB_FILE).a "$(LIB_INSTALL_DIR)"; fi;'
DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
+
# Flags to pass to the linker
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
---- tcl8.6.1/unix/tcl.m4~ 2013-09-19 22:17:13.000000000 +0200
-+++ tcl8.6.1/unix/tcl.m4 2014-05-31 19:44:20.670186134 +0200
-@@ -1114,7 +1114,7 @@
+--- tcl8.6.12/unix/tcl.m4~ 2021-11-04 15:29:53.000000000 +0100
++++ tcl8.6.12/unix/tcl.m4 2021-11-09 16:19:51.296276589 +0100
+@@ -1074,7 +1074,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
- CFLAGS_OPTIMIZE=-O2
-+ CFLAGS_OPTIMIZE=${OPTFLAGS}
- CFLAGS_WARNING="-Wall"
++ CFLAGS_OPTIMIZE="${OPTFLAGS}"
+ CFLAGS_WARNING="-Wall -Wpointer-arith"
], [
CFLAGS_OPTIMIZE=-O
-@@ -1409,7 +1409,7 @@
+
+--- tcl8.6.12/unix/tcl.m4~ 2021-11-11 14:43:00.000000000 +0100
++++ tcl8.6.12/unix/tcl.m4 2021-11-11 14:44:35.499587617 +0100
+@@ -1376,7 +1376,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_CFLAGS="-fPIC"
SHLIB_SUFFIX=".so"
- CFLAGS_OPTIMIZE="-O2"
-+ CFLAGS_OPTIMIZE="${OPTFLAGS}"
# egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
# when you inline the string and math operations. Turn this off to
# get rid of the warnings.
-
-diff -urN tcl8.5a2.org/unix/configure.in tcl8.5a2/unix/configure.in
---- tcl8.5a2.org/unix/configure.in 2004-12-08 00:16:06.000000000 +0100
-+++ tcl8.5a2/unix/configure.in 2005-04-04 13:19:13.000000000 +0200
-@@ -436,7 +436,11 @@
+--- tcl8.6.12/unix/configure.in~ 2021-10-29 19:08:08.000000000 +0200
++++ tcl8.6.12/unix/configure.in 2021-11-09 16:23:27.262943133 +0100
+@@ -765,7 +765,11 @@ fi
TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
+eval "TCL_LIB_SONAME=libtcl${LIB_SUFFIX}${TCL_SOMAJOR}"
+AC_SUBST(TCL_LIB_SONAME)
- SC_ENABLE_FRAMEWORK
-
-diff -urN tcl8.5a2.org/unix/Makefile.in tcl8.5a2/unix/Makefile.in
---- tcl8.5a2.org/unix/Makefile.in 2004-12-08 00:16:06.000000000 +0100
-+++ tcl8.5a2/unix/Makefile.in 2005-04-04 13:20:39.000000000 +0200
-@@ -459,7 +459,9 @@
- # a shared library or non-shared library for Tcl.
- ${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE}
+ # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
+ # since on some platforms TCL_LIB_FILE contains shell escapes.
+--- tcl8.6.12/unix/Makefile.in~ 2021-11-09 16:23:52.000000000 +0100
++++ tcl8.6.12/unix/Makefile.in 2021-11-09 16:24:43.286276425 +0100
+@@ -721,7 +721,9 @@ doc:
+ # library or non-shared library for Tcl.
+ ${LIB_FILE}: ${STUB_LIB_FILE} ${OBJS}
rm -f $@
- @MAKE_LIB@
+ @MAKE_LIB@ -Wl,-soname,@TCL_LIB_SONAME@
-+ -ln -sf ${TCL_LIB_FILE} libtcl${VERSION}@SHLIB_SUFFIX@
-+ -ln -sf ${TCL_LIB_FILE} libtcl${VERSION}@SHLIB_SUFFIX@.0
++ ln -sf ${TCL_LIB_FILE} libtcl${VERSION}@SHLIB_SUFFIX@
++ ln -sf ${TCL_LIB_FILE} libtcl${VERSION}@SHLIB_SUFFIX@.0
${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
- rm -f $@
+ @if test "x${LIB_FILE}" = "xlibtcl${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \
%bcond_without tests # don't perform "make test"
#
%define major 8.6
-%define minor 10
+%define minor 12
Summary: Tool Command Language embeddable scripting language, with shared libraries
Summary(fr.UTF-8): Tool Command Language, langage de script avec bibliothèques partagées
Summary(pl.UTF-8): Tool Command Language - język skryptowy z bibliotekami dynamicznymi
License: BSD
Group: Development/Languages/Tcl
Source0: http://downloads.sourceforge.net/tcl/%{name}-core%{version}-src.tar.gz
-# Source0-md5: 96ba4235d1a3086f899b6d7cc2fef301
+# Source0-md5: 0802e5c9e8936fc9b0c69a8da4cedfe2
Source1: %{name}-pl-man-pages.tar.bz2
# Source1-md5: dd3370f2b588763758787831a4bf48fc
+Patch1: tests.patch
Patch2: %{name}-opt.patch
Patch3: %{name}-mannames.patch
Patch4: %{name}-soname_fix.patch
Patch8: %{name}-hidden.patch
Patch9: %{name}-conf.patch
Patch10: libc-version.patch
+Patch11: tcl-8.6.10-tcltests-path-fix.patch
URL: http://www.tcl.tk/
BuildRequires: autoconf >= 2.59
BuildRequires: ncurses-devel >= 5.2
%prep
%setup -q -n %{name}%{version}
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
%build
%if %{with threads}
--- /dev/null
+--- tcl8.6.12/tests/cmdAH.test~ 2021-10-29 19:08:08.000000000 +0200
++++ tcl8.6.12/tests/cmdAH.test 2021-11-11 14:25:49.036254905 +0100
+@@ -1294,22 +1294,6 @@ test cmdAH-24.14.1 {
+ file mtime [file join [temporaryDirectory] CON.txt]
+ } -match regexp -result {could not (?:get modification time|read)} -returnCodes error
+
+-# 3155760000 is 64-bit unix time, Wed Jan 01 00:00:00 GMT 2070:
+-test cmdAH-24.20.1 {Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+- set filename [makeFile "" foo.text]
+-} -body {
+- list [file atime $filename 3155760000] [file atime $filename]
+-} -cleanup {
+- removeFile $filename
+-} -result {3155760000 3155760000}
+-test cmdAH-24.20.2 {Tcl_FileObjCmd: mtime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+- set filename [makeFile "" foo.text]
+-} -body {
+- list [file mtime $filename 3155760000] [file mtime $filename]
+-} -cleanup {
+- file delete -force $filename
+-} -result {3155760000 3155760000}
+-
+ # owned
+ test cmdAH-25.1 {Tcl_FileObjCmd: owned} -returnCodes error -body {
+ file owned a b