From cae61406bbc7b36818ab8526467d0dc576c7330b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 3 Nov 2024 16:19:49 -0800 Subject: 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 --- meta-oe/recipes-devtools/tcltk/tk/confsearch.diff | 47 ---------- meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff | 18 ---- meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff | 43 --------- meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff | 47 ++++++++++ meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff | 18 ++++ meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff | 43 +++++++++ meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb | 102 +++++++++++++++++++++ meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb | 102 --------------------- meta-oe/recipes-devtools/tcltk/tk_9.0.0.bb | 100 ++++++++++++++++++++ 9 files changed, 310 insertions(+), 210 deletions(-) delete mode 100644 meta-oe/recipes-devtools/tcltk/tk/confsearch.diff delete mode 100644 meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff delete mode 100644 meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff create mode 100644 meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff create mode 100644 meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff create mode 100644 meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff create mode 100644 meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb delete mode 100644 meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb 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/tk/confsearch.diff deleted file mode 100644 index 81d4735752..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/confsearch.diff +++ /dev/null @@ -1,47 +0,0 @@ -From 5539442e5f5442606071afc5cf02642314ad13bb Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Wed, 17 Aug 2011 22:52:35 +0200 -Subject: [PATCH] tk 8.5.8: import from OE rev - -Patch by Sergei Golovan allows to find tclConfig.sh in /usr/share/tcltk/tcl8.5 -and tkConfig.sh in /usr/share/tcltk/tk8.5 where they are located in Debian -installation. - -Upstream-Status: Pending ---- - unix/configure | 1 + - unix/tcl.m4 | 2 ++ - 2 files changed, 3 insertions(+) - -Index: a/unix/configure -=================================================================== ---- a/unix/configure.orig -+++ b/unix/configure -@@ -1431,6 +1431,7 @@ echo "$as_me: error: ${with_tclconfig} d - `ls -d /usr/local/lib 2>/dev/null` \ - `ls -d /usr/contrib/lib 2>/dev/null` \ - `ls -d /usr/pkg/lib 2>/dev/null` \ -+ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ - `ls -d /usr/lib/tcl8.6 2>/dev/null` \ - `ls -d /usr/lib 2>/dev/null` \ - `ls -d /usr/lib64 2>/dev/null` \ -Index: a/unix/tcl.m4 -=================================================================== ---- a/unix/tcl.m4.orig -+++ b/unix/tcl.m4 -@@ -93,6 +93,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ - `ls -d /usr/local/lib 2>/dev/null` \ - `ls -d /usr/contrib/lib 2>/dev/null` \ - `ls -d /usr/pkg/lib 2>/dev/null` \ -+ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ - `ls -d /usr/lib/tcl8.6 2>/dev/null` \ - `ls -d /usr/lib 2>/dev/null` \ - `ls -d /usr/lib64 2>/dev/null` \ -@@ -226,6 +227,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ - `ls -d /usr/local/lib 2>/dev/null` \ - `ls -d /usr/contrib/lib 2>/dev/null` \ - `ls -d /usr/pkg/lib 2>/dev/null` \ -+ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ - `ls -d /usr/lib/tk8.6 2>/dev/null` \ - `ls -d /usr/lib 2>/dev/null` \ - `ls -d /usr/lib64 2>/dev/null` \ diff --git a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff b/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff deleted file mode 100644 index c1e2f7344e..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/fix-xft.diff +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Pending - ---- a/unix/configure.in 2010-05-19 13:29:03.000000000 +0200 -+++ b/unix/configure.in 2010-05-19 13:42:05.000000000 +0200 -@@ -526,13 +526,9 @@ - found_xft="yes" - dnl make sure package configurator (xft-config or pkg-config - dnl says that xft is present. -- XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no" -- XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" -- if test "$found_xft" = "no" ; then - found_xft=yes - XFT_CFLAGS=`pkg-config --cflags xft fontconfig 2>/dev/null` || found_xft="no" - XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no" -- fi - AC_MSG_RESULT([$found_xft]) - dnl make sure that compiling against Xft header file doesn't bomb - if test "$found_xft" = "yes" ; then diff --git a/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff b/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff deleted file mode 100644 index 8cdcf20207..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk/tkprivate.diff +++ /dev/null @@ -1,43 +0,0 @@ -Patch by Chris Waters sets path which are normally point to a directory -with Tk sources to a subdirectory of /usr/include/tcl8.4 (debian/rules -puts private Tk headers there). - -Upstream-Status: Pending - ---- tk8.5-8.5.8.orig/unix/tkConfig.sh.in -+++ tk8.5-8.5.8/unix/tkConfig.sh.in -@@ -55,7 +55,7 @@ - - # String to pass to linker to pick up the Tk library from its - # build directory. --TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' -+TK_BUILD_LIB_SPEC='@TK_LIB_SPEC@' - - # String to pass to linker to pick up the Tk library from its - # installed directory. -@@ -71,7 +71,7 @@ - # different place than the directory containing the source files, this - # points to the location of the sources, not the location where Tk was - # compiled. --TK_SRC_DIR='@TK_SRC_DIR@' -+TK_SRC_DIR='@includedir@/tk-private' - - # Needed if you want to make a 'fat' shared library library - # containing tk objects or link a different wish. -@@ -86,14 +86,14 @@ - - # String to pass to linker to pick up the Tk stub library from its - # build directory. --TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' -+TK_BUILD_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' - - # String to pass to linker to pick up the Tk stub library from its - # installed directory. - TK_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' - - # Path to the Tk stub library in the build directory. --TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' -+TK_BUILD_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' - - # Path to the Tk stub library in the install directory. - TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' diff --git a/meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff b/meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff new file mode 100644 index 0000000000..81d4735752 --- /dev/null +++ b/meta-oe/recipes-devtools/tcltk/tk8/confsearch.diff @@ -0,0 +1,47 @@ +From 5539442e5f5442606071afc5cf02642314ad13bb Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 17 Aug 2011 22:52:35 +0200 +Subject: [PATCH] tk 8.5.8: import from OE rev + +Patch by Sergei Golovan allows to find tclConfig.sh in /usr/share/tcltk/tcl8.5 +and tkConfig.sh in /usr/share/tcltk/tk8.5 where they are located in Debian +installation. + +Upstream-Status: Pending +--- + unix/configure | 1 + + unix/tcl.m4 | 2 ++ + 2 files changed, 3 insertions(+) + +Index: a/unix/configure +=================================================================== +--- a/unix/configure.orig ++++ b/unix/configure +@@ -1431,6 +1431,7 @@ echo "$as_me: error: ${with_tclconfig} d + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ ++ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + `ls -d /usr/lib64 2>/dev/null` \ +Index: a/unix/tcl.m4 +=================================================================== +--- a/unix/tcl.m4.orig ++++ b/unix/tcl.m4 +@@ -93,6 +93,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ ++ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + `ls -d /usr/lib64 2>/dev/null` \ +@@ -226,6 +227,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ ++ `ls -d /usr/share/tcltk/tcl8.6 2>/dev/null` \ + `ls -d /usr/lib/tk8.6 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + `ls -d /usr/lib64 2>/dev/null` \ diff --git a/meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff b/meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff new file mode 100644 index 0000000000..c1e2f7344e --- /dev/null +++ b/meta-oe/recipes-devtools/tcltk/tk8/fix-xft.diff @@ -0,0 +1,18 @@ +Upstream-Status: Pending + +--- a/unix/configure.in 2010-05-19 13:29:03.000000000 +0200 ++++ b/unix/configure.in 2010-05-19 13:42:05.000000000 +0200 +@@ -526,13 +526,9 @@ + found_xft="yes" + dnl make sure package configurator (xft-config or pkg-config + dnl says that xft is present. +- XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no" +- XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" +- if test "$found_xft" = "no" ; then + found_xft=yes + XFT_CFLAGS=`pkg-config --cflags xft fontconfig 2>/dev/null` || found_xft="no" + XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no" +- fi + AC_MSG_RESULT([$found_xft]) + dnl make sure that compiling against Xft header file doesn't bomb + if test "$found_xft" = "yes" ; then diff --git a/meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff b/meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff new file mode 100644 index 0000000000..8cdcf20207 --- /dev/null +++ b/meta-oe/recipes-devtools/tcltk/tk8/tkprivate.diff @@ -0,0 +1,43 @@ +Patch by Chris Waters sets path which are normally point to a directory +with Tk sources to a subdirectory of /usr/include/tcl8.4 (debian/rules +puts private Tk headers there). + +Upstream-Status: Pending + +--- tk8.5-8.5.8.orig/unix/tkConfig.sh.in ++++ tk8.5-8.5.8/unix/tkConfig.sh.in +@@ -55,7 +55,7 @@ + + # String to pass to linker to pick up the Tk library from its + # build directory. +-TK_BUILD_LIB_SPEC='@TK_BUILD_LIB_SPEC@' ++TK_BUILD_LIB_SPEC='@TK_LIB_SPEC@' + + # String to pass to linker to pick up the Tk library from its + # installed directory. +@@ -71,7 +71,7 @@ + # different place than the directory containing the source files, this + # points to the location of the sources, not the location where Tk was + # compiled. +-TK_SRC_DIR='@TK_SRC_DIR@' ++TK_SRC_DIR='@includedir@/tk-private' + + # Needed if you want to make a 'fat' shared library library + # containing tk objects or link a different wish. +@@ -86,14 +86,14 @@ + + # String to pass to linker to pick up the Tk stub library from its + # build directory. +-TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' ++TK_BUILD_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' + + # String to pass to linker to pick up the Tk stub library from its + # installed directory. + TK_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' + + # Path to the Tk stub library in the build directory. +-TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' ++TK_BUILD_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' + + # Path to the Tk stub library in the install directory. + TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' diff --git a/meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb b/meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb new file mode 100644 index 0000000000..f277b86d91 --- /dev/null +++ b/meta-oe/recipes-devtools/tcltk/tk8_8.6.15.bb @@ -0,0 +1,102 @@ +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 = "tcl8 virtual/libx11 libxt" + +SRC_URI = "\ + ${SOURCEFORGE_MIRROR}/tcl/tk${PV}-src.tar.gz \ + file://confsearch.diff \ + file://tkprivate.diff \ + file://fix-xft.diff \ +" + +SRC_URI[sha256sum] = "550969f35379f952b3020f3ab7b9dd5bfd11c1ef7c9b7c6a75f5c49aca793fec" + +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/tcl/files/Tcl/" +UPSTREAM_CHECK_REGEX = "Tcl/(?P\d+(\.\d+)+)/" + +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" + +# depends on virtual/libx11 +REQUIRED_DISTRO_FEATURES = "x11" + +EXTRA_OECONF = "\ + --enable-threads \ + --with-x \ + --with-tcl=${STAGING_BINDIR}/crossscripts \ + --libdir=${libdir} \ +" + +export TK_LIBRARY='${libdir}/tk${VER}' + +do_install:append() { + ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0 + oe_libinstall -so libtk${VER} ${D}${libdir} + 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" + +FILES:${PN}-lib = "${libdir}/libtk${VER}.so*" +FILES:${PN} += "${libdir}/tk*" + +# isn't getting picked up by shlibs code +RDEPENDS:${PN} += "tk8-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" \ + ${PKGD}${libdir}/tkConfig.sh + + rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh +} diff --git a/meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb b/meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb deleted file mode 100644 index 1438a05625..0000000000 --- a/meta-oe/recipes-devtools/tcltk/tk_8.6.15.bb +++ /dev/null @@ -1,102 +0,0 @@ -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" - -SRC_URI = "\ - ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ - file://confsearch.diff \ - file://tkprivate.diff \ - file://fix-xft.diff \ -" - -SRC_URI[sha256sum] = "550969f35379f952b3020f3ab7b9dd5bfd11c1ef7c9b7c6a75f5c49aca793fec" - -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 = "\ - --enable-threads \ - --with-x \ - --with-tcl=${STAGING_BINDIR}/crossscripts \ - --libdir=${libdir} \ -" - -export TK_LIBRARY='${libdir}/tk${VER}' - -do_install:append() { - ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0 - oe_libinstall -so libtk${VER} ${D}${libdir} - 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" - -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}: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" \ - ${PKGD}${libdir}/tkConfig.sh - - rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh -} 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 +} -- cgit v1.2.3-54-g00ecf