actions.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/licenses/gpl.txt
  5. from pisi.actionsapi import autotools
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import libtools
  9. from pisi.actionsapi import get
  10. def setup():
  11. #Make sure the system regenerates src/fcobjshash.h.
  12. shelltools.system("rm -rf src/fcobjshash.h")
  13. # Do not rebuild docs
  14. shelltools.export("HASDOCBOOK", "no")
  15. libtools.libtoolize("-f")
  16. autotools.autoreconf("-fi")
  17. autotools.configure("--disable-static \
  18. --disable-docs \
  19. --with-cache-dir=/var/cache/fontconfig \
  20. --with-default-fonts=/usr/share/fonts \
  21. --with-add-fonts=/usr/local/share/fonts")
  22. def build():
  23. autotools.make()
  24. def install():
  25. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  26. if get.buildTYPE() == "emul32": return
  27. pisitools.insinto("/etc/fonts", "fonts.conf", "fonts.conf.new")
  28. enabled_configs = ("10-sub-pixel-rgb.conf", "70-yes-bitmaps.conf")
  29. disabled_configs = ("10-sub-pixel-none.conf",)
  30. # for cfg in enabled_configs:
  31. # pisitools.dosym("/usr/share/fontconfig/conf.avail/%s" % cfg, "/etc/fonts/conf.d/%s" % cfg)
  32. #pisitools.dosym("../conf.avail/%s" % cfg, "/etc/fonts/conf.d/%s" % cfg)
  33. for cfg in disabled_configs:
  34. pisitools.remove("/usr/share/fontconfig/conf.avail/%s" % cfg)
  35. for i in ["fc-cat", "fc-list", "fc-match", "fc-cache"]:
  36. pisitools.doman("%s/*.1" % i)
  37. pisitools.doman("doc/*.3")
  38. pisitools.dodoc("AUTHORS", "COPYING", "README*", "doc/*.txt")