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 | |
| 23 | EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON" |
| 24 | |
| 25 | # Prepend mraa-utils to make sure bindir ends up in there |
| 26 | PACKAGES =+ "${PN}-utils" |
| 27 | |
| 28 | FILES_${PN}-doc += "${datadir}/mraa/examples/" |
| 29 | |
| 30 | FILES_${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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | # Note: 'nodejs' is disabled by default because the bindings |
| 36 | # generation currently fails with nodejs (>v7.x). |
| 37 | BINDINGS ??= "python" |
| 38 | |
| 39 | # nodejs isn't available for armv4/armv5 architectures |
| 40 | BINDINGS_armv4 ??= "python" |
| 41 | BINDINGS_armv5 ??= "python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 42 | |
| 43 | PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ |
| 44 | ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}" |
| 45 | |
| 46 | PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," |
| 47 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," |
| 48 | PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" |
| 49 | |
| 50 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/" |
| 51 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" |
| 52 | |
| 53 | FILES_node-${PN} = "${prefix}/lib/node_modules/" |
| 54 | RDEPENDS_node-${PN} += "nodejs" |
| 55 | |
| 56 | ### Include desired language bindings ### |
| 57 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
| 58 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" |