diff options
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv_2.4.bb')
-rw-r--r-- | meta-oe/recipes-support/opencv/opencv_2.4.bb | 106 |
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 @@ | |||
1 | SUMMARY = "Opencv : The Open Computer Vision Library" | ||
2 | HOMEPAGE = "http://opencv.org/" | ||
3 | SECTION = "libs" | ||
4 | |||
5 | LICENSE = "BSD-3-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14" | ||
7 | |||
8 | ARM_INSTRUCTION_SET_armv4 = "arm" | ||
9 | ARM_INSTRUCTION_SET_armv5 = "arm" | ||
10 | |||
11 | DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0" | ||
12 | |||
13 | SRCREV = "2c9547e3147779001811d01936aed38f560929fc" | ||
14 | SRC_URI = "git://github.com/Itseez/opencv.git;branch=2.4 \ | ||
15 | file://0001-Use-__vector-instead-of-vector-as-suggests-Eigen.patch" | ||
16 | |||
17 | PV = "2.4.11+git${SRCPV}" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | # Do an out-of-tree build | ||
22 | OECMAKE_SOURCEPATH = "${S}" | ||
23 | OECMAKE_BUILDPATH = "${WORKDIR}/build-${TARGET_ARCH}" | ||
24 | |||
25 | EXTRA_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 | |||
37 | PACKAGECONFIG ??= "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 | |||
41 | PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen," | ||
42 | PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+," | ||
43 | PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper," | ||
44 | PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg," | ||
45 | PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav," | ||
46 | PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils," | ||
47 | PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng," | ||
48 | PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff," | ||
49 | PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils," | ||
50 | |||
51 | inherit distutils-base pkgconfig cmake | ||
52 | |||
53 | export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}" | ||
54 | export PYTHON="${STAGING_BINDIR_NATIVE}/python" | ||
55 | |||
56 | TARGET_CC_ARCH += "-I${S}/include " | ||
57 | |||
58 | PACKAGES += "${PN}-apps python-opencv" | ||
59 | |||
60 | python 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 | |||
80 | PACKAGES_DYNAMIC += "^libopencv-.*" | ||
81 | |||
82 | FILES_${PN} = "" | ||
83 | FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV" | ||
84 | FILES_${PN}-dbg += "${libdir}/.debug" | ||
85 | FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig" | ||
86 | FILES_${PN}-doc = "${datadir}/OpenCV/doc" | ||
87 | |||
88 | ALLOW_EMPTY_${PN} = "1" | ||
89 | |||
90 | SUMMARY_python-opencv = "Python bindings to opencv" | ||
91 | FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
92 | RDEPENDS_python-opencv = "python-core python-numpy" | ||
93 | |||
94 | do_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/ | ||
106 | PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3 - the recipe will be removed on 2017-09-01 unless the issue is fixed" | ||