actions.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env 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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.system("export SONAME_LIBVULKAN=lvulkan-1")
  12. options = "--disable-doxygen-doc \
  13. --prefix=/usr \
  14. --with-spirv-tools \
  15. --enable-static=no \
  16. "
  17. if get.buildTYPE() == "emul32":
  18. shelltools.export("CC", "gcc -m32")
  19. shelltools.export("CXX", "g++ -m32")
  20. shelltools.export("LDFLAGS", "%s -L/usr/lib32" % get.LDFLAGS())
  21. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  22. options += " --libdir=/usr/lib32 \
  23. --includedir=/_emul32/include \
  24. --bindir=/_emul32/bin \
  25. "
  26. autotools.configure(options)
  27. def build():
  28. autotools.make()
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. if get.buildTYPE() == "emul32":
  32. pisitools.removeDir("/_emul32")
  33. for f in shelltools.ls("%s/usr/lib32/pkgconfig" % get.installDIR()):
  34. pisitools.dosed("%s/usr/lib32/pkgconfig/%s" % (get.installDIR(), f), "_usr", "usr")
  35. return
  36. pisitools.dodoc("AUTHORS", "LICENSE", "COPYING", "README")