actions.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/env python3
  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 inary.actionsapi import autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. def setup():
  11. inarytools.flags.add("-fPIC")
  12. inarytools.dosed("makeinclude.in", "^(docdir.*)$", r"\1/html")
  13. autotools.autoconf()
  14. options = "\
  15. --enable-gl \
  16. --enable-shared \
  17. --enable-threads \
  18. "
  19. if get.buildTYPE() == "emul32":
  20. shelltools.export("CFLAGS", "-m32")
  21. shelltools.export("CXXFLAGS", "-m32")
  22. options += "--prefix=/emul32 \
  23. --libdir=/usr/lib32 \
  24. --with-optim='%s' \
  25. " % get.CFLAGS()
  26. elif get.ARCH() == "x86_64":
  27. options += "--with-optim='%s' \
  28. " % get.CFLAGS()
  29. autotools.configure(options)
  30. def build():
  31. autotools.make()
  32. autotools.make("-C documentation all")
  33. def install():
  34. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  35. autotools.rawInstall("DESTDIR=%s -C fluid " % get.installDIR(), " install-linux")
  36. if get.buildTYPE() == "emul32": return
  37. autotools.install("-C documentation")
  38. inarytools.dodoc("ANNOUNCEMENT", "CHANGES", "COPYING", "CREDITS", "README")