blob: cd7dd9ae0f2c37e5656778af3b82c0bbb8d1dff7 [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 Geissler82c905d2020-04-13 13:39:40 -050013SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \
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 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020
Patrick Williams213cb262021-08-07 19:21:33 -050021SRC_URI:append:toolchain-clang:x86 = " file://0001-nmea_gps-Link-with-latomic.patch "
Brad Bishop23eaf032019-11-20 05:15:02 -050022
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023S = "${WORKDIR}/git"
24
25# Depends on mraa which only supports x86 and ARM for now
26COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
27
Brad Bishop19323692019-04-05 15:28:33 -040028inherit distutils3-base cmake pkgconfig
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029
Andrew Geissler82c905d2020-04-13 13:39:40 -050030EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off"
31
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032# override this in local.conf to get needed bindings.
Patrick Williams213cb262021-08-07 19:21:33 -050033# BINDINGS:pn-upm="python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040035# Note: 'nodejs' is disabled by default because the bindings
36# generation currently fails with nodejs (>v7.x).
37BINDINGS ??= "python"
38
39# nodejs isn't available for armv4/armv5 architectures
Patrick Williams213cb262021-08-07 19:21:33 -050040BINDINGS:armv4 ??= "python"
41BINDINGS:armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042
43PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
44 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
45
Brad Bishop2d39a062019-10-28 08:33:36 -040046PACKAGECONFIG[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 -050047PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
48
Patrick Williams213cb262021-08-07 19:21:33 -050049do_configure:prepend() {
Andrew Geisslerd221e032020-07-10 16:13:21 -050050 sed -i s:\"lib/${_packages_path}:\"${baselib}/${_packages_path}:g ${S}/cmake/modules/OpenCVDetectPython.cmake
51}
52
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
54RDEPENDS:${PYTHON_PN}-${PN} += "${PYTHON_PN}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050055
Patrick Williams213cb262021-08-07 19:21:33 -050056FILES:node-${PN} = "${prefix}/lib/node_modules/"
57RDEPENDS:node-${PN} += "nodejs"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050058
59### Include desired language bindings ###
60PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
61PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"