talimat 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Tanım: OpenCV (Açık Kaynaklı Bilgisayar Vizyon Kütüphanesi) açık kaynaklı bir bilgisayar görme ve makine öğrenme yazılımı kütüphanesi.
  2. # URL: http://opencv.org/
  3. # Paketçi: milisarge
  4. # Gerekler: libjpeg-turbo libtiff jasper libpng ffmpeg28 gstreamer xine-lib v4l-utils xorg-mesa python3-numpy python-numpy gtkglext libgphoto2
  5. # Grup: kütüphane
  6. _pybin=python2
  7. _pydir=python2.7
  8. isim=opencv
  9. surum=3.3.0
  10. devir=2
  11. kaynak=(http://downloads.sourceforge.net/opencvlibrary/$isim-$surum.zip
  12. https://raw.githubusercontent.com/opencv/opencv_3rdparty/a62e20676a60ee0ad6581e217fe7e4bada3b95db/ippicv/ippicv_2017u2_lnx_intel64_20170418.tgz
  13. https://github.com/opencv/opencv_contrib/archive/$surum.tar.gz::opencv_contrib-$surum.tar.gz)
  14. derle() {
  15. cd $isim-$surum
  16. ipp_surum=ippicv_2017u2_lnx_intel64_20170418.tgz
  17. ipp_file=$DERLEME_KAYNAKDIZIN/$ipp_surum &&
  18. ipp_hash=$(md5sum $ipp_file | cut -d" " -f1) &&
  19. ipp_dir=.cache/ippicv &&
  20. mkdir -p $ipp_dir &&
  21. cp $ipp_file $ipp_dir/$ipp_hash-$ipp_surum
  22. mkdir build
  23. cd build
  24. cmake -D WITH_OPENCL=ON \
  25. -DWITH_OPENGL=ON \
  26. -DWITH_TBB=ON \
  27. -DWITH_XINE=ON \
  28. -DWITH_GSTREAMER=OFF \
  29. -DBUILD_WITH_DEBUG_INFO=OFF \
  30. -DBUILD_TESTS=OFF \
  31. -DBUILD_PERF_TESTS=OFF \
  32. -DBUILD_EXAMPLES=ON \
  33. -DINSTALL_C_EXAMPLES=ON \
  34. -DINSTALL_PYTHON_EXAMPLES=ON \
  35. -DCMAKE_BUILD_TYPE=Release \
  36. -DCMAKE_INSTALL_PREFIX=/usr \
  37. -DCMAKE_SKIP_RPATH=ON \
  38. -DOPENCV_EXTRA_MODULES_PATH="$SRC/opencv_contrib-$surum/modules" \
  39. ..
  40. make
  41. make DESTDIR=$PKG install
  42. cd "$PKG/usr/share"
  43. if [[ -d OpenCV/samples ]]; then
  44. mv OpenCV/samples "$SRC/$isim-samples"
  45. mv OpenCV $isim #dizini ismi tutarlı olması için
  46. elif [[ ! -d OpenCV ]]; then
  47. echo "Dizin adlandırma hatası!"
  48. fi
  49. }