public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: add Fix-FTBFS-with-GCC-6-1307821.patch
Date: Fri, 28 Aug 2026 13:30:32 GMT [thread overview]
Message-ID: <178792383260.1.11581077193578963984.rpms-opencv-8ce3dc6e2727@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/opencv
Branch : opencv5
Commit : 8ce3dc6e272762c761e02b9bfcbae44a07f66204
Author : Sérgio M. Basto <sergio@serjux.com>
Date : 2016-03-02T02:41:35+00:00
Stats : +128/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/opencv/c/8ce3dc6e272762c761e02b9bfcbae44a07f66204?branch=opencv5
Log:
add Fix-FTBFS-with-GCC-6-1307821.patch
---
diff --git a/Fix-FTBFS-with-GCC-6-1307821.patch b/Fix-FTBFS-with-GCC-6-1307821.patch
new file mode 100644
index 0000000..a2f6b36
--- /dev/null
+++ b/Fix-FTBFS-with-GCC-6-1307821.patch
@@ -0,0 +1,128 @@
+From 3a4653aeecd7804ba0064c7877e41cbeb55abb54 Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Tue, 1 Mar 2016 00:33:53 -0600
+Subject: [PATCH] Fix FTBFS with GCC 6 (#1307821)
+
+---
+ opencv-2.4.12.3-gcc6.patch | 68 ++++++++++++++++++++++++++++++++++++++++++++++
+ opencv.spec | 9 +++++-
+ 2 files changed, 76 insertions(+), 1 deletion(-)
+ create mode 100644 opencv-2.4.12.3-gcc6.patch
+
+diff --git a/opencv-2.4.12.3-gcc6.patch b/opencv-2.4.12.3-gcc6.patch
+new file mode 100644
+index 0000000..71f7b5b
+--- /dev/null
++++ b/opencv-2.4.12.3-gcc6.patch
+@@ -0,0 +1,68 @@
++diff --git a/modules/contrib/src/chamfermatching.cpp b/modules/contrib/src/chamfermatching.cpp
++--- a/modules/contrib/src/chamfermatching.cpp
+++++ b/modules/contrib/src/chamfermatching.cpp
++@@ -966,10 +966,8 @@ void ChamferMatcher::Matching::computeDistanceTransform(Mat& edges_img, Mat& dis
++ 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;
++- }
+++ 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::computeDistanceTransform(Mat& edges_img, Mat& dis
++ 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];
++- }
+++ 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];
++ }
++ }
++ }
++@@ -1107,26 +1103,22 @@ ChamferMatcher::Match* ChamferMatcher::Matching::localChamferDistance(Point offs
++
++ float cost = (sum_distance/truncate_)/addr.size();
++
+++ float* optr = orientation_img.ptr<float>(y)+x;
+++ float sum_orientation = 0;
+++ int cnt_orientation = 0;
++
++- if (&orientation_img!=NULL) {
++- float* optr = orientation_img.ptr<float>(y)+x;
++- float sum_orientation = 0;
++- int cnt_orientation = 0;
+++ for (size_t i=0;i<addr.size();++i) {
++
++- for (size_t i=0;i<addr.size();++i) {
++-
++- if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
++- if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
++- sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
++- cnt_orientation++;
++- }
+++ if(addr[i] < (orientation_img.cols*orientation_img.rows) - (offset.y*orientation_img.cols + offset.x)){
+++ if (tpl->orientations[i]>=-CV_PI && (*(optr+addr[i]))>=-CV_PI) {
+++ sum_orientation += orientation_diff(tpl->orientations[i], (*(optr+addr[i])));
+++ cnt_orientation++;
++ }
++ }
+++ }
++
++- if (cnt_orientation>0) {
++- cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
++- }
++-
+++ if (cnt_orientation>0) {
+++ cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
++ }
++
++ if(cost > 0){
++
+diff --git a/opencv.spec b/opencv.spec
+index 8749958..9853d30 100644
+--- a/opencv.spec
++++ b/opencv.spec
+@@ -12,7 +12,7 @@
+
+ Name: opencv
+ Version: 2.4.12.3
+-Release: 2%{?dist}
++Release: 3%{?dist}
+ Summary: Collection of algorithms for computer vision
+ Group: Development/Libraries
+ # This is normal three clause BSD.
+@@ -37,6 +37,9 @@ Patch4: opencv-2.4.7-cmake_paths.patch
+ # Fix macro usage of "list_filterout"
+ # https://github.com/pld-linux/opencv/commit/dadee4672641272b129410bc097f5c199bb4fb43
+ Patch5: opencv-2.4.11-listfilterout.patch
++# fix build with gcc6
++# https://github.com/Itseez/opencv/commit/eebd4cad665f4f1270ca58bb13e9708e130f9b30
++Patch6: opencv-2.4.12.3-gcc6.patch
+
+ BuildRequires: libtool
+ BuildRequires: cmake >= 2.6.3
+@@ -137,6 +140,7 @@ This package contains Python bindings for the OpenCV library.
+ %patch3 -p1 -b .ts_static
+ %patch4 -p1 -b .cmake_paths
+ %patch5 -p1 -b .listfilterout
++%patch6 -p1 -b .gcc6
+
+ # fix dos end of lines
+ sed -i 's|\r||g' samples/c/adaptiveskindetector.cpp
+@@ -272,6 +276,9 @@ popd
+ %{python2_sitearch}/cv2.so
+
+ %changelog
++* Tue Mar 01 2016 Yaakov Selkowitz <yselkowi@redhat.com> - 2.4.12.3-3
++- Fix FTBFS with GCC 6 (#1307821)
++
+ * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.12.3-2
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+--
+2.5.0
\ No newline at end of file
reply other threads:[~2026-08-28 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178792383260.1.11581077193578963984.rpms-opencv-8ce3dc6e2727@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox