php7: add new package

This is a copy of the existing php5 stuff, adopted for PHP7.

Please not, that its not supported to install both php5
and php7 in parallel on the target.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
Michael Heimpold
2016-07-18 23:30:38 +02:00
parent 1034356e9e
commit 292c2ffc18
13 changed files with 1770 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Package/php7-pecl/Default
SUBMENU:=PHP
SECTION:=lang
CATEGORY:=Languages
URL:=http://pecl.php.net/
DEPENDS:=php7
endef
define Build/Prepare
$(Build/Prepare/Default)
( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 )
endef
CONFIGURE_ARGS+= \
--with-php-config=$(STAGING_DIR)/usr/bin/php7-config
define PECLPackage
define Package/php7-pecl-$(1)
$(call Package/php7-pecl/Default)
TITLE:=$(2)
ifneq ($(3),)
DEPENDS+=$(3)
endif
endef
define Package/php7-pecl-$(1)/install
$(INSTALL_DIR) $$(1)/usr/lib/php
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
$(INSTALL_DIR) $$(1)/etc/php7
ifeq ($(4),zend)
echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(subst -,_,$(1)).ini
else
echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(subst -,_,$(1)).ini
endif
endef
endef