luvi.mk 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ################################################################################
  2. #
  3. # luvi
  4. #
  5. ################################################################################
  6. LUVI_VERSION = 2.11.0
  7. LUVI_SOURCE = luvi-src-v$(LUVI_VERSION).tar.gz
  8. LUVI_SITE = https://github.com/luvit/luvi/releases/download/v$(LUVI_VERSION)
  9. LUVI_LICENSE = Apache-2.0
  10. LUVI_LICENSE_FILES = LICENSE.txt
  11. LUVI_DEPENDENCIES = libuv luajit luv host-luajit
  12. # Dispatch all architectures of LuaJIT
  13. ifeq ($(BR2_i386),y)
  14. LUVI_TARGET_ARCH = x86
  15. else ifeq ($(BR2_x86_64),y)
  16. LUVI_TARGET_ARCH = x64
  17. else ifeq ($(BR2_powerpc),y)
  18. LUVI_TARGET_ARCH = ppc
  19. else ifeq ($(BR2_arm)$(BR2_armeb),y)
  20. LUVI_TARGET_ARCH = arm
  21. else ifeq ($(BR2_aarch64),y)
  22. LUVI_TARGET_ARCH = arm64
  23. else ifeq ($(BR2_mips),y)
  24. LUVI_TARGET_ARCH = mips
  25. else ifeq ($(BR2_mipsel),y)
  26. LUVI_TARGET_ARCH = mipsel
  27. else
  28. LUVI_TARGET_ARCH = $(BR2_ARCH)
  29. endif
  30. # Bundled lua bindings have to be linked statically into the luvi executable
  31. LUVI_CONF_OPTS = \
  32. -DBUILD_SHARED_LIBS=OFF \
  33. -DWithSharedLibluv=ON \
  34. -DTARGET_ARCH=$(LUVI_TARGET_ARCH) \
  35. -DLUA_PATH=$(HOST_DIR)/share/luajit-$(LUAJIT_VERSION)/?.lua
  36. # Add "rex" module (PCRE via bundled lrexlib)
  37. ifeq ($(BR2_PACKAGE_PCRE),y)
  38. LUVI_DEPENDENCIES += pcre
  39. LUVI_CONF_OPTS += -DWithPCRE=ON -DWithSharedPCRE=ON
  40. else
  41. LUVI_CONF_OPTS += -DWithPCRE=OFF -DWithSharedPCRE=OFF
  42. endif
  43. # Add "ssl" module (via bundled lua-openssl)
  44. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  45. LUVI_DEPENDENCIES += openssl
  46. LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON
  47. else
  48. LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF
  49. endif
  50. # Add "zlib" module (via bundled lua-zlib)
  51. ifeq ($(BR2_PACKAGE_ZLIB),y)
  52. LUVI_DEPENDENCIES += zlib
  53. LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON
  54. else
  55. LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF
  56. endif
  57. $(eval $(cmake-package))