#
-# Copyright (C) 2006-2012 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=5.4.5
-PKG_RELEASE:=3
+PKG_VERSION:=5.4.27
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=ffcc7f4dcf2b79d667fe0c110e6cb724
+PKG_MD5SUM:=1c6e99187d25023411b663ea09f145ee
PKG_FIXUP:=libtool no-autoreconf
PKG_BUILD_PARALLEL:=1
PHP5_MODULES = \
- apc \
calendar ctype curl \
fileinfo \
- dio dom \
+ dom \
exif \
ftp \
gettext gd gmp \
- hash http \
+ hash \
iconv \
json \
- ldap libevent \
+ ldap \
mbstring mcrypt mysql mysqli \
openssl \
pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
xml xmlreader xmlwriter zip \
PKG_CONFIG_DEPENDS:= \
- CONFIG_PACKAGE_php5-cgi CONFIG_PACKAGE_php5-cli \
$(patsubst %,CONFIG_PACKAGE_php5-mod-%,$(PHP5_MODULES)) \
- CONFIG_PHP5_FILTER CONFIG_PHP5_LIBXML PHP5_SYSTEMTZDATA
+ CONFIG_PHP5_FILTER CONFIG_PHP5_LIBXML CONFIG_PHP5_SYSTEMTZDATA
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
endef
CONFIGURE_ARGS+= \
+ --enable-cli \
+ --enable-cgi \
--enable-shared \
--disable-static \
--disable-rpath \
--with-pcre-regex="$(STAGING_DIR)/usr" \
--disable-phar
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-cli),)
- CONFIGURE_ARGS+= --enable-cli
-else
- CONFIGURE_ARGS+= --disable-cli
-endif
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-cgi),)
- CONFIGURE_ARGS+= --enable-cgi
-else
- CONFIGURE_ARGS+= --disable-cgi
-endif
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-apc),)
- CONFIGURE_ARGS+= --enable-apc=shared --disable-apc-mmap --disable-apc-pthreadmutex
-else
- CONFIGURE_ARGS+= --disable-apc
-endif
-
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-calendar),)
CONFIGURE_ARGS+= --enable-calendar=shared
else
CONFIGURE_ARGS+= --without-gettext
endif
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-dio),)
- CONFIGURE_ARGS+= --enable-dio=shared
-else
- CONFIGURE_ARGS+= --disable-dio
-endif
-
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-dom),)
CONFIGURE_ARGS+= --enable-dom=shared
else
CONFIGURE_ARGS+= --disable-hash
endif
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-http),)
- CONFIGURE_ARGS+= \
- --enable-http=shared \
- --without-http-shared-deps \
- --with-http-curl-requests="$(STAGING_DIR)/usr"
-else
- CONFIGURE_ARGS+= --disable-http
-endif
-
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-iconv),)
CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)"
else
CONFIGURE_ARGS+= --without-ldap
endif
-ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-libevent),)
- CONFIGURE_ARGS+= --with-libevent=shared,"$(STAGING_DIR)/usr"
-else
- CONFIGURE_ARGS+= --without-libevent
-endif
-
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-mbstring),)
CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex
else
endef
define Build/InstallDev
+ mkdir -p $(PKG_BUILD_DIR)/staging/usr/bin
make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging
rm -f $(PKG_BUILD_DIR)/staging/usr/bin/php
$(CP) $(PKG_BUILD_DIR)/staging/* $(STAGING_DIR_HOST)
sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR_HOST)/usr'#" $(STAGING_DIR_HOST)/usr/bin/phpize
sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR_HOST)/usr'#" $(STAGING_DIR_HOST)/usr/bin/phpize
+ sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR_HOST)/usr\"#" $(STAGING_DIR_HOST)/usr/bin/php-config
endef
define BuildModule
$(eval $(call BuildPackage,php5-fastcgi))
#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS]))
-$(eval $(call BuildModule,apc,APC,+PACKAGE_php5-mod-apc:librt))
$(eval $(call BuildModule,calendar,Calendar))
$(eval $(call BuildModule,ctype,Ctype))
$(eval $(call BuildModule,curl,cURL,+PACKAGE_php5-mod-curl:libcurl))
$(eval $(call BuildModule,fileinfo,Fileinfo,+PACKAGE_php5-mod-fileinfo:libmagic))
-$(eval $(call BuildModule,dio,Direct IO))
$(eval $(call BuildModule,dom,DOM,+@PHP5_LIBXML +PACKAGE_php5-mod-dom:libxml2))
$(eval $(call BuildModule,exif,EXIF))
$(eval $(call BuildModule,ftp,FTP,+PACKAGE_php5-mod-ftp:libopenssl))
$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php5-mod-gd:libjpeg +PACKAGE_php5-mod-gd:libpng))
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php5-mod-gmp:libgmp))
$(eval $(call BuildModule,hash,Hash))
-$(eval $(call BuildModule,http,HTTP,+PACKAGE_php5-mod-http:libcurl +PACKAGE_php5-mod-http:libevent2 +PACKAGE_php5-mod-http:librt))
$(eval $(call BuildModule,iconv,iConv,+PACKAGE_php5-mod-iconv:libiconv))
$(eval $(call BuildModule,json,JSON))
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php5-mod-ldap:libopenldap +PACKAGE_php5-mod-ldap:libsasl2))
-$(eval $(call BuildModule,libevent,libevent,+PACKAGE_php5-mod-libevent:libevent2))
$(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))