diff --git a/.gitignore b/.gitignore index eb11a9d..505eff8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/v1.7.0.tar.gz +/v*.tar.gz diff --git a/0001-Use-IdleNotificationDeadline-as-deprecated-IdleNotif.patch b/0001-Use-IdleNotificationDeadline-as-deprecated-IdleNotif.patch deleted file mode 100644 index d91fbcd..0000000 --- a/0001-Use-IdleNotificationDeadline-as-deprecated-IdleNotif.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 11d1bf11b5d5e4d85dc99e9a9ad76a7d94954a6f Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 9 Sep 2018 18:24:06 +0100 -Subject: [PATCH] Use IdleNotificationDeadline as deprecated IdleNotification - has been removed - -In v8 API 6.5 the long deprecated IdleNotification has been removed so we -need to use IdleNotificationDeadline as nodejs 10.x uses newer v8. - -Signed-off-by: Peter Robinson ---- - src/common_top.i | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/common_top.i b/src/common_top.i -index c9edb585..ae2b904e 100644 ---- a/src/common_top.i -+++ b/src/common_top.i -@@ -28,9 +28,9 @@ void cleanUp() - * See https://codereview.chromium.org/412163003 for this API change - */ - #if (SWIG_V8_VERSION < 0x032838) -- while (!v8::V8::IdleNotification()) -+ while (!v8::V8::IdleNotificationDeadline()) - #else -- while (!v8::Isolate::GetCurrent()->IdleNotification(1000)) -+ while (!v8::Isolate::GetCurrent()->IdleNotificationDeadline(1000)) - #endif - {;} - } --- -2.19.0.rc1 - diff --git a/0001-initise-all-uint8_t-variables-to-0.patch b/0001-initise-all-uint8_t-variables-to-0.patch deleted file mode 100644 index 9c7a166..0000000 --- a/0001-initise-all-uint8_t-variables-to-0.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 0f843a1533c1088a4290b23f8f7dd9b0957dcf12 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sun, 9 Sep 2018 19:18:18 +0100 -Subject: [PATCH] initise all uint8_t variables to 0 - -Signed-off-by: Peter Robinson ---- - src/kxtj3/kxtj3.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/kxtj3/kxtj3.c b/src/kxtj3/kxtj3.c -index 54a3a8f4..a6f3c4f8 100755 ---- a/src/kxtj3/kxtj3.c -+++ b/src/kxtj3/kxtj3.c -@@ -304,7 +304,7 @@ static upm_result_t kxtj3_write_register(const kxtj3_context dev, uint8_t reg, u - - static upm_result_t kxtj3_set_bit_on(const kxtj3_context dev, uint8_t reg, uint8_t bit_mask) - { -- uint8_t reg_value; -+ uint8_t reg_value = 0; - if (kxtj3_read_register(dev, reg, ®_value) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -314,7 +314,7 @@ static upm_result_t kxtj3_set_bit_on(const kxtj3_context dev, uint8_t reg, uint8 - - static upm_result_t kxtj3_set_bit_off(const kxtj3_context dev, uint8_t reg, uint8_t bit_mask) - { -- uint8_t reg_value; -+ uint8_t reg_value = 0; - if (kxtj3_read_register(dev, reg, ®_value) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -324,7 +324,7 @@ static upm_result_t kxtj3_set_bit_off(const kxtj3_context dev, uint8_t reg, uint - - static upm_result_t kxtj3_set_bits_with_mask(const kxtj3_context dev, uint8_t reg, uint8_t val, uint8_t bit_mask) - { -- uint8_t reg_val; -+ uint8_t reg_val = 0; - if (kxtj3_read_register(dev, reg, ®_val) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -600,7 +600,7 @@ upm_result_t kxtj3_set_odr_wakeup_function(const kxtj3_context dev, KXTJ3_ODR_WA - - static bool kxtj3_check_digital_communication_reg_value(kxtj3_context dev, uint8_t expected_val) - { -- uint8_t dcst_reg; -+ uint8_t dcst_reg = 0; - if (kxtj3_read_register(dev, KXTJ3_DCST_RESP, &dcst_reg) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -1017,7 +1017,7 @@ upm_result_t kxtj3_set_wakeup_motion_time(kxtj3_context dev, float desired_time) - upm_result_t kxtj3_get_wakeup_motion_time(kxtj3_context dev, float *out_time) - { - assert(dev != NULL); -- uint8_t motion_count; -+ uint8_t motion_count = 0; - if (kxtj3_read_register(dev, KXTJ3_WAKEUP_COUNTER, &motion_count) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -1044,7 +1044,7 @@ upm_result_t kxtj3_set_wakeup_non_activity_time(kxtj3_context dev, float desired - upm_result_t kxtj3_get_wakeup_non_activity_time(kxtj3_context dev, float *out_time) - { - assert(dev != NULL); -- uint8_t non_activity_reg_count; -+ uint8_t non_activity_reg_count = 0; - if (kxtj3_read_register(dev, KXTJ3_NA_COUNTER, &non_activity_reg_count) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - -@@ -1082,7 +1082,7 @@ upm_result_t kxtj3_set_wakeup_threshold_g_value(kxtj3_context dev, float g_thres - upm_result_t kxtj3_get_wakeup_threshold(kxtj3_context dev, float *out_threshold) - { - assert(dev != NULL); -- uint8_t reg_value_h, reg_value_l; -+ uint8_t reg_value_h = 0, reg_value_l = 0; - if (kxtj3_read_register(dev, KXTJ3_WAKEUP_THRESHOLD_H, ®_value_h) != UPM_SUCCESS) - return UPM_ERROR_OPERATION_FAILED; - --- -2.19.0.rc1 - diff --git a/sources b/sources index 883a97f..b163246 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.7.0.tar.gz) = d882582bc051d504728ddbf8253a0c1528a411fbb01db2e25ac124108018bb7fa7fb7c98e4c1358e407b58e20006fd30b7af019eea552d1b7e60562690134f60 +SHA512 (v1.7.1.tar.gz) = 39192d455bbfca49c0d0fa80c9f9f800e9708520080bd026bf12cfc7088a5cdaf734de055d547bb58efebbc7cbe001e938384192c433406661396d8b9989092d diff --git a/upm-1.7-fix-leds.patch b/upm-1.7-fix-leds.patch deleted file mode 100644 index c3ee6dd..0000000 --- a/upm-1.7-fix-leds.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 17fe4ae6741228feb5f522eca6d4ea5ad0a8308f Mon Sep 17 00:00:00 2001 -From: Manivannan Sadhasivam -Date: Mon, 17 Sep 2018 23:12:45 +0530 -Subject: [PATCH] led: Update LED init API - -mraa_led_init API expects led number. So, replace it with -mraa_led_init_raw for initializing an LED based on label. - -Signed-off-by: Manivannan Sadhasivam ---- - src/led/led.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/led/led.c b/src/led/led.c -index 2f39e9f07..d593141b5 100644 ---- a/src/led/led.c -+++ b/src/led/led.c -@@ -76,7 +76,7 @@ led_context led_init_str(const char* name){ - dev->gpio = NULL; - - dev->name = name; -- dev->gpioled = mraa_led_init(name); -+ dev->gpioled = mraa_led_init_raw(name); - - if (!dev->gpioled) { - printf("%s: Unable to initialize gpioled device (%s).\n", __FUNCTION__, dev->name); - diff --git a/upm.spec b/upm.spec index c01e37f..3570530 100644 --- a/upm.spec +++ b/upm.spec @@ -1,18 +1,12 @@ Name: upm -Version: 1.7.0 -Release: 2%{?dist} +Version: 1.7.1 +Release: 1%{?dist} Summary: A high level library for sensors and actuators License: MIT URL: http://iotdk.intel.com/docs/master/upm/index.html Source0: https://github.com/intel-iot-devkit/upm/archive/v%{version}.tar.gz -# https://github.com/intel-iot-devkit/upm/pull/666 -Patch1: 0001-Use-IdleNotificationDeadline-as-deprecated-IdleNotif.patch -# https://github.com/intel-iot-devkit/upm/pull/667 -Patch2: 0001-initise-all-uint8_t-variables-to-0.patch -Patch3: upm-1.7-fix-leds.patch - # To quote "Only x86, arm and mock platforms currently supported" ExcludeArch: %{power64} s390x @@ -33,6 +27,8 @@ underlying hardware platform through calls to MRAA APIs. %package devel Summary: Development package for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: libjpeg-turbo-devel +Requires: mraa-devel %description devel Files for development with %{name}. @@ -68,19 +64,17 @@ else %cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_SKIP_RPATH=ON -DUSE_LIB64:BOOL=OFF -DVERSION:STRING=%{version} . fi -make %{?_smp_mflags} V=1 +%make_build %install -make install DESTDIR=%{buildroot} INSTALL='install -p' +%make_install rm -f %{buildroot}/%{_includedir}/upm/upm_utilities.hpp # Symlink nodejs dependencies %nodejs_symlink_deps -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license LICENSE @@ -100,6 +94,10 @@ rm -f %{buildroot}/%{_includedir}/upm/upm_utilities.hpp %{nodejs_sitelib}/jsupm_*/ %changelog +* Sun Oct 14 2018 Peter Robinson 1.7.1-1 +- New upstream 1.7.1 release +- Minor cleanups + * Mon Sep 10 2018 Peter Robinson 1.7.0-2 - Add nodejs-mraa dep for nodejs-upm sub package