Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/
Date: Mon, 09 Mar 2020 13:00:28
Message-Id: 1583758799.1676af9b3103d681f9335b89bd19016494cb18eb.soap@gentoo
1 commit: 1676af9b3103d681f9335b89bd19016494cb18eb
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 9 12:59:59 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 9 12:59:59 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1676af9b
7
8 media-libs/opencv: Use only GTK3
9
10 * OpenCV currently does not support OpenGL contexts
11 in GTK3, so we disable USE="opengl gtk3" for the
12 time being.
13
14 Package-Manager: Portage-2.3.93, Repoman-2.3.20
15 Closes: https://github.com/gentoo/gentoo/pull/14866
16 Signed-off-by: David Seifert <soap <AT> gentoo.org>
17
18 media-libs/opencv/metadata.xml | 1 +
19 ...encv-4.1.2-r2.ebuild => opencv-4.1.2-r3.ebuild} | 41 ++++++++++++----------
20 2 files changed, 23 insertions(+), 19 deletions(-)
21
22 diff --git a/media-libs/opencv/metadata.xml b/media-libs/opencv/metadata.xml
23 index f7bccfa408e..98984a7467b 100644
24 --- a/media-libs/opencv/metadata.xml
25 +++ b/media-libs/opencv/metadata.xml
26 @@ -17,6 +17,7 @@ Face Recognition; Gesture Recognition; Motion Tracking, Ego Motion, Motion Under
27 <flag name="eigen">Enable usage of <pkg>dev-cpp/eigen</pkg> for computations</flag>
28 <flag name="features2d">Enable features2d module</flag>
29 <flag name="gdal">Enable support for sci-libs/gdal library</flag>
30 + <flag name="gtk3">Enable x11-libs/gtk+:3 support</flag>
31 <flag restrict="&gt;=media-libs/opencv-4.1.2" name="opencvapps">Enable compilation with opencvapps</flag>
32 <flag restrict="&gt;=media-libs/opencv-3.1.0" name="gflags">Use Google's C++ argument parsing library</flag>
33 <flag restrict="&gt;=media-libs/opencv-3.1.0" name="glog">Use Google's C++ loggin library</flag>
34
35 diff --git a/media-libs/opencv/opencv-4.1.2-r2.ebuild b/media-libs/opencv/opencv-4.1.2-r3.ebuild
36 similarity index 95%
37 rename from media-libs/opencv/opencv-4.1.2-r2.ebuild
38 rename to media-libs/opencv/opencv-4.1.2-r3.ebuild
39 index 6597c3fdc4a..4b4180760a3 100644
40 --- a/media-libs/opencv/opencv-4.1.2-r2.ebuild
41 +++ b/media-libs/opencv/opencv-4.1.2-r3.ebuild
42 @@ -21,7 +21,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
43 LICENSE="BSD"
44 SLOT="0/4.1.2" # subslot = libopencv* soname version
45 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
46 -IUSE="contrib contribcvv contribdnn contribhdf contribsfm contribxfeatures2d 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 dnnsamples -download +eigen examples +features2d ffmpeg gdal gflags glog gphoto2 gstreamer gtk ieee1394 jpeg jpeg2k lapack libav opencl openexr opengl openmp opencvapps pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine"
47 +IUSE="contrib contribcvv contribdnn contribhdf contribsfm contribxfeatures2d 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 dnnsamples -download +eigen examples +features2d ffmpeg gdal gflags glog gphoto2 gstreamer gtk3 ieee1394 jpeg jpeg2k lapack libav opencl openexr opengl openmp opencvapps pch png +python qt5 tesseract testprograms threads tiff vaapi v4l vtk webp xine"
48 # OpenGL needs gtk or Qt installed to activate, otherwise build system
49 # will silently disable it Wwithout the user knowing, which defeats the
50 # purpose of the opengl use flag.
51 @@ -36,13 +36,13 @@ REQUIRED_USE="
52 contribsfm? ( contrib eigen gflags glog )
53 contribxfeatures2d? ( contrib download )
54 java? ( python )
55 - opengl? ( || ( gtk qt5 ) )
56 + opengl? ( qt5 )
57 python? ( ${PYTHON_REQUIRED_USE} )
58 - tesseract? ( contrib )"
59 + tesseract? ( contrib )
60 + ?? ( gtk3 qt5 )"
61
62 # The following logic is intrinsic in the build system, but we do not enforce
63 # it on the useflags since this just blocks emerging pointlessly:
64 -# gtk? ( !qt5 )
65 # openmp? ( !threads )
66
67 RDEPEND="
68 @@ -63,10 +63,9 @@ RDEPEND="
69 media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
70 media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
71 )
72 - gtk? (
73 + gtk3? (
74 dev-libs/glib:2[${MULTILIB_USEDEP}]
75 - x11-libs/gtk+:2[${MULTILIB_USEDEP}]
76 - opengl? ( x11-libs/gtkglext[${MULTILIB_USEDEP}] )
77 + x11-libs/gtk+:3[${MULTILIB_USEDEP}]
78 )
79 ieee1394? (
80 media-libs/libdc1394[${MULTILIB_USEDEP}]
81 @@ -98,10 +97,12 @@ RDEPEND="
82 webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
83 xine? ( media-libs/xine-lib )"
84 DEPEND="${RDEPEND}
85 - virtual/pkgconfig[${MULTILIB_USEDEP}]
86 eigen? ( dev-cpp/eigen:3 )
87 - java? ( >=virtual/jdk-1.6 )
88 - vaapi? ( x11-libs/libva )"
89 + java? ( >=virtual/jdk-1.6 )
90 + vaapi? ( x11-libs/libva )"
91 +BDEPEND="
92 + java? ( >=virtual/jdk-1.6 )
93 + virtual/pkgconfig[${MULTILIB_USEDEP}]"
94
95 MULTILIB_WRAPPED_HEADERS=(
96 /usr/include/opencv2/cvconfig.h
97 @@ -231,11 +232,11 @@ MULTILIB_WRAPPED_HEADERS=(
98 )
99
100 PATCHES=(
101 - "${FILESDIR}/${PN}-3.0.0-gles.patch"
102 - "${FILESDIR}/${PN}-3.4.0-disable-download.patch"
103 - "${FILESDIR}/${PN}-3.4.1-cuda-add-relaxed-constexpr.patch"
104 - "${FILESDIR}/${P}-pkg-config-file.patch"
105 - "${FILESDIR}/${P}-opencl-license.patch"
106 + "${FILESDIR}"/${PN}-3.0.0-gles.patch
107 + "${FILESDIR}"/${PN}-3.4.0-disable-download.patch
108 + "${FILESDIR}"/${PN}-3.4.1-cuda-add-relaxed-constexpr.patch
109 + "${FILESDIR}"/${P}-pkg-config-file.patch
110 + "${FILESDIR}"/${P}-opencl-license.patch
111 )
112
113 pkg_pretend() {
114 @@ -290,8 +291,8 @@ multilib_src_configure() {
115 -DWITH_FFMPEG=$(usex ffmpeg)
116 -DWITH_GSTREAMER=$(usex gstreamer)
117 -DWITH_GSTREAMER_0_10=OFF # Don't want this
118 - -DWITH_GTK=$(usex gtk)
119 - -DWITH_GTK_2_X=$(usex gtk)
120 + -DWITH_GTK=$(usex gtk3)
121 + -DWITH_GTK_2_X=OFF # only want gtk3 nowadays
122 -DWITH_IPP=OFF
123 -DWITH_JASPER=OFF
124 -DWITH_JPEG=$(usex jpeg)
125 @@ -318,7 +319,7 @@ multilib_src_configure() {
126 -DWITH_UNICAP=OFF # Not packaged
127 -DWITH_V4L=$(usex v4l)
128 -DWITH_LIBV4L=$(usex v4l)
129 - #-DWITH_DSHOW=ON # direct show supp
130 + # -DWITH_DSHOW=ON # direct show supp
131 -DWITH_MSMF=OFF
132 -DWITH_XIMEA=OFF # Windows only
133 -DWITH_XINE=$(multilib_native_usex xine)
134 @@ -344,7 +345,7 @@ multilib_src_configure() {
135 -DWITH_CUBLAS=$(multilib_native_usex cuda)
136 -DWITH_CUFFT=$(multilib_native_usex cuda)
137 -DWITH_NVCUVID=OFF
138 -# -DWITH_NVCUVID=$(usex cuda)
139 + # -DWITH_NVCUVID=$(usex cuda)
140 -DCUDA_NPP_LIBRARY_ROOT_DIR=$(usex cuda "${EPREFIX}/opt/cuda" "")
141 # ===================================================
142 # OpenCV build components
143 @@ -485,6 +486,8 @@ python_module_compile() {
144 # Avoid conflicts with new module builds as build system doesn't
145 # really support it.
146 rm -rf modules/python2 || die "rm failed"
147 +
148 + python_optimize "${D}"/$(python_get_sitedir)
149 }
150
151 multilib_src_install() {