blob: 8854a33bcb79f73333921aec35f36881231f923e [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 Bishop1a4b7ee2018-12-16 17:11:34 -080010SRCREV = "dc45cd78595c7c24c8a8574c63bb48b5bb99c5aa"
Brad Bishop316dfdd2018-06-25 12:45:53 -040011PV = "1.6.0-git${SRCPV}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
14 file://0001-Replace-strncpy-with-memcpy.patch \
15 file://0001-include-sys-types.h-for-uint-definition.patch \
Brad Bishop19323692019-04-05 15:28:33 -040016 file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018
19S = "${WORKDIR}/git"
20
21# Depends on mraa which only supports x86 and ARM for now
22COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
23
Brad Bishop19323692019-04-05 15:28:33 -040024inherit distutils3-base cmake pkgconfig
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026# override this in local.conf to get needed bindings.
27# BINDINGS_pn-upm="python"
28# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040029# Note: 'nodejs' is disabled by default because the bindings
30# generation currently fails with nodejs (>v7.x).
31BINDINGS ??= "python"
32
33# nodejs isn't available for armv4/armv5 architectures
34BINDINGS_armv4 ??= "python"
35BINDINGS_armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036
37PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
38 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
39
40PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
41PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
42
43FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
44RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
45
46FILES_node-${PN} = "${prefix}/lib/node_modules/"
47RDEPENDS_node-${PN} += "nodejs"
48
49### Include desired language bindings ###
50PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
51PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"