actions.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 \
  20. --prefix=/usr \
  21. --enable-readline \
  22. --with-intl-api \
  23. --disable-debug \
  24. --disable-debug-symbols \
  25. --disable-jemalloc \
  26. --disable-strip \
  27. --enable-hardening \
  28. --enable-linker=gold \
  29. --enable-optimize \
  30. --enable-readline \
  31. --enable-release \
  32. --enable-shared-js \
  33. --enable-tests \
  34. --with-intl-api \
  35. --with-system-zlib \
  36. --with-system-nspr \
  37. --without-system-icu")
  38. def build():
  39. shelltools.cd("build-js")
  40. autotools.make("prefix=/usr")
  41. def check():
  42. shelltools.cd("build-js")
  43. #autotools.make("-C js/src check-jstests")
  44. #autotools.make("-C js/src check-jit-test")
  45. def install():
  46. shelltools.cd("build-js")
  47. autotools.rawInstall("DESTDIR=%s prefix=/usr" % get.installDIR())
  48. pisitools.remove("/usr/lib/*.ajs")
  49. pisitools.dosed("%s/usr/bin/js115-config" % get.installDIR(), "usr/local", "usr")
  50. pisitools.dosed("%s/usr/lib/pkgconfig/mozjs-115.pc" % get.installDIR(), "usr/local", "usr")
  51. #for polkit
  52. #pisitools.rename("/usr/lib/pkgconfig/mozjs-..pc", "mozjs-17.0.pc")
  53. #pisitools.remove("usr/lib/libmozjs-..a")
  54. shelltools.cd("..")
  55. pisitools.dodoc("README*")
  56. # add link for polkit
  57. #pisitools.dosym("libmozjs-..so", "/usr/lib/libmozjs-17.0.so")