From 35e6529cd23a7c3c382292bea587f1d7a2dc6bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 8 Jun 2019 02:23:51 +0100 Subject: [PATCH] Update to 3.4.6 --- .gitignore | 2 + ...b79e3f98b4ce30481e0299cca550ed77aef0.patch | 82 ------------------- ...43c69c654344d2e2fb7b2d21121ca89224e6.patch | 35 -------- ...9e4e65a8d9e0b5a15e9a5242453f261bee46.patch | 28 ------- opencv-3.4.1-cmake_paths.patch | 24 ------ opencv-4.1.0-install_3rdparty_licenses.patch | 11 +++ opencv-clean.sh | 2 +- opencv.spec | 27 +++--- sources | 4 +- 9 files changed, 28 insertions(+), 187 deletions(-) delete mode 100644 ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch delete mode 100644 c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch delete mode 100644 c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch delete mode 100644 opencv-3.4.1-cmake_paths.patch create mode 100644 opencv-4.1.0-install_3rdparty_licenses.patch diff --git a/.gitignore b/.gitignore index 3baf801..b508527 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ OpenCV-2.1.0.tar.bz2 /opencv-clean-3.4.3.tar.gz /opencv-clean-3.4.4.tar.gz /opencv_contrib-clean-3.4.4.tar.gz +/opencv-clean-3.4.6.tar.gz +/opencv_contrib-3.4.6.tar.gz diff --git a/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch b/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch deleted file mode 100644 index dea8d45..0000000 --- a/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch +++ /dev/null @@ -1,82 +0,0 @@ -From ad35b79e3f98b4ce30481e0299cca550ed77aef0 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Thu, 22 Nov 2018 21:06:33 +0000 -Subject: [PATCH] python: update install paths - -- don't require "OPENCV_PYTHON{2,3}_INSTALL_PATH" if OPENCV_SKIP_PYTHON_LOADER=ON -- avoid unnecessary relative paths in generated config-X.Y.py ---- - CMakeLists.txt | 4 ++-- - modules/python/common.cmake | 14 +++++++++----- - 2 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fde8b578ba0..6298f4438c2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1494,7 +1494,7 @@ if(BUILD_opencv_python2) - status(" Libraries:" HAVE_opencv_python2 THEN "${PYTHON2_LIBRARIES}" ELSE NO) - endif() - status(" numpy:" PYTHON2_NUMPY_INCLUDE_DIRS THEN "${PYTHON2_NUMPY_INCLUDE_DIRS} (ver ${PYTHON2_NUMPY_VERSION})" ELSE "NO (Python wrappers can not be generated)") -- status(" packages path:" PYTHON2_EXECUTABLE THEN "${PYTHON2_PACKAGES_PATH}" ELSE "-") -+ status(" install path:" HAVE_opencv_python2 THEN "${__INSTALL_PATH_PYTHON2}" ELSE "-") - endif() - - if(BUILD_opencv_python3) -@@ -1507,7 +1507,7 @@ if(BUILD_opencv_python3) - status(" Libraries:" HAVE_opencv_python3 THEN "${PYTHON3_LIBRARIES}" ELSE NO) - endif() - status(" numpy:" PYTHON3_NUMPY_INCLUDE_DIRS THEN "${PYTHON3_NUMPY_INCLUDE_DIRS} (ver ${PYTHON3_NUMPY_VERSION})" ELSE "NO (Python3 wrappers can not be generated)") -- status(" packages path:" PYTHON3_EXECUTABLE THEN "${PYTHON3_PACKAGES_PATH}" ELSE "-") -+ status(" install path:" HAVE_opencv_python3 THEN "${__INSTALL_PATH_PYTHON3}" ELSE "-") - endif() - - status("") -diff --git a/modules/python/common.cmake b/modules/python/common.cmake -index 14912297eae..4b4eaa6e7f8 100644 ---- a/modules/python/common.cmake -+++ b/modules/python/common.cmake -@@ -122,6 +122,8 @@ endif() - - if(NOT " ${PYTHON}" STREQUAL " PYTHON" AND DEFINED OPENCV_${PYTHON}_INSTALL_PATH) - set(__python_binary_install_path "${OPENCV_${PYTHON}_INSTALL_PATH}") -+elseif(OPENCV_SKIP_PYTHON_LOADER AND DEFINED ${PYTHON}_PACKAGES_PATH) -+ set(__python_binary_install_path "${${PYTHON}_PACKAGES_PATH}") - else() - ocv_assert(DEFINED OPENCV_PYTHON_INSTALL_PATH) - set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}") -@@ -134,6 +136,8 @@ install(TARGETS ${the_module} - ${PYTHON_INSTALL_ARCHIVE} - ) - -+set(__INSTALL_PATH_${PYTHON} "${__python_binary_install_path}" CACHE INTERNAL "") # CMake status -+ - if(NOT OPENCV_SKIP_PYTHON_LOADER) - ocv_assert(DEFINED OPENCV_PYTHON_INSTALL_PATH) - if(OpenCV_FOUND) -@@ -143,12 +147,11 @@ if(NOT OPENCV_SKIP_PYTHON_LOADER) - endif() - - set(__python_loader_install_tmp_path "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/install/python_loader/") -+ set(OpenCV_PYTHON_LOADER_FULL_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_PYTHON_INSTALL_PATH}/cv2") - if(IS_ABSOLUTE "${OPENCV_PYTHON_INSTALL_PATH}") -- set(OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/") -- set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "'${CMAKE_INSTALL_PREFIX}'") -+ set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "'${OPENCV_PYTHON_INSTALL_PATH}/cv2'") - else() -- file(RELATIVE_PATH OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_PYTHON_INSTALL_PATH}/cv2" ${CMAKE_INSTALL_PREFIX}) -- set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "os.path.join(LOADER_DIR, '${OpenCV_PYTHON_INSTALL_PATH_RELATIVE_CONFIGCMAKE}')") -+ set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "LOADER_DIR") - endif() - - if(DEFINED ${PYTHON}_VERSION_MINOR) -@@ -167,7 +170,8 @@ if(NOT OPENCV_SKIP_PYTHON_LOADER) - if(IS_ABSOLUTE __python_binary_install_path) - set(CMAKE_PYTHON_EXTENSION_PATH "'${__python_binary_install_path}'") - else() -- set(CMAKE_PYTHON_EXTENSION_PATH "os.path.join(${CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE}, '${__python_binary_install_path}')") -+ file(RELATIVE_PATH OpenCV_PYTHON_BINARY_RELATIVE_INSTALL_PATH "${OpenCV_PYTHON_LOADER_FULL_INSTALL_PATH}" "${CMAKE_INSTALL_PREFIX}/${__python_binary_install_path}") -+ set(CMAKE_PYTHON_EXTENSION_PATH "os.path.join(${CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE}, '${OpenCV_PYTHON_BINARY_RELATIVE_INSTALL_PATH}')") - endif() - configure_file("${PYTHON_SOURCE_DIR}/package/template/config-x.y.py.in" "${__python_loader_install_tmp_path}/cv2/${__target_config}" @ONLY) - install(FILES "${__python_loader_install_tmp_path}/cv2/${__target_config}" DESTINATION "${OPENCV_PYTHON_INSTALL_PATH}/cv2/" COMPONENT python) diff --git a/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch b/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch deleted file mode 100644 index 13b28b9..0000000 --- a/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c26c43c69c654344d2e2fb7b2d21121ca89224e6 Mon Sep 17 00:00:00 2001 -From: Maksim Shabunin -Date: Mon, 3 Dec 2018 17:16:09 +0300 -Subject: [PATCH] Fixed compilation with VA-interop on 32-bit platforms - ---- - modules/core/src/va_intel.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules/core/src/va_intel.cpp b/modules/core/src/va_intel.cpp -index ac74f0c5337..c571b90b5fe 100644 ---- a/modules/core/src/va_intel.cpp -+++ b/modules/core/src/va_intel.cpp -@@ -340,8 +340,8 @@ static void copy_convert_yv12_to_bgr(const VAImage& image, const unsigned char* - 1.5959997177f - }; - -- CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format"); -- CV_CheckEQ(image.num_planes, 3, ""); -+ CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format"); -+ CV_CheckEQ((size_t)image.num_planes, (size_t)3, ""); - - const size_t srcOffsetY = image.offsets[0]; - const size_t srcOffsetV = image.offsets[1]; -@@ -417,8 +417,8 @@ static void copy_convert_bgr_to_yv12(const VAImage& image, const Mat& bgr, unsig - -0.2909994125f, 0.438999176f, -0.3679990768f, -0.0709991455f - }; - -- CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format"); -- CV_CheckEQ(image.num_planes, 3, ""); -+ CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format"); -+ CV_CheckEQ((size_t)image.num_planes, (size_t)3, ""); - - const size_t dstOffsetY = image.offsets[0]; - const size_t dstOffsetV = image.offsets[1]; diff --git a/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch b/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch deleted file mode 100644 index 25a91e0..0000000 --- a/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c4419e4e65a8d9e0b5a15e9a5242453f261bee46 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Thu, 15 Nov 2018 06:54:35 +0000 -Subject: [PATCH] cvv: repair build - ---- - modules/cvv/src/qtutil/filter/diffFilterWidget.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp b/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -index a555c84983..ca2964fd16 100644 ---- a/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -+++ b/modules/cvv/src/qtutil/filter/diffFilterWidget.cpp -@@ -1,6 +1,5 @@ - #include - #include --#include - - #include - -@@ -14,6 +13,7 @@ - - namespace cvv - { -+using namespace cv; - namespace qtutil - { - diff --git a/opencv-3.4.1-cmake_paths.patch b/opencv-3.4.1-cmake_paths.patch deleted file mode 100644 index 96af291..0000000 --- a/opencv-3.4.1-cmake_paths.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- ./CMakeLists.txt.orig 2018-02-27 01:46:32.259819239 +0000 -+++ ./CMakeLists.txt 2018-02-27 19:48:19.658736383 +0000 -@@ -439,19 +439,14 @@ else() - ocv_update(OPENCV_CONFIG_INSTALL_PATH ".") - else() - include(GNUInstallDirs) -- ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}) -+ ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}) - ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) - ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java) - ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV) - - if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH) -- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) -- ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}/cmake/opencv) -- else() -- ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) -- endif() -+ ocv_update(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/OpenCV) - endif() - endif() - ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include") diff --git a/opencv-4.1.0-install_3rdparty_licenses.patch b/opencv-4.1.0-install_3rdparty_licenses.patch new file mode 100644 index 0000000..7bbc85f --- /dev/null +++ b/opencv-4.1.0-install_3rdparty_licenses.patch @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVDetectOpenCL.cmake.orig 2019-05-14 00:35:41.373094435 +0100 ++++ ./cmake/OpenCVDetectOpenCL.cmake 2019-05-14 00:35:50.833189862 +0100 +@@ -5,7 +5,7 @@ if(APPLE) + else() + set(OPENCL_LIBRARY "" CACHE STRING "OpenCL library") + set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2" CACHE PATH "OpenCL include directory") +- ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") ++ #ocv_install_3rdparty_licenses(opencl-headers "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/LICENSE.txt") + endif() + mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY) + diff --git a/opencv-clean.sh b/opencv-clean.sh index f95e268..9e88d46 100755 --- a/opencv-clean.sh +++ b/opencv-clean.sh @@ -1,4 +1,4 @@ -export VERSION=3.4.4 +export VERSION=3.4.6 wget -c https://github.com/opencv/opencv/archive/${VERSION}/opencv-${VERSION}.tar.gz tar xf opencv-${VERSION}.tar.gz diff --git a/opencv.spec b/opencv.spec index 1b58656..c2210c5 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,7 +49,7 @@ %global srcname opencv %global abiver 3.4 -%global javaver 344 +%global javaver 346 # Required because opencv-core has lot of spurious dependencies # (despite supposed to be "-core") @@ -58,8 +58,8 @@ %global optflags %(echo %{optflags} -Wl,--as-needed ) Name: opencv -Version: 3.4.4 -Release: 10%{?dist} +Version: 3.4.6 +Release: 1%{?dist} Summary: Collection of algorithms for computer vision # This is normal three clause BSD. License: BSD @@ -71,12 +71,7 @@ URL: http://opencv.org # Source0: %{name}-clean-%{version}.tar.gz Source1: %{name}_contrib-clean-%{version}.tar.gz -# fix/simplify cmake config install location (upstreamable) -# https://bugzilla.redhat.com/1031312 -Patch1: opencv-3.4.1-cmake_paths.patch -Patch10: https://github.com/opencv/opencv/pull/13351/commits/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch -Patch11: https://github.com/opencv/opencv_contrib/pull/1905/commits/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch -Patch12: https://github.com/opencv/opencv/pull/13254/commits/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch +Patch2: opencv-4.1.0-install_3rdparty_licenses.patch BuildRequires: gcc-c++ BuildRequires: libtool @@ -243,15 +238,13 @@ rm -r 3rdparty/ mkdir 3rdparty/ mv quirc/ 3rdparty/ -%patch1 -p1 -b .cmake_paths -%patch10 -p1 -b .fix_support_YV12_too +%patch2 -p1 -b .install_3rdparty_licenses + %ifarch %{ix86} %{arm} %endif pushd %{name}_contrib-%{version} -%patch11 -p1 -b .cvv_repair_build popd -%patch12 -p1 -b .fix_install_of_python_bindings %build # enabled by default if libraries are presents at build time: @@ -353,7 +346,6 @@ popd %files %doc README.md -%license LICENSE %{_bindir}/opencv_* %dir %{_datadir}/OpenCV %{_datadir}/OpenCV/haarcascades @@ -361,6 +353,8 @@ popd %{_datadir}/OpenCV/valgrind* %files core +%license LICENSE +%{_datadir}/licenses/opencv3/ %{_libdir}/libopencv_core.so.%{abiver}* %{_libdir}/libopencv_cvv.so.%{abiver}* %{_libdir}/libopencv_features2d.so.%{abiver}* @@ -387,7 +381,7 @@ popd %{_includedir}/opencv2 %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc -%{_libdir}/OpenCV/*.cmake +%{_datadir}/OpenCV/*.cmake %files doc %{_datadir}/OpenCV/samples @@ -438,6 +432,9 @@ popd %{_libdir}/libopencv_xphoto.so.%{abiver}* %changelog +* Thu May 23 2019 Sérgio Basto - 3.4.6-1 +- Update to 3.4.6 + * Mon May 20 2019 Sérgio Basto - 3.4.4-10 - Try improve Java Bindings diff --git a/sources b/sources index 1de73fb..bc95b7c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (opencv_contrib-clean-3.4.4.tar.gz) = ccb2fd7c3034e5c6e6d5065ee74a65ad4d4861a5683a81013cc93750de81d390ff2ad40ed65fcf54807090f67b136e6bb57cd9f1a435c49d5812d5380c062fd7 -SHA512 (opencv-clean-3.4.4.tar.gz) = ee8cc8af5e8c6accb4593171c6e30848f91717d41143e74336934fa4eefe4a333623ce2cf54f663f4e70a86c2d637389d9d0636458c9d35e6a5bf75a4cd78b84 +SHA512 (opencv-clean-3.4.6.tar.gz) = df7f2ee5ab83c047e5caa8cb12f6cbd8e7c13e554fe4183c43fc4d59e6b42e7a6e8caf71de587c95e36ec720105b4e5c166f3e376bb7ad446bd1b94bc0a84192 +SHA512 (opencv_contrib-3.4.6.tar.gz) = 27e9edeed2c995fcf2bd4a1f9226911f6bca2761d0ca615723eb851bb3fd5b46b7b55531db65d12593886e2484beb4ec7c8b2efaae2638c8427913cb9f3e0cb9