update to php 5.2.3, bugfixes and security fixes... note, the binaries have changed...
[openwrt/svn-archive/archive.git] / lang / php5 / Makefile
index 929099f49ba48c1422d4e03a93d8b0c8066c30a0..639f4f55b3a8b025bc3e7951e9414cb91d847d8e 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=5.0.5
+PKG_VERSION:=5.2.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://fr.php.net/distributions/
-PKG_MD5SUM:=b5d4ca75bbb11ee5b830fa67213d9f7f
+PKG_SOURCE_URL:=http://www.php.net/distributions/
+PKG_MD5SUM:=eb50b751c8e1ced05bd012d5a0e4dec3
 PKG_CAT:=bzcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -150,6 +150,12 @@ define Package/php5-mod-xml
   TITLE:=XML module
 endef
 
+define Package/php5-mod-apc
+  $(call Package/php5/Default)
+  DEPENDS:=php5
+  TITLE:=APC Extension
+endef
+
 PKG_CONFIGURE_LIBS:= -lcrypto -lssl
 PKG_CONFIGURE_OPTS:= \
        --enable-shared \
@@ -172,6 +178,8 @@ PKG_CONFIGURE_OPTS:= \
        --without-iconv \
        --disable-libxml \
          --without-libxml-dir \
+       --disable-xmlreader \
+       --disable-xmlwriter \
        --disable-mbstring \
        --disable-mbregex \
        --with-openssl=shared,"$(STAGING_DIR)/usr" \
@@ -184,6 +192,7 @@ PKG_CONFIGURE_OPTS:= \
        --disable-tokenizer \
        --with-zlib="$(STAGING_DIR)/usr" \
          --with-zlib-dir="$(STAGING_DIR)/usr" \
+       --disable-filter
 
 ifneq ($(SDK),)
   PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libexpat
@@ -214,7 +223,7 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-gd),)
        --with-png-dir="$(STAGING_DIR)/usr" \
        --without-xpm-dir \
        --without-ttf \
-       --without-t1lib \
+       --without-t1lib \
        --enable-gd-native-ttf \
        --disable-gd-jis-conv
 else
@@ -257,6 +266,12 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-xml),)
 else
   PKG_CONFIGURE_OPTS+= --disable-xml
 endif
+ifneq ($(CONFIG_PACKAGE_php5-mod-apc),)
+  PKG_CONFIGURE_OPTS+= --enable-apc --disable-apc-mmap
+  PKG_CONFIGURE_LIBS+= -lrt
+else
+  PKG_CONFIGURE_OPTS+= --disable-apc
+endif
 
 define Build/Configure
 endef
@@ -295,13 +310,15 @@ ifneq ($(CONFIG_PACKAGE_php5-cgi),)
                php_cv_cc_rpath="no" \
        )
        $(MAKE) -C $(PKG_BUILD_DIR)
-       mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-cgi
+       mv $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(PKG_BUILD_DIR)/php-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 \
@@ -314,7 +331,7 @@ ifneq ($(CONFIG_PACKAGE_php5-fastcgi),)
                php_cv_cc_rpath="no" \
        )
        $(MAKE) -C $(PKG_BUILD_DIR)
-       mv $(PKG_BUILD_DIR)/sapi/cgi/php $(PKG_BUILD_DIR)/php-fastcgi
+       mv $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(PKG_BUILD_DIR)/php-fcgi
   endef
 endif
 
@@ -331,17 +348,17 @@ endef
 
 define Package/php5-cli/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/php-cli $(1)/usr/bin/php
+       $(CP) $(PKG_BUILD_DIR)/php-cli $(1)/usr/bin/php-cli
 endef
 
 define Package/php5-cgi/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/php-cgi $(1)/usr/bin/php
+       $(CP) $(PKG_BUILD_DIR)/php-cgi $(1)/usr/bin/php-cgi
 endef
 
 define Package/php5-fastcgi/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_BUILD_DIR)/php-fastcgi $(1)/usr/sbin/php
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/php-fcgi $(1)/usr/bin/php-fcgi
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/php.init $(1)/etc/init.d/php
 endef
@@ -374,3 +391,4 @@ $(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-xml,xml))
+$(eval $(call BuildPlugin,php5-mod-apc))