Want more features on Pastebin? Sign Up, it's FREE!
Guest

cancerbero

By: a guest on Jun 25th, 2013  |  syntax: Bash  |  size: 2.57 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. DESCRIPTION = "Opencv : The Open Computer Vision Library"
  2. HOMEPAGE = "http://opencv.willowgarage.com/wiki/"
  3. SECTION = "libs"
  4.  
  5. LICENSE = "BSD"
  6. LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14"
  7.  
  8. ARM_INSTRUCTION_SET = "arm"
  9.  
  10. DEPENDS = "v4l-utils libtool jpeg bzip2 zlib libpng tiff glib-2.0"
  11.  
  12. SRC_URI = "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/${PV}/opencv-${PV}.tar.gz"
  13. SRC_URI[md5sum] = "8eac87462c7bec8b89021b723207c623"
  14. SRC_URI[sha256sum] = "d30beecf4b57977fbd1635af54c5ab3fc00113e9e59a9d58081732260fe06292"
  15.  
  16. S = "${WORKDIR}/opencv-${PV}"
  17.  
  18. EXTRA_OECMAKE = "-DBUILD_NEW_PYTHON_SUPPORT=ON \
  19.                 -DWITH_FFMPEG=OFF \
  20.                 -DWITH_GSTREAMER=OFF \
  21.                 -DWITH_V4L=ON \
  22.                 -DWITH_GTK=OFF \
  23.                 -DCMAKE_SKIP_RPATH=ON \
  24.                "
  25.  
  26. inherit distutils-base pkgconfig cmake
  27.  
  28. export BUILD_SYS
  29. export HOST_SYS
  30.  
  31. TARGET_CC_ARCH += "-I${S}/include "
  32.  
  33. PACKAGES += "${PN}-apps"
  34.  
  35. python populate_packages_prepend () {
  36.         cv_libdir = d.expand('${libdir}')
  37.         cv_libdir_dbg = d.expand('${libdir}/.debug')
  38.         do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
  39.         do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
  40.         do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
  41.         do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
  42.  
  43.         pn = d.getVar('PN', 1)
  44.         metapkg =  pn + '-dev'
  45.         d.setVar('ALLOW_EMPTY_' + metapkg, "1")
  46.         blacklist = [ metapkg ]
  47.         metapkg_rdepends = [ ]
  48.         packages = d.getVar('PACKAGES', 1).split()
  49.         for pkg in packages[1:]:
  50.                 if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
  51.                         metapkg_rdepends.append(pkg)
  52.         d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
  53. }
  54.  
  55. PACKAGES_DYNAMIC += "^libopencv-.*"
  56.  
  57. FILES_${PN} = ""
  58. FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
  59. FILES_${PN}-dbg += "${libdir}/.debug"
  60. FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
  61. FILES_${PN}-doc = "${datadir}/OpenCV/doc"
  62.  
  63. ALLOW_EMPTY_${PN} = "1"
  64.  
  65. do_install_append() {
  66.         cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
  67.         sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
  68. }
clone this paste RAW Paste Data