public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/, media-libs/opencv/files/
Date: Mon, 14 Apr 2025 18:01:13 +0000 (UTC)	[thread overview]
Message-ID: <1744653633.de005c58db7f4b0cfff3f5c0df46e69b8eec3ac1.asturm@gentoo> (raw)

commit:     de005c58db7f4b0cfff3f5c0df46e69b8eec3ac1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 13 19:25:57 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Apr 14 18:00:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de005c58

media-libs/opencv: Fix build w/ >=cmake-4

Closes: https://bugs.gentoo.org/951724
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/opencv/files/opencv-4.10.0-cmake4.patch | 165 +++++++++++++++++++++
 media-libs/opencv/opencv-4.10.0.ebuild             |   1 +
 2 files changed, 166 insertions(+)

diff --git a/media-libs/opencv/files/opencv-4.10.0-cmake4.patch b/media-libs/opencv/files/opencv-4.10.0-cmake4.patch
new file mode 100644
index 000000000000..6078f1beba70
--- /dev/null
+++ b/media-libs/opencv/files/opencv-4.10.0-cmake4.patch
@@ -0,0 +1,165 @@
+https://github.com/opencv/opencv/pull/27192
+
+From cb8030809e0278d02fa335cc1f5ec7c3c17548e0 Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Wed, 2 Apr 2025 13:45:08 -0700
+Subject: [PATCH] Fix configuring with CMake version 4
+
+fixes #27122
+---
+ CMakeLists.txt                                                  | 2 +-
+ cmake/OpenCVGenPkgconfig.cmake                                  | 2 +-
+ .../introduction/linux_gcc_cmake/linux_gcc_cmake.markdown       | 2 +-
+ modules/python/CMakeLists.txt                                   | 2 +-
+ platforms/android/build-tests/test_cmake_build.py               | 2 +-
+ samples/CMakeLists.example.in                                   | 2 +-
+ samples/CMakeLists.txt                                          | 2 +-
+ samples/cpp/example_cmake/CMakeLists.txt                        | 2 +-
+ samples/cpp/tutorial_code/gpu/gpu-thrust-interop/CMakeLists.txt | 2 +-
+ samples/hal/c_hal/CMakeLists.txt                                | 2 +-
+ samples/hal/slow_hal/CMakeLists.txt                             | 2 +-
+ samples/openvx/CMakeLists.txt                                   | 2 +-
+ 12 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7985623ffb53..ca402b65c9b1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,7 +16,7 @@ endif()
+ include(cmake/OpenCVMinDepVersions.cmake)
+ 
+ if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
+-  cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
++  cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+   #Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
+   #CMake fails to find _fseeko() which leads to subsequent linker error.
+   #See details here: http://www.cmake.org/Wiki/CMake/Policies
+diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
+index 4fc80f5e4b27..3532260efb53 100644
+--- a/cmake/OpenCVGenPkgconfig.cmake
++++ b/cmake/OpenCVGenPkgconfig.cmake
+@@ -110,7 +110,7 @@ endif()
+ # =============================================================================
+ else() # DEFINED CMAKE_HELPER_SCRIPT
+ 
+-cmake_minimum_required(VERSION 2.8.12.2)
++cmake_minimum_required(VERSION 3.5)
+ cmake_policy(SET CMP0012 NEW)
+ include("${CMAKE_HELPER_SCRIPT}")
+ include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")
+diff --git a/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.markdown b/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.markdown
+index 7cfbb31777d3..75bdc2ef42d0 100644
+--- a/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.markdown
++++ b/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.markdown
+@@ -63,7 +63,7 @@ int main(int argc, char** argv )
+ 
+ Now you have to create your CMakeLists.txt file. It should look like this:
+ @code{.cmake}
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 3.5)
+ project( DisplayImage )
+ find_package( OpenCV REQUIRED )
+ include_directories( ${OpenCV_INCLUDE_DIRS} )
+diff --git a/modules/python/CMakeLists.txt b/modules/python/CMakeLists.txt
+index 93eab8c94d21..ec30f4215012 100644
+--- a/modules/python/CMakeLists.txt
++++ b/modules/python/CMakeLists.txt
+@@ -35,7 +35,7 @@ add_subdirectory(python3)
+ 
+ else()  # standalone build
+ 
+-cmake_minimum_required(VERSION 2.8.12.2)
++cmake_minimum_required(VERSION 3.5)
+ project(OpenCVPython CXX C)
+ include("./standalone.cmake")
+ 
+diff --git a/platforms/android/build-tests/test_cmake_build.py b/platforms/android/build-tests/test_cmake_build.py
+index 25d185b8e5c6..51affd1f3b4b 100644
+--- a/platforms/android/build-tests/test_cmake_build.py
++++ b/platforms/android/build-tests/test_cmake_build.py
+@@ -7,7 +7,7 @@
+ log.basicConfig(format='%(message)s', level=log.DEBUG)
+ 
+ CMAKE_TEMPLATE='''\
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
++CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
+ 
+ # Enable C++11
+ set(CMAKE_CXX_STANDARD 11)
+diff --git a/samples/CMakeLists.example.in b/samples/CMakeLists.example.in
+index 7cf20d5e44b3..59a133bc9d74 100644
+--- a/samples/CMakeLists.example.in
++++ b/samples/CMakeLists.example.in
+@@ -1,5 +1,5 @@
+ # cmake needs this line
+-cmake_minimum_required(VERSION 3.1)
++cmake_minimum_required(VERSION 3.5)
+ 
+ if(NOT DEFINED EXAMPLE_NAME)
+   message(FATAL_ERROR "Invalid build script: missing EXAMPLE_NAME")
+diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
+index 6a18b61afa33..dabe07747f81 100644
+--- a/samples/CMakeLists.txt
++++ b/samples/CMakeLists.txt
+@@ -62,7 +62,7 @@ else()
+ #  Standalone mode
+ #
+ #===================================================================================================
+-cmake_minimum_required(VERSION 3.1)
++cmake_minimum_required(VERSION 3.5)
+ 
+ project(samples C CXX)
+ option(BUILD_EXAMPLES "Build samples" ON)
+diff --git a/samples/cpp/example_cmake/CMakeLists.txt b/samples/cpp/example_cmake/CMakeLists.txt
+index 8d5cd98af291..f17aca4b5432 100644
+--- a/samples/cpp/example_cmake/CMakeLists.txt
++++ b/samples/cpp/example_cmake/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # cmake needs this line
+-cmake_minimum_required(VERSION 3.1)
++cmake_minimum_required(VERSION 3.5)
+ 
+ # Define project name
+ project(opencv_example_project)
+diff --git a/samples/cpp/tutorial_code/gpu/gpu-thrust-interop/CMakeLists.txt b/samples/cpp/tutorial_code/gpu/gpu-thrust-interop/CMakeLists.txt
+index 037d508569b3..1a35085aa2a6 100644
+--- a/samples/cpp/tutorial_code/gpu/gpu-thrust-interop/CMakeLists.txt
++++ b/samples/cpp/tutorial_code/gpu/gpu-thrust-interop/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
++CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
+ 
+ FIND_PACKAGE(CUDA REQUIRED)
+ INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
+diff --git a/samples/hal/c_hal/CMakeLists.txt b/samples/hal/c_hal/CMakeLists.txt
+index 8cf78aa5ff63..72dfef01c3ad 100644
+--- a/samples/hal/c_hal/CMakeLists.txt
++++ b/samples/hal/c_hal/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+ 
+ set(PROJECT_NAME "c_hal")
+ set(HAL_LIB_NAME "c_hal")
+diff --git a/samples/hal/slow_hal/CMakeLists.txt b/samples/hal/slow_hal/CMakeLists.txt
+index 1ffa4670b6ab..a20596ea2a13 100644
+--- a/samples/hal/slow_hal/CMakeLists.txt
++++ b/samples/hal/slow_hal/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+ 
+ set(PROJECT_NAME "slow_hal")
+ set(HAL_LIB_NAME "slow_hal")
+diff --git a/samples/openvx/CMakeLists.txt b/samples/openvx/CMakeLists.txt
+index fd04e6b9e261..c5efdf9ad02a 100644
+--- a/samples/openvx/CMakeLists.txt
++++ b/samples/openvx/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ ocv_install_example_src(cpp *.cpp *.hpp CMakeLists.txt)
+ 
+-cmake_minimum_required(VERSION 2.8.12.2)
++cmake_minimum_required(VERSION 3.5)
+ 
+ set(OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS
+   opencv_core

diff --git a/media-libs/opencv/opencv-4.10.0.ebuild b/media-libs/opencv/opencv-4.10.0.ebuild
index a1f434194b03..0209326a2531 100644
--- a/media-libs/opencv/opencv-4.10.0.ebuild
+++ b/media-libs/opencv/opencv-4.10.0.ebuild
@@ -338,6 +338,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.10.0-tbb-detection.patch"
 
 	"${DISTDIR}/${P}-protobuf-30.patch" # drop in 4.11
+	"${FILESDIR}/${P}-cmake4.patch" # PR pending
 
 	# TODO applied in src_prepare
 	# "${FILESDIR}/${PN}_contrib-4.8.1-rgbd.patch"


             reply	other threads:[~2025-04-14 18:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 18:01 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-05  2:03 [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/, media-libs/opencv/files/ Sam James
2024-11-05  2:03 Sam James
2024-02-04 13:15 Andreas Sturmlechner
2024-02-04 12:45 Andreas Sturmlechner
2024-01-10 12:33 Sam James
2023-11-22 11:40 Sam James
2023-08-28  4:05 Sam James
2022-09-14  9:19 Andreas Sturmlechner
2022-04-19  5:50 Matt Turner
2021-05-31 20:53 Michał Górny
2020-11-03  7:18 Sam James
2020-06-25 17:08 Andreas Sturmlechner
2019-12-06 20:37 Amy Liffey
2019-03-31 18:52 Amy Liffey
2019-01-24  9:24 Amy Liffey
2019-01-17 18:12 Amy Liffey
2017-09-19 14:00 Amy Liffey
2017-09-19  7:52 Amy Liffey
2017-09-01 11:39 Amy Liffey
2017-06-06 14:45 Amy Liffey
2017-04-16 14:15 Amy Liffey
2016-11-08  7:01 Amy Winston
2016-11-08  7:01 Amy Winston
2016-06-09 18:27 Amy Winston
2016-05-15 13:52 Amy Winston
2016-03-02 12:14 Amy Winston
2016-01-23 17:51 Amy Winston

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=1744653633.de005c58db7f4b0cfff3f5c0df46e69b8eec3ac1.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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