blob: a6b379ec36507a36b15e541cc50bde94ca1f97cf [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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013SRC_URI = "git://github.com/intel-iot-devkit/${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 Bishop1a4b7ee2018-12-16 17:11:34 -080016 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017
18S = "${WORKDIR}/git"
19
20# Depends on mraa which only supports x86 and ARM for now
21COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
22
Brad Bishop19323692019-04-05 15:28:33 -040023inherit distutils3-base cmake pkgconfig
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
Brad Bishopd7bf8c12018-02-25 22:55:05 -050025# override this in local.conf to get needed bindings.
26# BINDINGS_pn-upm="python"
27# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040028# Note: 'nodejs' is disabled by default because the bindings
29# generation currently fails with nodejs (>v7.x).
30BINDINGS ??= "python"
31
32# nodejs isn't available for armv4/armv5 architectures
33BINDINGS_armv4 ??= "python"
34BINDINGS_armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035
36PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
37 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
38
39PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
40PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
41
42FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
43RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
44
45FILES_node-${PN} = "${prefix}/lib/node_modules/"
46RDEPENDS_node-${PN} += "nodejs"
47
48### Include desired language bindings ###
49PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
50PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"