extra/opencv to 4.8.0-2

This commit is contained in:
Kevin Mihelich 2023-07-06 15:37:37 +00:00
parent 11bdcdc7ce
commit d4cca489bd
2 changed files with 7 additions and 23 deletions

View file

@ -8,8 +8,8 @@
pkgbase=opencv
pkgname=(opencv opencv-samples python-opencv)
pkgver=4.7.0
pkgrel=13
pkgver=4.8.0
pkgrel=2
pkgdesc='Open Source Computer Vision Library'
arch=(x86_64)
license=(BSD)
@ -26,19 +26,13 @@ optdepends=('opencv-samples: samples'
'java-runtime: Java interface')
source=(https://github.com/opencv/opencv/archive/$pkgver/$pkgname-$pkgver.tar.gz
https://github.com/opencv/opencv_contrib/archive/$pkgver/opencv_contrib-$pkgver.tar.gz
https://github.com/opencv/opencv/commit/82616eec.patch
protobuf-23.patch
vtk9.patch)
sha256sums=('8df0079cdbe179748a18d44731af62a245a45ebf5085223dc03133954c662973'
'42df840cf9055e59d0e22c249cfb19f04743e1bdad113d31b1573d3934d62584'
'a71e8ffad606d518a846296a06e59beac38887b30021a72b08321aeffd43a75d'
'572f7b774678e2fc46b524ce72d4b0ddf175b2a576c6dcfd013d16165ba39863'
sha256sums=('cbf47ecc336d2bff36b0dcd7d6c179a9bb59e805136af6b9670ca944aef889bd'
'b4aef0f25a22edcd7305df830fa926ca304ea9db65de6ccd02f6cfa5f3357dbb'
'f35a2d4ea0d6212c7798659e59eda2cb0b5bc858360f7ce9c696c77d3029668e')
prepare() {
patch -d $pkgname-$pkgver -p1 < vtk9.patch # Don't require all vtk optdepends
patch -d $pkgname-$pkgver -p1 < 82616eec.patch # https://github.com/opencv/opencv/issues/23323
patch -d $pkgname-$pkgver -p1 < protobuf-23.patch # Fix build with protobuf 23
}
build() {
@ -69,7 +63,9 @@ build() {
-DOPENCV_ENABLE_NONFREE=ON \
-DOPENCV_JNI_INSTALL_PATH=lib \
-DOPENCV_GENERATE_SETUPVARS=OFF \
-DEIGEN_INCLUDE_PATH=/usr/include/eigen3"
-DEIGEN_INCLUDE_PATH=/usr/include/eigen3 \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
-Dprotobuf_MODULE_COMPATIBLE=ON"
cmake -B build -S $pkgname-$pkgver $_opts
cmake --build build

View file

@ -1,12 +0,0 @@
diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
index 8835347d1d..473f5fd850 100644
--- a/cmake/OpenCVFindProtobuf.cmake
+++ b/cmake/OpenCVFindProtobuf.cmake
@@ -31,6 +31,7 @@ if(BUILD_PROTOBUF)
set(HAVE_PROTOBUF TRUE)
else()
unset(Protobuf_VERSION CACHE)
+ find_package(Protobuf CONFIG QUIET)
find_package(Protobuf QUIET)
# Backwards compatibility