actions.py 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 cmaketools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. def setup():
  11. options = "\-DCMAKE_BUILD_TYPE=Release \
  12. -DFREEGLUT_BUILD_DEMOS=OFF \
  13. "
  14. if get.buildTYPE() == "emul32":
  15. shelltools.export("CFLAGS", "-m32")
  16. shelltools.export("CXXFLAGS", "-m32")
  17. options += "-DCMAKE_INSTALL_LIBDIR=lib32 -DFREEGLUT_BUILD_DEMOS=OFF \
  18. "
  19. elif get.ARCH() == "x86_64":
  20. options += "-DCMAKE_INSTALL_LIBDIR=lib \
  21. "
  22. pisitools.cflags.add("-fcommon")
  23. cmaketools.configure(options)
  24. def build():
  25. cmaketools.make()
  26. def install():
  27. cmaketools.install()
  28. pisitools.dodoc("AUTHORS", "COPYING", "README.md")
  29. # pisitools.dohtml("doc/*")