actions.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 shelltools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. optimizationtype = "--enable-amd64" if get.ARCH() == "x86_64" else "--enable-mmx"
  11. def setup():
  12. autotools.autoreconf("-fi")
  13. autotools.configure("--disable-static \
  14. --with-x \
  15. --with-jpeg \
  16. --with-png \
  17. --with-tiff \
  18. --with-gif \
  19. --with-zlib \
  20. --with-bzip2 \
  21. %s \
  22. --enable-visibility-hiding" % optimizationtype)
  23. #--with-id3 \
  24. shelltools.system("sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool")
  25. shelltools.system("sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool")
  26. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  27. def build():
  28. autotools.make()
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. pisitools.dohtml("doc/*")
  32. pisitools.dodoc("AUTHORS", "ChangeLog", "README", "TODO")