Add mraa/upm recipes from meta-refkit-core
cover Add mraa/upm recipes from meta-refkit-core
Move in recipes from meta-refkit-core for the mraa I/O library and upm sensor library.
The following changes since commit f841648657069051dffa1012a42eb1524b894d50:
openwsman: Fix build with musl (2017-09-22 22:56:13 +0000)
are available in the git repository at:
git://git.openembedded.org/meta-openembedded-contrib paule/mraa
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=paule/mraa
Paul Eggleton (2):
mraa: move recipe from meta-refkit-core
upm: add recipe from meta-refkit-core
meta-oe/recipes-extended/mraa/mraa_git.bb | 48 +++++++++++++++++++ ...15-fixed-case-logic-in-getThresh-function.patch | 54 ++++++++++++++++++++++ meta-oe/recipes-extended/upm/upm_git.bb | 42 +++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 meta-oe/recipes-extended/mraa/mraa_git.bb create mode 100644 meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch create mode 100644 meta-oe/recipes-extended/upm/upm_git.bb
Signature · 1 line
2.9.5
PATCH 1/2 mraa: move recipe from meta-refkit-core
Make this recipe a little more widely visible (has previously appeared in meta-refkit-core and meta-intel-iot-middleware). Also make couple of minor tweaks:
* Make SUMMARY more accurate by borrowing the first part of the short description now in the mraa github repo
* Set HOMEPAGE
* Drop AUTHOR as this is field is only really intended for older software where there is no real point of contact for upstream other than an author's email address.
--- meta-oe/recipes-extended/mraa/mraa_git.bb | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-oe/recipes-extended/mraa/mraa_git.bb
meta-oe/recipes-extended/mraa/mraa_git.bb new file +48 -0
@@ -0,0 +1,48 @@ +SUMMARY = "Linux Library for low speed I/O Communication" +HOMEPAGE = "https://github.com/intel-iot-devkit/mraa" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=66493d54e65bfc12c7983ff2e884f37f" + +SRCREV = "8ddbcde84e2d146bc0f9e38504d6c89c14291480" +PV = "1.7.0-git${SRCPV}" + +SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http" + +S = "${WORKDIR}/git" + +inherit cmake distutils3-base + +DEPENDS += "json-c" + +EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON" + +# Prepend mraa-utils to make sure bindir ends up in there +PACKAGES =+ "${PN}-utils" + +FILES_${PN}-doc += "${datadir}/mraa/examples/" + +FILES_${PN}-utils = "${bindir}/" + +# override this in local.conf to get needed bindings. +# BINDINGS_pn-mraa="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 '' }" + +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," +PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" + +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)}"
Signature · 1 line
2.9.5
Re: [meta-oe][PATCH 1/2] mraa: move recipe from meta-refkit-core
Quoted 11 lines · Paul Eggleton
Make this recipe a little more widely visible (has previously appeared in meta-refkit-core and meta-intel-iot-middleware). Also make couple of minor tweaks:
* Make SUMMARY more accurate by borrowing the first part of the short description now in the mraa github repo
* Set HOMEPAGE
* Drop AUTHOR as this is field is only really intended for older software where there is no real point of contact for upstream other than an author's email address.
This is not supported on mips e.g.
| -- INFO - libmraa Version v1.7.0 | -- INFO - cmake Version 3.8.2 | -- INFO - Target arch is unknown | CMake Error at CMakeLists.txt:173 (message): | Only x86, arm, PERIPHERALMAN and mock platforms currently supported |
Please limit the supported hosts to arm and x86
Quoted 68 lines
Signed-off-by Paul Eggleton <[email protected]>--- meta-oe/recipes-extended/mraa/mraa_git.bb | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-oe/recipes-extended/mraa/mraa_git.bbmeta-oe/recipes-extended/mraa/mraa_git.bb new file +48
-1@@ -0,0 +1,48 @@ +SUMMARY = "Linux Library for low speed I/O Communication" +HOMEPAGE = "https://github.com/intel-iot-devkit/mraa" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=66493d54e65bfc12c7983ff2e884f37f" + +SRCREV = "8ddbcde84e2d146bc0f9e38504d6c89c14291480" +PV = "1.7.0-git${SRCPV}" + +SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http" + +S = "${WORKDIR}/git" + +inherit cmake distutils3-base + +DEPENDS += "json-c" + +EXTRA_OECMAKE_append = " -DINSTALLTOOLS:BOOL=ON -DFIRMATA=ON -DCMAKE_SKIP_RPATH=ON" + +# Prepend mraa-utils to make sure bindir ends up in there +PACKAGES =+ "${PN}-utils" + +FILES_${PN}-doc += "${datadir}/mraa/examples/" + +FILES_${PN}-utils = "${bindir}/" + +# override this in local.conf to get needed bindings. +# BINDINGS_pn-mraa="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 '' }" + +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," +PACKAGECONFIG[ft4222] = "-DUSBPLAT=ON -DFTDI4222=ON, -DUSBPLAT=OFF -DFTDI4222=OFF,, libft4222" + +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)}" --2.9.5
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [meta-oe][PATCH 1/2] mraa: move recipe from meta-refkit-core
Hi Khem,
Quoted 10 lines · NZDT Khem Raj
This is not supported on mips e.g.
| -- INFO - libmraa Version v1.7.0 | -- INFO - cmake Version 3.8.2 | -- INFO - Target arch is unknown | CMake Error at CMakeLists.txt:173 (message): | Only x86, arm, PERIPHERALMAN and mock platforms currently supported |Please limit the supported hosts to arm and x86
Done - v2 sent.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
PATCH 2/2 upm: add recipe from meta-refkit-core
In reply to Paul EggletonMake this recipe a little more widely visible (has previously appeared in meta-refkit-core and meta-intel-iot-middleware). Also make couple of minor tweaks:
* Fix BINDINGS example to use the correct recipe name (copy-paste error)
* Set HOMEPAGE
* Drop AUTHOR as this is field is only really intended for older software where there is no real point of contact for upstream other than an author's email address.
--- ...15-fixed-case-logic-in-getThresh-function.patch | 54 ++++++++++++++++++++++ meta-oe/recipes-extended/upm/upm_git.bb | 42 +++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch create mode 100644 meta-oe/recipes-extended/upm/upm_git.bb
meta-oe/recipes-extended/upm/files/ads1x15-fixed-case-logic-in-getThresh-function.patch new file +54 -0
@@ -0,0 +1,54 @@ +From c64d04d084f47b4cb3e1cdee6e96348fcc6a756e Mon Sep 17 00:00:00 2001 +From: Mihai Tudor Panu <[email protected]> +Date: Tue, 30 May 2017 15:14:09 -0700 +Subject: [PATCH 1/1] ads1x15: fixed case logic in getThresh() function + +Signed-off-by: Mihai Tudor Panu <[email protected]> + +Upstream-Status: Backported [c64d04d084f47b4cb3e1cdee6e96348fcc6a756e] + +Signed-off-by: Patrick Ohly <[email protected]> + +--- + src/ads1x15/ads1x15.cxx | 4 ++-- + src/ads1x15/ads1x15.hpp | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/ads1x15/ads1x15.cxx b/src/ads1x15/ads1x15.cxx +index 35782709..47701b2a 100644 +--- a/src/ads1x15/ads1x15.cxx ++++ b/src/ads1x15/ads1x15.cxx +@@ -116,7 +116,7 @@ ADS1X15::setContinuous(bool mode){ + + float + ADS1X15::getThresh(ADSTHRESH reg){ +- if( THRESH_HIGH && THRESH_LOW) return getLastSample(reg); ++ if(reg == THRESH_HIGH || reg == THRESH_LOW) return getLastSample(reg); + else return 0.0; + } + +@@ -137,7 +137,7 @@ ADS1X15::setThresh(ADSTHRESH reg, float value){ + case 2: + case 3: + set_value = value / getMultiplier(); +- set_value = set_value << m_bitShift; ++ set_value = set_value << m_bitShift; + if(i2c->writeWordReg(reg, swapWord(set_value)) != mraa::SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + ": I2c.write() failed"); + return; +diff --git a/src/ads1x15/ads1x15.hpp b/src/ads1x15/ads1x15.hpp +index 7524572d..efd8c8ec 100644 +--- a/src/ads1x15/ads1x15.hpp ++++ b/src/ads1x15/ads1x15.hpp +@@ -390,7 +390,7 @@ namespace upm { + * @param reg ADSTHRES enum value. + * Returns 0.0 unless THRESH_HIGH or THRESH_LOW requested. + */ +- float getThresh(ADSTHRESH reg = THRESH_LOW); ++ float getThresh(ADSTHRESH reg = THRESH_DEFAULT); + + /** + * Sets threshold levels or configures for conversion ready +-- +2.11.0 +
meta-oe/recipes-extended/upm/upm_git.bb new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.9.5