summaryrefslogtreecommitdiff
path: root/media-libs/opencv/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-01-22 10:09:44 +0000
commit09351e78166b5e864197c4456ebae3f89dd0bed9 (patch)
tree41a96399f56ed3aa399006871bfce4430db84aa2 /media-libs/opencv/files
parentc8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff)
gentoo resync : 22.01.2019
Diffstat (limited to 'media-libs/opencv/files')
-rw-r--r--media-libs/opencv/files/opencv-3.1.0-find-libraries-fix.patch48
-rw-r--r--media-libs/opencv/files/opencv-3.1.0-java-magic.patch47
-rw-r--r--media-libs/opencv/files/opencv-3.2.0-contrib_xfeatures2d-autodownload.patch10
-rw-r--r--media-libs/opencv/files/opencv-3.2.0-cpu-mno-sse2.patch11
-rw-r--r--media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch64
-rw-r--r--media-libs/opencv/files/opencv-3.2.0-gcc-6.0.patch11
-rw-r--r--media-libs/opencv/files/opencv-3.2.0-vtk.patch11
-rw-r--r--media-libs/opencv/files/opencv-3.3.0-contrib-xfeatures2d.patch19
-rw-r--r--media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch87
-rw-r--r--media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch21
-rw-r--r--media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch41
-rw-r--r--media-libs/opencv/files/opencv-3.4.1-fix-build-with-va.patch26
-rw-r--r--media-libs/opencv/files/opencv-3.4.1-remove-git-autodetect.patch42
13 files changed, 68 insertions, 370 deletions
diff --git a/media-libs/opencv/files/opencv-3.1.0-find-libraries-fix.patch b/media-libs/opencv/files/opencv-3.1.0-find-libraries-fix.patch
deleted file mode 100644
index 52f4db6b3113..000000000000
--- a/media-libs/opencv/files/opencv-3.1.0-find-libraries-fix.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -purN a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
---- a/cmake/OpenCVFindLibsGrfmt.cmake 2015-12-18 15:02:16.000000000 +0000
-+++ b/cmake/OpenCVFindLibsGrfmt.cmake 2016-11-07 13:18:04.567340791 +0000
-@@ -18,7 +18,7 @@ endif()
- if(NOT ZLIB_FOUND)
- ocv_clear_vars(ZLIB_LIBRARY ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
-
-- set(ZLIB_LIBRARY zlib)
-+ set(ZLIB_LIBRARY z)
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/zlib")
- set(ZLIB_INCLUDE_DIRS "${${ZLIB_LIBRARY}_SOURCE_DIR}" "${${ZLIB_LIBRARY}_BINARY_DIR}")
- set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
-@@ -40,7 +40,7 @@ if(WITH_TIFF)
- if(NOT TIFF_FOUND)
- ocv_clear_vars(TIFF_LIBRARY TIFF_LIBRARIES TIFF_INCLUDE_DIR)
-
-- set(TIFF_LIBRARY libtiff)
-+ set(TIFF_LIBRARY tiff)
- set(TIFF_LIBRARIES ${TIFF_LIBRARY})
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libtiff")
- set(TIFF_INCLUDE_DIR "${${TIFF_LIBRARY}_SOURCE_DIR}" "${${TIFF_LIBRARY}_BINARY_DIR}")
-@@ -79,7 +79,7 @@ if(WITH_JPEG)
- if(NOT JPEG_FOUND)
- ocv_clear_vars(JPEG_LIBRARY JPEG_LIBRARIES JPEG_INCLUDE_DIR)
-
-- set(JPEG_LIBRARY libjpeg)
-+ set(JPEG_LIBRARY jpeg)
- set(JPEG_LIBRARIES ${JPEG_LIBRARY})
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libjpeg")
- set(JPEG_INCLUDE_DIR "${${JPEG_LIBRARY}_SOURCE_DIR}")
-@@ -136,7 +136,7 @@ if(WITH_JASPER)
- if(NOT JASPER_FOUND)
- ocv_clear_vars(JASPER_LIBRARY JASPER_LIBRARIES JASPER_INCLUDE_DIR)
-
-- set(JASPER_LIBRARY libjasper)
-+ set(JASPER_LIBRARY jasper)
- set(JASPER_LIBRARIES ${JASPER_LIBRARY})
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libjasper")
- set(JASPER_INCLUDE_DIR "${${JASPER_LIBRARY}_SOURCE_DIR}")
-@@ -169,7 +169,7 @@ if(WITH_PNG)
- if(NOT PNG_FOUND)
- ocv_clear_vars(PNG_LIBRARY PNG_LIBRARIES PNG_INCLUDE_DIR PNG_PNG_INCLUDE_DIR HAVE_LIBPNG_PNG_H PNG_DEFINITIONS)
-
-- set(PNG_LIBRARY libpng)
-+ set(PNG_LIBRARY png)
- set(PNG_LIBRARIES ${PNG_LIBRARY})
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libpng")
- set(PNG_INCLUDE_DIR "${${PNG_LIBRARY}_SOURCE_DIR}")
diff --git a/media-libs/opencv/files/opencv-3.1.0-java-magic.patch b/media-libs/opencv/files/opencv-3.1.0-java-magic.patch
deleted file mode 100644
index 96a0e7e7053f..000000000000
--- a/media-libs/opencv/files/opencv-3.1.0-java-magic.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -purN a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt 2015-12-18 15:02:16.000000000 +0000
-+++ b/CMakeLists.txt 2016-06-06 17:15:48.006020666 +0100
-@@ -209,6 +209,7 @@ OCV_OPTION(WITH_OPENCLAMDFFT "Include
- OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
- OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON IF (WIN32 AND NOT WINRT) )
- OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF (WIN32 AND NOT WINRT) )
-+OCV_OPTION(WITH_JAVA "Include Java support" ON)
- OCV_OPTION(WITH_IPP_A "Include Intel IPP_A support" OFF IF (MSVC OR X86 OR X86_64) )
- OCV_OPTION(WITH_MATLAB "Include Matlab support" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT))
- OCV_OPTION(WITH_VA "Include VA support" OFF IF (UNIX AND NOT ANDROID) )
-@@ -562,20 +563,25 @@ endif(BUILD_DOCS)
- include(cmake/OpenCVDetectPython.cmake)
-
- # --- Java Support ---
--include(cmake/OpenCVDetectApacheAnt.cmake)
--if(ANDROID)
-- include(cmake/OpenCVDetectAndroidSDK.cmake)
-+If(WITH_JAVA)
-+ include(cmake/OpenCVDetectApacheAnt.cmake)
-+ if(ANDROID)
-+ include(cmake/OpenCVDetectAndroidSDK.cmake)
-
-- if(NOT ANDROID_TOOLS_Pkg_Revision GREATER 13)
-- message(WARNING "OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled.")
-+ if(NOT ANDROID_TOOLS_Pkg_Revision GREATER 13)
-+ message(WARNING "OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled.")
-+ endif()
-+ else()
-+ find_package(JNI)
- endif()
--else()
-- find_package(JNI)
--endif()
-
--if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
-- SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
-+ if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
-+ SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
-+ else()
-+ SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
-+ endif()
- else()
-+ SET(ANT_EXECUTABLE "")
- SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
- endif()
-
diff --git a/media-libs/opencv/files/opencv-3.2.0-contrib_xfeatures2d-autodownload.patch b/media-libs/opencv/files/opencv-3.2.0-contrib_xfeatures2d-autodownload.patch
deleted file mode 100644
index f03c57d425cc..000000000000
--- a/media-libs/opencv/files/opencv-3.2.0-contrib_xfeatures2d-autodownload.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/modules/xfeatures2d/CMakeLists.txt 2017-02-28 13:10:56.470000000 +0100
-+++ b/modules/xfeatures2d/CMakeLists.txt 2017-02-28 13:11:03.970000000 +0100
-@@ -1,5 +1,5 @@
- set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection")
- ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml
- OPTIONAL opencv_cudaarithm WRAP python java)
--include(cmake/download_vgg.cmake)
--include(cmake/download_boostdesc.cmake)
-+#include(cmake/download_vgg.cmake)
-+#include(cmake/download_boostdesc.cmake)
diff --git a/media-libs/opencv/files/opencv-3.2.0-cpu-mno-sse2.patch b/media-libs/opencv/files/opencv-3.2.0-cpu-mno-sse2.patch
deleted file mode 100644
index a73456411f27..000000000000
--- a/media-libs/opencv/files/opencv-3.2.0-cpu-mno-sse2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/cmake/OpenCVCompilerOptions.cmake 2017-07-22 13:26:51.178960091 +0200
-+++ b/cmake/OpenCVCompilerOptions.cmake 2017-07-22 13:27:47.238961469 +0200
-@@ -176,8 +176,6 @@
- endif()
- if(ENABLE_SSE2)
- add_extra_compiler_option(-msse2)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-sse2)
- endif()
- if(ARM)
- add_extra_compiler_option("-mfp16-format=ieee")
diff --git a/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch b/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch
deleted file mode 100644
index 7b88216f329a..000000000000
--- a/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/cmake/OpenCVCompilerOptions.cmake
-+++ b/cmake/OpenCVCompilerOptions.cmake
-@@ -164,8 +164,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
- # Other optimizations
- if(ENABLE_OMIT_FRAME_POINTER)
- add_extra_compiler_option(-fomit-frame-pointer)
-- else()
-- add_extra_compiler_option(-fno-omit-frame-pointer)
- endif()
- if(ENABLE_FAST_MATH)
- add_extra_compiler_option(-ffast-math)
-@@ -195,8 +193,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
- if(NOT MINGW)
- if(ENABLE_AVX)
- add_extra_compiler_option(-mavx)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-avx)
- endif()
- if(ENABLE_AVX2)
- add_extra_compiler_option(-mavx2)
-@@ -210,26 +206,18 @@ if(CMAKE_COMPILER_IS_GNUCXX)
- if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx")
- if(ENABLE_SSE3)
- add_extra_compiler_option(-msse3)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-sse3)
- endif()
-
- if(ENABLE_SSSE3)
- add_extra_compiler_option(-mssse3)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-ssse3)
- endif()
-
- if(ENABLE_SSE41)
- add_extra_compiler_option(-msse4.1)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-sse4.1)
- endif()
-
- if(ENABLE_SSE42)
- add_extra_compiler_option(-msse4.2)
-- elseif(X86 OR X86_64)
-- add_extra_compiler_option(-mno-sse4.2)
- endif()
-
- if(ENABLE_POPCNT)
-@@ -238,16 +226,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
- endif()
- endif(NOT MINGW)
-
-- if(X86 OR X86_64)
-- if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-- if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)")
-- add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers
-- else()
-- add_extra_compiler_option(-mfpmath=387)
-- endif()
-- endif()
-- endif()
--
- # Profiling?
- if(ENABLE_PROFILING)
- add_extra_compiler_option("-pg -g"
diff --git a/media-libs/opencv/files/opencv-3.2.0-gcc-6.0.patch b/media-libs/opencv/files/opencv-3.2.0-gcc-6.0.patch
deleted file mode 100644
index 457d3595e49b..000000000000
--- a/media-libs/opencv/files/opencv-3.2.0-gcc-6.0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/cmake/OpenCVPCHSupport.cmake 2017-06-06 15:05:09.180022719 +0200
-+++ b/cmake/OpenCVPCHSupport.cmake 2017-06-06 15:05:50.775022684 +0200
-@@ -14,7 +14,7 @@
-
- IF(CMAKE_COMPILER_IS_GNUCXX)
-
-- IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2.0")
-+ IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0")
- SET(PCHSupport_FOUND TRUE)
- ENDIF()
-
diff --git a/media-libs/opencv/files/opencv-3.2.0-vtk.patch b/media-libs/opencv/files/opencv-3.2.0-vtk.patch
deleted file mode 100644
index 1e3daec8aa30..000000000000
--- a/media-libs/opencv/files/opencv-3.2.0-vtk.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/cmake/OpenCVDetectVTK.cmake 2017-03-20 10:43:28.401962910 +0100
-+++ b/cmake/OpenCVDetectVTK.cmake 2017-03-20 10:43:09.127963906 +0100
-@@ -8,7 +8,7 @@
- IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
- find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE)
- ELSE(VTK_RENDERING_BACKEND)
-- find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
-+ find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL2 vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
- ENDIF(VTK_RENDERING_BACKEND)
- ENDIF(VTK_FOUND)
-
diff --git a/media-libs/opencv/files/opencv-3.3.0-contrib-xfeatures2d.patch b/media-libs/opencv/files/opencv-3.3.0-contrib-xfeatures2d.patch
deleted file mode 100644
index 26e4ac767c37..000000000000
--- a/media-libs/opencv/files/opencv-3.3.0-contrib-xfeatures2d.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/modules/xfeatures2d/CMakeLists.txt 2017-09-16 14:28:38.440000000 +0200
-+++ b/modules/xfeatures2d/CMakeLists.txt 2017-09-16 14:27:21.350000000 +0200
-@@ -2,11 +2,11 @@
-
- ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_shape opencv_cudaarithm WRAP python java)
-
-+#include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake)
-+#include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake)
-+#set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d")
-+#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
-+#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
--include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake)
--include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake)
--set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d")
--download_boost_descriptors("${DOWNLOAD_DIR}" boost_status)
--download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status)
- if(NOT boost_status OR NOT vgg_status)
- ocv_module_disable(xfeatures2d)
- endif()
diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch
deleted file mode 100644
index 270c599d708c..000000000000
--- a/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff --git a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake
-index 678b450ab..c2a58bd00 100644
---- a/cmake/FindCUDA.cmake
-+++ b/cmake/FindCUDA.cmake
-@@ -283,7 +283,38 @@
- # CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core).
- # Only available for CUDA version 5.5+.
- # CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing).
--# Only available for CUDA version 5.5+.
-+# Only available for CUDA version 5.5+ and was split up
-+# in CUDA version 8.0+ and doesn't exist in combined
-+# form in CUDA version 9.0+.
-+# CUDA_nppial_LIBRARY -- NVIDIA Performance Primatives library (arithmetic and
-+# logical operation functions). Only available for CUDA
-+# version 8.0+.
-+# CUDA_nppicc_LIBRARY -- NVIDIA Performance Primatives library (color conversion
-+# and sampling functions). Only available for CUDA version
-+# 8.0+.
-+# CUDA_nppicom_LIBRARY -- NVIDIA Performance Primatives library (JPEG compression
-+# and decompression functions). Only available for CUDA
-+# version 8.0+.
-+# CUDA_nppidei_LIBRARY -- NVIDIA Performance Primatives library (data exchange and
-+# initialization functions). Only available for CUDA
-+# version 8.0+.
-+# CUDA_nppif_LIBRARY -- NVIDIA Performance Primatives library (filtering and
-+# computer vision functions). Only available for CUDA
-+# version 8.0+.
-+# CUDA_nppig_LIBRARY -- NVIDIA Performance Primatives library (geometry
-+# transformation functions). Only available for CUDA
-+# version 8.0+.
-+# CUDA_nppim_LIBRARY -- NVIDIA Performance Primatives library (morphological
-+# operation functions). Only available for CUDA version
-+# 8.0+.
-+# CUDA_nppist_LIBRARY -- NVIDIA Performance Primatives library (statistics and
-+# linear transform). Only available for CUDA version
-+# 8.0+.
-+# CUDA_nppisu_LIBRARY -- NVIDIA Performance Primatives library (memory support
-+# functions). Only available for CUDA version 8.0+.
-+# CUDA_nppitc_LIBRARY -- NVIDIA Performance Primatives library (threshold and
-+# compare operation functions). Only available for CUDA
-+# version 8.0+.
- # CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing).
- # Only available for CUDA version 5.5+.
- # CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
-@@ -522,6 +553,16 @@ macro(cuda_unset_include_and_libraries)
- unset(CUDA_npp_LIBRARY CACHE)
- unset(CUDA_nppc_LIBRARY CACHE)
- unset(CUDA_nppi_LIBRARY CACHE)
-+ unset(CUDA_nppial_LIBRARY CACHE)
-+ unset(CUDA_nppicc_LIBRARY CACHE)
-+ unset(CUDA_nppicom_LIBRARY CACHE)
-+ unset(CUDA_nppidei_LIBRARY CACHE)
-+ unset(CUDA_nppif_LIBRARY CACHE)
-+ unset(CUDA_nppig_LIBRARY CACHE)
-+ unset(CUDA_nppim_LIBRARY CACHE)
-+ unset(CUDA_nppist_LIBRARY CACHE)
-+ unset(CUDA_nppisu_LIBRARY CACHE)
-+ unset(CUDA_nppitc_LIBRARY CACHE)
- unset(CUDA_npps_LIBRARY CACHE)
- unset(CUDA_nvcuvenc_LIBRARY CACHE)
- unset(CUDA_nvcuvid_LIBRARY CACHE)
-@@ -787,7 +828,22 @@ if(NOT CUDA_VERSION VERSION_LESS "3.2")
- find_cuda_helper_libs(nvcuvid)
- endif()
- endif()
--if(CUDA_VERSION VERSION_GREATER "5.0")
-+if(CUDA_VERSION VERSION_GREATER "7.5")
-+ # In CUDA 8.0 NPP was splitted onto 12 separate libraries.
-+ find_cuda_helper_libs(nppc)
-+ find_cuda_helper_libs(nppial)
-+ find_cuda_helper_libs(nppicc)
-+ find_cuda_helper_libs(nppicom)
-+ find_cuda_helper_libs(nppidei)
-+ find_cuda_helper_libs(nppif)
-+ find_cuda_helper_libs(nppig)
-+ find_cuda_helper_libs(nppim)
-+ find_cuda_helper_libs(nppist)
-+ find_cuda_helper_libs(nppisu)
-+ find_cuda_helper_libs(nppitc)
-+ find_cuda_helper_libs(npps)
-+ set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}")
-+elseif(CUDA_VERSION VERSION_GREATER "5.0")
- # In CUDA 5.5 NPP was splitted onto 3 separate libraries.
- find_cuda_helper_libs(nppc)
- find_cuda_helper_libs(nppi)
-
-
diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch
deleted file mode 100644
index 384630002d98..000000000000
--- a/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/cmake/OpenCVDetectCUDA.cmake 2018-01-02 11:57:50.358147518 -0500
-+++ b/cmake/OpenCVDetectCUDA.cmake 2018-01-02 12:48:44.108965500 -0500
-@@ -104,7 +104,7 @@
- if(${CUDA_VERSION} VERSION_LESS "8.0")
- set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2")
- else()
-- set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1")
-+ set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1")
- endif()
- endif()
- endif()
-@@ -209,7 +209,7 @@ if(CUDA_FOUND)
- endif()
-
- if(UNIX OR APPLE)
-- set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
-+ set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC --expt-relaxed-constexpr)
- endif()
- if(APPLE)
- set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only)
-
diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch
deleted file mode 100644
index 43e2a0833cae..000000000000
--- a/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp b/./saturate_cast.hpp
-index ec9804c..4359d18 100644
---- a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp
-+++ b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp
-@@ -47,6 +47,9 @@
- #define OPENCV_CUDEV_UTIL_SATURATE_CAST_HPP
-
- #include "../common.hpp"
-+#if __CUDACC_VER_MAJOR__ >= 9
-+#include <cuda_fp16.h>
-+#endif
-
- namespace cv { namespace cudev {
-
-@@ -274,15 +277,25 @@ template <typename T, typename D> __device__ __forceinline__ D cast_fp16(T v);
-
- template <> __device__ __forceinline__ float cast_fp16<short, float>(short v)
- {
-+#if __CUDACC_VER_MAJOR__ >= 9
-+ return float(*(__half*)&v);
-+#else
- return __half2float(v);
-+#endif
- }
-
- template <> __device__ __forceinline__ short cast_fp16<float, short>(float v)
- {
-- return (short)__float2half_rn(v);
-+#if __CUDACC_VER_MAJOR__ >= 9
-+ __half h(v);
-+ return *(short*)&v;
-+#else
-+ return (short)__float2half_rn(v);
-+#endif
- }
- //! @}
-
- }}
-
- #endif
-+
diff --git a/media-libs/opencv/files/opencv-3.4.1-fix-build-with-va.patch b/media-libs/opencv/files/opencv-3.4.1-fix-build-with-va.patch
new file mode 100644
index 000000000000..813eb7e4ae65
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.4.1-fix-build-with-va.patch
@@ -0,0 +1,26 @@
+From 20f5fa8e3e880bc8b2e5156e9f25f7fb756ed8e4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com>
+Date: Wed, 28 Feb 2018 19:21:31 +0000
+Subject: [PATCH] Fix build with VA
+
+This commit readd ${VA_LIBRARIES} ${VA_INTEL_LIBRARIES}
+that was missed in commit 2200e13c7193e0fe9db4b9f7c4bee3a7ef043909
+
+ diff --git a/samples/va_intel/CMakeLists.txt b/samples/va_intel/CMakeLists.txt
+ - ocv_target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_VA_INTEL_SAMPLES_REQUIRED_DEPS} ${VA_LIBRARIES} ${VA_INTEL_LIBRARIES})
+ + ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_VA_INTEL_SAMPLES_REQUIRED_DEPS})
+---
+ samples/va_intel/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/samples/va_intel/CMakeLists.txt b/samples/va_intel/CMakeLists.txt
+index af51dd32061..04f2ea5fd40 100644
+--- a/samples/va_intel/CMakeLists.txt
++++ b/samples/va_intel/CMakeLists.txt
+@@ -17,5 +17,5 @@ ocv_include_modules_recurse(${OPENCV_VA_INTEL_SAMPLES_REQUIRED_DEPS})
+ file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
+ foreach(sample_filename ${all_samples})
+ ocv_define_sample(tgt ${sample_filename} va_intel)
+- ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_VA_INTEL_SAMPLES_REQUIRED_DEPS})
++ ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_VA_INTEL_SAMPLES_REQUIRED_DEPS} ${VA_LIBRARIES} ${VA_INTEL_LIBRARIES})
+ endforeach()
diff --git a/media-libs/opencv/files/opencv-3.4.1-remove-git-autodetect.patch b/media-libs/opencv/files/opencv-3.4.1-remove-git-autodetect.patch
new file mode 100644
index 000000000000..94b221ab9a8b
--- /dev/null
+++ b/media-libs/opencv/files/opencv-3.4.1-remove-git-autodetect.patch
@@ -0,0 +1,42 @@
+--- a/CMakeLists.txt 2019-01-10 19:29:06.831367707 +0100
++++ b/CMakeLists.txt 2019-01-10 19:30:11.125364384 +0100
+@@ -522,23 +522,23 @@
+ # ----------------------------------------------------------------------------
+ # Autodetect if we are in a GIT repository
+ # ----------------------------------------------------------------------------
+-find_host_package(Git QUIET)
++# find_host_package(Git QUIET)
+
+-if(NOT DEFINED OPENCV_VCSVERSION AND GIT_FOUND)
+- execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
+- WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
+- OUTPUT_VARIABLE OPENCV_VCSVERSION
+- RESULT_VARIABLE GIT_RESULT
+- ERROR_QUIET
+- OUTPUT_STRIP_TRAILING_WHITESPACE
+- )
+- if(NOT GIT_RESULT EQUAL 0)
+- set(OPENCV_VCSVERSION "unknown")
+- endif()
+-elseif(NOT DEFINED OPENCV_VCSVERSION)
+- # We don't have git:
+- set(OPENCV_VCSVERSION "unknown")
+-endif()
++# if(NOT DEFINED OPENCV_VCSVERSION AND GIT_FOUND)
++# execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --always --dirty --match "[0-9].[0-9].[0-9]*"
++# WORKING_DIRECTORY "${OpenCV_SOURCE_DIR}"
++# OUTPUT_VARIABLE OPENCV_VCSVERSION
++# RESULT_VARIABLE GIT_RESULT
++# ERROR_QUIET
++# OUTPUT_STRIP_TRAILING_WHITESPACE
++# )
++# if(NOT GIT_RESULT EQUAL 0)
++# set(OPENCV_VCSVERSION "unknown")
++# endif()
++# elseif(NOT DEFINED OPENCV_VCSVERSION)
++# # We don't have git:
++# set(OPENCV_VCSVERSION "unknown")
++#endif()
+
+
+ # ----------------------------------------------------------------------------