Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Tool Command Language ToolKit Extension" |
| 2 | HOMEPAGE = "http://tcl.sourceforge.net" |
| 3 | SECTION = "devel/tcltk" |
| 4 | |
| 5 | # http://www.tcl.tk/software/tcltk/license.html |
| 6 | LICENSE = "tcl" |
| 7 | LIC_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 | |
| 18 | DEPENDS = "tcl virtual/libx11 libxt" |
| 19 | |
| 20 | SRC_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 | " |
| 29 | SRC_URI[md5sum] = "e3cf6290999ee30651d75864eccfec63" |
| 30 | SRC_URI[sha256sum] = "d3f9161e8ba0f107fe8d4df1f6d3a14c30cc3512dfc12a795daa367a27660dac" |
| 31 | |
| 32 | S = "${WORKDIR}/${BPN}${PV}/unix" |
| 33 | |
| 34 | # Short version format: "8.6" |
| 35 | VER = "${@os.path.splitext(d.getVar('PV'))[0]}" |
| 36 | |
| 37 | LDFLAGS += "-Wl,-rpath,${libdir}/tcltk/${PV}/lib" |
| 38 | inherit autotools distro_features_check |
| 39 | # depends on virtual/libx11 |
| 40 | REQUIRED_DISTRO_FEATURES = "x11" |
| 41 | |
| 42 | EXTRA_OECONF = "\ |
| 43 | --enable-threads \ |
| 44 | --with-x \ |
| 45 | --with-tcl=${STAGING_BINDIR}/crossscripts \ |
| 46 | --libdir=${libdir} \ |
| 47 | " |
| 48 | export TK_LIBRARY='${libdir}/tk${VER}' |
| 49 | do_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 | |
| 60 | PACKAGECONFIG ??= "xft" |
| 61 | PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,xft" |
| 62 | PACKAGECONFIG[xss] = "--enable-xss,--disable-xss,libxscrnsaver libxext" |
| 63 | |
| 64 | PACKAGES =+ "${PN}-lib" |
| 65 | |
| 66 | FILES_${PN}-lib = "${libdir}/libtk${VER}.so*" |
| 67 | FILES_${PN} += "${libdir}/tk*" |
| 68 | |
| 69 | # isn't getting picked up by shlibs code |
| 70 | RDEPENDS_${PN} += "tk-lib" |
| 71 | RDEPENDS_${PN}_class-native = "" |
| 72 | |
| 73 | BBCLASSEXTEND = "native nativesdk" |
| 74 | |
| 75 | # Fix the path in sstate |
| 76 | SSTATE_SCAN_FILES += "*Config.sh" |
| 77 | |
| 78 | inherit binconfig |
| 79 | |
| 80 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 81 | |
| 82 | # Fix some paths that might be used by Tcl extensions |
| 83 | BINCONFIG_GLOB = "*Config.sh" |
| 84 | |
| 85 | # Cleanup host path from ${libdir}/tclConfig.sh and remove the |
| 86 | # ${bindir_crossscripts}/tclConfig.sh from target |
| 87 | PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess" |
| 88 | tcl_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 | } |