diff options
Diffstat (limited to 'meta/recipes-devtools/tcltk/tcl_9.0.1.bb')
-rw-r--r-- | meta/recipes-devtools/tcltk/tcl_9.0.1.bb | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl_9.0.1.bb b/meta/recipes-devtools/tcltk/tcl_9.0.1.bb new file mode 100644 index 0000000000..765dc64e4d --- /dev/null +++ b/meta/recipes-devtools/tcltk/tcl_9.0.1.bb | |||
@@ -0,0 +1,112 @@ | |||
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 | SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl-core${PV}-src.tar.gz \ | ||
19 | file://run-ptest \ | ||
20 | file://0001-tcl-Add-tcltk-from-OE.dev-but-with-legacy-staging-fu.patch \ | ||
21 | file://0002-tcl-fix-a-build-issue.patch \ | ||
22 | file://0003-tcl-install-tcl-to-lib64-instead-of-lib-on-64bit-tar.patch \ | ||
23 | file://0004-tcl-update-the-header-location.patch \ | ||
24 | file://0005-tcl-fix-race-in-interp.test.patch \ | ||
25 | " | ||
26 | SRC_URI[sha256sum] = "488fcb6c875a1762e9e8478319b20fbad9a31de475f056aeed94cc54b44cf221" | ||
27 | |||
28 | UPSTREAM_CHECK_URI = "https://www.tcl.tk/software/tcltk/download.html" | ||
29 | UPSTREAM_CHECK_REGEX = "tcl(?P<pver>\d+(\.\d+)+)-src" | ||
30 | |||
31 | S = "${UNPACKDIR}/${BPN}${PV}" | ||
32 | |||
33 | VER = "${PV}" | ||
34 | |||
35 | inherit autotools ptest binconfig | ||
36 | |||
37 | AUTOTOOLS_SCRIPT_PATH = "${S}/unix" | ||
38 | EXTRA_AUTORECONF = "--exclude=aclocal" | ||
39 | |||
40 | EXTRA_OECONF = "--disable-rpath --enable-man-suffix=tcl9 --disable-zipfs" | ||
41 | |||
42 | # Prevent installing copy of tzdata based on tzdata installation on the build host | ||
43 | # It doesn't install tzdata if one of the following files exist on the host: | ||
44 | # /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 | ||
45 | # otherwise "/usr/lib/tcl8.6/tzdata" is included in tcl package | ||
46 | EXTRA_OECONF += "--with-tzdata=no" | ||
47 | |||
48 | do_install() { | ||
49 | autotools_do_install | ||
50 | oe_runmake 'DESTDIR=${D}' install-private-headers | ||
51 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh | ||
52 | ln -sf tclsh9.0 ${D}${bindir}/tclsh${VER} | ||
53 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh | ||
54 | sed -i "s;'${UNPACKDIR};'${STAGING_INCDIR};g" tclConfig.sh | ||
55 | install -d ${D}${bindir_crossscripts} | ||
56 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} | ||
57 | install -m 0755 tclConfig.sh ${D}${libdir} | ||
58 | for dir in compat generic unix; do | ||
59 | install -d ${D}${includedir}/${BPN}${VER}/$dir | ||
60 | install -m 0644 ${S}/$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ | ||
61 | done | ||
62 | } | ||
63 | |||
64 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
65 | |||
66 | PACKAGES =+ "tcl-lib" | ||
67 | FILES:tcl-lib = "${libdir}/libtcl9.0.so.*" | ||
68 | FILES:${PN} += "${libdir}/tcl${VER} ${libdir}/tcl9.0 ${libdir}/tcl9" | ||
69 | FILES:${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" | ||
70 | |||
71 | # isn't getting picked up by shlibs code | ||
72 | RDEPENDS:${PN} += "tcl-lib" | ||
73 | RDEPENDS:${PN}-ptest += "libgcc locale-base-en-us tzdata" | ||
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 | # handle multilib | ||
86 | sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest | ||
87 | } | ||
88 | |||
89 | do_install_ptest:append:libc-musl () { | ||
90 | # Assumes locales other than provided by musl-locales | ||
91 | sed -i '/SKIP="$SKIP socket.*$/a # unixInit-3* is suppressed due to hardcoded locale assumptions\nSKIP="$SKIP unixInit-3\\\*"' ${D}${PTEST_PATH}/run-ptest | ||
92 | } | ||
93 | |||
94 | # Fix some paths that might be used by Tcl extensions | ||
95 | BINCONFIG_GLOB = "*Config.sh" | ||
96 | |||
97 | # Fix the path in sstate | ||
98 | SSTATE_SCAN_FILES += "*Config.sh" | ||
99 | |||
100 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the | ||
101 | # ${bindir_crossscripts}/tclConfig.sh from target | ||
102 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" | ||
103 | tcl_package_preprocess() { | ||
104 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ | ||
105 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ | ||
106 | -e "s;${STAGING_INCDIR};${includedir};g" \ | ||
107 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ | ||
108 | -e "s;${B};${libdir};g" ${PKGD}${libdir}/tclConfig.sh \ | ||
109 | ${PKGD}${libdir}/tclConfig.sh | ||
110 | |||
111 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh | ||
112 | } | ||