actions.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import cmaketools
  10. from pisi.actionsapi import pisitools
  11. def setup():
  12. #shelltools.export("CC", "clang")
  13. #shelltools.export("CXX", "clang++")
  14. #pisitools.ldflags.add("-fuse-ld=lld -rtlib=compiler-rt -stdlib=libc++")
  15. options = "-DCMAKE_BUILD_TYPE=Release \
  16. -DLIBOMP_ENABLE_ASSERTIONS=ON \
  17. -DLIBOMP_ENABLE_SHARED=ON \
  18. -DLIBOMP_USE_HIER_SCHED=ON \
  19. "
  20. if get.buildTYPE() == "emul32":
  21. pisitools.cflags.add("-m32")
  22. pisitools.cxxflags.add("-m32")
  23. options += " -DOPENMP_LIBDIR_SUFFIX=32 \
  24. "
  25. else:
  26. pisitools.cflags.add("-m64")
  27. pisitools.cxxflags.add("-m64")
  28. options += "-DOPENMP_LIBDIR_SUFFIX= \
  29. "
  30. cmaketools.configure(options)
  31. def build():
  32. autotools.make()
  33. def install():
  34. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  35. if get.buildTYPE() == "emul32":
  36. pisitools.remove("/usr/lib32/libgomp.so")
  37. else:
  38. pisitools.remove("/usr/lib/libgomp.so")
  39. #pisitools.removeDir("/usr/share/gtk-doc")
  40. pisitools.dodoc("CREDITS.txt", "LICENSE.txt", "README.rst")