Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/opencv Fix build on Illumos.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/877b9600a424
branches:  trunk
changeset: 436742:877b9600a424
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Aug 08 22:40:59 2020 +0000

description:
Fix build on Illumos.

diffstat:

 graphics/opencv/distinfo                                     |   3 +-
 graphics/opencv/patches/patch-modules_imgproc_src_resize.cpp |  24 ++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)

diffs (44 lines):

diff -r 965900eaa2e1 -r 877b9600a424 graphics/opencv/distinfo
--- a/graphics/opencv/distinfo  Sat Aug 08 22:18:27 2020 +0000
+++ b/graphics/opencv/distinfo  Sat Aug 08 22:40:59 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2020/04/18 22:01:33 joerg Exp $
+$NetBSD: distinfo,v 1.47 2020/08/08 22:40:59 joerg Exp $
 
 SHA1 (opencv-3.4.9.tar.gz) = bcd0fafc9f1a240d92af9007c9f8098da601d7a5
 RMD160 (opencv-3.4.9.tar.gz) = 2ab36f669a70c876e739736e6b9daacabc5933fe
@@ -20,5 +20,6 @@
 SHA1 (patch-modules_dnn_src_torch_torch__importer.cpp) = 814a3cc929569b691d01e34252dbd185f31161c2
 SHA1 (patch-modules_dnn_test__precomp.hpp) = 9bf15d32394f36b92e5fc5d57fd576b3860233ae
 SHA1 (patch-modules_flann_include_opencv2_flann_defines.h) = ab848e67c4e03219670598ac2d21071a617a5c33
+SHA1 (patch-modules_imgproc_src_resize.cpp) = e842d5960c4c00162a34f46cb45cf69d0e9f21ce
 SHA1 (patch-modules_ts_src_ts.cpp) = b9a3992014b02dbd89d46375a2476385e91dc24c
 SHA1 (patch-modules_videoio_src_cap__v4l.cpp) = 8e935a6d8128aaf536a9a431dc8b8a7ea58ae43d
diff -r 965900eaa2e1 -r 877b9600a424 graphics/opencv/patches/patch-modules_imgproc_src_resize.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/opencv/patches/patch-modules_imgproc_src_resize.cpp      Sat Aug 08 22:40:59 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-modules_imgproc_src_resize.cpp,v 1.1 2020/08/08 22:40:59 joerg Exp $
+
+On Illumos int8_t != ET, so be explicit about the cast to be used here.
+
+--- modules/imgproc/src/resize.cpp.orig        2020-08-08 22:04:15.259991576 +0000
++++ modules/imgproc/src/resize.cpp
+@@ -652,7 +652,7 @@ template <typename ET, typename FT>
+ void vlineSet(FT* src, ET* dst, int dst_width)
+ {
+     for (int i = 0; i < dst_width; i++)
+-        dst[i] = src[i];
++        dst[i] = int8_t(src[i]);
+ }
+ template <>
+ void vlineSet<uint8_t, ufixedpoint16>(ufixedpoint16* src, uint8_t* dst, int dst_width)
+@@ -684,7 +684,7 @@ void vlineResize(FT* src, size_t src_ste
+         typename FT::WT res = src[i] * m[0];
+         for (int k = 1; k < n; k++)
+             res = res + src[i + k*src_step] * m[k];
+-        dst[i] = res;
++        dst[i] = int8_t(res);
+     }
+ }
+ template <>



Home | Main Index | Thread Index | Old Index