blob: 3aa766d0bde9ea8066ca92cdba3e5d6b55c85054 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Sensor/Actuator repository for Mraa"
2HOMEPAGE = "https://github.com/intel-iot-devkit/upm"
3SECTION = "libs"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f"
7
Patrick Williams705982a2024-01-12 09:51:57 -06008DEPENDS = "libjpeg-turbo mraa python3-setuptools-native"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05009
Brad Bishop26bdd442019-08-16 17:08:17 -040010SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d"
Patrick Williams73bd93f2024-02-20 08:07:48 -060011PV = "2.0.0+git"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012
Patrick Williams8e7b46e2023-05-01 14:19:06 -050013SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \
Brad Bishop19323692019-04-05 15:28:33 -040014 file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \
Brad Bishop26bdd442019-08-16 17:08:17 -040015 file://0001-Use-stdint-types.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050016 file://0001-initialize-local-variables-before-use.patch \
17 file://0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050018 file://0001-cmake-Disable-using-Wno-maybe-uninitialized.patch \
Patrick Williams864cc432023-02-09 14:54:44 -060019 file://0001-include-missing-cstdint.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021
Patrick Williams213cb262021-08-07 19:21:33 -050022SRC_URI:append:toolchain-clang:x86 = " file://0001-nmea_gps-Link-with-latomic.patch "
Brad Bishop23eaf032019-11-20 05:15:02 -050023
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024S = "${WORKDIR}/git"
25
26# Depends on mraa which only supports x86 and ARM for now
27COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
28
Andrew Geissler595f6302022-01-24 19:11:47 +000029inherit setuptools3-base cmake pkgconfig
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030
Andrew Geissler82c905d2020-04-13 13:39:40 -050031EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off"
32
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033# override this in local.conf to get needed bindings.
Patrick Williams213cb262021-08-07 19:21:33 -050034# BINDINGS:pn-upm="python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040036# Note: 'nodejs' is disabled by default because the bindings
37# generation currently fails with nodejs (>v7.x).
38BINDINGS ??= "python"
39
40# nodejs isn't available for armv4/armv5 architectures
Patrick Williams213cb262021-08-07 19:21:33 -050041BINDINGS:armv4 ??= "python"
42BINDINGS:armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043
44PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
Patrick Williams39653562024-03-01 08:54:02 -060045 ${@bb.utils.contains('PACKAGES', 'python3-${PN}', 'python', '', d)}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050046
Patrick Williams39653562024-03-01 08:54:02 -060047PACKAGECONFIG[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 Bishopd7bf8c12018-02-25 22:55:05 -050048PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
49
Patrick Williams213cb262021-08-07 19:21:33 -050050do_configure:prepend() {
Andrew Geisslerd221e032020-07-10 16:13:21 -050051 sed -i s:\"lib/${_packages_path}:\"${baselib}/${_packages_path}:g ${S}/cmake/modules/OpenCVDetectPython.cmake
52}
53
Patrick Williams39653562024-03-01 08:54:02 -060054FILES:python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
55RDEPENDS:python3-${PN} += "python3"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050056
Patrick Williams213cb262021-08-07 19:21:33 -050057FILES:node-${PN} = "${prefix}/lib/node_modules/"
58RDEPENDS:node-${PN} += "nodejs"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050059
60### Include desired language bindings ###
61PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
Patrick Williams39653562024-03-01 08:54:02 -060062PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', 'python3-${PN}', '', d)}"