blob: 459ae8253b5dba715f39e8b264883276ef542a2b [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Tool Command Language ToolKit Extension"
2HOMEPAGE = "http://tcl.sourceforge.net"
3SECTION = "devel/tcltk"
4
5# http://www.tcl.tk/software/tcltk/license.html
6LICENSE = "tcl"
7LIC_FILES_CHKSUM = "file://${S}/../license.terms;md5=c88f99decec11afa967ad33d314f87fe \
8 file://${S}/../compat/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
9 file://${S}/../doc/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
10 file://${S}/../library/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
11 file://${S}/../macosx/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
12 file://${S}/../tests/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
13 file://${S}/../unix/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
14 file://${S}/../win/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
15 file://${S}/../xlib/license.terms;md5=c88f99decec11afa967ad33d314f87fe \
16"
17
18DEPENDS = "tcl virtual/libx11 libxt"
19
20SRC_URI = "\
21 ${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
22 file://confsearch.diff;striplevel=2 \
23 file://non-linux.diff;striplevel=2 \
24 file://tklibrary.diff;striplevel=2 \
25 file://tkprivate.diff;striplevel=2 \
26 file://fix-xft.diff \
27 file://configure.use.fontconfig.with.xft.patch \
28"
29SRC_URI[md5sum] = "e3cf6290999ee30651d75864eccfec63"
30SRC_URI[sha256sum] = "d3f9161e8ba0f107fe8d4df1f6d3a14c30cc3512dfc12a795daa367a27660dac"
31
32S = "${WORKDIR}/${BPN}${PV}/unix"
33
34# Short version format: "8.6"
35VER = "${@os.path.splitext(d.getVar('PV'))[0]}"
36
37LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib"
38inherit autotools distro_features_check
39# depends on virtual/libx11
40REQUIRED_DISTRO_FEATURES = "x11"
41
42EXTRA_OECONF = "\
43 --enable-threads \
44 --with-x \
45 --with-tcl=${STAGING_BINDIR}/crossscripts \
46 --libdir=${libdir} \
47"
48export TK_LIBRARY='${libdir}/tk${VER}'
49do_install_append() {
50 ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0
51 oe_libinstall -so libtk${VER} ${D}${libdir}
52 ln -sf wish${VER} ${D}${bindir}/wish
53
54 sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tkConfig.sh
55 sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tkConfig.sh
56 install -d ${D}${bindir_crossscripts}
57 install -m 0755 tkConfig.sh ${D}${bindir_crossscripts}
58}
59
60PACKAGECONFIG ??= "xft"
61PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft"
62PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext"
63
64PACKAGES =+ "${PN}-lib"
65
66FILES_${PN}-lib = "${libdir}/libtk${VER}.so*"
67FILES_${PN} += "${libdir}/tk*"
68
69# isn't getting picked up by shlibs code
70RDEPENDS_${PN} += "tk-lib"
71RDEPENDS_${PN}_class-native = ""
72
73BBCLASSEXTEND = "native nativesdk"
74
75# Fix the path in sstate
76SSTATE_SCAN_FILES += "*Config.sh"
77
78inherit binconfig
79
80SYSROOT_DIRS += "${bindir_crossscripts}"
81
82# Fix some paths that might be used by Tcl extensions
83BINCONFIG_GLOB = "*Config.sh"
84
85# Cleanup host path from ${libdir}/tclConfig.sh and remove the
86# ${bindir_crossscripts}/tclConfig.sh from target
87PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
88tcl_package_preprocess() {
89 sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
90 -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
91 -e "s;${STAGING_INCDIR};${includedir};g" \
92 -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
93 ${PKGD}${libdir}/tkConfig.sh
94
95 rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh
96}