package/php-lua: new package
PATCH 1/1 package/php-lua: new package
The php-lua package provides a PHP extension that embeds the lua interpreter and offers an OO-API to lua variables and functions.
https://pecl.php.net/package/lua
Based on initial work from Nicolas Carrier <[email protected]>
Two patches are present and were retrieved from the following upstream pull request in order to support PHP8:
https://github.com/laruence/php-lua/pull/47
--- DEVELOPERS | 4 ++ package/Config.in | 1 + ...TATIC-ZEND_ACC_STATIC-for-static-met.patch | 26 ++++++++ ...0002-php8-explicitly-declare-arginfo.patch | 66 +++++++++++++++++++ package/php-lua/Config.in | 8 +++ package/php-lua/php-lua.hash | 2 + package/php-lua/php-lua.mk | 39 +++++++++++ support/testing/tests/package/test_php_lua.py | 62 +++++++++++++++++ 8 files changed, 208 insertions(+) create mode 100644 package/php-lua/0001-ZEND_ACC_ALLOW_STATIC-ZEND_ACC_STATIC-for-static-met.patch create mode 100644 package/php-lua/0002-php8-explicitly-declare-arginfo.patch create mode 100644 package/php-lua/Config.in create mode 100644 package/php-lua/php-lua.hash create mode 100644 package/php-lua/php-lua.mk create mode 100644 support/testing/tests/package/test_php_lua.py
DEVELOPERS +4 -0
@@ -1154,8 +1154,10 @@ F: package/dtbocfg/ F: package/libdbi/ F: package/libdbi-drivers/ F: package/lua-augeas/ +F: package/php-lua/ F: support/testing/tests/package/test_dtbocfg.py F: support/testing/tests/package/test_lua_augeas.py +F: support/testing/tests/package/test_php_lua.py N: Hiroshi Kawashima <[email protected]> F: package/gauche/
@@ -1994,6 +1996,7 @@ F: package/bmap-tools/ F: package/libdbi/ F: package/libdbi-drivers/ F: package/lua-augeas/ +F: package/php-lua/ F: package/php-xdebug/ F: package/python-augeas/ F: package/python-flask-expects-json/
@@ -2004,6 +2007,7 @@ F: support/testing/tests/package/sample_python_augeas.py F: support/testing/tests/package/sample_python_flask_expects_json.py F: support/testing/tests/package/sample_python_git.py F: support/testing/tests/package/test_bmap_tools.py +F: support/testing/tests/package/test_php_lua.py F: support/testing/tests/package/test_python_augeas.py F: support/testing/tests/package/test_python_flask_expects_json.py F: support/testing/tests/package/test_python_git.py
package/Config.in +1 -0
@@ -867,6 +867,7 @@ menu "External php extensions" source "package/php-geoip/Config.in" source "package/php-gnupg/Config.in" source "package/php-imagick/Config.in" + source "package/php-lua/Config.in" source "package/php-memcached/Config.in" source "package/php-ssh2/Config.in" source "package/php-xdebug/Config.in"
package/php-lua/0001-ZEND_ACC_ALLOW_STATIC-ZEND_ACC_STATIC-for-static-met.patch new file +26 -0
@@ -0,0 +1,26 @@ +From fd775cedbb97b56f0d1b098a41519f4477f450c7 Mon Sep 17 00:00:00 2001 +From: cdosoftei <[email protected]> +Date: Mon, 10 Aug 2020 15:37:52 -0400 +Subject: [PATCH] ZEND_ACC_ALLOW_STATIC -> ZEND_ACC_STATIC for static method + +Signed-off-by: Herve Codina <[email protected]> +--- + lua.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lua.c b/lua.c +index b05f4ef..f2648ac 100755 +--- a/lua.c ++++ b/lua.c +@@ -822,7 +822,7 @@ zend_function_entry lua_class_methods[] = { + PHP_ME(lua, include, arginfo_lua_include, ZEND_ACC_PUBLIC) + PHP_ME(lua, call, arginfo_lua_call, ZEND_ACC_PUBLIC) + PHP_ME(lua, assign, arginfo_lua_assign, ZEND_ACC_PUBLIC) +- PHP_ME(lua, getVersion, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC) ++ PHP_ME(lua, getVersion, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + PHP_ME(lua, registerCallback, arginfo_lua_register, ZEND_ACC_PUBLIC) + PHP_MALIAS(lua, __call, call, arginfo_lua_call, ZEND_ACC_PUBLIC) + PHP_FE_END +-- +2.31.1 +
package/php-lua/0002-php8-explicitly-declare-arginfo.patch new file +66 -0
66 lines not on this page · raw message
package/php-lua/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_LUA + bool "php-lua" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + This extension embeds the lua interpreter and offers an + OO-API to lua variables and functions. + + https://pecl.php.net/package/lua
package/php-lua/php-lua.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 86545e1e09b79e3693dd93f2a5a8f15ea161b5a1928f315c7a27107744ee8772 lua-2.0.7.tgz +sha256 b6e00df9cb3b91977c0d64a7c4db48cb6f5041f6eeda6583c236775f70a35b78 LICENSE
package/php-lua/php-lua.mk new file +39 -0
@@ -0,0 +1,39 @@ +################################################################################ +# +# php-lua +# +################################################################################ + +PHP_LUA_VERSION = 2.0.7 +PHP_LUA_SITE = http://pecl.php.net/get +PHP_LUA_SOURCE = lua-$(PHP_LUA_VERSION).tgz +PHP_LUA_LICENSE = PHP-3.01 +PHP_LUA_LICENSE_FILES = LICENSE +PHP_LUA_DEPENDENCIES = php luainterpreter host-autoconf host-pkgconf + +PHP_LUA_CONF_OPTS = \ + --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-lua=$(STAGING_DIR)/usr + +# The php-lua package uses the following code to search for the lua library +# if test "$PHP_LUA_VERSION" != "yes" -a "$PHP_LUA_VERSION" != "no"; then +# LUA_LIB_SUFFIX=lua$PHP_LUA_VERSION +# else +# LUA_LIB_SUFFIX=lua +# fi +# LUA_LIB_NAME=lib$LUA_LIB_SUFFIX +# luajit library name is libluajit-x.y with x.y the api version. +# In order to use luajit, we use jit-x.y as "lua-version". +ifeq ($(BR2_PACKAGE_LUAJIT),y) +PHP_LUA_CONF_OPTS += --with-lua-version=jit-$(LUAINTERPRETER_ABIVER) +endif + +define PHP_LUA_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef +PHP_LUA_PRE_CONFIGURE_HOOKS += PHP_LUA_PHPIZE + +$(eval $(autotools-package))
support/testing/tests/package/test_php_lua.py new file +62 -0
62 lines not on this page · raw message
Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 12 lines · On Thu, 14 Oct 2021 11:39:51 +0200 Herve Codina <[email protected]>…
The php-lua package provides a PHP extension that embeds the lua interpreter and offers an OO-API to lua variables and functions.
https://pecl.php.net/package/lua
Based on initial work from Nicolas Carrier <[email protected]>
Two patches are present and were retrieved from the following upstream pull request in order to support PHP8:
https://github.com/laruence/php-lua/pull/47Signed-off-by Herve Codina <[email protected]>
Quoted 16 lines
--- DEVELOPERS | 4 ++ package/Config.in | 1 + ...TATIC-ZEND_ACC_STATIC-for-static-met.patch | 26 ++++++++ ...0002-php8-explicitly-declare-arginfo.patch | 66 +++++++++++++++++++ package/php-lua/Config.in | 8 +++ package/php-lua/php-lua.hash | 2 + package/php-lua/php-lua.mk | 39 +++++++++++ support/testing/tests/package/test_php_lua.py | 62 +++++++++++++++++ 8 files changed, 208 insertions(+) create mode 100644 package/php-lua/0001-ZEND_ACC_ALLOW_STATIC-ZEND_ACC_STATIC-for-static-met.patch create mode 100644 package/php-lua/0002-php8-explicitly-declare-arginfo.patch create mode 100644 package/php-lua/Config.in create mode 100644 package/php-lua/php-lua.hash create mode 100644 package/php-lua/php-lua.mk create mode 100644 support/testing/tests/package/test_php_lua.py
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot