diff --git a/mingw-w64-opencv/0001-mingw-w64-cmake.patch b/mingw-w64-opencv/0001-mingw-w64-cmake.patch index daedd68652..fa166351d4 100644 --- a/mingw-w64-opencv/0001-mingw-w64-cmake.patch +++ b/mingw-w64-opencv/0001-mingw-w64-cmake.patch @@ -1,12 +1,14 @@ diff -Naur a/cmake/OpenCVFindOpenEXR.cmake b/cmake/OpenCVFindOpenEXR.cmake --- a/cmake/OpenCVFindOpenEXR.cmake 2015-02-25 18:10:31.000000000 +0600 +++ b/cmake/OpenCVFindOpenEXR.cmake 2015-03-05 22:18:10.517256700 +0600 -@@ -13,7 +13,7 @@ +@@ -13,7 +13,9 @@ SET(OPENEXR_LIBSEARCH_SUFFIXES "") file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH) -if(WIN32) -+if(WIN32 AND NOT MINGW) ++if(MINGW) ++ SET(OPENEXR_ROOT $ENV{OpenEXR_HOME} CACHE STRING "Path to the OpenEXR install folder") ++elseif(MSVC) SET(OPENEXR_ROOT "C:/Deploy" CACHE STRING "Path to the OpenEXR \"Deploy\" folder") if(CMAKE_CL_64) SET(OPENEXR_LIBSEARCH_SUFFIXES x64/Release x64 x64/Debug) diff --git a/mingw-w64-opencv/0005-opencv-support-python-3.7.patch b/mingw-w64-opencv/0005-opencv-support-python-3.7.patch index a61017287f..6d094d6408 100644 --- a/mingw-w64-opencv/0005-opencv-support-python-3.7.patch +++ b/mingw-w64-opencv/0005-opencv-support-python-3.7.patch @@ -5,7 +5,7 @@ PYTHON2_NUMPY_INCLUDE_DIRS PYTHON2_NUMPY_VERSION) -find_python(3.4 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR -+find_python(3.7 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR ++find_python(3.8 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR PYTHON3INTERP_FOUND PYTHON3_EXECUTABLE PYTHON3_VERSION_STRING PYTHON3_VERSION_MAJOR PYTHON3_VERSION_MINOR PYTHON3LIBS_FOUND PYTHON3LIBS_VERSION_STRING PYTHON3_LIBRARIES PYTHON3_LIBRARY diff --git a/mingw-w64-opencv/PKGBUILD b/mingw-w64-opencv/PKGBUILD index feab17fff9..5d82e4e6ad 100644 --- a/mingw-w64-opencv/PKGBUILD +++ b/mingw-w64-opencv/PKGBUILD @@ -3,7 +3,7 @@ _realname=opencv pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=4.2.0 +pkgver=4.3.0 pkgrel=1 pkgdesc="Open Source Computer Vision Library (mingw-w64)" arch=('any') @@ -35,9 +35,9 @@ depends=(#"${MINGW_PACKAGE_PREFIX}-gst-plugins-base makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" #"${MINGW_PACKAGE_PREFIX}-qt5" "${MINGW_PACKAGE_PREFIX}-ffmpeg" - "${MINGW_PACKAGE_PREFIX}-python3-numpy" - "${MINGW_PACKAGE_PREFIX}-python3-flake8" - "${MINGW_PACKAGE_PREFIX}-python3-pylint" + "${MINGW_PACKAGE_PREFIX}-python-numpy" + "${MINGW_PACKAGE_PREFIX}-python-flake8" + "${MINGW_PACKAGE_PREFIX}-python-pylint" "${MINGW_PACKAGE_PREFIX}-tiny-dnn" #"${MINGW_PACKAGE_PREFIX}-vtk" "${MINGW_PACKAGE_PREFIX}-cereal" @@ -46,7 +46,7 @@ optdepends=(#"${MINGW_PACKAGE_PREFIX}-ceres-solver: SFM module" #"${MINGW_PACKAGE_PREFIX}-gflags: SFM module" #"${MINGW_PACKAGE_PREFIX}-glog: SFM module" "${MINGW_PACKAGE_PREFIX}-ffmpeg: support to read and write video files" - "${MINGW_PACKAGE_PREFIX}-python3-numpy: Python 3.x interface" + "${MINGW_PACKAGE_PREFIX}-python-numpy: Python 3.x interface" #"${MINGW_PACKAGE_PREFIX}-hdf5: opencv_hdf module" #"${MINGW_PACKAGE_PREFIX}-tesseract-ocr: opencv_text module" #"${MINGW_PACKAGE_PREFIX}-ogre3d: ovis module" @@ -67,9 +67,9 @@ source=("${_realname}-${pkgver}.tar.gz"::https://github.com/opencv/opencv/archiv '0102-mingw-w64-have-sincos.patch' '0103-sfm-module-linking.patch' '0104-rgbd-module-missing-include.patch') -sha256sums=('9ccb2192d7e8c03c58fee07051364d94ed7599363f3b0dce1c5e6cc11c1bb0ec' - '8a6b5661611d89baa59a26eb7ccf4abb3e55d73f99bb52d8f7c32265c8a43020' - 'f9736ad2f441a12f963eae1e2a5c891a744202ac0e7e2af02b64bf3c1dde5e92' +sha256sums=('68bc40cbf47fdb8ee73dfaf0d9c6494cd095cf6294d99de445ab64cf853d278a' + 'acb8e89c9e7d1174e63e40532125b60d248b00e517255a98a419d415228c6a55' + '496165d79ffdaee4626697c7f1c90891c1108854da2a266138c94dcb28e7a90f' 'fd4e095c3c879413184fc6b91a7b0a77dbb128612341a8be2c99d804a203e362' '52ebc8875b9ef3ea70897f34509228daeff73d0cab0aa9eb8b931be6a7d32d7f' 'aaf2a1952b04c9be3a133b08b0a06f536b4e9ba5f312a03f41301dba61a3fc94' @@ -130,6 +130,8 @@ build() { CFLAGS+=" -D_POSIX_SOURCE -Wno-attributes" CXXFLAGS+=" -D_POSIX_SOURCE -Wno-attributes" + export OpenEXR_HOME=${MINGW_PREFIX} + export OPENEXR_ROOT=${MINGW_PREFIX} export OpenBLAS_HOME=${MINGW_PREFIX} export TINYDNN_ROOT=${MINGW_PREFIX}/include/tiny_dnn @@ -166,10 +168,10 @@ build() { -DOPENCV_EXTRA_MODULES_PATH=../${_realname}_contrib-${pkgver}/modules \ -DBUILD_opencv_python2=OFF \ -DBUILD_opencv_python3=ON \ - -DPYTHON_DEFAULT_EXECUTABLE=${MINGW_PREFIX}/bin/python3 \ - -DPYTHON3_EXECUTABLE=${MINGW_PREFIX}/bin/python3 \ - -DPYTHON3_PACKAGES_PATH=$(cygpath -u $(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")) \ - -DOPENCV_PYTHON3_VERSION=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") \ + -DPYTHON_DEFAULT_EXECUTABLE=${MINGW_PREFIX}/bin/python \ + -DPYTHON3_EXECUTABLE=${MINGW_PREFIX}/bin/python \ + -DPYTHON3_PACKAGES_PATH=$(cygpath -u $(${MINGW_PREFIX}/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")) \ + -DOPENCV_PYTHON3_VERSION=$(${MINGW_PREFIX}/bin/python -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") \ -DBUILD_opencv_bioinspired=OFF \ -DOPENCV_GENERATE_PKGCONFIG=ON \ -DOPENCV_PYTHON_INSTALL_PATH=lib \