add option to compile APC for php5
[openwrt/svn-archive/archive.git] / lang / php5 / Makefile
index af9de6b1d962d6f81c21d20db807b73d64c28fdf..2690854be39545d3a0a054b152661a78faf35509 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=5.0.5
+PKG_VERSION:=5.1.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://fr.php.net/distributions/
-PKG_MD5SUM:=b5d4ca75bbb11ee5b830fa67213d9f7f
+PKG_MD5SUM:=08e423aa314369d4392a36b3f7246afc
 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" \
@@ -186,7 +194,7 @@ PKG_CONFIGURE_OPTS:= \
          --with-zlib-dir="$(STAGING_DIR)/usr" \
 
 ifneq ($(SDK),)
-  PKG_BUILDDEP:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libexpat
+  PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libexpat
 # force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK
   CONFIG_PACKAGE_php5-cli:=m
   CONFIG_PACKAGE_php5-cgi:=m
@@ -257,6 +265,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
@@ -302,6 +316,8 @@ 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 \
@@ -374,3 +390,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))