From 0bff53119f08d677db6c1a991bd30741682a8a08 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 2 Jun 2018 17:13:10 +0100 Subject: Revert "gentoo resync : 02.06.2018" This reverts commit 6c14fa2586d9e9c4427b5f727dc6c8ab77587cec. --- media-libs/opencv/Manifest | 5 +- .../files/opencv-3.4.1-compilation-C-mode.patch | 56 --- .../opencv-3.4.1-cuda-add-relaxed-constexpr.patch | 14 - .../opencv-3.4.1-python-lib-suffix-hack.patch | 13 - media-libs/opencv/opencv-3.4.1-r1.ebuild | 494 ++++++++++++++++++++ media-libs/opencv/opencv-3.4.1-r2.ebuild | 498 --------------------- 6 files changed, 495 insertions(+), 585 deletions(-) delete mode 100644 media-libs/opencv/files/opencv-3.4.1-compilation-C-mode.patch delete mode 100644 media-libs/opencv/files/opencv-3.4.1-cuda-add-relaxed-constexpr.patch delete mode 100644 media-libs/opencv/files/opencv-3.4.1-python-lib-suffix-hack.patch create mode 100644 media-libs/opencv/opencv-3.4.1-r1.ebuild delete mode 100644 media-libs/opencv/opencv-3.4.1-r2.ebuild (limited to 'media-libs/opencv') diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest index c54555031160..8c068e3b9506 100644 --- a/media-libs/opencv/Manifest +++ b/media-libs/opencv/Manifest @@ -19,9 +19,6 @@ AUX opencv-3.3.0-cuda9-compute20.patch 775 BLAKE2B 7a818042ba9c75fd835b7fc8f6c07 AUX opencv-3.3.0-cuda9-saturate.patch 1075 BLAKE2B 9e7af021924e84d0f12e8f9b764630dbd35e8d732550f2c16d7f812e9cbd4d4a1499182d7239b266985d39061a8a3f3e95b65e876c8dd339de9f1b764e769089 SHA512 e19b95957c282af846d08d2d6a7d8290c32692af165bc9c627a3d2e42319775d5128a832a4f639915b1331f8db979f2b88c1528e6059aeb78159a8f5409e1644 AUX opencv-3.3.0-remove-tiny-dnn-autodownload.patch 1138 BLAKE2B 0bf85ca7a0e3759a4de14a844f2929120a47f9c0c212992d078b19cc7a602e157d5233ebc30d7eb6dcfa8c5a9606e3acea15e5a96717842fa80d2d8b3fa3189c SHA512 6824c3fc193491d0d776a7a904d71515309a5b67b0dfa1790bbd402c40b68e813c9fdfc3037a60f31893341ea78553d97470d152e90f34485004e0e50e6d66f6 AUX opencv-3.4.0-disable-download.patch 1050 BLAKE2B 6f39f61588d9231cc8d877624538a49654ec8cf63091f8d0251cd01cc14684f2f5264c295a149c4a5754a9336e1ad4d1760cc26471fd85a6f571404f7c8d540d SHA512 95f2043c286a7de33fb4718fc1e2ded1fd943b20a5c4cc0c3d7af84fc317e53e3aa6358a33e4781195f8a80904d6bc615171142cde5d30a83d16045d36f85826 -AUX opencv-3.4.1-compilation-C-mode.patch 2077 BLAKE2B 78f55e49bd51ac4377a1db37125da6ca1ddfb9d723243eca7ef3df9d6d7b3922329cdd1c5915d480a9264af623c2953b4edaf81fd53afc950dc19cd49f04ea6f SHA512 203a4376728df6aa3dcaab147654139ebfd296a98d83847ac3ab0184dba828cf2ee298fedf7e7c2c64e1e8965237172fa6f1d5c7a4f6be5165a384d21b6875e7 -AUX opencv-3.4.1-cuda-add-relaxed-constexpr.patch 707 BLAKE2B 743a9c259c59fc4e3017539faef0723e0a80fb9c4bbde94811f32b3e6ae271b3db39fd35487d75078cfbe9e596604c4e37fb5c6c18619ed524c52683219dd8af SHA512 b37ce78495a3bbc439f203d9db81d9bff3e7f980c01ef5187dee537dd9c1025c5163ec3760b48d91a099a2fafb60526c9fe83f7183fc605fb3cc0f5c7a65f6bf -AUX opencv-3.4.1-python-lib-suffix-hack.patch 723 BLAKE2B bc4b1c68f2c73b40d20372ce4e3232b2db3b414ce2da16a8d84710fc53902211f17585c7ce6daf2d54025b53c04aa74f0c3eb3a30f26bfbc9af24e246f56b71a SHA512 54d2c8189fc1ff06ee1cacf5f375ea976faf339563ee804085feb0ec1f55cdbe10eea7335a786706b6a6152b6f9145156b3e74ce802c3d15b5a23014b25044b8 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 @@ -40,5 +37,5 @@ EBUILD opencv-3.2.0-r3.ebuild 12171 BLAKE2B f5fdc59285166a2a4e2e31901eef8d66cf0b EBUILD opencv-3.3.0-r2.ebuild 12169 BLAKE2B a6ed4ce0fc0f3a2bd432979c2caa88f8e27ad2dfe2b94e8c871d394496b7443452323463e7cbc47b52a8bdfaf02d9573d146746bd38248e26da05bcf36d0203e SHA512 d56942b7173929b842e068fcc83dceba38c9cad6e48dfc745438d2bd007a1db604e312034a423e299fd082a3d22ae0cbe52ad82219ffe8a228fb3a8e3ecc80f6 EBUILD opencv-3.3.0-r4.ebuild 16525 BLAKE2B 053b335e77f6a85ccc3d31de2e0ab7211fff0ef93d37d43f659161581d130c2fd64d9e5558e4f3c0fb2628dee01e37093782ed05e57c74a1eff74064d4c194bd SHA512 4b2a62017bc97ea01c08e56fb33a55f48abebea743cb6d6b9be15cc42c7fbc26707bc016b4f27f39c183abbeca1c4666e7c98844413e2495ebd6a93cf85d42ba EBUILD opencv-3.3.0-r5.ebuild 17096 BLAKE2B b831fe5601493b228023ee9f2d86d265b3841375beec391c1c2622df8c7b673c239086d249470a98b09aade2be3c7f983e7748b386f385d23dd2762ccd8cfa0e SHA512 9f8b51d1adaae620133c144ca3f4c1ad6d249a4bc77db883a7318eb3d80034978e371852d003866de5376824e1808fc2644da2308365920842f4c3590b0b452f -EBUILD opencv-3.4.1-r2.ebuild 18471 BLAKE2B 88ae4e84db3546588aa16bc9a627c25559246254838f9c8b20d452a3d0dc2778c583eb2f157ee87ab55482fec8ea45156ce71ec79cdab966e43c794e46b1d74d SHA512 cc9ef5c86592cfd5fbbbe68c648891e33087fccc0cc6ffea04b36050e215b635ede62d7843454fcc293dab154130e784e9ff95e0816bf401d1dccee94f5ed9b2 +EBUILD opencv-3.4.1-r1.ebuild 18274 BLAKE2B 1bcf6b99f53bc30edb77f73810edceca0de7baa06e60b99843448d23d98769096abf725bb4d20bbba72b5c4a02bd25fdec604e44969ecab7aaf4aed58453f0c0 SHA512 caed3d62f9b8bb3c7dd2380a3bcf4c736a876442d5b9dc1d40ba2df495327a690436e4b27d8ad10d76dd278b8593bc72a21005dbafb61ed7440a4386c74ceaa6 MISC metadata.xml 2648 BLAKE2B fe794c98503b602b365ea04bf32c1011fc485faf7da60e4475db32a3403be3f13be3c713270121feab8f5ec7dc6ac4caa7cbd9dbefaa121fa337273184d5a326 SHA512 60544f21407bffb30e12a2207288832487f0e2ff535343f06d103c0db13441776d84c0645d568ee7a9f7d502ca4267a8be923fe1cbbb8902a950ca7395616848 diff --git a/media-libs/opencv/files/opencv-3.4.1-compilation-C-mode.patch b/media-libs/opencv/files/opencv-3.4.1-compilation-C-mode.patch deleted file mode 100644 index c94f206ed4f1..000000000000 --- a/media-libs/opencv/files/opencv-3.4.1-compilation-C-mode.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 549b5df22520b60b91dd77096434d79425b31ac2 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Mon, 28 May 2018 18:07:23 +0300 -Subject: [PATCH] build: workaround issues with C compilation mode - -- cvdef.h + cvRound (double only) -- highgui_c.h ---- - modules/core/include/opencv2/core/cvdef.h | 8 +++++++- - modules/highgui/include/opencv2/highgui/highgui_c.h | 2 ++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h -index a87ced09d78..4ab72b34cc1 100644 ---- a/modules/core/include/opencv2/core/cvdef.h -+++ b/modules/core/include/opencv2/core/cvdef.h -@@ -480,7 +480,7 @@ Cv64suf; - // Integer types portatibility - #ifdef OPENCV_STDINT_HEADER - #include OPENCV_STDINT_HEADER --#else -+#elif defined(__cplusplus) - #if defined(_MSC_VER) && _MSC_VER < 1600 /* MSVS 2010 */ - namespace cv { - typedef signed char int8_t; -@@ -517,9 +517,15 @@ typedef ::int64_t int64_t; - typedef ::uint64_t uint64_t; - } - #endif -+#else // pure C -+#include - #endif - - - //! @} - -+#ifndef __cplusplus -+#include "opencv2/core/fast_math.hpp" // define cvRound(double) -+#endif -+ - #endif // OPENCV_CORE_CVDEF_H -diff --git a/modules/highgui/include/opencv2/highgui/highgui_c.h b/modules/highgui/include/opencv2/highgui/highgui_c.h -index 1eb414a76ca..35413139c79 100644 ---- a/modules/highgui/include/opencv2/highgui/highgui_c.h -+++ b/modules/highgui/include/opencv2/highgui/highgui_c.h -@@ -135,8 +135,10 @@ CVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOS - CVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value); - CVAPI(double) cvGetWindowProperty(const char* name, int prop_id); - -+#ifdef __cplusplus // FIXIT remove in OpenCV 4.0 - /* Get window image rectangle coordinates, width and height */ - CVAPI(cv::Rect)cvGetWindowImageRect(const char* name); -+#endif - - /* display image within window (highgui windows remember their content) */ - CVAPI(void) cvShowImage( const char* name, const CvArr* image ); diff --git a/media-libs/opencv/files/opencv-3.4.1-cuda-add-relaxed-constexpr.patch b/media-libs/opencv/files/opencv-3.4.1-cuda-add-relaxed-constexpr.patch deleted file mode 100644 index 11ca6aa861e9..000000000000 --- a/media-libs/opencv/files/opencv-3.4.1-cuda-add-relaxed-constexpr.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake ---- a/cmake/FindCUDA.cmake 2018-05-26 12:57:45.698858052 +0100 -+++ b/cmake/FindCUDA.cmake 2018-05-26 16:49:01.196390803 +0100 -@@ -447,8 +447,8 @@ - # Parse HOST_COMPILATION mode. - option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON) - --# Extra user settable flags --set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.") -+ #Extra user settable flags -+set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr;" CACHE STRING "Semi-colon delimit multiple arguments.") - - if(CMAKE_GENERATOR MATCHES "Visual Studio") - set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)") diff --git a/media-libs/opencv/files/opencv-3.4.1-python-lib-suffix-hack.patch b/media-libs/opencv/files/opencv-3.4.1-python-lib-suffix-hack.patch deleted file mode 100644 index 248e5034a218..000000000000 --- a/media-libs/opencv/files/opencv-3.4.1-python-lib-suffix-hack.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/cmake/OpenCVDetectPython.cmake 2018-05-31 09:14:42.998873104 +0200 -+++ b/cmake/OpenCVDetectPython.cmake 2018-05-31 09:26:08.444914001 +0200 -@@ -140,8 +140,8 @@ - else() #debian based assumed, install to the dist-packages. - set(_packages_path "python${_version_major_minor}/dist-packages") - endif() -- if(EXISTS "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${${packages_path}}") -- set(_packages_path "lib${LIB_SUFFIX}/${_packages_path}") -+ if(EXISTS "${CMAKE_INSTALL_PREFIX}/lib${LIBPY_SUFFIX}/${${packages_path}}") -+ set(_packages_path "lib${LIBPY_SUFFIX}/${_packages_path}") - else() - set(_packages_path "lib/${_packages_path}") - endif() diff --git a/media-libs/opencv/opencv-3.4.1-r1.ebuild b/media-libs/opencv/opencv-3.4.1-r1.ebuild new file mode 100644 index 000000000000..578d147619a3 --- /dev/null +++ b/media-libs/opencv/opencv-3.4.1-r1.ebuild @@ -0,0 +1,494 @@ +# 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 ipp 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}] + ) + ipp? ( sci-libs/ipp ) + 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" +) + +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=$(multilib_native_usex ipp) + -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 + -BUILD_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=OFF + -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) + ) + + # 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 34085a8db247..000000000000 --- a/media-libs/opencv/opencv-3.4.1-r2.ebuild +++ /dev/null @@ -1,498 +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 ipp 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}] - ) - ipp? ( sci-libs/ipp ) - 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=$(multilib_native_usex ipp) - -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 - -BUILD_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 -} -- cgit v1.2.3