actions.py 2.1 KB

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