Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Tool Command Language" |
| 2 | HOMEPAGE = "http://tcl.sourceforge.net" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 3 | 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." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 4 | SECTION = "devel/tcltk" |
| 5 | |
| 6 | # http://www.tcl.tk/software/tcltk/license.html |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "TCL & BSD-3-Clause" |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
| 9 | file://compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
| 10 | file://library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
| 11 | file://macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
| 12 | file://tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
| 13 | file://win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | " |
| 15 | |
| 16 | DEPENDS = "tcl-native zlib" |
| 17 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 18 | BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | file://tcl-add-soname.patch" |
| 20 | SRC_URI = "${BASE_SRC_URI} \ |
| 21 | file://fix_non_native_build_issue.patch \ |
| 22 | file://fix_issue_with_old_distro_glibc.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | file://tcl-remove-hardcoded-install-path.patch \ |
| 24 | file://alter-includedir.patch \ |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 25 | file://interp.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | file://run-ptest \ |
| 27 | " |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 28 | SRC_URI[sha256sum] = "cfb49aab82bd179651e23eeeb69606f51b0ddc575ca55c3d35e2457469024cfa" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | SRC_URI:class-native = "${BASE_SRC_URI}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 32 | # Upstream don't believe this is an exploitable issue |
| 33 | # https://core.tcl-lang.org/tcl/info/7079e4f91601e9c7 |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 34 | CVE_CHECK_IGNORE += "CVE-2021-35331" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 35 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 36 | UPSTREAM_CHECK_REGEX = "tcl(?P<pver>\d+(\.\d+)+)-src" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 37 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 38 | S = "${WORKDIR}/${BPN}${PV}" |
| 39 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 40 | VER = "${PV}" |
| 41 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 42 | inherit autotools ptest binconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 44 | AUTOTOOLS_SCRIPT_PATH = "${S}/unix" |
| 45 | EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 46 | |
| 47 | do_install() { |
| 48 | autotools_do_install |
| 49 | oe_runmake 'DESTDIR=${D}' install-private-headers |
| 50 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh |
| 51 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} |
| 52 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh |
| 53 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh |
| 54 | install -d ${D}${bindir_crossscripts} |
| 55 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} |
| 56 | install -m 0755 tclConfig.sh ${D}${libdir} |
| 57 | for dir in compat generic unix; do |
| 58 | install -d ${D}${includedir}/${BPN}${VER}/$dir |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 59 | install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 60 | done |
| 61 | } |
| 62 | |
| 63 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 64 | |
| 65 | PACKAGES =+ "tcl-lib" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | FILES:tcl-lib = "${libdir}/libtcl8.6.so.*" |
| 67 | FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" |
| 68 | FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 69 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 70 | # isn't getting picked up by shlibs code |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | RDEPENDS:${PN} += "tcl-lib" |
| 72 | RDEPENDS:${PN}-ptest += "libgcc" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 73 | |
| 74 | BBCLASSEXTEND = "native nativesdk" |
| 75 | |
| 76 | do_compile_ptest() { |
| 77 | oe_runmake tcltest |
| 78 | } |
| 79 | |
| 80 | do_install_ptest() { |
| 81 | cp ${B}/tcltest ${D}${PTEST_PATH} |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 82 | cp -r ${S}/library ${D}${PTEST_PATH} |
| 83 | cp -r ${S}/tests ${D}${PTEST_PATH} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | # Fix some paths that might be used by Tcl extensions |
| 87 | BINCONFIG_GLOB = "*Config.sh" |
| 88 | |
| 89 | # Fix the path in sstate |
| 90 | SSTATE_SCAN_FILES += "*Config.sh" |
| 91 | |
| 92 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the |
| 93 | # ${bindir_crossscripts}/tclConfig.sh from target |
| 94 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" |
| 95 | tcl_package_preprocess() { |
| 96 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ |
| 97 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ |
| 98 | -e "s;${STAGING_INCDIR};${includedir};g" \ |
| 99 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ |
| 100 | ${PKGD}${libdir}/tclConfig.sh |
| 101 | |
| 102 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh |
| 103 | } |