2
1

php-lua.mk 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ################################################################################
  2. #
  3. # php-lua
  4. #
  5. ################################################################################
  6. PHP_LUA_VERSION = 2.0.7
  7. PHP_LUA_SITE = http://pecl.php.net/get
  8. PHP_LUA_SOURCE = lua-$(PHP_LUA_VERSION).tgz
  9. PHP_LUA_LICENSE = PHP-3.01
  10. PHP_LUA_LICENSE_FILES = LICENSE
  11. PHP_LUA_DEPENDENCIES = php luainterpreter host-autoconf host-pkgconf
  12. PHP_LUA_CONF_OPTS = \
  13. --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
  14. --with-lua=$(STAGING_DIR)/usr
  15. # The php-lua package uses the following code to search for the lua library
  16. # if test "$PHP_LUA_VERSION" != "yes" -a "$PHP_LUA_VERSION" != "no"; then
  17. # LUA_LIB_SUFFIX=lua$PHP_LUA_VERSION
  18. # else
  19. # LUA_LIB_SUFFIX=lua
  20. # fi
  21. # LUA_LIB_NAME=lib$LUA_LIB_SUFFIX
  22. # luajit library name is libluajit-x.y with x.y the api version.
  23. # In order to use luajit, we use jit-x.y as "lua-version".
  24. ifeq ($(BR2_PACKAGE_LUAJIT),y)
  25. PHP_LUA_CONF_OPTS += --with-lua-version=jit-$(LUAINTERPRETER_ABIVER)
  26. endif
  27. define PHP_LUA_PHPIZE
  28. (cd $(@D); \
  29. PHP_AUTOCONF=$(HOST_DIR)/bin/autoconf \
  30. PHP_AUTOHEADER=$(HOST_DIR)/bin/autoheader \
  31. $(STAGING_DIR)/usr/bin/phpize)
  32. endef
  33. PHP_LUA_PRE_CONFIGURE_HOOKS += PHP_LUA_PHPIZE
  34. $(eval $(autotools-package))