diff options
Diffstat (limited to 'meta/recipes-devtools/tcltk/tcl_8.6.10.bb')
-rw-r--r-- | meta/recipes-devtools/tcltk/tcl_8.6.10.bb | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.10.bb b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb new file mode 100644 index 0000000000..284f20e27a --- /dev/null +++ b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb | |||
@@ -0,0 +1,102 @@ | |||
1 | SUMMARY = "Tool Command Language" | ||
2 | HOMEPAGE = "http://tcl.sourceforge.net" | ||
3 | SECTION = "devel/tcltk" | ||
4 | |||
5 | # http://www.tcl.tk/software/tcltk/license.html | ||
6 | LICENSE = "tcl & BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
8 | file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
9 | file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
10 | file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
11 | file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
12 | file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \ | ||
13 | " | ||
14 | |||
15 | DEPENDS = "tcl-native zlib" | ||
16 | |||
17 | BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \ | ||
18 | file://tcl-add-soname.patch" | ||
19 | SRC_URI = "${BASE_SRC_URI} \ | ||
20 | file://fix_non_native_build_issue.patch \ | ||
21 | file://fix_issue_with_old_distro_glibc.patch \ | ||
22 | file://no_packages.patch \ | ||
23 | file://tcl-remove-hardcoded-install-path.patch \ | ||
24 | file://alter-includedir.patch \ | ||
25 | file://0001-Fix-abd4abedd2-Failed-to-build-tk-8.6.10-with-cross-.patch;patchdir=.. \ | ||
26 | file://run-ptest \ | ||
27 | " | ||
28 | SRC_URI[md5sum] = "97c55573f8520bcab74e21bfd8d0aadc" | ||
29 | SRC_URI[sha256sum] = "5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed" | ||
30 | |||
31 | SRC_URI_class-native = "${BASE_SRC_URI}" | ||
32 | |||
33 | S = "${WORKDIR}/${BPN}${PV}/unix" | ||
34 | |||
35 | VER = "${PV}" | ||
36 | |||
37 | inherit autotools ptest binconfig | ||
38 | |||
39 | EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}" | ||
40 | |||
41 | do_compile_prepend() { | ||
42 | echo > ${S}/../compat/fixstrtod.c | ||
43 | } | ||
44 | |||
45 | do_install() { | ||
46 | autotools_do_install | ||
47 | oe_runmake 'DESTDIR=${D}' install-private-headers | ||
48 | ln -sf ./tclsh${VER} ${D}${bindir}/tclsh | ||
49 | ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER} | ||
50 | sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh | ||
51 | sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh | ||
52 | install -d ${D}${bindir_crossscripts} | ||
53 | install -m 0755 tclConfig.sh ${D}${bindir_crossscripts} | ||
54 | install -m 0755 tclConfig.sh ${D}${libdir} | ||
55 | for dir in compat generic unix; do | ||
56 | install -d ${D}${includedir}/${BPN}${VER}/$dir | ||
57 | install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/ | ||
58 | done | ||
59 | } | ||
60 | |||
61 | SYSROOT_DIRS += "${bindir_crossscripts}" | ||
62 | |||
63 | PACKAGES =+ "tcl-lib" | ||
64 | FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" | ||
65 | FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8" | ||
66 | FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh" | ||
67 | |||
68 | # isn't getting picked up by shlibs code | ||
69 | RDEPENDS_${PN} += "tcl-lib" | ||
70 | RDEPENDS_${PN}_class-native = "" | ||
71 | RDEPENDS_${PN}-ptest += "libgcc" | ||
72 | |||
73 | BBCLASSEXTEND = "native nativesdk" | ||
74 | |||
75 | do_compile_ptest() { | ||
76 | oe_runmake tcltest | ||
77 | } | ||
78 | |||
79 | do_install_ptest() { | ||
80 | cp ${B}/tcltest ${D}${PTEST_PATH} | ||
81 | cp -r ${S}/../library ${D}${PTEST_PATH} | ||
82 | cp -r ${S}/../tests ${D}${PTEST_PATH} | ||
83 | } | ||
84 | |||
85 | # Fix some paths that might be used by Tcl extensions | ||
86 | BINCONFIG_GLOB = "*Config.sh" | ||
87 | |||
88 | # Fix the path in sstate | ||
89 | SSTATE_SCAN_FILES += "*Config.sh" | ||
90 | |||
91 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the | ||
92 | # ${bindir_crossscripts}/tclConfig.sh from target | ||
93 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" | ||
94 | tcl_package_preprocess() { | ||
95 | sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \ | ||
96 | -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \ | ||
97 | -e "s;${STAGING_INCDIR};${includedir};g" \ | ||
98 | -e "s;--sysroot=${RECIPE_SYSROOT};;g" \ | ||
99 | ${PKGD}${libdir}/tclConfig.sh | ||
100 | |||
101 | rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh | ||
102 | } | ||