| 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" | 
|  | 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/${BPN}${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://no_packages.patch \ | 
|  | 24 | file://tcl-remove-hardcoded-install-path.patch \ | 
|  | 25 | file://alter-includedir.patch \ | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 26 | file://run-ptest \ | 
|  | 27 | " | 
| Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 28 | SRC_URI[sha256sum] = "8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 |  | 
|  | 30 | SRC_URI_class-native = "${BASE_SRC_URI}" | 
|  | 31 |  | 
|  | 32 | S = "${WORKDIR}/${BPN}${PV}/unix" | 
|  | 33 |  | 
| Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 34 | PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/${BPN}${PV}" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 35 | VER = "${PV}" | 
|  | 36 |  | 
|  | 37 | inherit autotools ptest binconfig update-alternatives | 
|  | 38 |  | 
|  | 39 | EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}" | 
|  | 40 |  | 
|  | 41 | do_compile_prepend() { | 
|  | 42 | echo > ${S}/../compat/fixstrtod.c | 
|  | 43 | } | 
|  | 44 |  | 
|  | 45 | do_install() { | 
|  | 46 | autotools_do_install | 
|  | 47 | oe_runmake 'DESTDIR=${D}' install-private-headers | 
|  | 48 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh | 
|  | 49 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} | 
|  | 50 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh | 
|  | 51 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh | 
|  | 52 | install -d ${D}${bindir_crossscripts} | 
|  | 53 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} | 
|  | 54 | install -m 0755 tclConfig.sh ${D}${libdir} | 
|  | 55 | for dir in compat generic unix; do | 
|  | 56 | install -d ${D}${includedir}/${BPN}${VER}/$dir | 
|  | 57 | install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ | 
|  | 58 | done | 
|  | 59 | } | 
|  | 60 |  | 
|  | 61 | SYSROOT_DIRS += "${bindir_crossscripts}" | 
|  | 62 |  | 
|  | 63 | PACKAGES =+ "tcl-lib" | 
|  | 64 | FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" | 
|  | 65 | FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" | 
|  | 66 | FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" | 
|  | 67 |  | 
|  | 68 | ALTERNATIVE_${PN}-doc = "Thread.3" | 
|  | 69 | ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3" | 
|  | 70 |  | 
|  | 71 | # isn't getting picked up by shlibs code | 
|  | 72 | RDEPENDS_${PN} += "tcl-lib" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 73 | RDEPENDS_${PN}-ptest += "libgcc" | 
|  | 74 |  | 
|  | 75 | BBCLASSEXTEND = "native nativesdk" | 
|  | 76 |  | 
|  | 77 | do_compile_ptest() { | 
|  | 78 | oe_runmake tcltest | 
|  | 79 | } | 
|  | 80 |  | 
|  | 81 | do_install_ptest() { | 
|  | 82 | cp ${B}/tcltest ${D}${PTEST_PATH} | 
|  | 83 | cp -r ${S}/../library ${D}${PTEST_PATH} | 
|  | 84 | cp -r ${S}/../tests ${D}${PTEST_PATH} | 
|  | 85 | } | 
|  | 86 |  | 
|  | 87 | # Fix some paths that might be used by Tcl extensions | 
|  | 88 | BINCONFIG_GLOB = "*Config.sh" | 
|  | 89 |  | 
|  | 90 | # Fix the path in sstate | 
|  | 91 | SSTATE_SCAN_FILES += "*Config.sh" | 
|  | 92 |  | 
|  | 93 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the | 
|  | 94 | # ${bindir_crossscripts}/tclConfig.sh from target | 
|  | 95 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" | 
|  | 96 | tcl_package_preprocess() { | 
|  | 97 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ | 
|  | 98 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ | 
|  | 99 | -e "s;${STAGING_INCDIR};${includedir};g" \ | 
|  | 100 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ | 
|  | 101 | ${PKGD}${libdir}/tclConfig.sh | 
|  | 102 |  | 
|  | 103 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh | 
|  | 104 | } |