pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/opencv2 opencv2: fix build on NetBSD-8.99.12 ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/48b9e844b7de
branches: trunk
changeset: 375600:48b9e844b7de
user: wiz <wiz%pkgsrc.org@localhost>
date: Fri Feb 16 17:13:58 2018 +0000
description:
opencv2: fix build on NetBSD-8.99.12 with gcc6.
Some advice from https://github.com/opencv/opencv/issues/6517
Bump PKGREVISION.
diffstat:
graphics/opencv2/Makefile | 6 +-
graphics/opencv2/distinfo | 3 +-
graphics/opencv2/patches/patch-modules_contrib_src_chamfermatching.cpp | 44 ++++++++++
3 files changed, 49 insertions(+), 4 deletions(-)
diffs (85 lines):
diff -r c27dfc9224f6 -r 48b9e844b7de graphics/opencv2/Makefile
--- a/graphics/opencv2/Makefile Fri Feb 16 14:43:49 2018 +0000
+++ b/graphics/opencv2/Makefile Fri Feb 16 17:13:58 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2017/11/15 22:16:47 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2018/02/16 17:13:58 wiz Exp $
DISTNAME= opencv-2.4.11
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= graphics devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opencvlibrary/}
EXTRACT_SUFX= .zip
@@ -36,7 +36,7 @@
.include "options.mk"
CMAKE_ARGS+= -DZLIB_ROOT=${BUILDLINK_PREFIX.zlib}
-CMAKE_ARGS.SunOS+= -DENABLE_PRECOMPILED_HEADERS=NO
+CMAKE_ARGS+= -DENABLE_PRECOMPILED_HEADERS=NO
PLIST_VARS+= opencl
diff -r c27dfc9224f6 -r 48b9e844b7de graphics/opencv2/distinfo
--- a/graphics/opencv2/distinfo Fri Feb 16 14:43:49 2018 +0000
+++ b/graphics/opencv2/distinfo Fri Feb 16 17:13:58 2018 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 21:34:11 agc Exp $
+$NetBSD: distinfo,v 1.3 2018/02/16 17:13:58 wiz Exp $
SHA1 (opencv-2.4.11.zip) = d6e3048416d42213c204f89b9dfe39742f9a708c
RMD160 (opencv-2.4.11.zip) = 793391b05b571859005b98612cb176c02352a94f
SHA512 (opencv-2.4.11.zip) = 748f6b939200a7ad2c2ae2531bf9bf38b82a576530f10691c13a0ad52568a7eb8b9d312e946ba8e78f592ef05ae389ecb982544f0c00cb83a2d87ae4b4da61b0
Size (opencv-2.4.11.zip) = 91671436 bytes
+SHA1 (patch-modules_contrib_src_chamfermatching.cpp) = 65a2c72934a840ac05f8ca06dfad92bc75b81ea9
SHA1 (patch-modules_contrib_src_inputoutput.cpp) = 57255cda71854e490d83602828299f0ab6420887
SHA1 (patch-modules_contrib_src_spinimages.cpp) = b3e465700059616be991d597230bc8dc42f15be1
SHA1 (patch-modules_core_include_opencv2_core_types_c.h) = c056068c01c417dc262f21c00324da7f86c0cd8e
diff -r c27dfc9224f6 -r 48b9e844b7de graphics/opencv2/patches/patch-modules_contrib_src_chamfermatching.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/opencv2/patches/patch-modules_contrib_src_chamfermatching.cpp Fri Feb 16 17:13:58 2018 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-modules_contrib_src_chamfermatching.cpp,v 1.1 2018/02/16 17:13:58 wiz Exp $
+
+Address of variable is never NULL; some compilers error out about this.
+
+--- modules/contrib/src/chamfermatching.cpp.orig 2015-02-25 12:10:31.000000000 +0000
++++ modules/contrib/src/chamfermatching.cpp
+@@ -966,10 +966,8 @@ void ChamferMatcher::Matching::computeDi
+ for (int y=0;y<h;++y) {
+ for (int x=0;x<w;++x) {
+ // initialize
+- if (&annotate_img!=NULL) {
+ annotate_img.at<Vec2i>(y,x)[0]=x;
+ annotate_img.at<Vec2i>(y,x)[1]=y;
+- }
+
+ uchar edge_val = edges_img.at<uchar>(y,x);
+ if( (edge_val!=0) ) {
+@@ -1013,10 +1011,8 @@ void ChamferMatcher::Matching::computeDi
+ dist_img.at<float>(ny,nx) = dist;
+ q.push(std::make_pair(nx,ny));
+
+- if (&annotate_img!=NULL) {
+ annotate_img.at<Vec2i>(ny,nx)[0]=annotate_img.at<Vec2i>(y,x)[0];
+ annotate_img.at<Vec2i>(ny,nx)[1]=annotate_img.at<Vec2i>(y,x)[1];
+- }
+ }
+ }
+ }
+@@ -1108,7 +1104,6 @@ ChamferMatcher::Match* ChamferMatcher::M
+ float cost = (sum_distance/truncate_)/addr.size();
+
+
+- if (&orientation_img!=NULL) {
+ float* optr = orientation_img.ptr<float>(y)+x;
+ float sum_orientation = 0;
+ int cnt_orientation = 0;
+@@ -1127,7 +1122,6 @@ ChamferMatcher::Match* ChamferMatcher::M
+ cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
+ }
+
+- }
+
+ if(cost > 0){
+ ChamferMatcher::Match* istance = new ChamferMatcher::Match();
Home |
Main Index |
Thread Index |
Old Index