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 |
| 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 | |
| 30 | SRC_URI_class-native = "${BASE_SRC_URI}" |
| 31 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 32 | UPSTREAM_CHECK_REGEX = "tcl(?P<pver>\d+(\.\d+)+)-src" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 34 | S = "${WORKDIR}/${BPN}${PV}" |
| 35 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 36 | VER = "${PV}" |
| 37 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 38 | inherit autotools ptest binconfig |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 39 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 40 | AUTOTOOLS_SCRIPT_PATH = "${S}/unix" |
| 41 | EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 42 | |
| 43 | do_install() { |
| 44 | autotools_do_install |
| 45 | oe_runmake 'DESTDIR=${D}' install-private-headers |
| 46 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh |
| 47 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} |
| 48 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh |
| 49 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh |
| 50 | install -d ${D}${bindir_crossscripts} |
| 51 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} |
| 52 | install -m 0755 tclConfig.sh ${D}${libdir} |
| 53 | for dir in compat generic unix; do |
| 54 | install -d ${D}${includedir}/${BPN}${VER}/$dir |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 55 | install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | done |
| 57 | } |
| 58 | |
| 59 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 60 | |
| 61 | PACKAGES =+ "tcl-lib" |
| 62 | FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" |
| 63 | FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" |
| 64 | FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" |
| 65 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 66 | # isn't getting picked up by shlibs code |
| 67 | RDEPENDS_${PN} += "tcl-lib" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 68 | RDEPENDS_${PN}-ptest += "libgcc" |
| 69 | |
| 70 | BBCLASSEXTEND = "native nativesdk" |
| 71 | |
| 72 | do_compile_ptest() { |
| 73 | oe_runmake tcltest |
| 74 | } |
| 75 | |
| 76 | do_install_ptest() { |
| 77 | cp ${B}/tcltest ${D}${PTEST_PATH} |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame^] | 78 | cp -r ${S}/library ${D}${PTEST_PATH} |
| 79 | cp -r ${S}/tests ${D}${PTEST_PATH} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | # Fix some paths that might be used by Tcl extensions |
| 83 | BINCONFIG_GLOB = "*Config.sh" |
| 84 | |
| 85 | # Fix the path in sstate |
| 86 | SSTATE_SCAN_FILES += "*Config.sh" |
| 87 | |
| 88 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the |
| 89 | # ${bindir_crossscripts}/tclConfig.sh from target |
| 90 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" |
| 91 | tcl_package_preprocess() { |
| 92 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ |
| 93 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ |
| 94 | -e "s;${STAGING_INCDIR};${includedir};g" \ |
| 95 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ |
| 96 | ${PKGD}${libdir}/tclConfig.sh |
| 97 | |
| 98 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh |
| 99 | } |