summaryrefslogtreecommitdiff
path: root/recipes-devtools
diff options
context:
space:
mode:
authorNorbert Wesp <n.wesp@phytec.de>2018-11-07 17:06:11 +0100
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2018-12-04 14:32:44 +0100
commit551d31a949e4209e2871f6e9b128c6c11ddac8b7 (patch)
tree1812523cc6f66079a484f5d6667baa41609fe44e /recipes-devtools
parent9ab9a9783a85e38c9286ea3537e5a91741de9787 (diff)
downloadmeta-yogurt-551d31a949e4209e2871f6e9b128c6c11ddac8b7.tar.bz2
meta-yogurt-551d31a949e4209e2871f6e9b128c6c11ddac8b7.zip
mraa: Add recipe for mraa v2.0.0
The new recipe is based on a meta-oe recipe in master-branch for mraa v1.9 The SRC_URI has been changed, so instead of a git-repository a tar.gz file will be downloaded. There is no recipe for mraa v2.0.0 (even in master-branch) so it will be added to our meta-yogurt layer. Signed-off-by: Norbert Wesp <n.wesp@phytec.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/mraa/mraa_2.0.0.bb50
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes-devtools/mraa/mraa_2.0.0.bb b/recipes-devtools/mraa/mraa_2.0.0.bb
new file mode 100644
index 0000000..97d9274
--- /dev/null
+++ b/recipes-devtools/mraa/mraa_2.0.0.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Linux Library for low speed I/O Communication"
+HOMEPAGE = "https://github.com/intel-iot-devkit/mraa"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2"
+
+SRC_URI = "https://github.com/intel-iot-devkit/mraa/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "1a5d8eaab441655c1e8741e35a702b3e"
+SRC_URI[sha256sum] = "c9f3c3741c6894be5516adecfe6b55a38960b6718b268a9afd645f7955e5a716"
+
+S = "${WORKDIR}/${PN}-${PV}"
+
+# CMakeLists.txt checks the architecture, only x86 and ARM supported for now
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+
+inherit cmake distutils3-base
+
+DEPENDS += "json-c"
+
+EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON"
+
+# Prepend mraa-utils to make sure bindir ends up in there
+PACKAGES =+ "${PN}-utils"
+
+FILES_${PN}-doc += "${datadir}/mraa/examples/"
+
+FILES_${PN}-utils = "${bindir}/"
+
+# override this in local.conf to get needed bindings.
+# BINDINGS_pn-mraa="python"
+# will result in only the python bindings being built/packaged.
+BINDINGS ??= "python nodejs"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
+ ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
+
+PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
+PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
+PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222"
+
+FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/"
+RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
+
+FILES_node-${PN} = "${prefix}/lib/node_modules/"
+RDEPENDS_node-${PN} += "nodejs"
+
+### Include desired language bindings ###
+PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
+PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"