blob: 0ae7760bd202f4b3357b2b32908ac48ae96a86f9 [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
8DEPENDS = "libjpeg-turbo mraa"
9
Brad Bishop26bdd442019-08-16 17:08:17 -040010SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d"
11PV = "2.0.0+git${SRCPV}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012
Andrew Geissler595f6302022-01-24 19:11:47 +000013SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http;branch=master;protocol=https \
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)} \
45 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
46
Brad Bishop2d39a062019-10-28 08:33:36 -040047PACKAGECONFIG[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 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 Williams213cb262021-08-07 19:21:33 -050054FILES:${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
55RDEPENDS:${PYTHON_PN}-${PN} += "${PYTHON_PN}"
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)}"
62PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"