diff options
author | Amy Liffey <amynka@gentoo.org> | 2019-01-16 20:30:15 +0100 |
---|---|---|
committer | Amy Liffey <amynka@gentoo.org> | 2019-01-16 20:42:14 +0100 |
commit | 488d9073c92dd15c8b67506993c90c595d039bee (patch) | |
tree | 3746b942910c3ed1e9fff398e8784c2be4128a37 /media-libs/opencv | |
parent | profiles/package.mask: remove masks for removed packages (diff) | |
download | gentoo-488d9073c92dd15c8b67506993c90c595d039bee.tar.gz gentoo-488d9073c92dd15c8b67506993c90c595d039bee.tar.bz2 gentoo-488d9073c92dd15c8b67506993c90c595d039bee.zip |
media-libs/opencv: remove old versions 3.2.0, 3.3.0, 3.4.1-r2
Closes: https://bugs.gentoo.org/630438
Closes: https://bugs.gentoo.org/637080
Closes: https://bugs.gentoo.org/657076
Closes: https://bugs.gentoo.org/636030
Closes: https://bugs.gentoo.org/661674
Closes: https://bugs.gentoo.org/658568
Signed-off-by: Amy Liffey <amynka@gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
Diffstat (limited to 'media-libs/opencv')
15 files changed, 0 insertions, 1706 deletions
diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest index 9b52583151c3..4cfab222a0a3 100644 --- a/media-libs/opencv/Manifest +++ b/media-libs/opencv/Manifest @@ -1,9 +1,4 @@ -DIST imgcodecs-opencv-3.3.0.tar.gz 7724 BLAKE2B 0e1c931a6dd796a7fa8e4a958f9a959d3bbba9bfa636a74a22d839b2919a8e1d0843765bcb69c5fbff7156efad0db2e5b3b70a2fc6e1911c0317ba46142cc130 SHA512 9c6fc31830e299e3d15da1cfc3468fe23eecda970a02e5826e0a7cfba34200c557c0e46f940154a26e9916da05859a83376217cbe7452ec8d14e99bc76f63d37 DIST opencv-2.4.13.tar.gz 91669572 BLAKE2B 7f6be39e29c0db5d005cb14215fdf5955fa69c34d72c4f1e1fa8bf8de1e748a0d2fe5febb43296ef529c57e4dec8d1b6739c0c4df9e64657b9550ed382fbc4b9 SHA512 efdc4340fdf557dae44ac604c8c20f61ced89f99274264b61c2640f28741504462c6b57076e207040ca2513e3921275bdfbe6c22fc123bd50df78745e6b7bcd6 -DIST opencv-3.2.0.tar.gz 78861546 BLAKE2B 6d44263792b9cd2d009c7eeaddc2ef87acb01482cc9d36f2fe7717f981ff85a4e5007e4018d3ae15f383f6c3b1a0e009049f319bde0bce98575f04ccd6062cd8 SHA512 a338f4b4cdebfc2dcd763427b9c9632b3a3b0d072117b8e6367c73ea1ac21f7148553a23c7afbb44b01a48be3be95520789c2de1d6ae230b7b414ee713d3606d -DIST opencv-3.2.0_contrib.tar.gz 54765210 BLAKE2B 6c5bcb1c18da937751f234cc1edaae58416ab9ab5a3407a2ab2c22f4e174ffeb800396d34fe489f424b288fbd608e106cd5f5b458a06a509cea5f7d8e23a67a7 SHA512 eadb6a8a3625235b0c71e29c36d15d9342278aaf9148ef6a7e1aa80f4db0491aaf30b6df16bfd0cd358402b2a3059b6acbce23fb5fe2c0c57150a733ffbbff5a -DIST opencv-3.3.0.tar.gz 81238534 BLAKE2B 9eac7de8eefbcc9981a249343052c2dcada4e73c3406d545a89b9e6a054a7c7153933537d123f227caf51f23196fcaaed4135229db195e9c4139f2977e034e34 SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb -DIST opencv-3.3.0_contrib.tar.gz 54848519 BLAKE2B 53615af19426bf7a1540a6f23c7803276d6de594260b0d87b06b6b12c9e20326925a275e31e017784e8e876e30df7b8f326e192a75c5300252ae09f50d0d9a8b SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e DIST opencv-3.4.0-face_landmark_model.tar.gz 63299830 BLAKE2B 58f08cd8c030ee1c8b66e76a561fd625e112face427d001185f8d7c0eaace55adbd8474663021841a1382bfe393a210e64c51223441713cdb9156fac866a845c SHA512 2cd29ce42c08b2966db3ef4a2bc217ab3d07051819757ec6de8f3deea29e28f60abab39f101dba03f766f17018598e411bd687a7eaab0c681c113e10a2de2b23 DIST opencv-3.4.0-res10_300x300-caffeemodel.tar.gz 10036604 BLAKE2B 2a2de48fc420f13e7be146ac88f311901c5b4e409c30e466152e33cae1f8afd87dcb6d758af447c268d90bd67989c8798cd80cab172b10499a6ad5224509dbdf SHA512 96fee9f447d5739bc01a5cab37c453cf7237457dfb5d2bf93ac37f8e5aa557ac222316f449cd58e37e856abe4d8e9d4a7820daaba32f0b22cbcde8e340287d4b DIST opencv-3.4.1.tar.gz 87051748 BLAKE2B 87c83ab9b3d7fb048263f047aa5d6e95b153e1a28f3e34cc885eff7eb080a2258cfa1aa494cd56b32f1098ab158c17c23fc8464fcbe70642a3a1842f2fd1b4ac SHA512 e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b 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/opencv-3.2.0-r4.ebuild b/media-libs/opencv/opencv-3.2.0-r4.ebuild deleted file mode 100644 index 31102b464abf..000000000000 --- a/media-libs/opencv/opencv-3.2.0-r4.ebuild +++ /dev/null @@ -1,369 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python{2_7,3_4,3_5} ) - -inherit toolchain-funcs python-r1 java-pkg-opt-2 java-ant-2 \ - cmake-multilib - -DESCRIPTION="A collection of algorithms and sample code for various computer vision problems" -HOMEPAGE="https://opencv.org" - -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - contrib? ( https://github.com/${PN}/${PN}_contrib/archive/${PV}.tar.gz -> ${P}_contrib.tar.gz - contrib_xfeatures2d? ( https://dev.gentoo.org/~amynka/snap/vgg_boostdesc-${PV}.tar.gz ) )" -LICENSE="BSD" -SLOT="0/3.2" # subslot = libopencv* soname version -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux" -IUSE="contrib cuda debug +eigen examples ffmpeg gdal gflags glog gphoto2 gstreamer gtk ieee1394 jpeg jpeg2k lapack libav opencl openexr opengl openmp pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine contrib_cvv contrib_hdf contrib_sfm contrib_xfeatures2d" - -# OpenGL needs gtk or Qt installed to activate, otherwise build system -# will silently disable it without the user knowing, which defeats the -# purpose of the opengl use flag. -REQUIRED_USE=" - cuda? ( tesseract? ( opencl ) ) - gflags? ( contrib ) - glog? ( contrib ) - contrib_cvv? ( contrib qt5 ) - contrib_hdf? ( contrib ) - contrib_sfm? ( contrib eigen gflags glog ) - opengl? ( || ( gtk qt5 ) ) - python? ( ${PYTHON_REQUIRED_USE} ) - tesseract? ( contrib )" - -# The following logic is intrinsic in the build system, but we do not enforce -# it on the useflags since this just blocks emerging pointlessly: -# gtk? ( !qt5 ) -# openmp? ( !threads ) - -RDEPEND=" - app-arch/bzip2[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - cuda? ( dev-util/nvidia-cuda-toolkit:0= ) - contrib_hdf? ( sci-libs/hdf5 ) - ffmpeg? ( - libav? ( media-video/libav:0=[${MULTILIB_USEDEP}] ) - !libav? ( media-video/ffmpeg:0=[${MULTILIB_USEDEP}] ) - ) - gdal? ( sci-libs/gdal:= ) - gflags? ( dev-cpp/gflags[${MULTILIB_USEDEP}] ) - glog? ( dev-cpp/glog[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - ) - gtk? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/gtk+:2[${MULTILIB_USEDEP}] - opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] ) - ) - ieee1394? ( - media-libs/libdc1394[${MULTILIB_USEDEP}] - sys-libs/libraw1394[${MULTILIB_USEDEP}] - ) - java? ( >=virtual/jre-1.6:* ) - jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) - jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] ) - lapack? ( virtual/lapack ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/opengl[${MULTILIB_USEDEP}] - virtual/glu[${MULTILIB_USEDEP}] - ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] ) - qt5? ( - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - dev-qt/qttest:5 - dev-qt/qtconcurrent:5 - opengl? ( dev-qt/qtopengl:5 ) - ) - tesseract? ( app-text/tesseract[opencl=] ) - threads? ( dev-cpp/tbb[${MULTILIB_USEDEP}] ) - tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] ) - v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] ) - vtk? ( sci-libs/vtk[rendering] ) - webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] ) - xine? ( media-libs/xine-lib )" -DEPEND="${RDEPEND} - virtual/pkgconfig[${MULTILIB_USEDEP}] - eigen? ( dev-cpp/eigen:3 ) - java? ( >=virtual/jdk-1.6 )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/opencv2/cvconfig.h - /usr/include/opencv2/opencv_modules.hpp - # [contrib_cvv] - /usr/include/opencv2/cvv.hpp - /usr/include/opencv2/cvv/call_meta_data.hpp - /usr/include/opencv2/cvv/cvv.hpp - /usr/include/opencv2/cvv/debug_mode.hpp - /usr/include/opencv2/cvv/dmatch.hpp - /usr/include/opencv2/cvv/filter.hpp - /usr/include/opencv2/cvv/final_show.hpp - /usr/include/opencv2/cvv/show_image.hpp - # [contrib_hdf] - /usr/include/opencv2/hdf.hpp - /usr/include/opencv2/hdf/hdf5.hpp - # [vtk] - /usr/include/opencv2/viz.hpp - /usr/include/opencv2/viz/types.hpp - /usr/include/opencv2/viz/viz3d.hpp - /usr/include/opencv2/viz/vizcore.hpp - /usr/include/opencv2/viz/widget_accessor.hpp - /usr/include/opencv2/viz/widgets.hpp -) - -PATCHES=( - "${FILESDIR}/${PN}-3.0.0-gles.patch" - "${FILESDIR}/${PN}-3.1.0-java-magic.patch" - "${FILESDIR}/${PN}-3.1.0-find-libraries-fix.patch" - "${FILESDIR}/${P}-vtk.patch" - "${FILESDIR}/${P}-gcc-6.0.patch" - "${FILESDIR}/${PN}-3.2.0-fix_ussage_cpu_instructions.patch" - "${FILESDIR}/${P}-cpu-mno-sse2.patch" -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - cmake-utils_src_prepare - - # remove bundled stuff - rm -rf 3rdparty || die "Removing 3rd party components failed" - sed -e '/add_subdirectory(.*3rdparty.*)/ d' \ - -i CMakeLists.txt cmake/*cmake || die - - if use contrib && use contrib_xfeatures2d; then - cd "${WORKDIR}/${PN}_contrib-${PV}" || die - eapply "${FILESDIR}/${P}-contrib_xfeatures2d-autodownload.patch" - mv "${WORKDIR}"/*.i "${WORKDIR}/${PN}_contrib-${PV}"/modules/xfeatures2d/src/ || die - fi - - java-pkg-opt-2_src_prepare - - # this really belongs in src_prepare() too - JAVA_ANT_ENCODING="iso-8859-1" - # set encoding so even this cmake build will pick it up. - export ANT_OPTS+=" -Dfile.encoding=iso-8859-1" - java-ant-2_src_configure -} - -multilib_src_configure() { - # please dont sort here, order is the same as in CMakeLists.txt - GLOBALCMAKEARGS=( - # Optional 3rd party components - # =================================================== - -DWITH_1394=$(usex ieee1394) - # -DWITH_AVFOUNDATION=OFF # IOS - -DWITH_VTK=$(multilib_native_usex vtk) - -DWITH_EIGEN=$(usex eigen) - -DWITH_VFW=OFF # Video windows support - -DWITH_FFMPEG=$(usex ffmpeg) - -DWITH_GSTREAMER=$(usex gstreamer) - -DWITH_GSTREAMER_0_10=OFF # Don't want this - -DWITH_GTK=$(usex gtk) - -DWITH_GTK_2_X=$(usex gtk) - -DWITH_IPP=OFF - -DWITH_JASPER=$(usex jpeg2k) - -DWITH_JPEG=$(usex jpeg) - -DWITH_WEBP=$(usex webp) - -DWITH_OPENEXR=$(usex openexr) - -DWITH_OPENGL=$(usex opengl) - -DWITH_OPENVX=OFF - -DWITH_OPENNI=OFF # Not packaged - -DWITH_OPENNI2=OFF # Not packaged - -DWITH_PNG=$(usex png) - -DWITH_GDCM=OFF - -DWITH_PVAPI=OFF - -DWITH_GIGEAPI=OFF - -DWITH_ARAVIS=OFF - -DWITH_QT=$(multilib_native_usex qt5 5 OFF) - -DWITH_WIN32UI=OFF # Windows only - # -DWITH_QUICKTIME=OFF - # -DWITH_QTKIT=OFF - -DWITH_TBB=$(usex threads) - -DWITH_OPENMP=$(usex openmp) - -DWITH_CSTRIPES=OFF - -DWITH_PTHREADS_PF=ON - -DWITH_TIFF=$(usex tiff) - -DWITH_UNICAP=OFF # Not packaged - -DWITH_V4L=$(usex v4l) - -DWITH_LIBV4L=$(usex v4l) - -DWITH_DSHOW=ON # direct show supp - -DWITH_MSMF=OFF - -DWITH_XIMEA=OFF # Windows only - -DWITH_XINE=$(multilib_native_usex xine) - -DWITH_CLP=OFF - -DWITH_OPENCL=$(usex opencl) - -DWITH_OPENCL_SVM=OFF - -DWITH_OPENCLAMDFFT=$(usex opencl) - -DWITH_OPENCLAMDBLAS=$(usex opencl) - -DWITH_DIRECTX=OFF - -DWITH_INTELPERC=OFF - -DWITH_JAVA=$(multilib_native_usex java) # Ant needed, no compile flag - -DWITH_IPP_A=OFF - -DWITH_MATLAB=OFF - -DWITH_VA=$(usex vaapi) - -DWITH_VA_INTEL=$(usex vaapi) - -DWITH_GDAL=$(multilib_native_usex gdal) - -DWITH_GPHOTO2=$(usex gphoto2) - -DWITH_LAPACK=$(multilib_native_usex lapack) - # =================================================== - # CUDA build components: nvidia-cuda-toolkit takes care of GCC version - # =================================================== - -DWITH_CUDA=$(multilib_native_usex cuda) - -DWITH_CUBLAS=$(multilib_native_usex cuda) - -DWITH_CUFFT=$(multilib_native_usex cuda) - -DWITH_NVCUVID=OFF -# -DWITH_NVCUVID=$(usex cuda) - -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "") - # =================================================== - # OpenCV build components - # =================================================== - -DBUILD_SHARED_LIBS=ON - -DBUILD_ANDROID_EXAMPLES=OFF - -DBUILD_opencv_apps= - -DBUILD_DOCS=OFF # Doesn't install anyways. - -DBUILD_EXAMPLES=$(multilib_native_usex examples) - -DBUILD_PERF_TESTS=OFF - -DBUILD_TESTS=$(multilib_native_usex testprograms) - -DBUILD_WITH_DEBUG_INFO=$(usex debug) - # -DBUILD_WITH_STATIC_CRT=OFF - -DBUILD_WITH_DYNAMIC_IPP=OFF - -DBUILD_FAT_JAVA_LIB=$(multilib_native_usex java) - # -DBUILD_ANDROID_SERVICE=OFF - -DBUILD_CUDA_STUBS=$(multilib_native_usex cuda) - -DOPENCV_EXTRA_MODULES_PATH=$(usex contrib "${WORKDIR}/opencv_contrib-${PV}/modules" "") - # =================================================== - # OpenCV installation options - # =================================================== - -DINSTALL_CREATE_DISTRIB=OFF - -DINSTALL_C_EXAMPLES=$(multilib_native_usex examples) - -DINSTALL_TESTS=$(multilib_native_usex testprograms) - -DINSTALL_PYTHON_EXAMPLES=$(multilib_native_usex examples) - # -DINSTALL_ANDROID_EXAMPLES=OFF - -DINSTALL_TO_MANGLED_PATHS=OFF - # =================================================== - # OpenCV build options - # =================================================== - -DENABLE_CCACHE=OFF - -DENABLE_PRECOMPILED_HEADERS=$(usex pch) - -DENABLE_SOLUTION_FOLDERS=OFF - -DENABLE_PROFILING=OFF - -DENABLE_COVERAGE=OFF - -DENABLE_OMIT_FRAME_POINTER=OFF - -DENABLE_FAST_MATH=OFF - -DENABLE_SSE=OFF - -DENABLE_SSE2=OFF - -DENABLE_SSE3=OFF - -DENABLE_SSSE3=OFF - -DENABLE_SSE41=OFF - -DENABLE_SSE42=OFF - -DENABLE_POPCNT=OFF - -DENABLE_AVX=OFF - -DENABLE_AVX=OFF - -DENABLE_AVX2=OFF - -DENABLE_FMA3=OFF - -DENABLE_NEON=OFF - - -DHAVE_opencv_java=$(multilib_native_usex java YES NO) - -DENABLE_NOISY_WARNINGS=OFF - -DOPENCV_WARNINGS_ARE_ERRORS=OFF - -DENABLE_IMPL_COLLECTION=OFF - -DENABLE_INSTRUMENTATION=OFF - -DGENERATE_ABI_DESCRIPTOR=OFF - -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF - # =================================================== - # things we want to be hard off or not yet figured out - # =================================================== - -DBUILD_PACKAGE=OFF - -DENABLE_PROFILING=OFF - # =================================================== - # things we want to be hard enabled not worth useflag - # =================================================== - -DCMAKE_SKIP_RPATH=ON - -DOPENCV_DOC_INSTALL_PATH= - ) - - # =================================================== - # OpenCV Contrib Modules - # =================================================== - if use contrib; then - GLOBALCMAKEARGS+=( - -DBUILD_opencv_dnn=OFF - -DBUILD_opencv_dnns_easily_fooled=OFF - -DBUILD_opencv_xfeatures2d=$(usex contrib_xfeatures2d ON OFF) - -DBUILD_opencv_cvv=$(usex contrib_cvv ON OFF) - -DBUILD_opencv_hdf=$(multilib_native_usex contrib_hdf ON OFF) - -DBUILD_opencv_sfm=$(usex contrib_sfm ON OFF) - ) - - if multilib_is_native_abi; then - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex !tesseract) - ) - else - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=ON - ) - fi - fi - - # workaround for bug 413429 - tc-export CC CXX - - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} - -DPYTHON_EXECUTABLE=OFF - -DINSTALL_PYTHON_EXAMPLES=OFF - ) - - cmake-utils_src_configure -} - -python_module_compile() { - local BUILD_DIR=${orig_BUILD_DIR} - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} ) - - # Set all python variables to load the correct Gentoo paths - mycmakeargs+=( - # cheap trick: python_setup sets one of them as a symlink - # to the correct interpreter, and the other to fail-wrapper - -DPYTHON2_EXECUTABLE=$(type -P python2) - -DPYTHON3_EXECUTABLE=$(type -P python3) - -DINSTALL_PYTHON_EXAMPLES=$(usex examples) - ) - - # Regenerate cache file. Can't use rebuild_cache as it won't - # have the Gentoo specific options. - rm -rf CMakeCache.txt || die "rm failed" - cmake-utils_src_configure - cmake-utils_src_compile - cmake-utils_src_install - - # Remove compiled binary so new version compiles - # Avoid conflicts with new module builds as build system doesn't - # really support it. - rm -rf modules/python2 || die "rm failed" -} - -multilib_src_install() { - cmake-utils_src_install - - # Build and install the python modules for all targets - if multilib_is_native_abi && use python; then - local orig_BUILD_DIR=${BUILD_DIR} - python_foreach_impl python_module_compile - fi -} diff --git a/media-libs/opencv/opencv-3.3.0-r6.ebuild b/media-libs/opencv/opencv-3.3.0-r6.ebuild deleted file mode 100644 index f911f83e57ed..000000000000 --- a/media-libs/opencv/opencv-3.3.0-r6.ebuild +++ /dev/null @@ -1,465 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) - -inherit toolchain-funcs python-r1 java-pkg-opt-2 java-ant-2 cmake-multilib - -DESCRIPTION="A collection of algorithms and sample code for various computer vision problems" -HOMEPAGE="https://opencv.org" -TINY_DNN_PV="1.0.0a3" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - https://dev.gentoo.org/~amynka/snap/imgcodecs-${P}.tar.gz - contrib? ( https://github.com/${PN}/${PN}_contrib/archive/${PV}.tar.gz -> ${P}_contrib.tar.gz - contrib_dnn? ( https://github.com/tiny-dnn/tiny-dnn/archive/v${TINY_DNN_PV}.tar.gz -> tiny-dnn-${TINY_DNN_PV}.tar.gz ) - contrib_xfeatures2d? ( https://dev.gentoo.org/~amynka/snap/vgg_boostdesc-3.2.0.tar.gz ) ) " -LICENSE="BSD" -SLOT="0/3.3" # subslot = libopencv* soname version -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux" -IUSE="contrib cuda debug +eigen examples ffmpeg gdal gflags glog gphoto2 gstreamer gtk ieee1394 jpeg jpeg2k lapack libav opencl openexr opengl openmp pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine contrib_cvv contrib_dnn contrib_hdf contrib_sfm contrib_xfeatures2d" - -# OpenGL needs gtk or Qt installed to activate, otherwise build system -# will silently disable it without the user knowing, which defeats the -# purpose of the opengl use flag. -REQUIRED_USE=" - cuda? ( tesseract? ( opencl ) ) - gflags? ( contrib ) - glog? ( contrib ) - contrib_cvv? ( contrib qt5 ) - contrib_dnn? ( contrib ) - contrib_hdf? ( contrib ) - contrib_sfm? ( contrib eigen gflags glog ) - contrib_xfeatures2d? ( contrib cuda ) - java? ( python ) - opengl? ( || ( gtk qt5 ) ) - python? ( ${PYTHON_REQUIRED_USE} ) - tesseract? ( contrib )" - -# The following logic is intrinsic in the build system, but we do not enforce -# it on the useflags since this just blocks emerging pointlessly: -# gtk? ( !qt5 ) -# openmp? ( !threads ) - -RDEPEND=" - app-arch/bzip2[${MULTILIB_USEDEP}] - dev-libs/protobuf:=[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - cuda? ( dev-util/nvidia-cuda-toolkit:0= ) - contrib_hdf? ( sci-libs/hdf5 ) - ffmpeg? ( - libav? ( media-video/libav:0=[${MULTILIB_USEDEP}] ) - !libav? ( media-video/ffmpeg:0=[${MULTILIB_USEDEP}] ) - ) - gdal? ( sci-libs/gdal:= ) - gflags? ( dev-cpp/gflags[${MULTILIB_USEDEP}] ) - glog? ( dev-cpp/glog[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - ) - gtk? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/gtk+:2[${MULTILIB_USEDEP}] - opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] ) - ) - ieee1394? ( - media-libs/libdc1394[${MULTILIB_USEDEP}] - sys-libs/libraw1394[${MULTILIB_USEDEP}] - ) - java? ( >=virtual/jre-1.6:* ) - jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) - jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] ) - lapack? ( virtual/lapack ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/opengl[${MULTILIB_USEDEP}] - virtual/glu[${MULTILIB_USEDEP}] - ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] ) - qt5? ( - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - dev-qt/qttest:5 - dev-qt/qtconcurrent:5 - opengl? ( dev-qt/qtopengl:5 ) - ) - tesseract? ( app-text/tesseract[opencl=] ) - threads? ( dev-cpp/tbb[${MULTILIB_USEDEP}] ) - tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] ) - v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] ) - vtk? ( sci-libs/vtk[rendering] ) - webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] ) - xine? ( media-libs/xine-lib )" -DEPEND="${RDEPEND} - virtual/pkgconfig[${MULTILIB_USEDEP}] - contrib_dnn? ( dev-libs/cereal ) - eigen? ( dev-cpp/eigen:3 ) - java? ( >=virtual/jdk-1.6 )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/opencv2/cvconfig.h - /usr/include/opencv2/opencv_modules.hpp - # [contrib_cvv] - /usr/include/opencv2/cvv.hpp - /usr/include/opencv2/cvv/call_meta_data.hpp - /usr/include/opencv2/cvv/cvv.hpp - /usr/include/opencv2/cvv/debug_mode.hpp - /usr/include/opencv2/cvv/dmatch.hpp - /usr/include/opencv2/cvv/filter.hpp - /usr/include/opencv2/cvv/final_show.hpp - /usr/include/opencv2/cvv/show_image.hpp - # [contrib_hdf] - /usr/include/opencv2/hdf.hpp - /usr/include/opencv2/hdf/hdf5.hpp - # [vtk] - /usr/include/opencv2/viz.hpp - /usr/include/opencv2/viz/types.hpp - /usr/include/opencv2/viz/viz3d.hpp - /usr/include/opencv2/viz/vizcore.hpp - /usr/include/opencv2/viz/widget_accessor.hpp - /usr/include/opencv2/viz/widgets.hpp - # [cudev] - /usr/include/opencv2/cudaarithm.hpp - /usr/include/opencv2/cudabgsegm.hpp - /usr/include/opencv2/cudacodec.hpp - /usr/include/opencv2/cudafeatures2d.hpp - /usr/include/opencv2/cudafilters.hpp - /usr/include/opencv2/cudaimgproc.hpp - /usr/include/opencv2/cudalegacy.hpp - /usr/include/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp - /usr/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp - /usr/include/opencv2/cudalegacy/NCV.hpp - /usr/include/opencv2/cudalegacy/NCVPyramid.hpp - /usr/include/opencv2/cudalegacy/NPP_staging.hpp - /usr/include/opencv2/cudaobjdetect.hpp - /usr/include/opencv2/cudaoptflow.hpp - /usr/include/opencv2/cudastereo.hpp - /usr/include/opencv2/cudawarping.hpp - /usr/include/opencv2/cudev/block/block.hpp - /usr/include/opencv2/cudev/block/detail/reduce.hpp - /usr/include/opencv2/cudev/block/detail/reduce_key_val.hpp - /usr/include/opencv2/cudev/block/dynamic_smem.hpp - /usr/include/opencv2/cudev/block/reduce.hpp - /usr/include/opencv2/cudev/block/scan.hpp - /usr/include/opencv2/cudev/block/vec_distance.hpp - /usr/include/opencv2/cudev/common.hpp - /usr/include/opencv2/cudev/expr/binary_func.hpp - /usr/include/opencv2/cudev/expr/binary_op.hpp - /usr/include/opencv2/cudev/expr/color.hpp - /usr/include/opencv2/cudev/expr/deriv.hpp - /usr/include/opencv2/cudev/expr/expr.hpp - /usr/include/opencv2/cudev/expr/per_element_func.hpp - /usr/include/opencv2/cudev/expr/reduction.hpp - /usr/include/opencv2/cudev/expr/unary_func.hpp - /usr/include/opencv2/cudev/expr/unary_op.hpp - /usr/include/opencv2/cudev/expr/warping.hpp - /usr/include/opencv2/cudev/functional/color_cvt.hpp - /usr/include/opencv2/cudev/functional/detail/color_cvt.hpp - /usr/include/opencv2/cudev/functional/functional.hpp - /usr/include/opencv2/cudev/functional/tuple_adapter.hpp - /usr/include/opencv2/cudev/grid/copy.hpp - /usr/include/opencv2/cudev/grid/detail/copy.hpp - /usr/include/opencv2/cudev/grid/detail/histogram.hpp - /usr/include/opencv2/cudev/grid/detail/integral.hpp - /usr/include/opencv2/cudev/grid/detail/minmaxloc.hpp - /usr/include/opencv2/cudev/grid/detail/pyr_down.hpp - /usr/include/opencv2/cudev/grid/detail/pyr_up.hpp - /usr/include/opencv2/cudev/grid/detail/reduce.hpp - /usr/include/opencv2/cudev/grid/detail/reduce_to_column.hpp - /usr/include/opencv2/cudev/grid/detail/reduce_to_row.hpp - /usr/include/opencv2/cudev/grid/detail/split_merge.hpp - /usr/include/opencv2/cudev/grid/detail/transform.hpp - /usr/include/opencv2/cudev/grid/detail/transpose.hpp - /usr/include/opencv2/cudev/grid/histogram.hpp - /usr/include/opencv2/cudev/grid/integral.hpp - /usr/include/opencv2/cudev/grid/pyramids.hpp - /usr/include/opencv2/cudev/grid/reduce.hpp - /usr/include/opencv2/cudev/grid/reduce_to_vec.hpp - /usr/include/opencv2/cudev/grid/split_merge.hpp - /usr/include/opencv2/cudev/grid/transform.hpp - /usr/include/opencv2/cudev/grid/transpose.hpp - /usr/include/opencv2/cudev.hpp - /usr/include/opencv2/cudev/ptr2d/constant.hpp - /usr/include/opencv2/cudev/ptr2d/deriv.hpp - /usr/include/opencv2/cudev/ptr2d/detail/gpumat.hpp - /usr/include/opencv2/cudev/ptr2d/extrapolation.hpp - /usr/include/opencv2/cudev/ptr2d/glob.hpp - /usr/include/opencv2/cudev/ptr2d/gpumat.hpp - /usr/include/opencv2/cudev/ptr2d/interpolation.hpp - /usr/include/opencv2/cudev/ptr2d/lut.hpp - /usr/include/opencv2/cudev/ptr2d/mask.hpp - /usr/include/opencv2/cudev/ptr2d/remap.hpp - /usr/include/opencv2/cudev/ptr2d/resize.hpp - /usr/include/opencv2/cudev/ptr2d/texture.hpp - /usr/include/opencv2/cudev/ptr2d/traits.hpp - /usr/include/opencv2/cudev/ptr2d/transform.hpp - /usr/include/opencv2/cudev/ptr2d/warping.hpp - /usr/include/opencv2/cudev/ptr2d/zip.hpp - /usr/include/opencv2/cudev/util/atomic.hpp - /usr/include/opencv2/cudev/util/detail/tuple.hpp - /usr/include/opencv2/cudev/util/detail/type_traits.hpp - /usr/include/opencv2/cudev/util/limits.hpp - /usr/include/opencv2/cudev/util/saturate_cast.hpp - /usr/include/opencv2/cudev/util/simd_functions.hpp - /usr/include/opencv2/cudev/util/tuple.hpp - /usr/include/opencv2/cudev/util/type_traits.hpp - /usr/include/opencv2/cudev/util/vec_math.hpp - /usr/include/opencv2/cudev/util/vec_traits.hpp - /usr/include/opencv2/cudev/warp/detail/reduce.hpp - /usr/include/opencv2/cudev/warp/detail/reduce_key_val.hpp - /usr/include/opencv2/cudev/warp/reduce.hpp - /usr/include/opencv2/cudev/warp/scan.hpp - /usr/include/opencv2/cudev/warp/shuffle.hpp - /usr/include/opencv2/cudev/warp/warp.hpp -) - -PATCHES=( - "${FILESDIR}/${PN}-3.0.0-gles.patch" - "${FILESDIR}/${PN}-3.1.0-java-magic.patch" - "${FILESDIR}/${PN}-3.1.0-find-libraries-fix.patch" - "${WORKDIR}/${P}-imgcodecs-gcc.patch" # bug 627958 and https://github.com/opencv/opencv/pull/9376 - "${FILESDIR}/${P}-cuda9-cmake.patch" - "${FILESDIR}/${P}-cuda9-saturate.patch" - "${FILESDIR}/${P}-cuda9-compute20.patch" -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - cmake-utils_src_prepare - - # remove bundled stuff - rm -rf 3rdparty || die "Removing 3rd party components failed" - sed -e '/add_subdirectory(.*3rdparty.*)/ d' \ - -i CMakeLists.txt cmake/*cmake || die - - if use contrib && use contrib_dnn; then - cd "${WORKDIR}/${PN}_contrib-${PV}" || die - eapply "${FILESDIR}/${P}-remove-tiny-dnn-autodownload.patch" - fi - - if use contrib && use contrib_xfeatures2d; then - cd "${WORKDIR}/${PN}_contrib-${PV}" || die - eapply "${FILESDIR}/${P}-contrib-xfeatures2d.patch" - mv "${WORKDIR}"/*.i "${WORKDIR}/${PN}_contrib-${PV}"/modules/xfeatures2d/src/ || die - fi - - java-pkg-opt-2_src_prepare - - # this really belongs in src_prepare() too - JAVA_ANT_ENCODING="iso-8859-1" - # set encoding so even this cmake build will pick it up. - export ANT_OPTS+=" -Dfile.encoding=iso-8859-1" - java-ant-2_src_configure -} - -multilib_src_configure() { - # please dont sort here, order is the same as in CMakeLists.txt - GLOBALCMAKEARGS=( - # Optional 3rd party components - # =================================================== - -DWITH_1394=$(usex ieee1394) - # -DWITH_AVFOUNDATION=OFF # IOS - -DWITH_VTK=$(multilib_native_usex vtk) - -DWITH_EIGEN=$(usex eigen) - -DWITH_VFW=OFF # Video windows support - -DWITH_FFMPEG=$(usex ffmpeg) - -DWITH_GSTREAMER=$(usex gstreamer) - -DWITH_GSTREAMER_0_10=OFF # Don't want this - -DWITH_GTK=$(usex gtk) - -DWITH_GTK_2_X=$(usex gtk) - -DWITH_IPP=OFF - -DWITH_JASPER=$(usex jpeg2k) - -DWITH_JPEG=$(usex jpeg) - -DWITH_WEBP=$(usex webp) - -DWITH_OPENEXR=$(usex openexr) - -DWITH_OPENGL=$(usex opengl) - -DWITH_OPENVX=OFF - -DWITH_OPENNI=OFF # Not packaged - -DWITH_OPENNI2=OFF # Not packaged - -DWITH_PNG=$(usex png) - -DWITH_GDCM=OFF - -DWITH_PVAPI=OFF - -DWITH_GIGEAPI=OFF - -DWITH_ARAVIS=OFF - -DWITH_QT=$(multilib_native_usex qt5 5 OFF) - -DWITH_WIN32UI=OFF # Windows only - # -DWITH_QUICKTIME=OFF - # -DWITH_QTKIT=OFF - -DWITH_TBB=$(usex threads) - -DWITH_OPENMP=$(usex openmp) - -DWITH_CSTRIPES=OFF - -DWITH_PTHREADS_PF=ON - -DWITH_TIFF=$(usex tiff) - -DWITH_UNICAP=OFF # Not packaged - -DWITH_V4L=$(usex v4l) - -DWITH_LIBV4L=$(usex v4l) - -DWITH_DSHOW=ON # direct show supp - -DWITH_MSMF=OFF - -DWITH_XIMEA=OFF # Windows only - -DWITH_XINE=$(multilib_native_usex xine) - -DWITH_CLP=OFF - -DWITH_OPENCL=$(usex opencl) - -DWITH_OPENCL_SVM=OFF - -DWITH_OPENCLAMDFFT=$(usex opencl) - -DWITH_OPENCLAMDBLAS=$(usex opencl) - -DWITH_DIRECTX=OFF - -DWITH_INTELPERC=OFF - -DWITH_JAVA=$(multilib_native_usex java) # Ant needed, no compile flag - -DWITH_IPP_A=OFF - -DWITH_MATLAB=OFF - -DWITH_VA=$(usex vaapi) - -DWITH_VA_INTEL=$(usex vaapi) - -DWITH_GDAL=$(multilib_native_usex gdal) - -DWITH_GPHOTO2=$(usex gphoto2) - -DWITH_LAPACK=$(multilib_native_usex lapack) - -DWITH_ITT=OFF # 3dparty libs itt_notify - # =================================================== - # CUDA build components: nvidia-cuda-toolkit takes care of GCC version - # =================================================== - -DWITH_CUDA=$(multilib_native_usex cuda) - -DWITH_CUBLAS=$(multilib_native_usex cuda) - -DWITH_CUFFT=$(multilib_native_usex cuda) - -DWITH_NVCUVID=OFF -# -DWITH_NVCUVID=$(usex cuda) - -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "") - # =================================================== - # OpenCV build components - # =================================================== - -DBUILD_SHARED_LIBS=ON - -DBUILD_ANDROID_EXAMPLES=OFF - -DBUILD_opencv_apps= - -DBUILD_DOCS=OFF # Doesn't install anyways. - -DBUILD_EXAMPLES=$(multilib_native_usex examples) - -DBUILD_PERF_TESTS=OFF - -DBUILD_TESTS=$(multilib_native_usex testprograms) - -DBUILD_WITH_DEBUG_INFO=$(usex debug) - # -DBUILD_WITH_STATIC_CRT=OFF - -DBUILD_WITH_DYNAMIC_IPP=OFF - -DBUILD_FAT_JAVA_LIB=$(multilib_native_usex java) - # -DBUILD_ANDROID_SERVICE=OFF - -DBUILD_CUDA_STUBS=$(multilib_native_usex cuda) - -DOPENCV_EXTRA_MODULES_PATH=$(usex contrib "${WORKDIR}/opencv_contrib-${PV}/modules" "") - # =================================================== - # OpenCV installation options - # =================================================== - -DINSTALL_CREATE_DISTRIB=OFF - -DINSTALL_C_EXAMPLES=$(multilib_native_usex examples) - -DINSTALL_TESTS=$(multilib_native_usex testprograms) - -DINSTALL_PYTHON_EXAMPLES=$(multilib_native_usex examples) - # -DINSTALL_ANDROID_EXAMPLES=OFF - -DINSTALL_TO_MANGLED_PATHS=OFF - # =================================================== - # OpenCV build options - # =================================================== - -DENABLE_CCACHE=OFF - -DENABLE_PRECOMPILED_HEADERS=$(usex pch) - -DENABLE_SOLUTION_FOLDERS=OFF - -DENABLE_PROFILING=OFF - -DENABLE_COVERAGE=OFF - - -DHAVE_opencv_java=$(multilib_native_usex java YES NO) - -DENABLE_NOISY_WARNINGS=OFF - -DOPENCV_WARNINGS_ARE_ERRORS=OFF - -DENABLE_IMPL_COLLECTION=OFF - -DENABLE_INSTRUMENTATION=OFF - -DGENERATE_ABI_DESCRIPTOR=OFF - -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF - # =================================================== - # things we want to be hard off or not yet figured out - # =================================================== - -DBUILD_PACKAGE=OFF - # =================================================== - # Not building protobuf but update files bug #631418 - # =================================================== - -DBUILD_PROTOBUF=OFF - -DPROTOBUF_UPDATE_FILES=ON - # =================================================== - # things we want to be hard enabled not worth useflag - # =================================================== - -DCMAKE_SKIP_RPATH=ON - -DOPENCV_DOC_INSTALL_PATH= - ) - - # =================================================== - # OpenCV Contrib Modules - # =================================================== - if use contrib; then - GLOBALCMAKEARGS+=( - -DBUILD_opencv_dnn=$(usex contrib_dnn ON OFF) - -DTINYDNN_ROOT="${WORKDIR}/tiny-dnn-${TINY_DNN_PV}" - -DBUILD_opencv_dnns_easily_fooled=OFF - -DBUILD_opencv_xfeatures2d=$(usex contrib_xfeatures2d ON OFF) - -DBUILD_opencv_cvv=$(usex contrib_cvv ON OFF) - -DBUILD_opencv_hdf=$(multilib_native_usex contrib_hdf ON OFF) - -DBUILD_opencv_sfm=$(usex contrib_sfm ON OFF) - ) - - if multilib_is_native_abi; then - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex !tesseract) - ) - else - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=ON - ) - fi - fi - - # workaround for bug 413429 - tc-export CC CXX - - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} - -DPYTHON_EXECUTABLE=OFF - -DINSTALL_PYTHON_EXAMPLES=OFF - ) - - cmake-utils_src_configure -} - -python_module_compile() { - local BUILD_DIR=${orig_BUILD_DIR} - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} ) - - # Set all python variables to load the correct Gentoo paths - mycmakeargs+=( - # cheap trick: python_setup sets one of them as a symlink - # to the correct interpreter, and the other to fail-wrapper - -DPYTHON2_EXECUTABLE=$(type -P python2) - -DPYTHON3_EXECUTABLE=$(type -P python3) - -DINSTALL_PYTHON_EXAMPLES=$(usex examples) - ) - - # Regenerate cache file. Can't use rebuild_cache as it won't - # have the Gentoo specific options. - rm -rf CMakeCache.txt || die "rm failed" - cmake-utils_src_configure - cmake-utils_src_compile - cmake-utils_src_install - - # Remove compiled binary so new version compiles - # Avoid conflicts with new module builds as build system doesn't - # really support it. - rm -rf modules/python2 || die "rm failed" -} - -multilib_src_install() { - cmake-utils_src_install - - # Build and install the python modules for all targets - if multilib_is_native_abi && use python; then - local orig_BUILD_DIR=${BUILD_DIR} - python_foreach_impl python_module_compile - fi -} diff --git a/media-libs/opencv/opencv-3.4.1-r2.ebuild b/media-libs/opencv/opencv-3.4.1-r2.ebuild deleted file mode 100644 index 5da1df041fd6..000000000000 --- a/media-libs/opencv/opencv-3.4.1-r2.ebuild +++ /dev/null @@ -1,497 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) - -inherit java-pkg-opt-2 java-ant-2 python-r1 toolchain-funcs cmake-multilib - -DESCRIPTION="A collection of algorithms and sample code for various computer vision problems" -HOMEPAGE="https://opencv.org" -TINY_DNN_PV="1.0.0a3" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - dnn_samples? ( https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-res10_300x300-caffeemodel.tar.gz ) - contrib? ( - https://github.com/${PN}/${PN}_contrib/archive/${PV}.tar.gz -> ${P}_contrib.tar.gz - contrib_dnn? ( https://github.com/tiny-dnn/tiny-dnn/archive/v${TINY_DNN_PV}.tar.gz -> tiny-dnn-${TINY_DNN_PV}.tar.gz - https://dev.gentoo.org/~amynka/snap/${PN}-3.4.0-face_landmark_model.tar.gz - ) - contrib_xfeatures2d? ( https://dev.gentoo.org/~amynka/snap/vgg_boostdesc-3.2.0.tar.gz ) - )" - -LICENSE="BSD" -SLOT="0/3.4.1" # subslot = libopencv* soname version -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux" -IUSE="contrib contrib_cvv contrib_dnn contrib_hdf contrib_sfm contrib_xfeatures2d cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_popcnt cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cuda debug dnn_samples +eigen examples ffmpeg gdal gflags glog gphoto2 gstreamer gtk ieee1394 jpeg jpeg2k lapack libav opencl openexr opengl openmp pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine" -# OpenGL needs gtk or Qt installed to activate, otherwise build system -# will silently disable it Wwithout the user knowing, which defeats the -# purpose of the opengl use flag. -REQUIRED_USE=" - cuda? ( tesseract? ( opencl ) ) - dnn_samples? ( examples ) - gflags? ( contrib ) - glog? ( contrib ) - contrib_cvv? ( contrib qt5 ) - contrib_dnn? ( contrib ) - contrib_hdf? ( contrib ) - contrib_sfm? ( contrib eigen gflags glog ) - contrib_xfeatures2d? ( contrib cuda ) - java? ( python ) - opengl? ( || ( gtk qt5 ) ) - python? ( ${PYTHON_REQUIRED_USE} ) - tesseract? ( contrib )" - -# The following logic is intrinsic in the build system, but we do not enforce -# it on the useflags since this just blocks emerging pointlessly: -# gtk? ( !qt5 ) -# openmp? ( !threads ) - -RDEPEND=" - app-arch/bzip2[${MULTILIB_USEDEP}] - dev-libs/protobuf:=[${MULTILIB_USEDEP}] - sys-libs/zlib[${MULTILIB_USEDEP}] - cuda? ( dev-util/nvidia-cuda-toolkit:0= ) - contrib_hdf? ( sci-libs/hdf5 ) - ffmpeg? ( - libav? ( media-video/libav:0=[${MULTILIB_USEDEP}] ) - !libav? ( media-video/ffmpeg:0=[${MULTILIB_USEDEP}] ) - ) - gdal? ( sci-libs/gdal:= ) - gflags? ( dev-cpp/gflags[${MULTILIB_USEDEP}] ) - glog? ( dev-cpp/glog[${MULTILIB_USEDEP}] ) - gphoto2? ( media-libs/libgphoto2[${MULTILIB_USEDEP}] ) - gstreamer? ( - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] - media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] - ) - gtk? ( - dev-libs/glib:2[${MULTILIB_USEDEP}] - x11-libs/gtk+:2[${MULTILIB_USEDEP}] - opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] ) - ) - ieee1394? ( - media-libs/libdc1394[${MULTILIB_USEDEP}] - sys-libs/libraw1394[${MULTILIB_USEDEP}] - ) - java? ( >=virtual/jre-1.6:* ) - jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) - jpeg2k? ( media-libs/jasper:=[${MULTILIB_USEDEP}] ) - lapack? ( virtual/lapack ) - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) - openexr? ( media-libs/openexr[${MULTILIB_USEDEP}] ) - opengl? ( - virtual/opengl[${MULTILIB_USEDEP}] - virtual/glu[${MULTILIB_USEDEP}] - ) - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] ) - qt5? ( - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - dev-qt/qttest:5 - dev-qt/qtconcurrent:5 - opengl? ( dev-qt/qtopengl:5 ) - ) - tesseract? ( app-text/tesseract[opencl=] ) - threads? ( dev-cpp/tbb[${MULTILIB_USEDEP}] ) - tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] ) - v4l? ( >=media-libs/libv4l-0.8.3[${MULTILIB_USEDEP}] ) - vtk? ( sci-libs/vtk[rendering] ) - webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] ) - xine? ( media-libs/xine-lib )" -DEPEND="${RDEPEND} - virtual/pkgconfig[${MULTILIB_USEDEP}] - contrib_dnn? ( dev-libs/cereal ) - eigen? ( dev-cpp/eigen:3 ) - java? ( >=virtual/jdk-1.6 )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/opencv2/cvconfig.h - /usr/include/opencv2/opencv_modules.hpp - # [contrib_cvv] - /usr/include/opencv2/cvv.hpp - /usr/include/opencv2/cvv/call_meta_data.hpp - /usr/include/opencv2/cvv/cvv.hpp - /usr/include/opencv2/cvv/debug_mode.hpp - /usr/include/opencv2/cvv/dmatch.hpp - /usr/include/opencv2/cvv/filter.hpp - /usr/include/opencv2/cvv/final_show.hpp - /usr/include/opencv2/cvv/show_image.hpp - # [contrib_hdf] - /usr/include/opencv2/hdf.hpp - /usr/include/opencv2/hdf/hdf5.hpp - # [vtk] - /usr/include/opencv2/viz.hpp - /usr/include/opencv2/viz/types.hpp - /usr/include/opencv2/viz/viz3d.hpp - /usr/include/opencv2/viz/vizcore.hpp - /usr/include/opencv2/viz/widget_accessor.hpp - /usr/include/opencv2/viz/widgets.hpp - # [cudev] - /usr/include/opencv2/cudaarithm.hpp - /usr/include/opencv2/cudabgsegm.hpp - /usr/include/opencv2/cudacodec.hpp - /usr/include/opencv2/cudafeatures2d.hpp - /usr/include/opencv2/cudafilters.hpp - /usr/include/opencv2/cudaimgproc.hpp - /usr/include/opencv2/cudalegacy.hpp - /usr/include/opencv2/cudalegacy/NCVBroxOpticalFlow.hpp - /usr/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp - /usr/include/opencv2/cudalegacy/NCV.hpp - /usr/include/opencv2/cudalegacy/NCVPyramid.hpp - /usr/include/opencv2/cudalegacy/NPP_staging.hpp - /usr/include/opencv2/cudaobjdetect.hpp - /usr/include/opencv2/cudaoptflow.hpp - /usr/include/opencv2/cudastereo.hpp - /usr/include/opencv2/cudawarping.hpp - /usr/include/opencv2/cudev/block/block.hpp - /usr/include/opencv2/cudev/block/detail/reduce.hpp - /usr/include/opencv2/cudev/block/detail/reduce_key_val.hpp - /usr/include/opencv2/cudev/block/dynamic_smem.hpp - /usr/include/opencv2/cudev/block/reduce.hpp - /usr/include/opencv2/cudev/block/scan.hpp - /usr/include/opencv2/cudev/block/vec_distance.hpp - /usr/include/opencv2/cudev/common.hpp - /usr/include/opencv2/cudev/expr/binary_func.hpp - /usr/include/opencv2/cudev/expr/binary_op.hpp - /usr/include/opencv2/cudev/expr/color.hpp - /usr/include/opencv2/cudev/expr/deriv.hpp - /usr/include/opencv2/cudev/expr/expr.hpp - /usr/include/opencv2/cudev/expr/per_element_func.hpp - /usr/include/opencv2/cudev/expr/reduction.hpp - /usr/include/opencv2/cudev/expr/unary_func.hpp - /usr/include/opencv2/cudev/expr/unary_op.hpp - /usr/include/opencv2/cudev/expr/warping.hpp - /usr/include/opencv2/cudev/functional/color_cvt.hpp - /usr/include/opencv2/cudev/functional/detail/color_cvt.hpp - /usr/include/opencv2/cudev/functional/functional.hpp - /usr/include/opencv2/cudev/functional/tuple_adapter.hpp - /usr/include/opencv2/cudev/grid/copy.hpp - /usr/include/opencv2/cudev/grid/detail/copy.hpp - /usr/include/opencv2/cudev/grid/detail/histogram.hpp - /usr/include/opencv2/cudev/grid/detail/integral.hpp - /usr/include/opencv2/cudev/grid/detail/minmaxloc.hpp - /usr/include/opencv2/cudev/grid/detail/pyr_down.hpp - /usr/include/opencv2/cudev/grid/detail/pyr_up.hpp - /usr/include/opencv2/cudev/grid/detail/reduce.hpp - /usr/include/opencv2/cudev/grid/detail/reduce_to_column.hpp - /usr/include/opencv2/cudev/grid/detail/reduce_to_row.hpp - /usr/include/opencv2/cudev/grid/detail/split_merge.hpp - /usr/include/opencv2/cudev/grid/detail/transform.hpp - /usr/include/opencv2/cudev/grid/detail/transpose.hpp - /usr/include/opencv2/cudev/grid/histogram.hpp - /usr/include/opencv2/cudev/grid/integral.hpp - /usr/include/opencv2/cudev/grid/pyramids.hpp - /usr/include/opencv2/cudev/grid/reduce.hpp - /usr/include/opencv2/cudev/grid/reduce_to_vec.hpp - /usr/include/opencv2/cudev/grid/split_merge.hpp - /usr/include/opencv2/cudev/grid/transform.hpp - /usr/include/opencv2/cudev/grid/transpose.hpp - /usr/include/opencv2/cudev.hpp - /usr/include/opencv2/cudev/ptr2d/constant.hpp - /usr/include/opencv2/cudev/ptr2d/deriv.hpp - /usr/include/opencv2/cudev/ptr2d/detail/gpumat.hpp - /usr/include/opencv2/cudev/ptr2d/extrapolation.hpp - /usr/include/opencv2/cudev/ptr2d/glob.hpp - /usr/include/opencv2/cudev/ptr2d/gpumat.hpp - /usr/include/opencv2/cudev/ptr2d/interpolation.hpp - /usr/include/opencv2/cudev/ptr2d/lut.hpp - /usr/include/opencv2/cudev/ptr2d/mask.hpp - /usr/include/opencv2/cudev/ptr2d/remap.hpp - /usr/include/opencv2/cudev/ptr2d/resize.hpp - /usr/include/opencv2/cudev/ptr2d/texture.hpp - /usr/include/opencv2/cudev/ptr2d/traits.hpp - /usr/include/opencv2/cudev/ptr2d/transform.hpp - /usr/include/opencv2/cudev/ptr2d/warping.hpp - /usr/include/opencv2/cudev/ptr2d/zip.hpp - /usr/include/opencv2/cudev/util/atomic.hpp - /usr/include/opencv2/cudev/util/detail/tuple.hpp - /usr/include/opencv2/cudev/util/detail/type_traits.hpp - /usr/include/opencv2/cudev/util/limits.hpp - /usr/include/opencv2/cudev/util/saturate_cast.hpp - /usr/include/opencv2/cudev/util/simd_functions.hpp - /usr/include/opencv2/cudev/util/tuple.hpp - /usr/include/opencv2/cudev/util/type_traits.hpp - /usr/include/opencv2/cudev/util/vec_math.hpp - /usr/include/opencv2/cudev/util/vec_traits.hpp - /usr/include/opencv2/cudev/warp/detail/reduce.hpp - /usr/include/opencv2/cudev/warp/detail/reduce_key_val.hpp - /usr/include/opencv2/cudev/warp/reduce.hpp - /usr/include/opencv2/cudev/warp/scan.hpp - /usr/include/opencv2/cudev/warp/shuffle.hpp - /usr/include/opencv2/cudev/warp/warp.hpp -) - -PATCHES=( - "${FILESDIR}/${PN}-3.0.0-gles.patch" - "${FILESDIR}/${PN}-3.4.0-disable-download.patch" - "${FILESDIR}/${P}-compilation-C-mode.patch" # https://bugs.gentoo.org/656530 - "${FILESDIR}/${P}-python-lib-suffix-hack.patch" - "${FILESDIR}/${P}-cuda-add-relaxed-constexpr.patch" -) - -pkg_pretend() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - cmake-utils_src_prepare - - # remove bundled stuff - rm -rf 3rdparty || die "Removing 3rd party components failed" - sed -e '/add_subdirectory(.*3rdparty.*)/ d' \ - -i CMakeLists.txt cmake/*cmake || die - - if use dnn_samples; then - mv "${WORKDIR}/res10_300x300_ssd_iter_140000.caffemodel" "${WORKDIR}/${P}/samples/dnn/" || die - fi - - if use contrib; then - cd "${WORKDIR}/${PN}_contrib-${PV}" || die - eapply "${FILESDIR}/${PN}-3.3.0-remove-tiny-dnn-autodownload.patch" - - if use contrib_xfeatures2d; then - mv "${WORKDIR}"/*.i "${WORKDIR}/${PN}_contrib-${PV}"/modules/xfeatures2d/src/ || die - fi - fi - - java-pkg-opt-2_src_prepare - - # this really belongs in src_prepare() too - JAVA_ANT_ENCODING="iso-8859-1" - # set encoding so even this cmake build will pick it up. - export ANT_OPTS+=" -Dfile.encoding=iso-8859-1" - java-ant-2_src_configure -} - -multilib_src_configure() { - # please dont sort here, order is the same as in CMakeLists.txt - GLOBALCMAKEARGS=( - # Optional 3rd party components - # =================================================== - -DENABLE_DOWNLOAD=OFF - -DWITH_1394=$(usex ieee1394) - # -DWITH_AVFOUNDATION=OFF # IOS - -DWITH_VTK=$(multilib_native_usex vtk) - -DWITH_EIGEN=$(usex eigen) - -DWITH_VFW=OFF # Video windows support - -DWITH_FFMPEG=$(usex ffmpeg) - -DWITH_GSTREAMER=$(usex gstreamer) - -DWITH_GSTREAMER_0_10=OFF # Don't want this - -DWITH_GTK=$(usex gtk) - -DWITH_GTK_2_X=$(usex gtk) - -DWITH_IPP=OFF - -DWITH_JASPER=$(usex jpeg2k) - -DWITH_JPEG=$(usex jpeg) - -DWITH_WEBP=$(usex webp) - -DWITH_OPENEXR=$(usex openexr) - -DWITH_OPENGL=$(usex opengl) - -DWITH_OPENVX=OFF - -DWITH_OPENNI=OFF # Not packaged - -DWITH_OPENNI2=OFF # Not packaged - -DWITH_PNG=$(usex png) - -DWITH_GDCM=OFF - -DWITH_PVAPI=OFF - -DWITH_GIGEAPI=OFF - -DWITH_ARAVIS=OFF - -DWITH_QT=$(multilib_native_usex qt5 5 OFF) - -DWITH_WIN32UI=OFF # Windows only - # -DWITH_QUICKTIME=OFF - # -DWITH_QTKIT=OFF - -DWITH_TBB=$(usex threads) - -DWITH_OPENMP=$(usex openmp) - -DWITH_CSTRIPES=OFF - -DWITH_PTHREADS_PF=ON - -DWITH_TIFF=$(usex tiff) - -DWITH_UNICAP=OFF # Not packaged - -DWITH_V4L=$(usex v4l) - -DWITH_LIBV4L=$(usex v4l) - -DWITH_DSHOW=ON # direct show supp - -DWITH_MSMF=OFF - -DWITH_XIMEA=OFF # Windows only - -DWITH_XINE=$(multilib_native_usex xine) - -DWITH_CLP=OFF - -DWITH_OPENCL=$(usex opencl) - -DWITH_OPENCL_SVM=OFF - -DWITH_OPENCLAMDFFT=$(usex opencl) - -DWITH_OPENCLAMDBLAS=$(usex opencl) - -DWITH_DIRECTX=OFF - -DWITH_INTELPERC=OFF - -DWITH_IPP_A=OFF - -DWITH_MATLAB=OFF - -DWITH_VA=$(usex vaapi) - -DWITH_VA_INTEL=$(usex vaapi) - -DWITH_GDAL=$(multilib_native_usex gdal) - -DWITH_GPHOTO2=$(usex gphoto2) - -DWITH_LAPACK=$(multilib_native_usex lapack) - -DWITH_ITT=OFF # 3dparty libs itt_notify - # =================================================== - # CUDA build components: nvidia-cuda-toolkit takes care of GCC version - # =================================================== - -DWITH_CUDA=$(multilib_native_usex cuda) - -DWITH_CUBLAS=$(multilib_native_usex cuda) - -DWITH_CUFFT=$(multilib_native_usex cuda) - -DWITH_NVCUVID=OFF -# -DWITH_NVCUVID=$(usex cuda) - -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "") - # =================================================== - # OpenCV build components - # =================================================== - -DBUILD_SHARED_LIBS=ON - -DBUILD_JAVA=$(multilib_native_usex java) # Ant needed, no compile flag - -DBUILD_ANDROID_EXAMPLES=OFF - -DBUILD_opencv_apps= - -DBUILD_DOCS=OFF # Doesn't install anyways. - -DBUILD_EXAMPLES=$(multilib_native_usex examples) - -DBUILD_PERF_TESTS=OFF - -DBUILD_TESTS=$(multilib_native_usex testprograms) - -DBUILD_WITH_DEBUG_INFO=$(usex debug) - # -DBUILD_WITH_STATIC_CRT=OFF - -DBUILD_WITH_DYNAMIC_IPP=OFF - -DBUILD_FAT_JAVA_LIB=$(multilib_native_usex java) - # -DBUILD_ANDROID_SERVICE=OFF - -DBUILD_CUDA_STUBS=$(multilib_native_usex cuda) - -DOPENCV_EXTRA_MODULES_PATH=$(usex contrib "${WORKDIR}/opencv_contrib-${PV}/modules" "") - # =================================================== - # OpenCV installation options - # =================================================== - -DINSTALL_CREATE_DISTRIB=OFF - -DINSTALL_C_EXAMPLES=$(multilib_native_usex examples) - -DINSTALL_TESTS=$(multilib_native_usex testprograms) - -DINSTALL_PYTHON_EXAMPLES=$(multilib_native_usex examples) - # -DINSTALL_ANDROID_EXAMPLES=OFF - -DINSTALL_TO_MANGLED_PATHS=OFF - # opencv uses both ${CMAKE_INSTALL_LIBDIR} and ${LIB_SUFFIX} - # to set its destination libdir - -DLIB_SUFFIX= - # =================================================== - # OpenCV build options - # =================================================== - -DENABLE_CCACHE=OFF - -DENABLE_PRECOMPILED_HEADERS=$(usex pch) - -DENABLE_SOLUTION_FOLDERS=OFF - -DENABLE_PROFILING=OFF - -DENABLE_COVERAGE=OFF - - -DHAVE_opencv_java=$(multilib_native_usex java YES NO) - -DENABLE_NOISY_WARNINGS=OFF - -DOPENCV_WARNINGS_ARE_ERRORS=OFF - -DENABLE_IMPL_COLLECTION=OFF - -DENABLE_INSTRUMENTATION=OFF - -DGENERATE_ABI_DESCRIPTOR=OFF - -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF - # =================================================== - # things we want to be hard off or not yet figured out - # =================================================== - -DBUILD_PACKAGE=OFF - # =================================================== - # Not building protobuf but update files bug #631418 - # =================================================== - -DBUILD_PROTOBUF=OFF - -DPROTOBUF_UPDATE_FILES=ON - # =================================================== - # things we want to be hard enabled not worth useflag - # =================================================== - -DCMAKE_SKIP_RPATH=ON - -DOPENCV_DOC_INSTALL_PATH= - # ================================================== - # cpu flags, should solve 633900 - #=================================================== - -DCPU_DISPATCH= - -DENABLE_SSE=$(usex cpu_flags_x86_sse) - -DENABLE_SSE2=$(usex cpu_flags_x86_sse2) - -DENABLE_SSE3=$(usex cpu_flags_x86_sse3) - -DENABLE_SSSE3=$(usex cpu_flags_x86_ssse3) - -DENABLE_SSE41=$(usex cpu_flags_x86_sse4_1) - -DENABLE_SSE42=$(usex cpu_flags_x86_sse4_2) - -DENABLE_POPCNT=$(usex cpu_flags_x86_popcnt) - -DENABLE_AVX=$(usex cpu_flags_x86_avx) - -DENABLE_AVX2=$(usex cpu_flags_x86_avx2) - -DENABLE_FMA3=$(usex cpu_flags_x86_fma3) - ) - - # =================================================== - # OpenCV Contrib Modules - # =================================================== - if use contrib; then - GLOBALCMAKEARGS+=( - -DBUILD_opencv_dnn=$(usex contrib_dnn ON OFF) - -DTINYDNN_ROOT="${WORKDIR}/tiny-dnn-${TINY_DNN_PV}" - -DBUILD_opencv_dnns_easily_fooled=OFF - -DBUILD_opencv_xfeatures2d=$(usex contrib_xfeatures2d ON OFF) - -DBUILD_opencv_cvv=$(usex contrib_cvv ON OFF) - -DBUILD_opencv_hdf=$(multilib_native_usex contrib_hdf ON OFF) - -DBUILD_opencv_sfm=$(usex contrib_sfm ON OFF) - ) - - if multilib_is_native_abi; then - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=$(usex !tesseract) - ) - else - GLOBALCMAKEARGS+=( - -DCMAKE_DISABLE_FIND_PACKAGE_Tesseract=ON - ) - fi - fi - - # workaround for bug 413429 - tc-export CC CXX - - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} - -DPYTHON_EXECUTABLE=OFF - -DINSTALL_PYTHON_EXAMPLES=OFF - ) - - cmake-utils_src_configure - - # Copy face_land_model to ${CMAKE_BINARY_DIR}/${OPENCV_TEST_DATA_INSTALL_PATH} - # TODO patch ocv_download to copy files into destination dirs - if use contrib_dnn; then - mkdir -p "${BUILD_DIR}"/share/OpenCV/testdata/cv/face/ || die - cp "${WORKDIR}"/face_landmark_model.dat "${BUILD_DIR}"/share/OpenCV/testdata/cv/face/ || die - fi - -} - -python_module_compile() { - local BUILD_DIR=${orig_BUILD_DIR} - local mycmakeargs=( ${GLOBALCMAKEARGS[@]} ) - - # Set all python variables to load the correct Gentoo paths - mycmakeargs+=( - # cheap trick: python_setup sets one of them as a symlink - # to the correct interpreter, and the other to fail-wrapper - -DPYTHON2_EXECUTABLE=$(type -P python2) - -DPYTHON3_EXECUTABLE=$(type -P python3) - -DINSTALL_PYTHON_EXAMPLES=$(usex examples) - -DLIBPY_SUFFIX=64 - ) - - # Regenerate cache file. Can't use rebuild_cache as it won't - # have the Gentoo specific options. - rm -rf CMakeCache.txt || die "rm failed" - cmake-utils_src_configure - cmake-utils_src_compile - cmake-utils_src_install - - # Remove compiled binary so new version compiles - # Avoid conflicts with new module builds as build system doesn't - # really support it. - rm -rf modules/python2 || die "rm failed" -} - -multilib_src_install() { - cmake-utils_src_install - - # Build and install the python modules for all targets - if multilib_is_native_abi && use python; then - local orig_BUILD_DIR=${BUILD_DIR} - python_foreach_impl python_module_compile - fi -} |