actions.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. WorkDir = "SDL_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. pisitools.dobin(".libs/showimage")
  45. pisitools.dodoc("CHANGES", "COPYING", "README")