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 | |
Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame] | 8 | DEPENDS = "libjpeg-turbo mraa python3-setuptools-native" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 10 | SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d" |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 11 | PV = "2.0.0+git" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 13 | SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \ |
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 \ |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 19 | file://0001-include-missing-cstdint.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | SRC_URI:append:toolchain-clang:x86 = " file://0001-nmea_gps-Link-with-latomic.patch " |
Brad Bishop | 23eaf03 | 2019-11-20 05:15:02 -0500 | [diff] [blame] | 23 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | # Depends on mraa which only supports x86 and ARM for now |
| 27 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" |
| 28 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 29 | inherit setuptools3-base cmake pkgconfig |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off" |
| 32 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 33 | # override this in local.conf to get needed bindings. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | # BINDINGS:pn-upm="python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 35 | # will result in only the python bindings being built/packaged. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 36 | # Note: 'nodejs' is disabled by default because the bindings |
| 37 | # generation currently fails with nodejs (>v7.x). |
| 38 | BINDINGS ??= "python" |
| 39 | |
| 40 | # nodejs isn't available for armv4/armv5 architectures |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | BINDINGS:armv4 ??= "python" |
| 42 | BINDINGS:armv5 ??= "python" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 43 | |
| 44 | PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \ |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 45 | ${@bb.utils.contains('PACKAGES', 'python3-${PN}', 'python', '', d)}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 46 | |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 47 | 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 python3," |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native," |
| 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | do_configure:prepend() { |
Andrew Geissler | d221e03 | 2020-07-10 16:13:21 -0500 | [diff] [blame] | 51 | sed -i s:\"lib/${_packages_path}:\"${baselib}/${_packages_path}:g ${S}/cmake/modules/OpenCVDetectPython.cmake |
| 52 | } |
| 53 | |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 54 | FILES:python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}" |
| 55 | RDEPENDS:python3-${PN} += "python3" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | FILES:node-${PN} = "${prefix}/lib/node_modules/" |
| 58 | RDEPENDS:node-${PN} += "nodejs" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 59 | |
| 60 | ### Include desired language bindings ### |
| 61 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}" |
Patrick Williams | 3965356 | 2024-03-01 08:54:02 -0600 | [diff] [blame] | 62 | PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', 'python3-${PN}', '', d)}" |