blob: 237c4e7389e6eb564bb6f2c1399c8c7cd34b7f02 [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
Andrew Geissler9aee5002022-03-30 16:27:02 +00006LICENSE = "TCL"
Brad Bishop19323692019-04-05 15:28:33 -04007LIC_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 \
Brad Bishop19323692019-04-05 15:28:33 -040023 file://tkprivate.diff;striplevel=2 \
24 file://fix-xft.diff \
Brad Bishop19323692019-04-05 15:28:33 -040025"
Brad Bishope42b3e32020-01-15 22:08:42 -050026SRC_URI[md5sum] = "602a47ad9ecac7bf655ada729d140a94"
27SRC_URI[sha256sum] = "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386"
Brad Bishop19323692019-04-05 15:28:33 -040028
29S = "${WORKDIR}/${BPN}${PV}/unix"
30
Patrick Williams169d7bc2024-01-05 11:33:25 -060031DEBUG_PREFIX_MAP += "-fdebug-prefix-map=${S}/../=${TARGET_DBGSRC_DIR}/.."
32
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050033PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/${BPN}${PV}"
34
Brad Bishop19323692019-04-05 15:28:33 -040035# Short version format: "8.6"
36VER = "${@os.path.splitext(d.getVar('PV'))[0]}"
37
38LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib"
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050039inherit autotools features_check pkgconfig
Brad Bishop19323692019-04-05 15:28:33 -040040# depends on virtual/libx11
41REQUIRED_DISTRO_FEATURES = "x11"
42
43EXTRA_OECONF = "\
44 --enable-threads \
45 --with-x \
46 --with-tcl=${STAGING_BINDIR}/crossscripts \
47 --libdir=${libdir} \
48"
49export TK_LIBRARY='${libdir}/tk${VER}'
Patrick Williams213cb262021-08-07 19:21:33 -050050do_install:append() {
Brad Bishop19323692019-04-05 15:28:33 -040051 ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0
52 oe_libinstall -so libtk${VER} ${D}${libdir}
53 ln -sf wish${VER} ${D}${bindir}/wish
54
55 sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tkConfig.sh
56 sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tkConfig.sh
57 install -d ${D}${bindir_crossscripts}
58 install -m 0755 tkConfig.sh ${D}${bindir_crossscripts}
59}
60
61PACKAGECONFIG ??= "xft"
62PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft"
63PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext"
64
65PACKAGES =+ "${PN}-lib"
66
Patrick Williams213cb262021-08-07 19:21:33 -050067FILES:${PN}-lib = "${libdir}/libtk${VER}.so*"
68FILES:${PN} += "${libdir}/tk*"
Brad Bishop19323692019-04-05 15:28:33 -040069
70# isn't getting picked up by shlibs code
Patrick Williams213cb262021-08-07 19:21:33 -050071RDEPENDS:${PN} += "tk-lib"
72RDEPENDS:${PN}:class-native = ""
Brad Bishop19323692019-04-05 15:28:33 -040073
74BBCLASSEXTEND = "native nativesdk"
75
76# Fix the path in sstate
77SSTATE_SCAN_FILES += "*Config.sh"
78
79inherit binconfig
80
81SYSROOT_DIRS += "${bindir_crossscripts}"
82
83# Fix some paths that might be used by Tcl extensions
84BINCONFIG_GLOB = "*Config.sh"
85
86# Cleanup host path from ${libdir}/tclConfig.sh and remove the
87# ${bindir_crossscripts}/tclConfig.sh from target
88PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
89tcl_package_preprocess() {
90 sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
91 -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
92 -e "s;${STAGING_INCDIR};${includedir};g" \
93 -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
94 ${PKGD}${libdir}/tkConfig.sh
95
96 rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh
97}