blob: 930c041233557e26f9f1077fe71aeeeb05d8ae03 [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 Bishop316dfdd2018-06-25 12:45:53 -04008SRCREV = "fbb7d9232067eac3f4508a37a8f7ea0c4fcebacb"
9PV = "1.9.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
23EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON"
24
25# Prepend mraa-utils to make sure bindir ends up in there
26PACKAGES =+ "${PN}-utils"
27
28FILES_${PN}-doc += "${datadir}/mraa/examples/"
29
30FILES_${PN}-utils = "${bindir}/"
31
32# override this in local.conf to get needed bindings.
33# BINDINGS_pn-mraa="python"
34# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040035# Note: 'nodejs' is disabled by default because the bindings
36# generation currently fails with nodejs (>v7.x).
37BINDINGS ??= "python"
38
39# nodejs isn't available for armv4/armv5 architectures
40BINDINGS_armv4 ??= "python"
41BINDINGS_armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042
43PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
44 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
45
46PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
47PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
48PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222"
49
50FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/"
51RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
52
53FILES_node-${PN} = "${prefix}/lib/node_modules/"
54RDEPENDS_node-${PN} += "nodejs"
55
56### Include desired language bindings ###
57PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
58PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"