public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Add upstream patch to fix build on PPC64LE
Date: Fri, 28 Aug 2026 13:32:55 GMT	[thread overview]
Message-ID: <178792397577.1.9570808544303710605.rpms-opencv-3219158b4748@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/opencv
            Branch : opencv5
            Commit : 3219158b47483cdbd1fdd82aff03380f67fc882b
            Author : Sérgio M. Basto <sergio@serjux.com>
            Date   : 2025-02-03T00:45:54+00:00
            Stats  : +57/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/opencv/c/3219158b47483cdbd1fdd82aff03380f67fc882b?branch=opencv5

            Log:
            Add upstream patch to fix build on PPC64LE

https://github.com/opencv/opencv/pull/26750
core: fixed VSX intrinsics implementation

---
diff --git a/26750.patch b/26750.patch
new file mode 100644
index 0000000..4a2fdc0
--- /dev/null
+++ b/26750.patch
@@ -0,0 +1,54 @@
+From 97f3f390661f2fd1168336820b89eb4383ce8528 Mon Sep 17 00:00:00 2001
+From: Maksim Shabunin <maksim.shabunin@gmail.com>
+Date: Fri, 10 Jan 2025 18:34:11 +0300
+Subject: [PATCH] core: fixed VSX intrinsics implementation
+
+---
+ modules/core/include/opencv2/core/hal/intrin_vsx.hpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp
+index 2157e1e87063..0a0915a22fc4 100644
+--- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp
++++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp
+@@ -262,7 +262,7 @@ OPENCV_HAL_IMPL_VSX_EXTRACT_N(v_float64x2, double)
+ inline _Tpvec v_setzero_##suffix() { return _Tpvec(vec_splats((_Tp)0)); }             \
+ inline _Tpvec v_setall_##suffix(_Tp v) { return _Tpvec(vec_splats((_Tp)v));}          \
+ template <> inline _Tpvec v_setzero_() { return v_setzero_##suffix(); }               \
+-template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(_Tp v); }       \
++template <> inline _Tpvec v_setall_(_Tp v) { return v_setall_##suffix(v); }       \
+ template<typename _Tpvec0> inline _Tpvec v_reinterpret_as_##suffix(const _Tpvec0 &a)  \
+ { return _Tpvec((cast)a.val); }
+ 
+@@ -650,11 +650,11 @@ OPENCV_HAL_IMPL_VSX_SELECT(v_float64x2, vec_bdword2_c)
+ #define OPENCV_HAL_IMPL_VSX_INT_CMP_OP(_Tpvec)                 \
+ inline _Tpvec v_eq(const _Tpvec& a, const _Tpvec& b)           \
+ { return _Tpvec(vec_cmpeq(a.val, b.val)); }                    \
+-inline _Tpvec V_ne(const _Tpvec& a, const _Tpvec& b)           \
++inline _Tpvec v_ne(const _Tpvec& a, const _Tpvec& b)           \
+ { return _Tpvec(vec_cmpne(a.val, b.val)); }                    \
+ inline _Tpvec v_lt(const _Tpvec& a, const _Tpvec& b)           \
+ { return _Tpvec(vec_cmplt(a.val, b.val)); }                    \
+-inline _Tpvec V_gt(const _Tpvec& a, const _Tpvec& b)           \
++inline _Tpvec v_gt(const _Tpvec& a, const _Tpvec& b)           \
+ { return _Tpvec(vec_cmpgt(a.val, b.val)); }                    \
+ inline _Tpvec v_le(const _Tpvec& a, const _Tpvec& b)           \
+ { return _Tpvec(vec_cmple(a.val, b.val)); }                    \
+@@ -1507,7 +1507,7 @@ inline v_float64x2 v_dotprod_expand(const v_int32x4& a, const v_int32x4& b, cons
+ inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b)
+ { return v_dotprod(a, b); }
+ inline v_int32x4 v_dotprod_fast(const v_int16x8& a, const v_int16x8& b, const v_int32x4& c)
+-{ return v_int32x4(vec_msum(a.val, b.val, vec_int4_z)) + c; }
++{ return v_add(v_int32x4(vec_msum(a.val, b.val, vec_int4_z)), c); }
+ // 32 >> 64
+ inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b)
+ { return v_dotprod(a, b); }
+@@ -1518,7 +1518,7 @@ inline v_int64x2 v_dotprod_fast(const v_int32x4& a, const v_int32x4& b, const v_
+ inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b)
+ { return v_dotprod_expand(a, b); }
+ inline v_uint32x4 v_dotprod_expand_fast(const v_uint8x16& a, const v_uint8x16& b, const v_uint32x4& c)
+-{ return v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)) + c; }
++{ return v_add(v_uint32x4(vec_msum(a.val, b.val, vec_uint4_z)), c); }
+ 
+ inline v_int32x4 v_dotprod_expand_fast(const v_int8x16& a, const v_int8x16& b)
+ {

diff --git a/opencv.spec b/opencv.spec
index b750630..02af591 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -104,6 +104,7 @@ Source6:        https://github.com/WeChatCV/opencv_3rdparty/archive/%{wechat_com
 
 Patch0:         opencv-4.1.0-install_3rdparty_licenses.patch
 Patch3:         opencv.python.patch
+Patch4:         https://github.com/opencv/opencv/pull/26750.patch
 Patch5:         https://github.com/opencv/opencv/pull/26786.patch
 
 BuildRequires:  gcc-c++
@@ -404,6 +405,7 @@ popd &>/dev/null
 
 %patch -P 0 -p1 -b .install_3rdparty_licenses
 %patch -P 3 -p1 -b .python_install_binary
+%patch -P 4 -p1 -b .VSX_intrinsics
 %patch -P 5 -p1 -b .GCC15
 
 pushd %{name}_contrib-%{version}
@@ -584,6 +586,7 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
 * Mon Feb 03 2025 Sérgio Basto <sergio@serjux.com> 4.11.0-1
 - Update to version 4.11.0
 - Resolves: rhbz#2336422
+- Add upstream patch to fix build on PPC64LE
 
 * Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.0-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

                 reply	other threads:[~2026-08-28 13:32 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=178792397577.1.9570808544303710605.rpms-opencv-3219158b4748@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