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 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | SRC_URI = "git://github.com/eclipse/${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 | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 16 | file://0001-initialize-local-variables-before-use.patch \ |
| 17 | file://0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | file://0001-cmake-Disable-using-Wno-maybe-uninitialized.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | |
Brad Bishop | 23eaf03 | 2019-11-20 05:15:02 -0500 | [diff] [blame] | 21 | SRC_URI_append_toolchain-clang_x86 = " file://0001-nmea_gps-Link-with-latomic.patch " |
| 22 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | # Depends on mraa which only supports x86 and ARM for now |
| 26 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" |
| 27 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | inherit distutils3-base cmake pkgconfig |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 30 | EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off" |
| 31 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 32 | # override this in local.conf to get needed bindings. |
| 33 | # BINDINGS_pn-upm="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 | |
Brad Bishop | 2d39a06 | 2019-10-28 08:33:36 -0400 | [diff] [blame] | 46 | PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON -DPYTHON_LIBRARY=${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so -DPYTHON_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN}," |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 47 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," |
| 48 | |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 49 | do_configure_prepend() { |
| 50 | sed -i s:\"lib/${_packages_path}:\"${baselib}/${_packages_path}:g ${S}/cmake/modules/OpenCVDetectPython.cmake |
| 51 | } |
| 52 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 53 | FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}" |
| 54 | RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}" |
| 55 | |
| 56 | FILES_node-${PN} = "${prefix}/lib/node_modules/" |
| 57 | RDEPENDS_node-${PN} += "nodejs" |
| 58 | |
| 59 | ### Include desired language bindings ### |
| 60 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
| 61 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}" |