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" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 7 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | SRCREV = "e15ce6fbc76148ba8835adc92196b0d0a3f245e7" |
| 9 | PV = "2.1.0+git${SRCPV}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \ |
| 12 | file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \ |
Andrew Geissler | 7f40b71 | 2020-05-15 14:09:53 -0500 | [diff] [blame] | 13 | file://0001-include-Declare-gVERSION-global-as-extern.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
| 18 | # CMakeLists.txt checks the architecture, only x86 and ARM supported for now |
| 19 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" |
| 20 | |
| 21 | inherit cmake distutils3-base |
| 22 | |
| 23 | DEPENDS += "json-c" |
| 24 | |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 25 | EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON \ |
| 26 | -DPYTHON3_PACKAGES_PATH:PATH=${baselib}/python${PYTHON_BASEVERSION}/site-packages \ |
Brad Bishop | 2d39a06 | 2019-10-28 08:33:36 -0400 | [diff] [blame] | 27 | -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so \ |
| 28 | -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ |
Andrew Geissler | 1548c07 | 2019-02-22 16:03:50 -0600 | [diff] [blame] | 29 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | |
| 31 | # Prepend mraa-utils to make sure bindir ends up in there |
| 32 | PACKAGES =+ "${PN}-utils" |
| 33 | |
| 34 | FILES_${PN}-doc += "${datadir}/mraa/examples/" |
| 35 | |
| 36 | FILES_${PN}-utils = "${bindir}/" |
| 37 | |
| 38 | # override this in local.conf to get needed bindings. |
| 39 | # BINDINGS_pn-mraa="python" |
| 40 | # will result in only the python bindings being built/packaged. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 41 | # Note: 'nodejs' is disabled by default because the bindings |
| 42 | # generation currently fails with nodejs (>v7.x). |
| 43 | BINDINGS ??= "python" |
| 44 | |
| 45 | # nodejs isn't available for armv4/armv5 architectures |
| 46 | BINDINGS_armv4 ??= "python" |
| 47 | BINDINGS_armv5 ??= "python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | |
| 49 | PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ |
| 50 | ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}" |
| 51 | |
| 52 | PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," |
| 53 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," |
| 54 | PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" |
| 55 | |
| 56 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}/" |
| 57 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" |
| 58 | |
| 59 | FILES_node-${PN} = "${prefix}/lib/node_modules/" |
| 60 | RDEPENDS_node-${PN} += "nodejs" |
| 61 | |
| 62 | ### Include desired language bindings ### |
| 63 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
| 64 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 65 | |
| 66 | TOOLCHAIN = "gcc" |