From cae61406bbc7b36818ab8526467d0dc576c7330b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 3 Nov 2024 16:19:49 -0800 Subject: [PATCH] tk: Add recipe for TK 9.0.0 release Core is upgrading TCL to 9.0.0 as well, this has to be done in tandem Rename tk 8.x as tk8 recipe Signed-off-by: Khem Raj --- .../tcltk/{tk => tk8}/confsearch.diff | 0 .../tcltk/{tk => tk8}/fix-xft.diff | 0 .../tcltk/{tk => tk8}/tkprivate.diff | 0 .../tcltk/{tk_8.6.15.bb => tk8_8.6.15.bb} | 10 +- meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb | 100 ++++++++++++++++++ 5 files changed, 105 insertions(+), 5 deletions(-) rename meta-oe/recipes-devtools/tcltk/{tk => tk8}/confsearch.diff (100%) rename meta-oe/recipes-devtools/tcltk/{tk => tk8}/fix-xft.diff (100%) rename meta-oe/recipes-devtools/tcltk/{tk => tk8}/tkprivate.diff (100%) rename meta-oe/recipes-devtools/tcltk/{tk_8.6.15.bb => tk8_8.6.15.bb} (94%) create mode 100644 meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb diff --git a/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff b/meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff similarity index 100% rename from meta-oe/recipes-devtools/tcltk/tk/confsearch.diff rename to meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff diff --git a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff b/meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff similarity index 100% rename from meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff rename to meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff diff --git a/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff b/meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff similarity index 100% rename from meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff rename to meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff diff --git a/meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb b/meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb similarity index 94% rename from meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb rename to meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb index 1438a05625..f277b86d91 100644 --- a/meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb +++ b/meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb @@ -15,10 +15,10 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=c88f99decec11afa967ad33d314f87fe \ file://xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ " -DEPENDS = "tcl virtual/libx11 libxt" +DEPENDS = "tcl8 virtual/libx11 libxt" SRC_URI = "\ - ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ + ${SOURCEFORGE_MIRROR}/tcl/tk${PV}-src.tar.gz \ file://confsearch.diff \ file://tkprivate.diff \ file://fix-xft.diff \ @@ -29,13 +29,13 @@ SRC_URI[sha256sum] = "550969f35379f952b3020f3ab7b9dd5bfd11c1ef7c9b7c6a75f5c49aca UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/tcl/files/Tcl/" UPSTREAM_CHECK_REGEX = "Tcl/(?P\d+(\.\d+)+)/" -S = "${WORKDIR}/${BPN}${PV}" +S = "${WORKDIR}/tk${PV}" # Short version format: "8.6" VER = "${@os.path.splitext(d.getVar('PV'))[0]}" LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib" - +CFLAGS += "-I${STAGING_INCDIR}/tcl${VER}" inherit autotools features_check pkgconfig AUTOTOOLS_SCRIPT_PATH = "${S}/unix" @@ -73,7 +73,7 @@ FILES:${PN}-lib = "${libdir}/libtk${VER}.so*" FILES:${PN} += "${libdir}/tk*" # isn't getting picked up by shlibs code -RDEPENDS:${PN} += "tk-lib" +RDEPENDS:${PN} += "tk8-lib" RDEPENDS:${PN}:class-native = "" BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb b/meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb new file mode 100644 index 0000000000..7deba151f7 --- /dev/null +++ b/meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb @@ -0,0 +1,100 @@ +SUMMARY = "Tool Command Language ToolKit Extension" +HOMEPAGE = "http://tcl.sourceforge.net" +SECTION = "devel/tcltk" + +# http://www.tcl.tk/software/tcltk/license.html +LICENSE = "TCL" +LIC_FILES_CHKSUM = "file://license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://library/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://macosx/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://tests/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://unix/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://win/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ + file://xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ +" + +DEPENDS = "tcl virtual/libx11 libxt zip-native" + +SRC_URI = "\ + ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ +" +SRC_URI[sha256sum] = "f166e3c20773c82243f753cef4b091d05267cb7f87da64be88cb2ca5a2ba027e" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/tcl/files/Tcl/" +UPSTREAM_CHECK_REGEX = "Tcl/(?P\d+(\.\d+)+)/" + +S = "${WORKDIR}/${BPN}${PV}" + +# Short version format: "8.6" +VER = "${@os.path.splitext(d.getVar('PV'))[0]}" + +LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib" + +inherit autotools features_check pkgconfig + +AUTOTOOLS_SCRIPT_PATH = "${S}/unix" + +# depends on virtual/libx11 +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF = "\ + --with-x \ + --with-tcl=${STAGING_BINDIR}/crossscripts \ + --libdir=${libdir} \ +" + +export TK_LIBRARY='${libdir}/tk${VER}' + +do_install:append() { + ln -sf wish${VER} ${D}${bindir}/wish + + sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tkConfig.sh + sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tkConfig.sh + install -d ${D}${bindir_crossscripts} + install -m 0755 tkConfig.sh ${D}${bindir_crossscripts} +} + +PACKAGECONFIG ??= "xft" +PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft" +PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext" + +PACKAGES =+ "${PN}-lib" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +FILES:${PN}-lib = "${libdir}/libtcl9tk${VER}.so*" +FILES:${PN} += "${libdir}/tk*" + +# isn't getting picked up by shlibs code +RDEPENDS:${PN} += "tk-lib" +RDEPENDS:${PN}:class-native = "" + +BBCLASSEXTEND = "native nativesdk" + +# Fix the path in sstate +SSTATE_SCAN_FILES += "*Config.sh" + +inherit binconfig + +SYSROOT_DIRS += "${bindir_crossscripts}" + +# Fix some paths that might be used by Tcl extensions +BINCONFIG_GLOB = "*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" \ + -e "s;${B};${libdir};g" \ + -e "s;${WORKDIR};${TARGET_DBGSRC_DIR};g" \ + ${PKGD}${libdir}/tkConfig.sh + + rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh +}