blob: 17ca262734620e64b259743fa71e6b5916188009 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Linux Library for low speed I/O Communication"
2HOMEPAGE = "https://github.com/intel-iot-devkit/mraa"
3SECTION = "libs"
4
5LICENSE = "MIT"
Brad Bishop316dfdd2018-06-25 12:45:53 -04006LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05007
Brad Bishop26bdd442019-08-16 17:08:17 -04008SRCREV = "967585c9ea0e1a8818d2172d2395d8502f6180a2"
9PV = "2.0.0+git${SRCPV}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010
Brad Bishop316dfdd2018-06-25 12:45:53 -040011SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
12 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013
14S = "${WORKDIR}/git"
15
16# CMakeLists.txt checks the architecture, only x86 and ARM supported for now
17COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
18
19inherit cmake distutils3-base
20
21DEPENDS += "json-c"
22
Andrew Geissler1548c072019-02-22 16:03:50 -060023EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON \
24 -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \
25 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026
27# Prepend mraa-utils to make sure bindir ends up in there
28PACKAGES =+ "${PN}-utils"
29
30FILES_${PN}-doc += "${datadir}/mraa/examples/"
31
32FILES_${PN}-utils = "${bindir}/"
33
34# override this in local.conf to get needed bindings.
35# BINDINGS_pn-mraa="python"
36# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040037# Note: 'nodejs' is disabled by default because the bindings
38# generation currently fails with nodejs (>v7.x).
39BINDINGS ??= "python"
40
41# nodejs isn't available for armv4/armv5 architectures
42BINDINGS_armv4 ??= "python"
43BINDINGS_armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050044
45PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
46 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
47
48PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
49PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
50PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222"
51
52FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/"
53RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
54
55FILES_node-${PN} = "${prefix}/lib/node_modules/"
56RDEPENDS_node-${PN} += "nodejs"
57
58### Include desired language bindings ###
59PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
60PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"