actions.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 2
  5. # See the file http://www.gnu.org/copyleft/gpl.txt
  6. from pisi.actionsapi import cmaketools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. shelltools.export("PYTHONDONTWRITEBYTECODE", "")
  11. def setup():
  12. #temporary workaround for error: "'UINT64_C' was not declared in this scope"
  13. shelltools.export("CXXFLAGS", "%s -D__STDC_CONSTANT_MACROS" % get.CXXFLAGS())
  14. cmaketools.configure("-D CMAKE_BUILD_TYPE=Release \
  15. -D CMAKE_INSTALL_PREFIX=/usr \
  16. -D CMAKE_SKIP_RPATH=ON \
  17. DESTDIR=%s \
  18. -DBUILD_EXAMPLES=1 \
  19. -DBUILD_SWIG_PYTHON_SUPPORT=1 \
  20. -DINSTALL_C_EXAMPLES=1 \
  21. -DINSTALL_PYTHON_EXAMPLES=1 \
  22. -DINSTALL_OCTAVE_EXAMPLES=1 \
  23. -DWITH_FFMPEG=0 \
  24. -DWITH_UNICAP=0 \
  25. -DENABLE_OPENMP=0 \
  26. -DNEW_PYTHON_SUPPORT=1 \
  27. -DOCTAVE_SUPPORT=0 \
  28. -DUSE_MMX=1 \
  29. -DUSE_SSE2=1 \
  30. -DUSE_SSE3=0 \
  31. -DUSE_SSE=1 \
  32. -DWITH_TBB=ON \
  33. -DWITH_EIGEN=ON \
  34. -DWITH_1394=1 \
  35. -DWITH_GSTREAMER=1 \
  36. -DWITH_GTK=1 \
  37. -DWITH_JASPER=1 \
  38. -DWITH_JPEG=1 \
  39. -DWITH_PNG=1 \
  40. -DWITH_TIFF=1 \
  41. -DWITH_V4L=1 \
  42. -DWITH_XINE=1 \
  43. -DCMAKE_SKIP_RPATH=1" % get.installDIR())
  44. # -DUSE_O3=OFF
  45. # -DUSE_OMIT_FRAME_POINTER=OFF
  46. def build():
  47. cmaketools.make("VERBOSE=1")
  48. def install():
  49. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  50. # Move other docs and samples under standart doc dir
  51. #doc_dir = "usr/share/doc/" + get.srcNAME()
  52. #pisitools.domove("usr/share/opencv/doc", doc_dir)
  53. #pisitools.domove("usr/share/opencv/samples", doc_dir)
  54. pisitools.dodoc("README.md", "LICENSE", )