Update opencv to 4.6.0

Port changes:
- Drop hppa atomic hack; We only support aarch64 amd64 i386
- Remove CONFIGURE_ENV+FLAGS; CMake respects C/CXX-FLAGS
This commit is contained in:
rsadowski 2022-06-08 10:09:16 +00:00
parent 15d4054169
commit 2014409e16
7 changed files with 25 additions and 18 deletions

View File

@ -4,7 +4,7 @@ CATEGORIES = graphics devel
COMMENT-main = library for computer vision real-time processing
COMMENT-java = Java bindings for OpenCV
V = 4.5.5
V = 4.6.0
GH_ACCOUNT = opencv
GH_PROJECT = opencv
GH_TAGNAME = ${V}
@ -20,7 +20,7 @@ MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>
opencv_flann opencv_highgui opencv_imgproc opencv_ml opencv_objdetect \
opencv_photo opencv_stitching opencv_video opencv_imgcodecs \
opencv_videoio opencv_dnn
SHARED_LIBS += $i 9.3
SHARED_LIBS += $i 10.0
.endfor
WANTLIB-main += ${COMPILER_LIBCXX} avcodec avformat avutil OpenEXR-3_1
@ -70,14 +70,8 @@ LIB_DEPENDS-java = ${BUILD_PKGPATH},-main=${V}
# XXX PIE cannot be produced due to problems with inline assembly.
# Since OpenCV is mostly used as a LIBrary, switch to PIC.
.if ${MACHINE_ARCH:Mi386}
CONFIGURE_ENV = CFLAGS="${CFLAGS} -fPIC" \
CXXFLAGS="${CXXFLAGS} -fPIC"
.endif
# Fix "undefined reference to `__atomic_store_8'" (and more)
.if ${MACHINE_ARCH:Mhppa}
WANTLIB-main += atomic
CONFIGURE_ENV += LDFLAGS="${LDFLAGS} -latomic"
CFLAGS += -fPIC
CXXFLAGS += -fPIC
.endif
CONFIGURE_ARGS = -DBUILD_DOCS=OFF \

View File

@ -1,2 +1,2 @@
SHA256 (opencv-4.5.5.tar.gz) = oc/c9mGTh8qeIyaHUE2plqqp97VomYa4Mx7ALLYdKK0=
SIZE (opencv-4.5.5.tar.gz) = 89879893
SHA256 (opencv-4.6.0.tar.gz) = HsHLpl+fIP5aQf2hWG4Bxw6gyabXtnyeE+3wz+Ijknc=
SIZE (opencv-4.6.0.tar.gz) = 90208971

View File

@ -0,0 +1,12 @@
Index: cmake/OpenCVCompilerOptions.cmake
--- cmake/OpenCVCompilerOptions.cmake.orig
+++ cmake/OpenCVCompilerOptions.cmake
@@ -373,7 +373,7 @@ endif()
# Apply "-Wl,--no-undefined" linker flags: https://github.com/opencv/opencv/pull/21347
if(NOT OPENCV_SKIP_LINK_NO_UNDEFINED)
- if(UNIX AND (NOT APPLE OR NOT CMAKE_VERSION VERSION_LESS "3.2"))
+ if(UNIX AND ((NOT APPLE OR NOT CMAKE_VERSION VERSION_LESS "3.2") AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD"))
set(_option "-Wl,--no-undefined")
set(_saved_CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_option}") # requires CMake 3.2+ and CMP0056

View File

@ -1,7 +1,7 @@
Index: cmake/OpenCVFindLibsGrfmt.cmake
--- cmake/OpenCVFindLibsGrfmt.cmake.orig
+++ cmake/OpenCVFindLibsGrfmt.cmake
@@ -228,12 +228,7 @@ if(WITH_PNG)
@@ -230,12 +230,7 @@ if(WITH_PNG)
include(FindPNG)
if(PNG_FOUND)
include(CheckIncludeFile)

View File

@ -2,7 +2,7 @@ Fix build on i386 and arm64.
Index: modules/core/src/system.cpp
--- modules/core/src/system.cpp.orig
+++ modules/core/src/system.cpp
@@ -252,7 +252,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
@@ -255,7 +255,7 @@ std::wstring GetTempFileNameWinRT(std::wstring prefix)
#include "omp.h"
#endif
@ -11,7 +11,7 @@ Index: modules/core/src/system.cpp
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
@@ -554,7 +554,7 @@ struct HWFeatures
@@ -557,7 +557,7 @@ struct HWFeatures
}
#endif // CV_CPUID_X86
@ -20,7 +20,7 @@ Index: modules/core/src/system.cpp
#ifdef __aarch64__
have[CV_CPU_NEON] = true;
have[CV_CPU_FP16] = true;
@@ -580,7 +580,7 @@ struct HWFeatures
@@ -583,7 +583,7 @@ struct HWFeatures
CV_LOG_INFO(NULL, "- FP16 instructions is NOT enabled via build flags");
#endif
#endif

View File

@ -1,4 +1,4 @@
share/java/
share/java/opencv4/
@so share/java/opencv4/libopencv_java455.so
share/java/opencv4/opencv-455.jar
@so share/java/opencv4/libopencv_java460.so
share/java/opencv4/opencv-460.jar

View File

@ -140,6 +140,7 @@ include/opencv4/opencv2/core/utils/
include/opencv4/opencv2/core/utils/allocator_stats.hpp
include/opencv4/opencv2/core/utils/allocator_stats.impl.hpp
include/opencv4/opencv2/core/utils/filesystem.hpp
include/opencv4/opencv2/core/utils/fp_control_utils.hpp
include/opencv4/opencv2/core/utils/instrumentation.hpp
include/opencv4/opencv2/core/utils/logger.defines.hpp
include/opencv4/opencv2/core/utils/logger.hpp