actions.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import shelltools, cmaketools, pisitools, get
  7. j = ''.join([
  8. ' -DCMAKE_INSTALL_PREFIX=/usr'
  9. ' -DCMAKE_BUILD_TYPE=None',
  10. ' -DBUILD_SHARED_LIBS=ON',
  11. ' -DCMAKE_INSTALL_LIBDIR=lib',
  12. ' -DCYTHON_EXECUTABLE=/usr/bin/cython3',
  13. ' -DWITH_DBUS=OFF',
  14. ' -DWITH_GSPELL=OFF',
  15. ' -DWITH_IMAGE_MAGICK=OFF',
  16. ' -DWITH_INTERNAL_CAIRO=OFF',
  17. ' -DBUILD_STATIC_LIBS=OFF',
  18. ' -D2GEOM_BOOST_PYTHON=OFF',
  19. ' -D2GEOM_CYTHON_BUILD_SHARED=OFF',
  20. ' -D2GEOM_CYTHON_BINDINGS=OFF',
  21. ' -DBUILD_TESTING=OFF',
  22. ' -D2GEOM_PERFOMANCE_TESTS=OFF -L ',
  23. ])
  24. def setup():
  25. #fix shebang
  26. # shelltools.system("find share/extensions -iname '*.py' -exec sed -i 's|env\ python$|env python3|g' {} \;")
  27. #if with imagemagick build.
  28. # shelltools.export("PKG_CONFIG_PATH", "${PKG_CONFIG_PATH}:/usr/lib/imagemagick6/pkgconfig")
  29. # shelltools.export("JOBS", "-j5")
  30. cmaketools.configure("-B_build %s" % j)
  31. def build():
  32. shelltools.cd("_build")
  33. cmaketools.make()
  34. def install():
  35. shelltools.cd("_build")
  36. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  37. pisitools.dodoc("../AUTHORS", "../NEWS.md", "../README.md")