From 511005999739be5dc87955135880a248110dc1e2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 20 Nov 2022 14:31:09 +0100 Subject: tcl: update 8.6.11 -> 8.6.12 Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni --- .../tcltk/tcl/fix_non_native_build_issue.patch | 27 ++++-- .../tcltk/tcl/tcl-add-soname.patch | 50 ++++++---- meta/recipes-devtools/tcltk/tcl_8.6.11.bb | 104 --------------------- meta/recipes-devtools/tcltk/tcl_8.6.12.bb | 104 +++++++++++++++++++++ 4 files changed, 153 insertions(+), 132 deletions(-) delete mode 100644 meta/recipes-devtools/tcltk/tcl_8.6.11.bb create mode 100644 meta/recipes-devtools/tcltk/tcl_8.6.12.bb diff --git a/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch b/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch index 5a10c93a31..41aefd1deb 100644 --- a/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch +++ b/meta/recipes-devtools/tcltk/tcl/fix_non_native_build_issue.patch @@ -1,10 +1,19 @@ +From 34c3a1adc1bfd13fb877179c37ef74a108f2a749 Mon Sep 17 00:00:00 2001 +From: Nitin A Kamble +Date: Fri, 13 Aug 2010 12:24:00 -0700 +Subject: [PATCH] tcl: fix a build issue + Upstream-Status: Inappropriate [upstream does not support installed tests] -Index: unix/Makefile.in -=================================================================== ---- a/unix.orig/Makefile.in 2013-11-10 23:37:34.243424934 -0800 -+++ b/unix/Makefile.in 2013-11-10 23:37:34.243424934 -0800 -@@ -709,23 +709,23 @@ +--- + unix/Makefile.in | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/unix/Makefile.in b/unix/Makefile.in +index 804532e..a9cb339 100644 +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -810,23 +810,23 @@ tcltest-real: test: test-tcl test-packages test-tcl: ${TCLTEST_EXE} @@ -32,7 +41,7 @@ Index: unix/Makefile.in # The following target generates the shared libraries in dltest/ that are used # for testing; they are included as part of the "tcltest" target (via the -@@ -743,23 +743,23 @@ +@@ -844,25 +844,25 @@ dltest.marker: ${STUB_LIB_FILE} # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` shell: ${TCL_EXE} @@ -45,8 +54,10 @@ Index: unix/Makefile.in + $(SHELL_ENV) $(GDB) ${TCL_EXE} valgrind: ${TCL_EXE} ${TCLTEST_EXE} -- $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind $(TESTFLAGS) -+ $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind $(TESTFLAGS) +- $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCLTEST_EXE} \ ++ $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ${TCLTEST_EXE} \ + $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind \ + $(TESTFLAGS) valgrindshell: ${TCL_EXE} - $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) diff --git a/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch index c4283c4f34..3123d289a1 100644 --- a/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch +++ b/meta/recipes-devtools/tcltk/tcl/tcl-add-soname.patch @@ -1,25 +1,21 @@ +From d6155ec08b355d64f1a7db407254d159037bb72a Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Wed, 9 Dec 2009 23:59:44 +0000 +Subject: [PATCH] tcl: Add tcltk from OE.dev but with legacy staging function + Upstream-Status: Pending -Index: unix/tcl.m4 -=================================================================== ---- a/unix.orig/tcl.m4 2013-09-19 13:17:13.000000000 -0700 -+++ b/unix/tcl.m4 2013-11-11 00:17:24.263485123 -0800 -@@ -1415,6 +1415,9 @@ - # get rid of the warnings. - #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" - -+ # following line added by CW for Debian GNU/Linux -+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0" -+ - SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared' - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" -Index: unix/Makefile.in -=================================================================== ---- a/unix.orig/Makefile.in 2013-09-19 13:17:13.000000000 -0700 -+++ b/unix/Makefile.in 2013-11-11 00:20:32.423489861 -0800 -@@ -796,7 +796,10 @@ - done; +--- + unix/Makefile.in | 5 ++++- + unix/tcl.m4 | 3 +++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/unix/Makefile.in b/unix/Makefile.in +index 398afd0..804532e 100644 +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -893,7 +893,10 @@ install-binaries: binaries + done @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ - @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" @@ -30,3 +26,17 @@ Index: unix/Makefile.in @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/unix/tcl.m4 b/unix/tcl.m4 +index f3d08ec..797c93f 100644 +--- a/unix/tcl.m4 ++++ b/unix/tcl.m4 +@@ -1382,6 +1382,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ + # get rid of the warnings. + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + ++ # following line added by CW for Debian GNU/Linux ++ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0" ++ + SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.11.bb b/meta/recipes-devtools/tcltk/tcl_8.6.11.bb deleted file mode 100644 index f8b2a69b9f..0000000000 --- a/meta/recipes-devtools/tcltk/tcl_8.6.11.bb +++ /dev/null @@ -1,104 +0,0 @@ -SUMMARY = "Tool Command Language" -HOMEPAGE = "http://tcl.sourceforge.net" -DESCRIPTION = "Tool Command Language, is an open-source multi-purpose C library which includes a powerful dynamic scripting language. Together they provide ideal cross-platform development environment for any programming project." -SECTION = "devel/tcltk" - -# http://www.tcl.tk/software/tcltk/license.html -LICENSE = "TCL & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ - file://win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ -" - -DEPENDS = "tcl-native zlib" - -BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \ - file://tcl-add-soname.patch" -SRC_URI = "${BASE_SRC_URI} \ - file://fix_non_native_build_issue.patch \ - file://fix_issue_with_old_distro_glibc.patch \ - file://tcl-remove-hardcoded-install-path.patch \ - file://alter-includedir.patch \ - file://interp.patch \ - file://run-ptest \ -" -SRC_URI[sha256sum] = "cfb49aab82bd179651e23eeeb69606f51b0ddc575ca55c3d35e2457469024cfa" - -SRC_URI:class-native = "${BASE_SRC_URI}" - -# Upstream don't believe this is an exploitable issue -# https://core.tcl-lang.org/tcl/info/7079e4f91601e9c7 -CVE_CHECK_IGNORE += "CVE-2021-35331" - -UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html" -UPSTREAM_CHECK_REGEX = "tcl(?P\d+(\.\d+)+)-src" - -S = "${WORKDIR}/${BPN}${PV}" - -VER = "${PV}" - -inherit autotools ptest binconfig - -AUTOTOOLS_SCRIPT_PATH = "${S}/unix" -EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" - -do_install() { - autotools_do_install - oe_runmake 'DESTDIR=${D}' install-private-headers - ln -sf ./tclsh${VER} ${D}${bindir}/tclsh - ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} - sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh - sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh - install -d ${D}${bindir_crossscripts} - install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} - install -m 0755 tclConfig.sh ${D}${libdir} - for dir in compat generic unix; do - install -d ${D}${includedir}/${BPN}${VER}/$dir - install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ - done -} - -SYSROOT_DIRS += "${bindir_crossscripts}" - -PACKAGES =+ "tcl-lib" -FILES:tcl-lib = "${libdir}/libtcl8.6.so.*" -FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" -FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" - -# isn't getting picked up by shlibs code -RDEPENDS:${PN} += "tcl-lib" -RDEPENDS:${PN}-ptest += "libgcc" - -BBCLASSEXTEND = "native nativesdk" - -do_compile_ptest() { - oe_runmake tcltest -} - -do_install_ptest() { - cp ${B}/tcltest ${D}${PTEST_PATH} - cp -r ${S}/library ${D}${PTEST_PATH} - cp -r ${S}/tests ${D}${PTEST_PATH} -} - -# Fix some paths that might be used by Tcl extensions -BINCONFIG_GLOB = "*Config.sh" - -# Fix the path in sstate -SSTATE_SCAN_FILES += "*Config.sh" - -# Cleanup host path from ${libdir}/tclConfig.sh and remove the -# ${bindir_crossscripts}/tclConfig.sh from target -PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" -tcl_package_preprocess() { - sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ - -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ - -e "s;${STAGING_INCDIR};${includedir};g" \ - -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ - ${PKGD}${libdir}/tclConfig.sh - - rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh -} diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.12.bb b/meta/recipes-devtools/tcltk/tcl_8.6.12.bb new file mode 100644 index 0000000000..824c0286c6 --- /dev/null +++ b/meta/recipes-devtools/tcltk/tcl_8.6.12.bb @@ -0,0 +1,104 @@ +SUMMARY = "Tool Command Language" +HOMEPAGE = "http://tcl.sourceforge.net" +DESCRIPTION = "Tool Command Language, is an open-source multi-purpose C library which includes a powerful dynamic scripting language. Together they provide ideal cross-platform development environment for any programming project." +SECTION = "devel/tcltk" + +# http://www.tcl.tk/software/tcltk/license.html +LICENSE = "TCL & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ + file://win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ +" + +DEPENDS = "tcl-native zlib" + +BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \ + file://tcl-add-soname.patch" +SRC_URI = "${BASE_SRC_URI} \ + file://fix_non_native_build_issue.patch \ + file://fix_issue_with_old_distro_glibc.patch \ + file://tcl-remove-hardcoded-install-path.patch \ + file://alter-includedir.patch \ + file://interp.patch \ + file://run-ptest \ +" +SRC_URI[sha256sum] = "186748f1131cef3d637421a18d70892f808e526a29c694bebfeb1c540f98727c" + +SRC_URI:class-native = "${BASE_SRC_URI}" + +# Upstream don't believe this is an exploitable issue +# https://core.tcl-lang.org/tcl/info/7079e4f91601e9c7 +CVE_CHECK_IGNORE += "CVE-2021-35331" + +UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html" +UPSTREAM_CHECK_REGEX = "tcl(?P\d+(\.\d+)+)-src" + +S = "${WORKDIR}/${BPN}${PV}" + +VER = "${PV}" + +inherit autotools ptest binconfig + +AUTOTOOLS_SCRIPT_PATH = "${S}/unix" +EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" + +do_install() { + autotools_do_install + oe_runmake 'DESTDIR=${D}' install-private-headers + ln -sf ./tclsh${VER} ${D}${bindir}/tclsh + ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} + sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh + sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh + install -d ${D}${bindir_crossscripts} + install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} + install -m 0755 tclConfig.sh ${D}${libdir} + for dir in compat generic unix; do + install -d ${D}${includedir}/${BPN}${VER}/$dir + install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ + done +} + +SYSROOT_DIRS += "${bindir_crossscripts}" + +PACKAGES =+ "tcl-lib" +FILES:tcl-lib = "${libdir}/libtcl8.6.so.*" +FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" +FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" + +# isn't getting picked up by shlibs code +RDEPENDS:${PN} += "tcl-lib" +RDEPENDS:${PN}-ptest += "libgcc" + +BBCLASSEXTEND = "native nativesdk" + +do_compile_ptest() { + oe_runmake tcltest +} + +do_install_ptest() { + cp ${B}/tcltest ${D}${PTEST_PATH} + cp -r ${S}/library ${D}${PTEST_PATH} + cp -r ${S}/tests ${D}${PTEST_PATH} +} + +# Fix some paths that might be used by Tcl extensions +BINCONFIG_GLOB = "*Config.sh" + +# Fix the path in sstate +SSTATE_SCAN_FILES += "*Config.sh" + +# Cleanup host path from ${libdir}/tclConfig.sh and remove the +# ${bindir_crossscripts}/tclConfig.sh from target +PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" +tcl_package_preprocess() { + sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ + -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ + -e "s;${STAGING_INCDIR};${includedir};g" \ + -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ + ${PKGD}${libdir}/tclConfig.sh + + rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh +} -- cgit 1.2.3-korg