actions.py 991 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import get
  10. i = ''.join([
  11. ' USE_SYSTEM_LIBS=yes',
  12. ' USE_SYSTEM_GLUT=no',
  13. ' USE_SYSTEM_LCMS2=no',
  14. ' USE_SYSTEM_GUMBO=no',
  15. ' USE_SYSTEM_JBIG2DEC=no',
  16. ' shared=yes '
  17. ])
  18. def build():
  19. shelltools.system("sed '/TOFU_CJK /c #define TOFU_CJK 1/' -i include/mupdf/fitz/config.h")
  20. shelltools.system("sed -i '/ttc/s/^/#/' Makefile")
  21. # remove bundled packages, use our system libraries
  22. shelltools.system("rm -rf thirdparty/{curl,freetype,harfbuzz,libjpeg,openjpeg,zlib}")
  23. autotools.make("prefix=/usr %s" % i)
  24. def install():
  25. autotools.rawInstall("DESTDIR=%s prefix=/usr %s" % (get.installDIR(), i))
  26. pisitools.dodoc("CHANGES", "COPYING", "README*")