diff mbox series

[oe,meta-oe,2/6] libftdi: Add target deps for python bindings

Message ID 20191024075355.2136934-2-raj.khem@gmail.com
State Accepted
Commit c53d81d763e2649ad7997533ae252097945b99c3
Headers show
Series [oe,meta-python,1/6] python3-astor: Upgrade to 0.8 | expand

Commit Message

Khem Raj Oct. 24, 2019, 7:53 a.m. UTC
helps linking with right libraries for python bindings

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta-oe/recipes-support/libftdi/libftdi_1.4.bb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
2.23.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libftdi/libftdi_1.4.bb b/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
index 4fc6eb0907..c33c791110 100644
--- a/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
+++ b/meta-oe/recipes-support/libftdi/libftdi_1.4.bb
@@ -9,7 +9,7 @@  LIC_FILES_CHKSUM= "\
     file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
 "
 
-DEPENDS = "libusb1"
+DEPENDS = "libusb1 python3"
 
 SRC_URI = "http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2"
 SRC_URI[md5sum] = "0c09fb2bb19a57c839fa6845c6c780a2"
@@ -17,11 +17,17 @@  SRC_URI[sha256sum] = "ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681c
 
 S = "${WORKDIR}/${BPN}1-${PV}"
 
-inherit cmake binconfig pkgconfig
+inherit cmake binconfig pkgconfig python3native
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[cpp-wrapper] = "-DFTDI_BUILD_CPP=on -DFTDIPP=on,-DFTDI_BUILD_CPP=off -DFTDIPP=off,boost"
 
-EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}"
+EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
+                 -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \
+                 -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-python = "${libdir}/${PYTHON_DIR}/site-packages/"