diff options
| -rw-r--r-- | meta-oe/recipes-extended/mraa/mraa_git.bb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mraa/mraa_git.bb b/meta-oe/recipes-extended/mraa/mraa_git.bb new file mode 100644 index 0000000000..616048fac9 --- /dev/null +++ b/meta-oe/recipes-extended/mraa/mraa_git.bb | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | SUMMARY = "Linux Library for low speed I/O Communication" | ||
| 2 | HOMEPAGE = "https://github.com/intel-iot-devkit/mraa" | ||
| 3 | SECTION = "libs" | ||
| 4 | |||
| 5 | LICENSE = "MIT" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=66493d54e65bfc12c7983ff2e884f37f" | ||
| 7 | |||
| 8 | SRCREV = "8ddbcde84e2d146bc0f9e38504d6c89c14291480" | ||
| 9 | PV = "1.7.0-git${SRCPV}" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http" | ||
| 12 | |||
| 13 | S = "${WORKDIR}/git" | ||
| 14 | |||
| 15 | # CMakeLists.txt checks the architecture, only x86 and ARM supported for now | ||
| 16 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" | ||
| 17 | |||
| 18 | inherit cmake distutils3-base | ||
| 19 | |||
| 20 | DEPENDS += "json-c" | ||
| 21 | |||
| 22 | EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON" | ||
| 23 | |||
| 24 | # Prepend mraa-utils to make sure bindir ends up in there | ||
| 25 | PACKAGES =+ "${PN}-utils" | ||
| 26 | |||
| 27 | FILES_${PN}-doc += "${datadir}/mraa/examples/" | ||
| 28 | |||
| 29 | FILES_${PN}-utils = "${bindir}/" | ||
| 30 | |||
| 31 | # override this in local.conf to get needed bindings. | ||
| 32 | # BINDINGS_pn-mraa="python" | ||
| 33 | # will result in only the python bindings being built/packaged. | ||
| 34 | BINDINGS ??= "python ${@ 'nodejs' if oe.types.boolean(d.getVar('HAVE_NODEJS') or '0') else '' }" | ||
| 35 | |||
| 36 | PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ | ||
| 37 | ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}" | ||
| 38 | |||
| 39 | PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," | ||
| 40 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," | ||
| 41 | PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" | ||
| 42 | |||
| 43 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/" | ||
| 44 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" | ||
| 45 | |||
| 46 | FILES_node-${PN} = "${prefix}/lib/node_modules/" | ||
| 47 | RDEPENDS_node-${PN} += "nodejs" | ||
| 48 | |||
| 49 | ### Include desired language bindings ### | ||
| 50 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" | ||
| 51 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" | ||
