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