summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/opencv/opencv_2.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv_2.4.bb')
-rw-r--r--meta-oe/recipes-support/opencv/opencv_2.4.bb106
1 files changed, 0 insertions, 106 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv_2.4.bb b/meta-oe/recipes-support/opencv/opencv_2.4.bb
deleted file mode 100644
index d17c640ac..000000000
--- a/meta-oe/recipes-support/opencv/opencv_2.4.bb
+++ /dev/null
@@ -1,106 +0,0 @@
1SUMMARY = "Opencv : The Open Computer Vision Library"
2HOMEPAGE = "http://opencv.org/"
3SECTION = "libs"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14"
7
8ARM_INSTRUCTION_SET_armv4 = "arm"
9ARM_INSTRUCTION_SET_armv5 = "arm"
10
11DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0"
12
13SRCREV = "2c9547e3147779001811d01936aed38f560929fc"
14SRC_URI = "git://github.com/Itseez/opencv.git;branch=2.4 \
15 file://0001-Use-__vector-instead-of-vector-as-suggests-Eigen.patch"
16
17PV = "2.4.11+git${SRCPV}"
18
19S = "${WORKDIR}/git"
20
21# Do an out-of-tree build
22OECMAKE_SOURCEPATH = "${S}"
23OECMAKE_BUILDPATH = "${WORKDIR}/build-${TARGET_ARCH}"
24
25EXTRA_OECMAKE = "-DPYTHON_NUMPY_INCLUDE_DIR:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include \
26 -DBUILD_PYTHON_SUPPORT=ON \
27 -DWITH_GSTREAMER=OFF \
28 -DWITH_1394=OFF \
29 -DCMAKE_SKIP_RPATH=ON \
30 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
31 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
32 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
33 ${@base_conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
34 ${@base_conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
35"
36
37PACKAGECONFIG ??= "eigen jpeg png tiff v4l libv4l \
38 ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
39 ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}"
40
41PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen,"
42PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+,"
43PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
44PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
45PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
46PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
47PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
48PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
49PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
50
51inherit distutils-base pkgconfig cmake
52
53export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
54export PYTHON="${STAGING_BINDIR_NATIVE}/python"
55
56TARGET_CC_ARCH += "-I${S}/include "
57
58PACKAGES += "${PN}-apps python-opencv"
59
60python populate_packages_prepend () {
61 cv_libdir = d.expand('${libdir}')
62 cv_libdir_dbg = d.expand('${libdir}/.debug')
63 do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
64 do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
65 do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
66 do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
67
68 pn = d.getVar('PN')
69 metapkg = pn + '-dev'
70 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
71 blacklist = [ metapkg ]
72 metapkg_rdepends = [ ]
73 packages = d.getVar('PACKAGES').split()
74 for pkg in packages[1:]:
75 if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
76 metapkg_rdepends.append(pkg)
77 d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
78}
79
80PACKAGES_DYNAMIC += "^libopencv-.*"
81
82FILES_${PN} = ""
83FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
84FILES_${PN}-dbg += "${libdir}/.debug"
85FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
86FILES_${PN}-doc = "${datadir}/OpenCV/doc"
87
88ALLOW_EMPTY_${PN} = "1"
89
90SUMMARY_python-opencv = "Python bindings to opencv"
91FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
92RDEPENDS_python-opencv = "python-core python-numpy"
93
94do_install_append() {
95 cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
96 sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
97
98 # Move Python files into correct library folder (for multilib build)
99 if [ "$libdir" != "/usr/lib" ]; then
100 mv ${D}/usr/lib/* ${D}/${libdir}/
101 rm -rf ${D}/usr/lib
102 fi
103}
104
105# http://errors.yoctoproject.org/Errors/Details/40660/
106PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3 - the recipe will be removed on 2017-09-01 unless the issue is fixed"