spidermonkey.mk 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ################################################################################
  2. #
  3. # spidermonkey
  4. #
  5. ################################################################################
  6. # Use a tarball with only the spidermonkey source code and a pre-setup
  7. # old-configure in src/js.This prevents having to use autoconf 2.13 and
  8. # makes the package much 31M instead of 257M
  9. SPIDERMONKEY_VERSION = 60.5.2
  10. SPIDERMONKEY_SOURCE = mozjs-$(SPIDERMONKEY_VERSION).tar.bz2
  11. SPIDERMONKEY_SITE = https://gentoo.osuosl.org/distfiles/9a
  12. SPIDERMONKEY_SUBDIR = js/src
  13. SPIDERMONKEY_LICENSE = MPL-2.0
  14. SPIDERMONKEY_LICENSE_FILES = moz.configure
  15. SPIDERMONKEY_INSTALL_STAGING = YES
  16. SPIDERMONKEY_DEPENDENCIES = \
  17. host-python \
  18. libnspr \
  19. zlib
  20. SPIDERMONKEY_CONF_ENV = \
  21. PYTHON="$(HOST_DIR)/bin/python2"
  22. # spidermonkey mixes up target and host.
  23. # spidermonkey does not allow building against a system jemalloc,
  24. # as it causes a conflict with glibc.
  25. SPIDERMONKEY_CONF_OPTS = \
  26. --host=$(GNU_HOST_NAME) \
  27. --target=$(GNU_TARGET_NAME) \
  28. --disable-jemalloc \
  29. --enable-shared-js \
  30. --with-system-zlib \
  31. --with-system-nspr \
  32. --with-nspr-exec-prefix="$(STAGING_DIR)/usr"
  33. ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS),y)
  34. SPIDERMONKEY_CONF_OPTS += --enable-ion
  35. else
  36. SPIDERMONKEY_CONF_OPTS += --disable-ion
  37. endif
  38. ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JS_SHELL),y)
  39. SPIDERMONKEY_CONF_OPTS += --enable-js-shell
  40. else
  41. SPIDERMONKEY_CONF_OPTS += --disable-js-shell
  42. endif
  43. ifeq ($(BR2_PACKAGE_READLINE),y)
  44. SPIDERMONKEY_CONF_OPTS += --enable-readline
  45. SPIDERMONKEY_DEPENDENCIES += readline
  46. else
  47. SPIDERMONKEY_CONF_OPTS += --disable-readline
  48. endif
  49. # Remove unneeded files
  50. define SPIDERMONKEY_CLEANUP
  51. rm -rf $(TARGET_DIR)/usr/lib/libjs_static.ajs
  52. rm -rf $(TARGET_DIR)/usr/bin/js60-config
  53. endef
  54. SPIDERMONKEY_POST_INSTALL_TARGET_HOOKS += SPIDERMONKEY_CLEANUP
  55. $(eval $(autotools-package))