diff options
author | CoprDistGit <infra@openeuler.org> | 2024-11-16 13:19:27 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-11-16 13:19:27 +0000 |
commit | dc41324914e7fb8451c663f2e83c4daa259e0f75 (patch) | |
tree | d52bde2543b54602e59450377c1b2f43cda5f791 | |
parent | 495915bd411b88bab4e9aa4b6f466072c12dd35d (diff) |
automatic import of tcl
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | File-not-found-should-be-ignored-silently.patch | 45 | ||||
-rw-r--r-- | macros.tcl | 3 | ||||
-rw-r--r-- | oops.patch | 27 | ||||
-rw-r--r-- | sources | 1 | ||||
-rw-r--r-- | stay-out-of-internals-when-nice-interfaces-are-avail.patch | 37 | ||||
-rw-r--r-- | tcl-8.6.10-hidden.patch | 13 | ||||
-rw-r--r-- | tcl-8.6.10-tcltests-path-fix.patch | 13 | ||||
-rw-r--r-- | tcl-8.6.15-autopath.patch | 56 | ||||
-rw-r--r-- | tcl-8.6.15-conf.patch | 22 | ||||
-rw-r--r-- | tcl-8.6.15-fix-install-mode.patch | 22 | ||||
-rw-r--r-- | tcl.spec | 206 |
12 files changed, 446 insertions, 0 deletions
@@ -0,0 +1 @@ +/tcl-core8.6.15-src.tar.gz diff --git a/File-not-found-should-be-ignored-silently.patch b/File-not-found-should-be-ignored-silently.patch new file mode 100644 index 0000000..408772f --- /dev/null +++ b/File-not-found-should-be-ignored-silently.patch @@ -0,0 +1,45 @@ +From 00f8160e2d52e8df57744c3b02ddda3f8a65d149 Mon Sep 17 00:00:00 2001 +From: "jan.nijtmans" <nijtmans@users.sourceforge.net> +Date: Sat, 24 Nov 2018 14:59:04 +0000 +Subject: [PATCH] If a pkgIndex file is encountered which produces an error, + continue. This shoud fix the Travis build for 9.0 (But same fix should be in + 8.7 as well) + +--- + library/package.tcl | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/library/package.tcl b/library/package.tcl +index c72fbfbbe41..974cbf07956 100644 +--- a/library/package.tcl ++++ b/library/package.tcl +@@ -493,7 +493,8 @@ proc tclPkgUnknown {name args} { + # $file was not readable; silently ignore + continue + } on error msg { +- tclLog "error reading package index file $file: $msg" ++ # $file is not usable; silently ignore ++ continue + } on ok {} { + set procdDirs($dir) 1 + } +@@ -511,7 +512,8 @@ proc tclPkgUnknown {name args} { + # $file was not readable; silently ignore + continue + } on error msg { +- tclLog "error reading package index file $file: $msg" ++ # $file is not usable; silently ignore ++ continue + } on ok {} { + set procdDirs($dir) 1 + } +@@ -595,7 +597,8 @@ proc tcl::MacOSXPkgUnknown {original name args} { + # $file was not readable; silently ignore + continue + } on error msg { +- tclLog "error reading package index file $file: $msg" ++ # $file is not usable; silently ignore ++ continue + } on ok {} { + set procdDirs($dir) 1 + } diff --git a/macros.tcl b/macros.tcl new file mode 100644 index 0000000..00da2a2 --- /dev/null +++ b/macros.tcl @@ -0,0 +1,3 @@ +%tcl_version %(echo 'puts $tcl_version' | tclsh) +%tcl_sitelib %{_datadir}/tcl%{tcl_version} +%tcl_sitearch %{_libdir}/tcl%{tcl_version} diff --git a/oops.patch b/oops.patch new file mode 100644 index 0000000..ea6285a --- /dev/null +++ b/oops.patch @@ -0,0 +1,27 @@ +From 15a2f423f0ea1de799f88ff78bcc8237e0afb5c8 Mon Sep 17 00:00:00 2001 +From: dgp <dgp@users.sourceforge.net> +Date: Thu, 24 Mar 2016 13:16:42 +0000 +Subject: [PATCH 0239/1800] oops + +--- + generic/tclOOMethod.c | 4 +--- + 1 file changed, 1 insertions(+), 3 deletions(-) + +diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c +index c65003f..0c7884a 100644 +--- a/generic/tclOOMethod.c ++++ b/generic/tclOOMethod.c +@@ -1548,9 +1548,7 @@ TclOOGetMethodBody( + if (mPtr->typePtr == &procMethodType) { + ProcedureMethod *pmPtr = (ProcedureMethod *)mPtr->clientData; + +- if (pmPtr->procPtr->bodyPtr->bytes == NULL) { +- (void) Tcl_GetString(pmPtr->procPtr->bodyPtr); +- } ++ (void) TclGetString(pmPtr->procPtr->bodyPtr); + return pmPtr->procPtr->bodyPtr; + } + return NULL; +-- +2.27.0 + @@ -0,0 +1 @@ +3dad4d9fc2c50240e2b2e36599e8b954 tcl-core8.6.15-src.tar.gz diff --git a/stay-out-of-internals-when-nice-interfaces-are-avail.patch b/stay-out-of-internals-when-nice-interfaces-are-avail.patch new file mode 100644 index 0000000..6ef9df4 --- /dev/null +++ b/stay-out-of-internals-when-nice-interfaces-are-avail.patch @@ -0,0 +1,37 @@ +From d8f01a421223dcf58b22e4cffef613818efde1fa Mon Sep 17 00:00:00 2001 +From: dgp <dgp@users.sourceforge.net> +Date: Thu, 24 Mar 2016 12:59:06 +0000 +Subject: [PATCH 0238/1800] stay out of internals when nice interfaces are + available. + +--- + generic/tclTest.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/generic/tclTest.c b/generic/tclTest.c +index 7c30d36e7..5bfa8f7ca 100644 +--- a/generic/tclTest.c ++++ b/generic/tclTest.c +@@ -7012,17 +7012,11 @@ TestconcatobjCmd( + + list1Ptr = Tcl_NewStringObj("foo bar sum", -1); + Tcl_ListObjLength(NULL, list1Ptr, &len); +- if (list1Ptr->bytes != NULL) { +- ckfree(list1Ptr->bytes); +- list1Ptr->bytes = NULL; +- } ++ Tcl_InvalidateStringRep(list1Ptr); + + list2Ptr = Tcl_NewStringObj("eeny meeny", -1); + Tcl_ListObjLength(NULL, list2Ptr, &len); +- if (list2Ptr->bytes != NULL) { +- ckfree(list2Ptr->bytes); +- list2Ptr->bytes = NULL; +- } ++ Tcl_InvalidateStringRep(list2Ptr); + + /* + * Verify that concat'ing a list obj with one or more empty strings does +-- +2.19.1 + diff --git a/tcl-8.6.10-hidden.patch b/tcl-8.6.10-hidden.patch new file mode 100644 index 0000000..0d84493 --- /dev/null +++ b/tcl-8.6.10-hidden.patch @@ -0,0 +1,13 @@ +diff --git a/generic/tclPort.h b/generic/tclPort.h +index 9485567..f329cde 100644 +--- a/generic/tclPort.h ++++ b/generic/tclPort.h +@@ -20,7 +20,7 @@ + #if defined(_WIN32) + # include "tclWinPort.h" + #else +-# include "tclUnixPort.h" ++# include "../unix/tclUnixPort.h" + #endif + #include "tcl.h" + diff --git a/tcl-8.6.10-tcltests-path-fix.patch b/tcl-8.6.10-tcltests-path-fix.patch new file mode 100644 index 0000000..62c55e9 --- /dev/null +++ b/tcl-8.6.10-tcltests-path-fix.patch @@ -0,0 +1,13 @@ +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} diff --git a/tcl-8.6.15-autopath.patch b/tcl-8.6.15-autopath.patch new file mode 100644 index 0000000..cf9f9c0 --- /dev/null +++ b/tcl-8.6.15-autopath.patch @@ -0,0 +1,56 @@ +diff --git a/library/auto.tcl b/library/auto.tcl +index 7d23b6e..3c7717b 100644 +--- a/library/auto.tcl ++++ b/library/auto.tcl +@@ -81,6 +81,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { + 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] ++ } ++ + # 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. +diff --git a/library/init.tcl b/library/init.tcl +index edf6bd5..fa37bcc 100644 +--- a/library/init.tcl ++++ b/library/init.tcl +@@ -52,16 +52,11 @@ if {![info exists auto_path]} { + namespace eval tcl { + if {![interp issafe]} { + 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 +- } + if {[info exists ::tcl_pkgPath]} { catch { + foreach Dir $::tcl_pkgPath { + if {$Dir ni $::auto_path} { +diff --git a/unix/configure.in b/unix/configure.in +index c73f368..5c57692 100644 +--- a/unix/configure.in ++++ b/unix/configure.in +@@ -869,9 +869,9 @@ + 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" ++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6" + else +- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib" ++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6" + fi + + #-------------------------------------------------------------------- diff --git a/tcl-8.6.15-conf.patch b/tcl-8.6.15-conf.patch new file mode 100644 index 0000000..451eded --- /dev/null +++ b/tcl-8.6.15-conf.patch @@ -0,0 +1,22 @@ +diff --git a/unix/tcl.m4 b/unix/tcl.m4 +index f3d08ec..ed12cda 100644 +--- a/unix/tcl.m4 ++++ b/unix/tcl.m4 +@@ -1378,7 +1378,7 @@ + # 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 -fPIC -Wl,-soname,${@}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" +@@ -1394,7 +1394,7 @@ + esac + + AS_IF([test $doRpath = yes], [ +- 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], [ diff --git a/tcl-8.6.15-fix-install-mode.patch b/tcl-8.6.15-fix-install-mode.patch new file mode 100644 index 0000000..e03b0c2 --- /dev/null +++ b/tcl-8.6.15-fix-install-mode.patch @@ -0,0 +1,22 @@ +--- tcl8.6.15/unix/Makefile.in.orig 2024-11-12 16:31:23.486705192 +0800 ++++ tcl8.6.15/unix/Makefile.in 2024-11-12 16:56:09.598577892 +0800 +@@ -154,8 +154,8 @@ + INSTALL_STRIP_LIBRARY = strip -x + + INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c +-INSTALL_PROGRAM = ${INSTALL} +-INSTALL_LIBRARY = ${INSTALL} ++INSTALL_PROGRAM = ${INSTALL} -m 755 ++INSTALL_LIBRARY = ${INSTALL} -m 755 + INSTALL_DATA = ${INSTALL} -m 644 + INSTALL_DATA_DIR = ${INSTALL} -d -m 755 + +@@ -812,7 +812,7 @@ + done + @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" + @@INSTALL_LIB@ +- @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" ++ @chmod 755 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" + @echo "Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}" + @$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}" + @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" diff --git a/tcl.spec b/tcl.spec new file mode 100644 index 0000000..9649443 --- /dev/null +++ b/tcl.spec @@ -0,0 +1,206 @@ +%define MAJOR 8.6 + +Name: tcl +Version: 8.6.15 +Release: 3 +Epoch: 1 +Summary: The Tool Command Language implementation +License: TCL AND GPL-3.0-or-later WITH bison-exception-2.2 AND BSD-3-Clause +URL: https://sourceforge.net/projects/tcl/ +Source0: https://downloads.sourceforge.net/sourceforge/tcl/tcl-core%{version}-src.tar.gz +Source1: macros.tcl + +BuildRequires: autoconf zlib-devel systemtap-sdt-devel gcc +Provides: tcl(abi) = %{MAJOR} +Obsoletes: tcl-tcldict <= %{version} +Provides: tcl-tcldict = %{version} + +Patch0: tcl-8.6.15-autopath.patch +Patch1: tcl-8.6.15-conf.patch +Patch2: tcl-8.6.10-hidden.patch +Patch3: tcl-8.6.10-tcltests-path-fix.patch +Patch4: stay-out-of-internals-when-nice-interfaces-are-avail.patch +Patch5: oops.patch +Patch6: File-not-found-should-be-ignored-silently.patch +Patch7: tcl-8.6.15-fix-install-mode.patch + +%description +Tcl(Tool Command Language) 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 linux, 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. + +%package help +Summary: help document for tcl +Requires: %{name} = %{epoch}:%{version}-%{release} +BuildArch: noarch +Provides: %{name}-doc < %{version}-%{release} +Obsoletes: %{name}-doc = %{version}-%{release} + +%description help +Help document for tcl. + +%package devel +Summary: The development files for tcl +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description devel +The development files for tcl. + +%prep +%autosetup -n %{name}%{version} -p1 + +%build +pushd unix +autoconf +%configure --enable-threads --enable-symbols --enable-shared --enable-dtrace +%ifnarch loongarch64 +%make_build CFLAGS="%{optflags}" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} +%else +%make_build CFLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} +%endif +popd + +%install +pushd unix +make INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} install +popd + +ln -s tclsh%{MAJOR} %{buildroot}%{_bindir}/tclsh +ln -s lib%{name}%{MAJOR}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}%{MAJOR} +ln -s %{_libdir}/%{name}Config.sh $RPM_BUILD_ROOT%{_libdir}/%{name}%{MAJOR}/%{name}Config.sh + +mv license.terms COPYING +mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}-private/generic +mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}-private/unix + +find generic unix -name "*.h" -exec cp -p '{}' %{buildroot}/%{_includedir}/%{name}-private/'{}' ';' +( +cd %{buildroot}/%{_includedir} +for header in *.h ; do + if [ -f %{buildroot}/%{_includedir}/%{name}-private/generic/$header ]; then + ln -sf ../../$header %{buildroot}/%{_includedir}/%{name}-private/generic + fi +done +) +sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %{buildroot}/%{_libdir}/%{name}Config.sh +rm -rf %{buildroot}/%{_datadir}/%{name}%{MAJOR}/ldAix + +install -D -m644 %{S:1} %{buildroot}%{_rpmmacrodir}/macros.tcl + +%check +pushd unix +%make_build test +popd + +%files +%license COPYING +%doc README.md changes +%{_bindir}/tclsh* +%dir %{_libdir}/%{name}%{MAJOR} +%{_datadir}/%{name}%{MAJOR} +%{_datadir}/%{name}8 +%{_libdir}/lib%{name}%{MAJOR}.so +%exclude %{_datadir}/%{name}%{MAJOR}/tclAppInit.c +%{_rpmmacrodir}/macros.tcl + +%files devel +%{_includedir}/* +%{_libdir}/lib%{name}stub%{MAJOR}.a +%{_libdir}/lib%{name}.so +%{_libdir}/%{name}Config.sh +%{_libdir}/%{name}ooConfig.sh +%{_libdir}/%{name}%{MAJOR}/%{name}Config.sh +%{_libdir}/pkgconfig/tcl.pc +%{_datadir}/%{name}%{MAJOR}/tclAppInit.c + +%files help +%{_mandir}/man?/* + +%changelog +* Tue Nov 12 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-3 +- fix library and excutable install mode, which will confuse new debugedit + +* Wed Oct 16 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-2 +- add macros.tcl for downstream packages + +* Tue Sep 17 2024 Funda Wang <fundawang@yeah.net> - 1:8.6.15-1 +- update to 8.6.15 + +* Thu Feb 29 2024 wangqia <wangqia@uniontech.com> - 1:8.6.14-1 +- Update to version 8.6.14 + +* Wed Feb 08 2023 fuanan <fuanan3@h-partners.com> - 1:8.6.13-2 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:drop the old symbol + +* Sun Jan 29 2023 zhangruifang2020 <zhangruifang1@h-partners.com> - 1:8.6.13-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 8.6.13 + +* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 1:8.6.12-2 +- add build flags for weak symbols on loongarch64 + +* Thu Apr 21 2022 zoulin <zoulin13@h-partners.com> - 1:8.6.12-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 8.6.12 + +* Fri May 28 2021 yangzhuangzhuang <yangzhuangzhaung1@huawei.com> - 1:8.6.10-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:The "no acceptable C compiler found" error message is displayed during compilation.Therefore,add buildrequires gcc. + +* Tue Oct 27 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 1:8.6.10-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: File not found should be ignored silently + +* Wed Jul 29 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1:8.6.10-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 8.6.10 + +* Tue Mar 17 2020 chengquan<chengquan3@huawei.com> - 1:8.6.8.8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Rollback some patches & add /usr/lib64/tcl* + +* Sat Jan 11 2020 zhangguangzhi<zhangguangzhi3@huawei.com> - 1:8.6.8.7 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:del patch to be consistent with open source + +* Wed Dec 25 2019 chengquan <chengquan3@huawei.com> - 1:8.6.8.6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix bug in update help package + +* Mon Nov 4 2019 shenyangyang <shenyangyang4@huawei.com> - 1:8.6.8.5 +- Type:NA +- ID:NA +- SUG:NA +- DESC:add use/bin/tclsh8.6 + +* Fri Nov 1 2019 caomeng <caomeng5@huawei.com> - 1:8.6.8.4 +- Type:NA +- ID:NA +- SUG:NA +- DESC:fix tclConfig.sh problem + +* Mon Sep 09 2019 Huiming Xie <xiehuiming@huawei.com> - 1:8.6.8.3 +- Package init |