[package] make initscript of fastcgi-php to use /etc/rc.common
[openwrt/svn-archive/archive.git] / lang / php5 / Makefile
index 97911f7e109a50c8a0d7be20d44746bd5fdf40f8..ba3d992d3ca107c40b5bb7bf382eb340bce64406 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=5.3.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.php.net/distributions/
 PKG_MD5SUM:=63e97ad450f0f7259e785100b634c797
 
 PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1 
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -265,7 +266,7 @@ endef
 
 define Package/php5-mod-pdo-sqlite
   $(call Package/php5/Default)
-  DEPENDS:=php5-mod-pdo +libsqlite3
+  DEPENDS:=php5-mod-pdo +libsqlite3 +libpthread
   TITLE:=PDO driver for SQLite (3.x)
 endef
 
@@ -317,7 +318,7 @@ endef
 
 define Package/php5-mod-sqlite3
   $(call Package/php5/Default)
-  DEPENDS:=php5 +libsqlite3
+  DEPENDS:=php5 +libsqlite3 +libpthread
   TITLE:=SQLite3 shared module (3.x)
 endef
 define Package/php5-mod-sqlite3/config
@@ -367,6 +368,9 @@ endef
   depends on PHP5_LIBXML
 endef
 
+CONFIGURE_VARS += \
+       ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no)
+
 PKG_CONFIGURE_OPTS:= \
        --enable-shared \
        --disable-static \
@@ -386,7 +390,7 @@ PKG_CONFIGURE_OPTS:= \
        --disable-phar
 
 ifneq ($(SDK),)
-  PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libsqlite3 libpcre libxml2
+  PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libpthread libsqlite3 libpcre libxml2
 # force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK
   CONFIG_PACKAGE_php5-cli:=m
   CONFIG_PACKAGE_php5-cgi:=m
@@ -523,7 +527,7 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-pdo),)
   endif
   ifneq ($(CONFIG_PACKAGE_php5-mod-pdo-sqlite),)
     PKG_CONFIGURE_OPTS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
-    PKG_CONFIGURE_LIBS+= -lsqlite3
+    PKG_CONFIGURE_LIBS+= -lsqlite3 -lpthread
   else
     PKG_CONFIGURE_OPTS+= --without-pdo-sqlite
   endif
@@ -563,7 +567,7 @@ endif
 
 ifneq ($(CONFIG_PACKAGE_php5-mod-sqlite3),)
   PKG_CONFIGURE_OPTS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr"
-  PKG_CONFIGURE_LIBS+= -lsqlite3
+  PKG_CONFIGURE_LIBS+= -lsqlite3 -lpthread
 else
   PKG_CONFIGURE_OPTS+= --without-sqlite3
 endif
@@ -639,7 +643,7 @@ ifneq ($(CONFIG_PACKAGE_php5-cli),)
                iconv_impl_name="gnu_libiconv" \
                ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
        )
-       $(MAKE) -C $(PKG_BUILD_DIR)
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
        mv $(PKG_BUILD_DIR)/sapi/cli/php $(PKG_BUILD_DIR)/php-cli
   endef
 endif
@@ -657,7 +661,7 @@ ifneq ($(CONFIG_PACKAGE_php5-cgi),)
                iconv_impl_name="gnu_libiconv" \
                ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \
        )
-       $(MAKE) -C $(PKG_BUILD_DIR)
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
        mv $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(PKG_BUILD_DIR)/php-cgi
   endef
 endif