Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 498744
Collapse All | Expand All

(-)/var/package-manager/portage/media-libs/opencv/opencv-2.4.7.ebuild (-13 / +18 lines)
Lines 1-11 Link Here
1
# Copyright 1999-2013 Gentoo Foundation
1
# Copyright 1999-2014 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-2.4.7.ebuild,v 1.2 2013/12/07 14:31:01 dilfridge Exp $
3
# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-2.4.7.ebuild,v 1.2 2013/12/07 14:31:01 dilfridge Exp $
4
4
5
EAPI=5
5
EAPI=5
6
PYTHON_DEPEND="2:2.6"
6
PYTHON_COMPAT=( python2_{6,7} )
7
7
8
inherit base toolchain-funcs cmake-utils python java-pkg-opt-2 java-ant-2
8
inherit base toolchain-funcs cmake-utils python-single-r1 java-pkg-opt-2 java-ant-2
9
9
10
DESCRIPTION="A collection of algorithms and sample code for various computer vision problems"
10
DESCRIPTION="A collection of algorithms and sample code for various computer vision problems"
11
HOMEPAGE="http://opencv.willowgarage.com"
11
HOMEPAGE="http://opencv.willowgarage.com"
Lines 14-27 Link Here
14
LICENSE="BSD"
14
LICENSE="BSD"
15
SLOT="0/2.4"
15
SLOT="0/2.4"
16
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~amd64-linux"
16
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~amd64-linux"
17
IUSE="cuda doc eigen examples ffmpeg gstreamer gtk ieee1394 ipp jpeg jpeg2k opencl openexr opengl openmp pch png qt4 testprograms threads tiff v4l xine"
17
IUSE="cuda doc +eigen examples ffmpeg gstreamer gtk ieee1394 ipp jpeg jpeg2k opencl openexr opengl openmp pch png python qt4 testprograms threads tiff v4l xine"
18
REQUIRED_USE="
19
	gtk? ( !qt4 )
20
	opengl? ( || ( gtk qt4 ) )
21
	openmp? ( !threads )
22
	python? ( ${PYTHON_REQUIRED_USE} )
23
"
18
24
19
RDEPEND="
25
RDEPEND="
20
	app-arch/bzip2
26
	app-arch/bzip2
21
	dev-python/numpy
22
	sys-libs/zlib
27
	sys-libs/zlib
23
	cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
28
	cuda? ( >=dev-util/nvidia-cuda-toolkit-5.5 )
24
	eigen? ( dev-cpp/eigen:2 )
25
	ffmpeg? ( virtual/ffmpeg )
29
	ffmpeg? ( virtual/ffmpeg )
26
	gstreamer? (
30
	gstreamer? (
27
		media-libs/gstreamer:0.10
31
		media-libs/gstreamer:0.10
Lines 30-35 Link Here
30
	gtk? (
34
	gtk? (
31
		dev-libs/glib:2
35
		dev-libs/glib:2
32
		x11-libs/gtk+:2
36
		x11-libs/gtk+:2
37
		opengl? ( x11-libs/gtkglext )
33
	)
38
	)
34
	java? ( >=virtual/jre-1.6 )
39
	java? ( >=virtual/jre-1.6 )
35
	jpeg? ( virtual/jpeg )
40
	jpeg? ( virtual/jpeg )
Lines 41-48 Link Here
41
	ipp? ( sci-libs/ipp )
46
	ipp? ( sci-libs/ipp )
42
	opencl? ( virtual/opencl )
47
	opencl? ( virtual/opencl )
43
	openexr? ( media-libs/openexr )
48
	openexr? ( media-libs/openexr )
44
	opengl? ( virtual/glu )
49
	opengl? ( virtual/opengl virtual/glu )
45
	png? ( media-libs/libpng:0= )
50
	png? ( media-libs/libpng:0= )
51
	python? ( ${PYTHON_DEPS} dev-python/numpy[${PYTHON_USEDEP}] )
46
	qt4? (
52
	qt4? (
47
		dev-qt/qtgui:4
53
		dev-qt/qtgui:4
48
		dev-qt/qttest:4
54
		dev-qt/qttest:4
Lines 55-65 Link Here
55
"
61
"
56
DEPEND="${RDEPEND}
62
DEPEND="${RDEPEND}
57
	virtual/pkgconfig
63
	virtual/pkgconfig
64
	eigen? ( dev-cpp/eigen:3 )
58
	java? ( >=virtual/jdk-1.6 )
65
	java? ( >=virtual/jdk-1.6 )
59
"
66
"
60
67
61
# REQUIRED_USE="opengl? ( qt )"
62
63
PATCHES=(
68
PATCHES=(
64
	"${FILESDIR}/${PN}-2.3.1a-libav-0.7.patch"
69
	"${FILESDIR}/${PN}-2.3.1a-libav-0.7.patch"
65
	"${FILESDIR}/${PN}-2.4.3-gcc47.patch"
70
	"${FILESDIR}/${PN}-2.4.3-gcc47.patch"
Lines 68-75 Link Here
68
)
73
)
69
74
70
pkg_setup() {
75
pkg_setup() {
71
	python_set_active_version 2
76
	use python && python-single-r1_pkg_setup
72
	python_pkg_setup
73
	java-pkg-opt-2_pkg_setup
77
	java-pkg-opt-2_pkg_setup
74
}
78
}
75
79
Lines 77-83 Link Here
77
	base_src_prepare
81
	base_src_prepare
78
82
79
	# remove bundled stuff
83
	# remove bundled stuff
80
	rm -rf 3rdparty
84
	rm -rf 3rdparty || die
81
	sed -i \
85
	sed -i \
82
		-e '/add_subdirectory(3rdparty)/ d' \
86
		-e '/add_subdirectory(3rdparty)/ d' \
83
		CMakeLists.txt || die
87
		CMakeLists.txt || die
Lines 117-122 Link Here
117
		$(cmake-utils_use_with openmp)
121
		$(cmake-utils_use_with openmp)
118
		-DWITH_OPENNI=OFF					# not packaged
122
		-DWITH_OPENNI=OFF					# not packaged
119
		$(cmake-utils_use_with png)
123
		$(cmake-utils_use_with png)
124
		$(cmake-utils_use_build python opencv_python)
120
		-DWITH_PVAPI=OFF					# not packaged
125
		-DWITH_PVAPI=OFF					# not packaged
121
		$(cmake-utils_use_with qt4 QT)
126
		$(cmake-utils_use_with qt4 QT)
122
		-DWITH_QUICKTIME=OFF
127
		-DWITH_QUICKTIME=OFF
Lines 167-173 Link Here
167
		mycmakeargs+=( "-DWITH_CUFFT=OFF" )
172
		mycmakeargs+=( "-DWITH_CUFFT=OFF" )
168
	fi
173
	fi
169
174
170
	if use examples; then
175
	if use examples && use python; then
171
		mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=ON" )
176
		mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=ON" )
172
	else
177
	else
173
		mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=OFF" )
178
		mycmakeargs+=( "-DINSTALL_PYTHON_EXAMPLES=OFF" )

Return to bug 498744