]> code.ossystems Code Review - openembedded-core.git/commitdiff
expect: support native compilation
authorPatrick Ohly <patrick.ohly@intel.com>
Mon, 23 Jan 2017 14:17:03 +0000 (15:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Jan 2017 10:41:11 +0000 (10:41 +0000)
This is needed for building the swtpm TPM simulator (recipe
in meta-security).

"nativesdk" is added just in case that someone also wants this
in an SDK.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/expect/expect_5.45.bb

index b4dfe157ce023b2192df210d3bdf1a2c19567a09..ab22a61394efb5d2c502f1f1186960c4bf9750b5 100644 (file)
@@ -43,11 +43,16 @@ do_install_append() {
         sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
 }
 
+# Apparently the public Tcl headers are only in /usr/include/tcl8.6
+# when building for the target.
+TCL_INCLUDE_PATH = ""
+TCL_INCLUDE_PATH_class-target = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
+
 EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
-                 --with-tclinclude=${STAGING_INCDIR}/tcl8.6 \
                  --enable-shared \
                  --enable-threads \
                  --disable-rpath \
+                 ${TCL_INCLUDE_PATH} \
                 "
 EXTRA_OEMAKE_install = " 'SCRIPTS=' "
 
@@ -62,3 +67,5 @@ FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
 FILES_${PN} += "${libdir}/libexpect${PV}.so \
                 ${libdir}/expect${PV}/* \
                "
+
+BBCLASSEXTEND = "native nativesdk"