Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Tool Command Language" |
| 2 | HOMEPAGE = "http://tcl.sourceforge.net" |
| 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." |
| 4 | SECTION = "devel/tcltk" |
| 5 | |
| 6 | # http://www.tcl.tk/software/tcltk/license.html |
| 7 | LICENSE = "TCL & BSD-3-Clause" |
| 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 \ |
| 14 | " |
| 15 | |
| 16 | DEPENDS = "tcl-native zlib" |
| 17 | |
| 18 | BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \ |
| 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 \ |
| 23 | file://tcl-remove-hardcoded-install-path.patch \ |
| 24 | file://alter-includedir.patch \ |
| 25 | file://interp.patch \ |
| 26 | file://run-ptest \ |
| 27 | " |
| 28 | SRC_URI[sha256sum] = "c61f0d6699e2bc7691f119b41963aaa8dc980f23532c4e937739832a5f4a6642" |
| 29 | |
| 30 | SRC_URI:class-native = "${BASE_SRC_URI}" |
| 31 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 32 | UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html" |
| 33 | UPSTREAM_CHECK_REGEX = "tcl(?P<pver>\d+(\.\d+)+)-src" |
| 34 | |
| 35 | S = "${WORKDIR}/${BPN}${PV}" |
| 36 | |
| 37 | VER = "${PV}" |
| 38 | |
| 39 | inherit autotools ptest binconfig |
| 40 | |
| 41 | AUTOTOOLS_SCRIPT_PATH = "${S}/unix" |
| 42 | EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" |
| 43 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 44 | # Prevent installing copy of tzdata based on tzdata installation on the build host |
| 45 | # It doesn't install tzdata if one of the following files exist on the host: |
| 46 | # /usr/share/zoneinfo/UTC /usr/share/zoneinfo/GMT /usr/share/lib/zoneinfo/UTC /usr/share/lib/zoneinfo/GMT /usr/lib/zoneinfo/UTC /usr/lib/zoneinfo/GMT |
| 47 | # otherwise "/usr/lib/tcl8.6/tzdata" is included in tcl package |
| 48 | EXTRA_OECONF += "--with-tzdata=no" |
| 49 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 50 | do_install() { |
| 51 | autotools_do_install |
| 52 | oe_runmake 'DESTDIR=${D}' install-private-headers |
| 53 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh |
| 54 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} |
| 55 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh |
| 56 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh |
| 57 | install -d ${D}${bindir_crossscripts} |
| 58 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} |
| 59 | install -m 0755 tclConfig.sh ${D}${libdir} |
| 60 | for dir in compat generic unix; do |
| 61 | install -d ${D}${includedir}/${BPN}${VER}/$dir |
| 62 | install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ |
| 63 | done |
| 64 | } |
| 65 | |
| 66 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 67 | |
| 68 | PACKAGES =+ "tcl-lib" |
| 69 | FILES:tcl-lib = "${libdir}/libtcl8.6.so.*" |
| 70 | FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" |
| 71 | FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" |
| 72 | |
| 73 | # isn't getting picked up by shlibs code |
| 74 | RDEPENDS:${PN} += "tcl-lib" |
| 75 | RDEPENDS:${PN}-ptest += "libgcc" |
| 76 | |
| 77 | BBCLASSEXTEND = "native nativesdk" |
| 78 | |
| 79 | do_compile_ptest() { |
| 80 | oe_runmake tcltest |
| 81 | } |
| 82 | |
| 83 | do_install_ptest() { |
| 84 | cp ${B}/tcltest ${D}${PTEST_PATH} |
| 85 | cp -r ${S}/library ${D}${PTEST_PATH} |
| 86 | cp -r ${S}/tests ${D}${PTEST_PATH} |
| 87 | } |
| 88 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 89 | do_install_ptest:append:libc-musl () { |
| 90 | # Assumes locales other than provided by musl-locales |
| 91 | sed -i -e 's|SKIPPED_TESTS=|SKIPPED_TESTS="unixInit-3*"|' ${D}${PTEST_PATH}/run-ptest |
| 92 | } |
| 93 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 94 | # Fix some paths that might be used by Tcl extensions |
| 95 | BINCONFIG_GLOB = "*Config.sh" |
| 96 | |
| 97 | # Fix the path in sstate |
| 98 | SSTATE_SCAN_FILES += "*Config.sh" |
| 99 | |
| 100 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the |
| 101 | # ${bindir_crossscripts}/tclConfig.sh from target |
| 102 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" |
| 103 | tcl_package_preprocess() { |
| 104 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ |
| 105 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ |
| 106 | -e "s;${STAGING_INCDIR};${includedir};g" \ |
| 107 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ |
| 108 | ${PKGD}${libdir}/tclConfig.sh |
| 109 | |
| 110 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh |
| 111 | } |