Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 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" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=4b92a3b497d7943042a6db40c088c3f2" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 7 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | SRCREV = "fbb7d9232067eac3f4508a37a8f7ea0c4fcebacb" |
| 9 | PV = "1.9.0-git${SRCPV}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \ |
| 12 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | # CMakeLists.txt checks the architecture, only x86 and ARM supported for now |
| 17 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" |
| 18 | |
| 19 | inherit cmake distutils3-base |
| 20 | |
| 21 | DEPENDS += "json-c" |
| 22 | |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 23 | EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON \ |
| 24 | -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \ |
| 25 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 26 | |
| 27 | # Prepend mraa-utils to make sure bindir ends up in there |
| 28 | PACKAGES =+ "${PN}-utils" |
| 29 | |
| 30 | FILES_${PN}-doc += "${datadir}/mraa/examples/" |
| 31 | |
| 32 | FILES_${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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | # Note: 'nodejs' is disabled by default because the bindings |
| 38 | # generation currently fails with nodejs (>v7.x). |
| 39 | BINDINGS ??= "python" |
| 40 | |
| 41 | # nodejs isn't available for armv4/armv5 architectures |
| 42 | BINDINGS_armv4 ??= "python" |
| 43 | BINDINGS_armv5 ??= "python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 44 | |
| 45 | PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ |
| 46 | ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}" |
| 47 | |
| 48 | PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," |
| 49 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," |
| 50 | PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" |
| 51 | |
| 52 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/" |
| 53 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" |
| 54 | |
| 55 | FILES_node-${PN} = "${prefix}/lib/node_modules/" |
| 56 | RDEPENDS_node-${PN} += "nodejs" |
| 57 | |
| 58 | ### Include desired language bindings ### |
| 59 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
| 60 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" |