actions.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. # Remove local copies for system libs
  12. for directory in ["cups/libs", "jpeg", "lcms2mt", "libpng", "openjpeg", "tiff", "zlib"]:
  13. shelltools.unlinkDir(directory)
  14. #pisitools.flags.add("-fno-strict-aliasing")
  15. autotools.autoreconf("-fi")
  16. options = "--with-x \
  17. --with-ijs \
  18. --disable-gtk \
  19. --with-libpaper \
  20. --with-jbig2dec \
  21. --enable-freetype \
  22. --with-drivers=ALL \
  23. --enable-fontconfig \
  24. --with-system-libtiff \
  25. --disable-compile-inits \
  26. --with-fontpath=/usr/share/fonts:/usr/share/fonts/default/ghostscript:/usr/share/cups/fonts:/usr/share/fonts/TTF:/usr/share/fonts/Type1:/usr/share/poppler/cMap/*"
  27. options += " --disable-cups --includedir=/usr/include --libdir=/usr/lib32" if get.buildTYPE() == "emul32" else " --enable-cups"
  28. autotools.configure(options)
  29. shelltools.cd("ijs/")
  30. pisitools.dosed("configure.ac", "AM_PROG_CC_STDC", "AC_PROG_CC")
  31. shelltools.system("./autogen.sh \
  32. --prefix=/usr \
  33. --enable-shared \
  34. --disable-static \
  35. --mandir=/usr/share/man")
  36. def build():
  37. autotools.make("-C ijs")
  38. autotools.make("so")
  39. autotools.make("-j1")
  40. if not get.buildTYPE() == "emul32": autotools.make("cups")
  41. def install():
  42. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  43. autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "soinstall")
  44. if not get.buildTYPE() == "emul32": autotools.rawInstall("-C ijs DESTDIR=%s" % get.installDIR())
  45. pisitools.dohtml("doc/*")
  46. pisitools.dodoc("LICENSE", "doc/COPYING")