actions.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. def setup():
  11. shelltools.export("CFLAGS", "%s -fno-strict-aliasing" % get.CFLAGS())
  12. options = "--disable-static \
  13. --disable-rpath \
  14. --without-x \
  15. --enable-cxx \
  16. --enable-ld-version-script \
  17. --with-pic"
  18. if get.buildTYPE() == "emul32":
  19. options += " --prefix=/_emul32 \
  20. --libdir=/usr/lib32 \
  21. "
  22. autotools.autoreconf("-vfi")
  23. autotools.configure(options)
  24. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  25. def build():
  26. autotools.make()
  27. def install():
  28. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  29. if get.buildTYPE() == "emul32":
  30. pisitools.dosym("/usr/lib/libtiff.so.6.0.2", "/usr/lib/libtiff.so.5")
  31. pisitools.dosym("/usr/lib32/libtiff.so.6.0.2", "/usr/lib32/libtiff.so.5")
  32. pisitools.dosym("/usr/lib/libtiffxx.so.6.0.2", "/usr/lib/libtiffxx.so.5")
  33. pisitools.dosym("/usr/lib32/libtiffxx.so.6.0.2", "/usr/lib32/libtiffxx.so.5")
  34. pisitools.dosed("%s/usr/lib32/pkgconfig/libtiff-4.pc" % get.installDIR(), "_usr", "usr")
  35. pisitools.removeDir("/_emul32")
  36. return
  37. pisitools.rename("/%s/tiff-%s" % (get.docDIR(), get.srcVERSION()), get.srcNAME())