blob: 6db8f882525a2097a4f84f66b3e53e337e22ae1d [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 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 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019
Brad Bishop23eaf032019-11-20 05:15:02 -050020SRC_URI_append_toolchain-clang_x86 = " file://0001-nmea_gps-Link-with-latomic.patch "
21
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022S = "${WORKDIR}/git"
23
24# Depends on mraa which only supports x86 and ARM for now
25COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
26
Brad Bishop19323692019-04-05 15:28:33 -040027inherit distutils3-base cmake pkgconfig
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029# override this in local.conf to get needed bindings.
30# BINDINGS_pn-upm="python"
31# will result in only the python bindings being built/packaged.
Brad Bishop316dfdd2018-06-25 12:45:53 -040032# Note: 'nodejs' is disabled by default because the bindings
33# generation currently fails with nodejs (>v7.x).
34BINDINGS ??= "python"
35
36# nodejs isn't available for armv4/armv5 architectures
37BINDINGS_armv4 ??= "python"
38BINDINGS_armv5 ??= "python"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039
40PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
41 ${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
42
Brad Bishop2d39a062019-10-28 08:33:36 -040043PACKAGECONFIG[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 -050044PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
45
46FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
47RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
48
49FILES_node-${PN} = "${prefix}/lib/node_modules/"
50RDEPENDS_node-${PN} += "nodejs"
51
52### Include desired language bindings ###
53PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
54PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"