summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb')
-rw-r--r--meta/recipes-devtools/tcltk8/tcl8_8.6.16.bb121
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 @@
1SUMMARY = "Tool Command Language"
2HOMEPAGE = "http://tcl.sourceforge.net"
3DESCRIPTION = "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."
4SECTION = "devel/tcltk"
5
6# http://www.tcl.tk/software/tcltk/license.html
7LICENSE = "TCL & BSD-3-Clause"
8LIC_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
16DEPENDS = "tcl8-native zlib"
17
18BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \
19 file://tcl-add-soname.patch"
20SRC_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 "
27SRC_URI[sha256sum] = "3b371386a9a928eecdbf263bcab7d6a531e620ca3fbab4fdeeb3d6a9a56f38e9"
28
29SRC_URI:class-native = "${BASE_SRC_URI}"
30
31UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html"
32UPSTREAM_CHECK_REGEX = "tcl(?P<pver>8(\.\d+)+)-src"
33
34S = "${WORKDIR}/tcl${PV}"
35
36VER = "${PV}"
37
38inherit autotools ptest binconfig
39
40AUTOTOOLS_SCRIPT_PATH = "${S}/unix"
41EXTRA_AUTORECONF = "--exclude=aclocal"
42
43EXTRA_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
49EXTRA_OECONF += "--with-tzdata=no"
50
51do_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
67SYSROOT_DIRS += "${bindir_crossscripts}"
68
69PACKAGES =+ "tcl8-lib"
70FILES:tcl8-lib = "${libdir}/libtcl8.6.so.*"
71FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
72FILES:${PN}-dev += "${libdir}/tcl8Config.sh ${libdir}/tcl8ooConfig.sh"
73
74# isn't getting picked up by shlibs code
75RDEPENDS:${PN} += "tcl8-lib"
76RDEPENDS:${PN}-ptest += "libgcc"
77
78BBCLASSEXTEND = "native nativesdk"
79
80do_compile_ptest() {
81 oe_runmake tcltest
82}
83
84do_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
91do_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
97BINCONFIG_GLOB = "*Config.sh"
98
99# Fix the path in sstate
100SSTATE_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.
107PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
108tcl_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}