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