Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "Sensor/Actuator repository for Mraa" |
| 2 | HOMEPAGE = "https://github.com/intel-iot-devkit/upm" |
| 3 | SECTION = "libs" |
| 4 | |
| 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f" |
| 7 | |
| 8 | DEPENDS = "libjpeg-turbo mraa" |
| 9 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 10 | SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d" |
| 11 | PV = "2.0.0+git${SRCPV}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 15 | file://0001-Use-stdint-types.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 16 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
| 20 | # Depends on mraa which only supports x86 and ARM for now |
| 21 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" |
| 22 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | inherit distutils3-base cmake pkgconfig |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 25 | # override this in local.conf to get needed bindings. |
| 26 | # BINDINGS_pn-upm="python" |
| 27 | # will result in only the python bindings being built/packaged. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | # Note: 'nodejs' is disabled by default because the bindings |
| 29 | # generation currently fails with nodejs (>v7.x). |
| 30 | BINDINGS ??= "python" |
| 31 | |
| 32 | # nodejs isn't available for armv4/armv5 architectures |
| 33 | BINDINGS_armv4 ??= "python" |
| 34 | BINDINGS_armv5 ??= "python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 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 | |
| 42 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}" |
| 43 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" |
| 44 | |
| 45 | FILES_node-${PN} = "${prefix}/lib/node_modules/" |
| 46 | RDEPENDS_node-${PN} += "nodejs" |
| 47 | |
| 48 | ### Include desired language bindings ### |
| 49 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
| 50 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" |