diff options
Diffstat (limited to 'meta/recipes-devtools/tcltk/tcl_8.6.14.bb')
-rw-r--r-- | meta/recipes-devtools/tcltk/tcl_8.6.14.bb | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.14.bb b/meta/recipes-devtools/tcltk/tcl_8.6.14.bb new file mode 100644 index 0000000000..de4f5b878f --- /dev/null +++ b/meta/recipes-devtools/tcltk/tcl_8.6.14.bb | |||
@@ -0,0 +1,110 @@ | |||
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://tcl-remove-hardcoded-install-path.patch \ | ||
23 | file://alter-includedir.patch \ | ||
24 | file://interp.patch \ | ||
25 | file://run-ptest \ | ||
26 | " | ||
27 | SRC_URI[sha256sum] = "ff604f43862a778827d7ecd1ad7686950ac2ef48d9cf69d3424cea9de08d9a72" | ||
28 | |||
29 | SRC_URI:class-native = "${BASE_SRC_URI}" | ||
30 | |||
31 | UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html" | ||
32 | UPSTREAM_CHECK_REGEX = "tcl(?P<pver>\d+(\.\d+)+)-src" | ||
33 | |||
34 | S = "${WORKDIR}/${BPN}${PV}" | ||
35 | |||
36 | VER = "${PV}" | ||
37 | |||
38 | inherit autotools ptest binconfig | ||
39 | |||
40 | AUTOTOOLS_SCRIPT_PATH = "${S}/unix" | ||
41 | EXTRA_OECONF = "--enable-threads --disable-rpath --enable-man-suffix" | ||
42 | |||
43 | # Prevent installing copy of tzdata based on tzdata installation on the build host | ||
44 | # It doesn't install tzdata if one of the following files exist on the host: | ||
45 | # /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 | ||
46 | # otherwise "/usr/lib/tcl8.6/tzdata" is included in tcl package | ||
47 | EXTRA_OECONF += "--with-tzdata=no" | ||
48 | |||
49 | do_install() { | ||
50 | autotools_do_install | ||
51 | oe_runmake 'DESTDIR=${D}' install-private-headers | ||
52 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh | ||
53 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} | ||
54 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh | ||
55 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh | ||
56 | install -d ${D}${bindir_crossscripts} | ||
57 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} | ||
58 | install -m 0755 tclConfig.sh ${D}${libdir} | ||
59 | for dir in compat generic unix; do | ||
60 | install -d ${D}${includedir}/${BPN}${VER}/$dir | ||
61 | install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ | ||
62 | done | ||
63 | } | ||
64 | |||
65 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
66 | |||
67 | PACKAGES =+ "tcl-lib" | ||
68 | FILES:tcl-lib = "${libdir}/libtcl8.6.so.*" | ||
69 | FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" | ||
70 | FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" | ||
71 | |||
72 | # isn't getting picked up by shlibs code | ||
73 | RDEPENDS:${PN} += "tcl-lib" | ||
74 | RDEPENDS:${PN}-ptest += "libgcc" | ||
75 | |||
76 | BBCLASSEXTEND = "native nativesdk" | ||
77 | |||
78 | do_compile_ptest() { | ||
79 | oe_runmake tcltest | ||
80 | } | ||
81 | |||
82 | do_install_ptest() { | ||
83 | cp ${B}/tcltest ${D}${PTEST_PATH} | ||
84 | cp -r ${S}/library ${D}${PTEST_PATH} | ||
85 | cp -r ${S}/tests ${D}${PTEST_PATH} | ||
86 | } | ||
87 | |||
88 | do_install_ptest:append:libc-musl () { | ||
89 | # Assumes locales other than provided by musl-locales | ||
90 | sed -i '/SKIP="$SKIP socket.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest | ||
91 | } | ||
92 | |||
93 | # Fix some paths that might be used by Tcl extensions | ||
94 | BINCONFIG_GLOB = "*Config.sh" | ||
95 | |||
96 | # Fix the path in sstate | ||
97 | SSTATE_SCAN_FILES += "*Config.sh" | ||
98 | |||
99 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the | ||
100 | # ${bindir_crossscripts}/tclConfig.sh from target | ||
101 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" | ||
102 | tcl_package_preprocess() { | ||
103 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ | ||
104 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ | ||
105 | -e "s;${STAGING_INCDIR};${includedir};g" \ | ||
106 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ | ||
107 | ${PKGD}${libdir}/tclConfig.sh | ||
108 | |||
109 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh | ||
110 | } | ||