actions.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. WorkDir = "SDL2_image-%s" % get.srcVERSION()
  11. def setup():
  12. options = "--disable-dependency-tracking \
  13. --disable-static \
  14. --enable-gif \
  15. --enable-jpg \
  16. --enable-tif \
  17. --enable-png \
  18. --enable-pnm \
  19. --enable-bmp \
  20. --enable-xcf \
  21. --enable-xpm \
  22. --enable-tga \
  23. --enable-lbm \
  24. --enable-pcx \
  25. --disable-jpg-shared \
  26. --disable-png-shared \
  27. --disable-tif-shared"
  28. if get.buildTYPE() == "emul32":
  29. options += " --includedir=/usr/include \
  30. --libdir=/usr/lib32"
  31. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  32. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  33. shelltools.export("CXXFLAGS", "%s -m32" % get.CXXFLAGS())
  34. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  35. for i in ["NEWS", "AUTHORS", "ChangeLog"]:
  36. shelltools.touch(i)
  37. #autotools.autoreconf("-vfi")
  38. autotools.configure(options)
  39. def build():
  40. autotools.make()
  41. def install():
  42. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  43. if get.buildTYPE() != "emul32":
  44. inarytools.dobin(".libs/showimage")