actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 get
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import pisitools
  10. def setup():
  11. options = "--disable-static \
  12. --disable-poppler-qt \
  13. --disable-gtk-doc-html \
  14. --disable-zlib \
  15. --enable-libcurl \
  16. --disable-gtk-test \
  17. --disable-poppler-qt4 \
  18. --enable-cairo-output \
  19. --enable-xpdf-headers \
  20. --enable-libjpeg \
  21. --enable-libopenjpeg=openjpeg1"
  22. if get.buildTYPE() == "emul32":
  23. options = " --libdir=/usr/lib32 \
  24. --disable-libcurl \
  25. --disable-utils \
  26. --disable-gtk-test \
  27. --disable-poppler-cpp \
  28. --disable-libopenjpeg \
  29. --disable-poppler-qt5"
  30. autotools.configure(options)
  31. def build():
  32. autotools.make()
  33. def install():
  34. if get.buildTYPE() == "emul32":
  35. pisitools.insinto("/usr/lib32", "poppler/.libs/libpoppler.so*")
  36. pisitools.insinto("/usr/lib32", "glib/.libs/libpoppler-glib.so*")
  37. for f in ["poppler.pc", "poppler-glib.pc"]:
  38. pisitools.insinto("/usr/lib32/pkgconfig", f)
  39. pisitools.dosed("%s/usr/lib32/pkgconfig/%s" % (get.installDIR(), f), get.emul32prefixDIR(), get.defaultprefixDIR())
  40. return
  41. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  42. pisitools.removeDir("/usr/share/gtk-doc")
  43. pisitools.dodoc("README", "AUTHORS", "ChangeLog", "NEWS", "README-XPDF", "TODO")