php5: add php5-mod-opcache (fixes #1010)

This patch adds build infrastructure for PHP's OPcache extension.
Compared with the other extension, this is a Zend module and it
need a little workaround during cross-compiling.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
Michael Heimpold
2015-05-17 17:05:50 +02:00
parent 1ff51b92fa
commit cd0bcd23e7
3 changed files with 182 additions and 2 deletions
+13 -2
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=php
PKG_VERSION:=5.6.8
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -36,7 +36,7 @@ PHP5_MODULES = \
json \
ldap \
mbstring mcrypt mysql mysqli \
openssl \
opcache openssl \
pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \
tokenizer \
@@ -276,6 +276,12 @@ else
CONFIGURE_ARGS+= --without-mysqli
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-opcache),)
CONFIGURE_ARGS+= --enable-opcache=shared
else
CONFIGURE_ARGS+= --disable-opcache
endif
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-openssl),)
CONFIGURE_ARGS+= \
--with-openssl=shared,"$(STAGING_DIR)/usr" \
@@ -508,7 +514,11 @@ define BuildModule
$(INSTALL_DIR) $$(1)/usr/lib/php
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
$(INSTALL_DIR) $$(1)/etc/php5
ifeq ($(4),zend)
echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
else
echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
endif
endef
$$(eval $$(call BuildPackage,php5-mod-$(1)))
@@ -540,6 +550,7 @@ $(eval $(call BuildModule,mbstring,MBString))
$(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php5-mod-mcrypt:libmcrypt +PACKAGE_php5-mod-mcrypt:libltdl))
$(eval $(call BuildModule,mysql,MySQL,+PACKAGE_php5-mod-mysql:libmysqlclient))
$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php5-mod-mysqli:libmysqlclient))
$(eval $(call BuildModule,opcache,OPcache,,zend))
$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php5-mod-openssl:libopenssl))
$(eval $(call BuildModule,pcntl,PCNTL))
$(eval $(call BuildModule,pdo,PHP Data Objects))