actions.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import perlmodules
  11. KeepSpecial=["libtool"]
  12. j = "--with-lqr \
  13. --with-wmf \
  14. --with-xml \
  15. --with-perl \
  16. --with-rsvg \
  17. --with-webp \
  18. --without-gvc \
  19. --prefix=/usr \
  20. --enable-hdri \
  21. --without-dps \
  22. --without-fpx \
  23. --with-modules \
  24. --with-openexr \
  25. --with-openjp2 \
  26. --without-djvu \
  27. --without-fftw \
  28. --enable-opencl \
  29. --without-gslib \
  30. --sysconfdir=/etc \
  31. --without-autotrace \
  32. PSDelegate=/usr/bin/gs \
  33. XPSDelegate=/usr/bin/gxps \
  34. PCLDelegate=/usr/bin/gpcl6 \
  35. --with-perl-options=INSTALLDIRS=vendor \
  36. --with-dejavu-font-dir=/usr/share/fonts/dejavu \
  37. --with-gs-font-dir=/usr/share/fonts/default/ghostscript \
  38. PKG_CONFIG='/usr/bin/env PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig pkg-config' \
  39. "
  40. def setup():
  41. pisitools.dosed("configure.ac", "AC_PATH_XTRA")
  42. autotools.autoreconf("-fi")
  43. pisitools.dosed("configure", "DOCUMENTATION_RELATIVE_PATH=.*", "DOCUMENTATION_RELATIVE_PATH=%s/html" % get.srcNAME())
  44. autotools.configure(j)
  45. # fix unused direct dependency analysis
  46. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  47. def build():
  48. autotools.make()
  49. def install():
  50. autotools.rawInstall("DESTDIR=%s pkgconfigdir=/usr/lib/%s/pkgconfig" % (get.installDIR(), get.srcNAME()))
  51. pisitools.dodoc("LICENSE", "README*")
  52. pisitools.remove("/usr/lib/*.la")
  53. # to prevent conflict, remove binaries, we can get them from latest ImageMagick
  54. pisitools.removeDir("/usr/bin")
  55. # to prevent conflict, remove man files, we can get them from latest ImageMagick
  56. pisitools.removeDir("/usr/share/man")
  57. # to prevent conflict, remove conflicting perl files
  58. perlmodules.removePacklist()
  59. perlmodules.removePodfiles()
  60. pisitools.removeDir("/usr/lib/perl5")