Skip to content

Instantly share code, notes, and snippets.

@sotaoverride
Created August 23, 2022 12:46
Show Gist options
  • Save sotaoverride/0855854f691338b3b73f997f018baae1 to your computer and use it in GitHub Desktop.
Save sotaoverride/0855854f691338b3b73f997f018baae1 to your computer and use it in GitHub Desktop.
SUMMARY = "Sensor/Actuator repository for Mraa"
HOMEPAGE = "https://github.com/intel-iot-devkit/upm"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=66493d54e65bfc12c7983ff2e884f37f"
DEPENDS = "libjpeg-turbo mraa"
SRCREV = "b9010059ade9b3ee9fb343b23c506acaed7d0b15"
PV = "1.5.0-git${SRCPV}"
SRC_URI = " \
git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
"
S = "${WORKDIR}/git"
# Depends on mraa which only supports x86 and ARM for now
COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
inherit distutils3-base cmake
# override this in local.conf to get needed bindings.
# BINDINGS_pn-upm="python"
# will result in only the python bindings being built/packaged.
#BINDINGS ??= "python ${@ 'nodejs' if oe.types.boolean(d.getVar('HAVE_NODEJS') or '0') else '' }"
#BINDINGS ??= "python"
PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
PACKAGECONFIG[python] = "-DBUILDSWIGPYTHON=ON, -DBUILDSWIGPYTHON=OFF, swig-native ${PYTHON_PN},"
PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
FILES_${PYTHON_PN}-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
RDEPENDS_${PYTHON_PN}-${PN} += "${PYTHON_PN}"
FILES_node-${PN} = "${prefix}/lib/node_modules/"
RDEPENDS_node-${PN} += "nodejs"
### Include desired language bindings ###
PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'nodejs', 'node-${PN}', '', d)}"
PACKAGES =+ "${@bb.utils.contains('BINDINGS', 'python', '${PYTHON_PN}-${PN}', '', d)}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment