added my Recipes
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 3707f467f9a26a7df3d41385023b43c3d08911d2 Mon Sep 17 00:00:00 2001
|
||||
From: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
|
||||
Date: Tue, 12 Feb 2019 17:46:52 -0800
|
||||
Subject: [PATCH][v3] CMakeLists.txt: Use SWIG_SUPPORT_FILES to find the list
|
||||
of generated files for cmake version 3.12 or higher
|
||||
|
||||
Use SWIG_SUPPORT_FILES to find the list of python files generated by
|
||||
CMake Swig module and install those files. This should be applicable to
|
||||
cmake version 3.12 or higher
|
||||
|
||||
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
|
||||
---
|
||||
src/CMakeLists.txt | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index e19cda2..b565814 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -337,8 +337,14 @@ macro(_upm_swig_python)
|
||||
OUTPUT_NAME _pyupm_${libname}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_PYTHON_BINARY_DIR})
|
||||
|
||||
+ if (CMAKE_VERSION VERSION_LESS "3.12")
|
||||
+ set(support_files ${swig_extra_generated_files})
|
||||
+ else()
|
||||
+ get_property(support_files TARGET _${python_wrapper_name} PROPERTY SWIG_SUPPORT_FILES)
|
||||
+ endif()
|
||||
+
|
||||
# Install .py's to python packages directory/upm
|
||||
- install (FILES ${swig_extra_generated_files}
|
||||
+ install (FILES ${support_files}
|
||||
DESTINATION ${PYTHON_PACKAGES_PATH}/upm
|
||||
COMPONENT ${CMAKE_PROJECT_NAME}-python${PYTHON_VERSION_MAJOR})
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
From 5a1e731d71d577f56a2c013e4a75a8e90188e63b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 9 Jul 2019 05:21:59 -0700
|
||||
Subject: [PATCH] Use stdint types
|
||||
|
||||
Fixes compilation with musl.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
src/bma250e/bma250e.cxx | 16 ++++++++--------
|
||||
src/bmg160/bmg160.cxx | 10 +++++-----
|
||||
src/bmi160/bosch_bmi160.h | 2 +-
|
||||
src/bmm150/bmm150.cxx | 8 ++++----
|
||||
4 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/bma250e/bma250e.cxx b/src/bma250e/bma250e.cxx
|
||||
index a8792782..1b3ecdd8 100644
|
||||
--- a/src/bma250e/bma250e.cxx
|
||||
+++ b/src/bma250e/bma250e.cxx
|
||||
@@ -195,35 +195,35 @@ BMA250E::BMA250E(std::string initStr) : mraaIo(initStr)
|
||||
fifoConfig(mode, axes);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable0:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable0(bits);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable1:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable1(bits);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable2:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable2(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap0:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap0(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap1:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap1(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap2:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap2(bits);
|
||||
}
|
||||
if(tok.substr(0, 16) == "setInterruptSrc:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
setInterruptSrc(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptOutputControl:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
|
||||
setInterruptOutputControl(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
|
||||
diff --git a/src/bmg160/bmg160.cxx b/src/bmg160/bmg160.cxx
|
||||
index 1a0939f8..2438c399 100644
|
||||
--- a/src/bmg160/bmg160.cxx
|
||||
+++ b/src/bmg160/bmg160.cxx
|
||||
@@ -173,23 +173,23 @@ BMG160::BMG160(std::string initStr) : mraaIo(initStr)
|
||||
fifoConfig(mode, axes);
|
||||
}
|
||||
if(tok.substr(0, 20) == "setInterruptEnable0:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(20), nullptr, 0);
|
||||
setInterruptEnable0(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap0:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap0(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setInterruptMap1:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setInterruptMap1(bits);
|
||||
}
|
||||
if(tok.substr(0, 16) == "setInterruptSrc:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
setInterruptSrc(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptOutputControl:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(26), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(26), nullptr, 0);
|
||||
setInterruptOutputControl(bits);
|
||||
}
|
||||
if(tok.substr(0, 26) == "setInterruptLatchBehavior:") {
|
||||
diff --git a/src/bmi160/bosch_bmi160.h b/src/bmi160/bosch_bmi160.h
|
||||
index 87ca2249..cd9efe6f 100644
|
||||
--- a/src/bmi160/bosch_bmi160.h
|
||||
+++ b/src/bmi160/bosch_bmi160.h
|
||||
@@ -81,7 +81,7 @@ typedef int16_t s16;/**< used for signed 16bit */
|
||||
typedef int32_t s32;/**< used for signed 32bit */
|
||||
typedef int64_t s64;/**< used for signed 64bit */
|
||||
|
||||
-typedef u_int8_t u8;/**< used for unsigned 8bit */
|
||||
+typedef uint8_t u8;/**< used for unsigned 8bit */
|
||||
typedef u_int16_t u16;/**< used for unsigned 16bit */
|
||||
typedef u_int32_t u32;/**< used for unsigned 32bit */
|
||||
typedef u_int64_t u64;/**< used for unsigned 64bit */
|
||||
diff --git a/src/bmm150/bmm150.cxx b/src/bmm150/bmm150.cxx
|
||||
index 234ebf92..02436788 100644
|
||||
--- a/src/bmm150/bmm150.cxx
|
||||
+++ b/src/bmm150/bmm150.cxx
|
||||
@@ -170,19 +170,19 @@ BMM150::BMM150(std::string initStr) : mraaIo(initStr)
|
||||
setOpmode(opmode);
|
||||
}
|
||||
if(tok.substr(0, 19) == "setInterruptEnable:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
|
||||
setInterruptEnable(bits);
|
||||
}
|
||||
if(tok.substr(0, 19) == "setInterruptConfig:") {
|
||||
- u_int8_t bits = (u_int8_t)std::stoul(tok.substr(19), nullptr, 0);
|
||||
+ uint8_t bits = (uint8_t)std::stoul(tok.substr(19), nullptr, 0);
|
||||
setInterruptConfig(bits);
|
||||
}
|
||||
if(tok.substr(0, 17) == "setRepetitionsXY:") {
|
||||
- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
+ uint8_t reps = (uint8_t)std::stoul(tok.substr(17), nullptr, 0);
|
||||
setRepetitionsXY(reps);
|
||||
}
|
||||
if(tok.substr(0, 16) == "setRepetitionsZ:") {
|
||||
- u_int8_t reps = (u_int8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
+ uint8_t reps = (uint8_t)std::stoul(tok.substr(16), nullptr, 0);
|
||||
setRepetitionsZ(reps);
|
||||
}
|
||||
if(tok.substr(0, 14) == "setPresetMode:") {
|
||||
@@ -0,0 +1,33 @@
|
||||
From d41e2bef1c39dcbc4896b1dd7ab168da530672b5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 30 Dec 2019 13:33:39 -0800
|
||||
Subject: [PATCH] cmake: Disable -Wno-misleading-indentation with clang-10 onwards
|
||||
|
||||
clang also introduced this warning now
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/693]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 069e4902..47c7f4c3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -99,6 +99,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_
|
||||
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
|
||||
endif ()
|
||||
|
||||
+# clang-10 added -Wmisleading-indentation as well, skipp it too
|
||||
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9")
|
||||
+ list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
|
||||
+endif ()
|
||||
+
|
||||
# Warnings as errors?
|
||||
if (WERROR)
|
||||
list (APPEND C_CXX_WARNING_FLAGS -Werror)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 169f62770f63a43b15d4d4c82336fd57c8467cfe Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 4 Apr 2020 21:43:51 -0700
|
||||
Subject: [PATCH] cmake: Disable using -Wno-maybe-uninitialized
|
||||
|
||||
This warning causes clang builds to fail because this is not a
|
||||
recognised warning with clang
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/CMakeLists.txt | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -6,7 +6,6 @@
|
||||
set (SWIG_CXX_DISABLE_WARNINGS -Wno-error
|
||||
-Wno-delete-non-virtual-dtor
|
||||
-Wno-unused-function
|
||||
- -Wno-maybe-uninitialized
|
||||
-Wno-strict-aliasing)
|
||||
|
||||
# If building under android, make sure swig gets an ANDROID flag
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -115,8 +115,7 @@ endif (WERROR)
|
||||
upm_add_compile_flags(C ${C_CXX_WARNING_FLAGS}
|
||||
-Winit-self
|
||||
-Wimplicit
|
||||
- -Wsign-compare
|
||||
- -Wmissing-parameter-type)
|
||||
+ -Wsign-compare)
|
||||
|
||||
# Set CXX compiler warning flags at top-level scope and emit a warning about
|
||||
# unsupported flags
|
||||
@@ -0,0 +1,43 @@
|
||||
From 64f75806c04c2ee819cf2f92cb564ad316354823 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 29 Jan 2023 00:27:47 -0800
|
||||
Subject: [PATCH] include missing <cstdint>
|
||||
|
||||
gcc 13 moved some includes around and as a result <cstdint> is no longer transitively included [1]. Explicitly include it for uint{32,64}_t.
|
||||
|
||||
[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/704]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/mcp9808/mcp9808.hpp | 1 +
|
||||
src/micsv89/micsv89.hpp | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/mcp9808/mcp9808.hpp b/src/mcp9808/mcp9808.hpp
|
||||
index b9e138d7..2509cd30 100644
|
||||
--- a/src/mcp9808/mcp9808.hpp
|
||||
+++ b/src/mcp9808/mcp9808.hpp
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <interfaces/iTemperature.hpp>
|
||||
diff --git a/src/micsv89/micsv89.hpp b/src/micsv89/micsv89.hpp
|
||||
index 2f97dbce..c6e22ad8 100644
|
||||
--- a/src/micsv89/micsv89.hpp
|
||||
+++ b/src/micsv89/micsv89.hpp
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From cce8be3966b602cf7e20d559e50fcf493b9b42cc Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 23 Dec 2019 18:13:21 -0800
|
||||
Subject: [PATCH] initialize local variables before use
|
||||
|
||||
fixes
|
||||
error: 'ctrl_reg2_data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/eclipse/upm/pull/693]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/kxtj3/kxtj3.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/kxtj3/kxtj3.c b/src/kxtj3/kxtj3.c
|
||||
index a6f3c4f8..050ae585 100755
|
||||
--- a/src/kxtj3/kxtj3.c
|
||||
+++ b/src/kxtj3/kxtj3.c
|
||||
@@ -715,7 +715,7 @@ upm_result_t kxtj3_sensor_software_reset(const kxtj3_context dev)
|
||||
if (kxtj3_set_bit_on(dev, KXTJ3_CTRL_REG2, KXTJ3_CTRL_REG2_SRST) != UPM_SUCCESS)
|
||||
return UPM_ERROR_OPERATION_FAILED;
|
||||
|
||||
- uint8_t ctrl_reg2_data;
|
||||
+ uint8_t ctrl_reg2_data = 0;
|
||||
kxtj3_read_register(dev, KXTJ3_CTRL_REG2, &ctrl_reg2_data);
|
||||
|
||||
uint8_t srst_counter = 0;
|
||||
@@ -824,7 +824,7 @@ upm_result_t kxtj3_enable_interrupt_pin(const kxtj3_context dev, KXTJ3_INTERRUPT
|
||||
KXTJ3_INTERRUPT_RESPONSE_T response_type)
|
||||
{
|
||||
assert(dev != NULL);
|
||||
- uint8_t int_reg_value;
|
||||
+ uint8_t int_reg_value = 0;
|
||||
kxtj3_read_register(dev, KXTJ3_INT_CTRL_REG1, &int_reg_value);
|
||||
|
||||
if (polarity)
|
||||
@@ -865,7 +865,7 @@ upm_result_t kxtj3_set_interrupt_response(const kxtj3_context dev, KXTJ3_INTERRU
|
||||
bool kxtj3_get_interrupt_status(const kxtj3_context dev)
|
||||
{
|
||||
assert(dev != NULL);
|
||||
- uint8_t status_reg_value;
|
||||
+ uint8_t status_reg_value = 0;
|
||||
kxtj3_read_register(dev, KXTJ3_STATUS_REG, &status_reg_value);
|
||||
if (!(status_reg_value & KXTJ3_STATUS_REG_INT))
|
||||
return false;
|
||||
@@ -955,7 +955,7 @@ kxtj3_wakeup_axes kxtj3_get_wakeup_axis_and_direction(kxtj3_context dev)
|
||||
{
|
||||
assert(dev != NULL);
|
||||
|
||||
- uint8_t int_source2_value;
|
||||
+ uint8_t int_source2_value = 0;
|
||||
kxtj3_read_register(dev, KXTJ3_INT_SOURCE2, &int_source2_value);
|
||||
|
||||
kxtj3_wakeup_axes wakeup_axis;
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 996d37fc0b7177ee57788399b9140032d5de2765 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 18 Nov 2019 15:50:02 -0800
|
||||
Subject: [PATCH] nmea_gps: Link with latomic
|
||||
|
||||
clang/x86 ends up with missing symbols for atomics due to atomic<double>
|
||||
with libstdc++, it works ok with libc++
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/nmea_gps/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nmea_gps/CMakeLists.txt b/src/nmea_gps/CMakeLists.txt
|
||||
index b3fb6591..5280bfed 100644
|
||||
--- a/src/nmea_gps/CMakeLists.txt
|
||||
+++ b/src/nmea_gps/CMakeLists.txt
|
||||
@@ -6,4 +6,4 @@ upm_mixed_module_init (NAME nmea_gps
|
||||
CPP_SRC nmea_gps.cxx
|
||||
FTI_SRC nmea_gps_fti.c
|
||||
CPP_WRAPS_C
|
||||
- REQUIRES mraa utilities-c ${CMAKE_THREAD_LIBS_INIT})
|
||||
+ REQUIRES mraa utilities-c atomic ${CMAKE_THREAD_LIBS_INIT})
|
||||
--
|
||||
2.24.0
|
||||
|
||||
62
meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
Normal file
62
meta-openembedded/meta-oe/recipes-extended/upm/upm_git.bb
Normal file
@@ -0,0 +1,62 @@
|
||||
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 = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d"
|
||||
PV = "2.0.0+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \
|
||||
file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \
|
||||
file://0001-Use-stdint-types.patch \
|
||||
file://0001-initialize-local-variables-before-use.patch \
|
||||
file://0001-cmake-Disable-Wno-misleading-indentation-with-clang-.patch \
|
||||
file://0001-cmake-Disable-using-Wno-maybe-uninitialized.patch \
|
||||
file://0001-include-missing-cstdint.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:toolchain-clang:x86 = " file://0001-nmea_gps-Link-with-latomic.patch "
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# Depends on mraa which only supports x86 and ARM for now
|
||||
COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
|
||||
|
||||
inherit setuptools3-base cmake pkgconfig
|
||||
|
||||
EXTRA_OECMAKE += "-UPYTHON_EXECUTABLE -DWERROR=off"
|
||||
|
||||
# override this in local.conf to get needed bindings.
|
||||
# BINDINGS:pn-upm="python"
|
||||
# will result in only the python bindings being built/packaged.
|
||||
# Note: 'nodejs' is disabled by default because the bindings
|
||||
# generation currently fails with nodejs (>v7.x).
|
||||
BINDINGS ??= "python"
|
||||
|
||||
# nodejs isn't available for armv4/armv5 architectures
|
||||
BINDINGS:armv4 ??= "python"
|
||||
BINDINGS:armv5 ??= "python"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGES', 'node-${PN}', 'nodejs', '', d)} \
|
||||
${@bb.utils.contains('PACKAGES', '${PYTHON_PN}-${PN}', 'python', '', d)}"
|
||||
|
||||
PACKAGECONFIG[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},"
|
||||
PACKAGECONFIG[nodejs] = "-DBUILDSWIGNODE=ON, -DBUILDSWIGNODE=OFF, swig-native nodejs-native,"
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i s:\"lib/${_packages_path}:\"${baselib}/${_packages_path}:g ${S}/cmake/modules/OpenCVDetectPython.cmake
|
||||
}
|
||||
|
||||
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)}"
|
||||
Reference in New Issue
Block a user