[PATCH 1/4] packages/lang/php5: Update to version 5.3.1

The following patchset upgrades the php5 package to php's 5.3 stable branch.
It removes the SPL build option as this is included in php's core henceforth, likewise
for pcre module. On the other hand a new option for SysV IPC is added and a package
for sqlite3 is introduced.
As FastCGI support is now a core feature the php5-fastcgi package now depends
on the php5-cgi package, containing just a link to the binary and the startup script.
The cross-compile patch is updated to fit the new version.
Signed-off-by: Michael Heimpold <michael.heimpold@s2000.tu-chemnitz.de>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@19266 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-01-22 01:08:54 +00:00
parent a17ad07b27
commit 74c87930e2
2 changed files with 47 additions and 88 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=php
PKG_VERSION:=5.2.6
PKG_RELEASE:=3
PKG_VERSION:=5.3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.php.net/distributions/
PKG_MD5SUM:=7380ffecebd95c6edb317ef861229ebd
PKG_MD5SUM:=63e97ad450f0f7259e785100b634c797
include $(INCLUDE_DIR)/package.mk
@ -31,33 +31,22 @@ define Package/php5/Default/description
endef
define Package/php5/config
choice
prompt "PHP5 SPL Options"
depends PACKAGE_php5
default PACKAGE_php5_without_spl
config PHP5_APC
bool "PHP5 APC support"
depends PACKAGE_php5
config PACKAGE_php5_with_spl
bool "With SPL (and pcre) static"
config PHP5_EXIF
bool "PHP5 EXIF support"
depends PACKAGE_php5
config PACKAGE_php5_without_spl
bool "without SPL (pcre may be enabled)"
endchoice
config PHP5_APC
bool "PHP5 APC support"
config PHP5_EXIF
bool "PHP5 EXIF support"
config PHP5_SYSVIPC
bool "PHP5 Semaphore, Shared Memory and IPC support"
depends PACKAGE_php5
endef
define Package/php5
$(call Package/php5/Default)
ifneq ($(CONFIG_PACKAGE_php5_with_spl),)
DEPENDS:=+libopenssl +zlib
CONFIG_PACKAGE_php5-mod-pcre:=
else
DEPENDS:=+libopenssl +zlib +libpcre
endif
DEPENDS:=+libopenssl +libpcre +zlib
endef
define Package/php5/description
@ -90,7 +79,7 @@ endef
define Package/php5-fastcgi
$(call Package/php5/Default)
DEPENDS:=php5
DEPENDS:=php5 +php5-cgi
TITLE+= (FastCGI)
endef
@ -141,12 +130,6 @@ define Package/php5-mod-openssl
TITLE:=OpenSSL module
endef
define Package/php5-mod-pcre
$(call Package/php5/Default)
DEPENDS:=php5 +libpcre
TITLE:=PCRE module
endef
define Package/php5-mod-pgsql
$(call Package/php5/Default)
DEPENDS:=php5 +libpq
@ -171,6 +154,12 @@ define Package/php5-mod-sqlite
TITLE:=SQLite module
endef
define Package/php5-mod-sqlite3
$(call Package/php5/Default)
DEPENDS:=php5 +libsqlite3
TITLE:=SQLite3 module
endef
define Package/php5-mod-pdo
$(call Package/php5/Default)
DEPENDS:=php5
@ -199,7 +188,6 @@ PKG_CONFIGURE_OPTS:= \
\
--with-config-file-path=/etc \
--enable-magic-quotes \
--enable-memory-limit \
--disable-short-tags \
\
--disable-ctype \
@ -223,10 +211,13 @@ PKG_CONFIGURE_OPTS:= \
--disable-tokenizer \
--with-zlib="$(STAGING_DIR)/usr" \
--with-zlib-dir="$(STAGING_DIR)/usr" \
--disable-filter
--with-pcre-regex="$(STAGING_DIR)/usr" \
--disable-filter \
--disable-fileinfo \
--disable-phar
ifneq ($(SDK),)
PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libexpat
PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libsqlite3 libexpat
# force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK
CONFIG_PACKAGE_php5-cli:=m
CONFIG_PACKAGE_php5-cgi:=m
@ -236,13 +227,9 @@ ifneq ($(SDK),)
CONFIG_PACKAGE_php5-mod-gmp:=m
CONFIG_PACKAGE_php5-mod-ldap:=m
CONFIG_PACKAGE_php5-mod-mysql:=m
ifneq ($(CONFIG_PACKAGE_php5_with_spl),)
CONFIG_PACKAGE_php5-mod-pcre:=n
else
CONFIG_PACKAGE_php5-mod-pcre:=m
endif
CONFIG_PACKAGE_php5-mod-pgsql:=m
CONFIG_PACKAGE_php5-mod-sqlite:=m
CONFIG_PACKAGE_php5-mod-sqlite3:=m
CONFIG_PACKAGE_php5-mod-xml:=m
endif
@ -280,17 +267,6 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-mysql),)
else
PKG_CONFIGURE_OPTS+= --without-mysql
endif
ifneq ($(CONFIG_PACKAGE_php5_with_spl),)
PKG_CONFIGURE_OPTS+= --with-pcre-dir="$(STAGING_DIR)/usr"
PKG_CONFIGURE_OPTS+= --enable-spl
else
PKG_CONFIGURE_OPTS+= --disable-spl
ifneq ($(CONFIG_PACKAGE_php5-mod-pcre),)
PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
else
PKG_CONFIGURE_OPTS+= --without-pcre-regex
endif
endif
ifneq ($(CONFIG_PACKAGE_php5-mod-pgsql),)
PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
else
@ -301,10 +277,17 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-sqlite),)
else
PKG_CONFIGURE_OPTS+= --without-sqlite
endif
ifneq ($(CONFIG_PACKAGE_php5-mod-sqlite3),)
PKG_CONFIGURE_OPTS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
PKG_CONFIGURE_LIBS+= -lsqlite3
else
PKG_CONFIGURE_OPTS+= --without-sqlite3
endif
ifneq ($(CONFIG_PACKAGE_php5-mod-pdo),)
PKG_CONFIGURE_OPTS+= --enable-pdo=shared
ifneq ($(CONFIG_PACKAGE_php5-mod-pdo-sqlite),)
PKG_CONFIGURE_OPTS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
PKG_CONFIGURE_LIBS+= -lsqlite3
endif
else
PKG_CONFIGURE_OPTS+= --disable-pdo
@ -326,6 +309,11 @@ ifneq ($(CONFIG_PHP5_EXIF),)
else
PKG_CONFIGURE_OPTS+= --disable-exif
endif
ifneq ($(CONFIG_PHP5_SYSVIPC),)
PKG_CONFIGURE_OPTS+= --enable-sysvsem --enable-sysvshm --enable-sysvmsg
else
PKG_CONFIGURE_OPTS+= --disable-sysvsem --disable-sysvshm --disable-sysvmsg
endif
define Build/Configure
endef
@ -337,9 +325,6 @@ ifneq ($(CONFIG_PACKAGE_php5-cli),)
$(PKG_CONFIGURE_OPTS) \
--enable-cli \
--disable-cgi \
--disable-fastcgi \
--enable-force-cgi-redirect \
--enable-discard-path \
, \
LIBS="$(PKG_CONFIGURE_LIBS)" \
php_cv_cc_rpath="no" \
@ -356,9 +341,6 @@ ifneq ($(CONFIG_PACKAGE_php5-cgi),)
$(PKG_CONFIGURE_OPTS) \
--disable-cli \
--enable-cgi \
--disable-fastcgi \
--enable-force-cgi-redirect \
--enable-discard-path \
, \
LIBS="$(PKG_CONFIGURE_LIBS)" \
php_cv_cc_rpath="no" \
@ -368,31 +350,9 @@ ifneq ($(CONFIG_PACKAGE_php5-cgi),)
endef
endif
ifneq ($(CONFIG_PACKAGE_php5-fastcgi),)
define Build/Compile/php5-fastcgi
-$(MAKE) -C $(PKG_BUILD_DIR) clean
rm $(PKG_BUILD_DIR)/configure
cd $(PKG_BUILD_DIR) && ./buildconf --force
$(call Build/Configure/Default, \
$(PKG_CONFIGURE_OPTS) \
--disable-cli \
--enable-cgi \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-discard-path \
, \
LIBS="$(PKG_CONFIGURE_LIBS)" \
php_cv_cc_rpath="no" \
)
$(MAKE) -C $(PKG_BUILD_DIR)
mv $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(PKG_BUILD_DIR)/php-fcgi
endef
endif
define Build/Compile
$(call Build/Compile/php5-cli)
$(call Build/Compile/php5-cgi)
$(call Build/Compile/php5-fastcgi)
endef
define Package/php5/conffiles
@ -416,7 +376,7 @@ endef
define Package/php5-fastcgi/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/php-fcgi $(1)/usr/bin/php-fcgi
ln -sf php-cgi $(1)/usr/bin/php-fcgi
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/php.init $(1)/etc/init.d/php
endef
@ -444,11 +404,11 @@ $(eval $(call BuildPlugin,php5-mod-gmp,gmp))
$(eval $(call BuildPlugin,php5-mod-ldap,ldap))
$(eval $(call BuildPlugin,php5-mod-mysql,mysql))
$(eval $(call BuildPlugin,php5-mod-openssl,openssl))
$(eval $(call BuildPlugin,php5-mod-pcre,pcre))
$(eval $(call BuildPlugin,php5-mod-pgsql,pgsql))
$(eval $(call BuildPlugin,php5-mod-session,session))
$(eval $(call BuildPlugin,php5-mod-sockets,sockets))
$(eval $(call BuildPlugin,php5-mod-sqlite,sqlite))
$(eval $(call BuildPlugin,php5-mod-sqlite3,sqlite3))
$(eval $(call BuildPlugin,php5-mod-pdo,pdo))
$(eval $(call BuildPlugin,php5-mod-pdo-sqlite,pdo_sqlite))
$(eval $(call BuildPlugin,php5-mod-xml,xml))

View File

@ -1,8 +1,7 @@
Index: php-5.2.4/configure
===================================================================
--- php-5.2.4.orig/configure 2007-09-02 12:27:37.000000000 +0200
+++ php-5.2.4/configure 2007-09-02 12:28:32.000000000 +0200
@@ -14679,7 +14679,7 @@
diff -Naur php-5.3.1.orig/configure php-5.3.1/configure
--- php-5.3.1.orig/configure 2009-11-18 21:11:57.000000000 +0100
+++ php-5.3.1/configure 2010-01-15 23:43:10.000000000 +0100
@@ -14712,7 +14712,7 @@
ac_libs=$LIBS
LIBS="$LIBS -ldl"
if test "$cross_compiling" = yes; then
@ -10,8 +9,8 @@ Index: php-5.2.4/configure
+ found=yes
else
cat > conftest.$ac_ext <<EOF
#line 14686 "configure"
@@ -53050,7 +53050,7 @@
#line 14719 "configure"
@@ -54494,7 +54494,7 @@
_SAVE_CPPFLAGS=$CPPFLAGS
_SAVE_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS -I$LDAP_INCDIR"
@ -19,4 +18,4 @@ Index: php-5.2.4/configure
+ LIBS="$LIBS $LDAP_SHARED_LIBADD -lsasl2"
echo $ac_n "checking for 3 arg ldap_set_rebind_proc""... $ac_c" 1>&6
echo "configure:53057: checking for 3 arg ldap_set_rebind_proc" >&5
echo "configure:54501: checking for 3 arg ldap_set_rebind_proc" >&5