Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Tool Command Language ToolKit Extension" |
| 2 | HOMEPAGE = "http://tcl.sourceforge.net" |
| 3 | SECTION = "devel/tcltk" |
| 4 | |
| 5 | # http://www.tcl.tk/software/tcltk/license.html |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6 | LICENSE = "TCL" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://${S}/../license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 8 | file://${S}/../compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 9 | file://${S}/../doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 10 | file://${S}/../library/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 11 | file://${S}/../macosx/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 12 | file://${S}/../tests/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 13 | file://${S}/../unix/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 14 | file://${S}/../win/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 15 | file://${S}/../xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \ |
| 16 | " |
| 17 | |
| 18 | DEPENDS = "tcl virtual/libx11 libxt" |
| 19 | |
| 20 | SRC_URI = "\ |
| 21 | ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ |
| 22 | file://confsearch.diff;striplevel=2 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | file://tkprivate.diff;striplevel=2 \ |
| 24 | file://fix-xft.diff \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | " |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 26 | SRC_URI[md5sum] = "602a47ad9ecac7bf655ada729d140a94" |
| 27 | SRC_URI[sha256sum] = "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | |
| 29 | S = "${WORKDIR}/${BPN}${PV}/unix" |
| 30 | |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 31 | PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/${BPN}${PV}" |
| 32 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 33 | # Short version format: "8.6" |
| 34 | VER = "${@os.path.splitext(d.getVar('PV'))[0]}" |
| 35 | |
| 36 | LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 37 | inherit autotools features_check pkgconfig |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | # depends on virtual/libx11 |
| 39 | REQUIRED_DISTRO_FEATURES = "x11" |
| 40 | |
| 41 | EXTRA_OECONF = "\ |
| 42 | --enable-threads \ |
| 43 | --with-x \ |
| 44 | --with-tcl=${STAGING_BINDIR}/crossscripts \ |
| 45 | --libdir=${libdir} \ |
| 46 | " |
| 47 | export TK_LIBRARY='${libdir}/tk${VER}' |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0 |
| 50 | oe_libinstall -so libtk${VER} ${D}${libdir} |
| 51 | ln -sf wish${VER} ${D}${bindir}/wish |
| 52 | |
| 53 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tkConfig.sh |
| 54 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tkConfig.sh |
| 55 | install -d ${D}${bindir_crossscripts} |
| 56 | install -m 0755 tkConfig.sh ${D}${bindir_crossscripts} |
| 57 | } |
| 58 | |
| 59 | PACKAGECONFIG ??= "xft" |
| 60 | PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft" |
| 61 | PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext" |
| 62 | |
| 63 | PACKAGES =+ "${PN}-lib" |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | FILES:${PN}-lib = "${libdir}/libtk${VER}.so*" |
| 66 | FILES:${PN} += "${libdir}/tk*" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 67 | |
| 68 | # isn't getting picked up by shlibs code |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | RDEPENDS:${PN} += "tk-lib" |
| 70 | RDEPENDS:${PN}:class-native = "" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | |
| 72 | BBCLASSEXTEND = "native nativesdk" |
| 73 | |
| 74 | # Fix the path in sstate |
| 75 | SSTATE_SCAN_FILES += "*Config.sh" |
| 76 | |
| 77 | inherit binconfig |
| 78 | |
| 79 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 80 | |
| 81 | # Fix some paths that might be used by Tcl extensions |
| 82 | BINCONFIG_GLOB = "*Config.sh" |
| 83 | |
| 84 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the |
| 85 | # ${bindir_crossscripts}/tclConfig.sh from target |
| 86 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" |
| 87 | tcl_package_preprocess() { |
| 88 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ |
| 89 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ |
| 90 | -e "s;${STAGING_INCDIR};${includedir};g" \ |
| 91 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ |
| 92 | ${PKGD}${libdir}/tkConfig.sh |
| 93 | |
| 94 | rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh |
| 95 | } |