public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nicolas Chauvet <kwizart@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Update with_cuda options
Date: Fri, 28 Aug 2026 13:31:53 GMT	[thread overview]
Message-ID: <178792391320.1.17861985998480502657.rpms-opencv-e2830d3e0003@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/opencv
            Branch : opencv5
            Commit : e2830d3e000395d50b82c91d840e5fb5c91e2fa5
            Author : Nicolas Chauvet <kwizart@gmail.com>
            Date   : 2021-03-12T17:31:17+01:00
            Stats  : +15/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/opencv/c/e2830d3e000395d50b82c91d840e5fb5c91e2fa5?branch=opencv5

            Log:
            Update with_cuda options

Initial patch from "Eric Sandeen <esandeen@redhat.com>"
See rhbz#1938054

---
diff --git a/opencv.spec b/opencv.spec
index 942ba86..259efe1 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -40,6 +40,12 @@
 
 %global srcname opencv
 
+# If _cuda_version is unset
+%if 0%{!?_cuda_version:1} && 0%{?with_cuda:1}
+%global _cuda_version 11.2
+%global _cuda_rpm_version 11-2
+%global _cuda_prefix /usr/local/cuda-%{_cuda_version}
+%endif
 
 Name:           opencv
 Version:        4.5.1
@@ -71,9 +77,10 @@ BuildRequires:  libtool
 BuildRequires:  cmake >= 2.6.3
 BuildRequires:  chrpath
 %{?with_cuda:
-BuildRequires:  pkgconfig(cublas-%{?_cuda_rpm_version})
-BuildRequires:  pkgconfig(cufft-%{?_cuda_rpm_version})
-BuildRequires:  pkgconfig(nppc-%{?_cuda_rpm_version})
+BuildRequires:  cuda-minimal-build-%{?_cuda_rpm_version}
+BuildRequires:  pkgconfig(cublas-%{?_cuda_version})
+BuildRequires:  pkgconfig(cufft-%{?_cuda_version})
+BuildRequires:  pkgconfig(nppc-%{?_cuda_version})
 }
 %{?with_eigen2:BuildRequires:  eigen2-devel}
 %{?with_eigen3:BuildRequires:  eigen3-devel}
@@ -293,6 +300,7 @@ install -pm 0644 %{SOURCE4} .cache/ade/
  -DCUDA_TOOLKIT_ROOT_DIR=%{?_cuda_prefix} \
  -DCUDA_VERBOSE_BUILD=ON \
  -DCUDA_PROPAGATE_HOST_FLAGS=OFF \
+ -DCUDA_NVCC_FLAGS="-Xcompiler -fPIC" \
  } \
  %{?with_openni: -DWITH_OPENNI=ON } \
  %{!?with_xine: -DWITH_XINE=OFF } \
@@ -424,6 +432,10 @@ ln -s -r %{buildroot}%{_jnidir}/opencv-%{javaver}.jar %{buildroot}%{_jnidir}/ope
 %{_libdir}/libopencv_bgsegm.so.%{abiver}*
 %{_libdir}/libopencv_bioinspired.so.%{abiver}*
 %{_libdir}/libopencv_ccalib.so.%{abiver}*
+%{?with_cuda:
+%{_libdir}/libopencv_cuda*.so.%{abiver}*
+%{_libdir}/libopencv_cudev.so.%{abiver}*
+}
 %{_libdir}/libopencv_cvv.so.%{abiver}*
 %{_libdir}/libopencv_datasets.so.%{abiver}*
 %{_libdir}/libopencv_dnn_objdetect.so.%{abiver}*

                 reply	other threads:[~2026-08-28 13:31 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=178792391320.1.17861985998480502657.rpms-opencv-e2830d3e0003@fedoraproject.org \
    --to=kwizart@gmail.com \
    --cc=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