blob: 7f0cfa237c83168fe7947f5220793a8f944343c4 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001DESCRIPTION = "libftdi is a library to talk to FTDI chips.\
2FT232BM/245BM, FT2232C/D and FT232/245R using libusb,\
3including the popular bitbang mode."
4HOMEPAGE = "http://www.intra2net.com/en/developer/libftdi/"
5SECTION = "libs"
6LICENSE = "LGPL-2.1-only & GPL-2.0-only"
7LIC_FILES_CHKSUM= "\
8 file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe \
9 file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
10"
11
12DEPENDS = "libusb1 python3 swig-native"
13
14SRC_URI = "http://www.intra2net.com/en/developer/${BPN}/download/${BPN}1-${PV}.tar.bz2"
15SRC_URI[sha256sum] = "7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
16
17S = "${WORKDIR}/${BPN}1-${PV}"
18
19inherit cmake binconfig pkgconfig python3native
20
21PACKAGECONFIG ??= ""
22PACKAGECONFIG[cpp-wrapper] = "-DFTDI_BUILD_CPP=on -DFTDIPP=on,-DFTDI_BUILD_CPP=off -DFTDIPP=off,boost"
Patrick Williams8dd68482022-10-04 07:57:18 -050023PACKAGECONFIG[ftdi-eeprom] = "-DFTDI_EEPROM=on,-DFTDI_EEPROM=off,libconfuse"
Patrick Williams92b42cb2022-09-03 06:53:57 -050024
Patrick Williams8dd68482022-10-04 07:57:18 -050025EXTRA_OECMAKE = "-DSTATICLIBS=off -DEXAMPLES=off \
Patrick Williams92b42cb2022-09-03 06:53:57 -050026 -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
27 -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \
28 -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
29
Andrew Geissler3eeda902023-05-19 10:14:02 -050030do_install:append() {
31 # remove absolute paths
32 sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/libftdi1/LibFTDI1Config.cmake
33}
34
Patrick Williams92b42cb2022-09-03 06:53:57 -050035BBCLASSEXTEND = "native nativesdk"
36
Patrick Williams8dd68482022-10-04 07:57:18 -050037PACKAGES =+ "${PN}-python ftdi-eeprom"
Patrick Williams92b42cb2022-09-03 06:53:57 -050038
Patrick Williams8dd68482022-10-04 07:57:18 -050039FILES:ftdi-eeprom = "${bindir}/ftdi_eeprom"
Patrick Williams92b42cb2022-09-03 06:53:57 -050040FILES:${PN}-python = "${libdir}/${PYTHON_DIR}/site-packages/"