actions.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 get
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. #WorkDir = "mozjs%s/js/src" % get.srcVERSION()
  10. shelltools.export("SHELL","/bin/sh")
  11. WorkDir = "firefox-%s" %get.srcVERSION()
  12. def setup():
  13. #shelltools.cd("js/src")
  14. #shelltools.system("sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl ")
  15. shelltools.export("CC", "gcc")
  16. shelltools.export("CXX", "g++")
  17. shelltools.system("mkdir -p build-js")
  18. shelltools.cd("build-js")
  19. shelltools.system("sh ../js/src/configure.in \
  20. --prefix=/usr \
  21. --libdir=/usr/lib \
  22. --enable-readline \
  23. --with-intl-api \
  24. --disable-debug \
  25. --disable-debug-symbols \
  26. --disable-jemalloc \
  27. --disable-strip \
  28. --enable-hardening \
  29. --enable-linker=gold \
  30. --enable-optimize \
  31. --enable-readline \
  32. --enable-release \
  33. --enable-shared-js \
  34. --enable-tests \
  35. --with-intl-api \
  36. --with-system-zlib \
  37. --with-system-nspr \
  38. --without-system-icu")
  39. def build():
  40. shelltools.cd("build-js")
  41. autotools.make()
  42. def check():
  43. shelltools.cd("build-js")
  44. #autotools.make("-C js/src check-jstests")
  45. #autotools.make("-C js/src check-jit-test")
  46. def install():
  47. shelltools.cd("build-js")
  48. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  49. pisitools.remove("/usr/lib/*.ajs")
  50. #for polkit
  51. #pisitools.rename("/usr/lib/pkgconfig/mozjs-..pc", "mozjs-17.0.pc")
  52. #pisitools.remove("usr/lib/libmozjs-..a")
  53. shelltools.cd("..")
  54. pisitools.dodoc("README*")
  55. # add link for polkit
  56. #pisitools.dosym("libmozjs-..so", "/usr/lib/libmozjs-17.0.so")