summaryrefslogtreecommitdiff
path: root/package/php/php.mk
diff options
context:
space:
mode:
authorJohn Voltz <john.voltz@gmail.com>2008-03-06 18:21:33 +0000
committerJohn Voltz <john.voltz@gmail.com>2008-03-06 18:21:33 +0000
commit7059768c4ca846a7c811b9197866edaf5c446475 (patch)
treeb81366d2388168dc926decbfc8a8f95b9f479eea /package/php/php.mk
parente5caaac6b968342f9713b7a7f53383c913fd9005 (diff)
enhancements for php
Diffstat (limited to 'package/php/php.mk')
-rw-r--r--package/php/php.mk116
1 files changed, 89 insertions, 27 deletions
diff --git a/package/php/php.mk b/package/php/php.mk
index e16085095..6d5d0e8e1 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -3,50 +3,122 @@
# php
#
#############################################################
-PHP_VER:=5.2.3
+PHP_VER:=5.2.5
PHP_SOURCE:=php-$(PHP_VER).tar.bz2
PHP_SITE:=http://us.php.net/get/${PHP_SOURCE}/from/us2.php.net/mirror
PHP_DIR:=$(BUILD_DIR)/php-$(PHP_VER)
PHP_CAT=$(BZCAT)
PHP_DEPS=
PHP_TARGET_DEPS=
+PHP_CONFIGURE = $(ENABLE_DEBUG)
ifneq ($(BR2_PACKAGE_PHP_CLI),y)
- PHP_CLI="--disable-cli"
+ PHP_CONFIGURE+=--disable-cli
else
- PHP_CLI="--enable-cli"
+ PHP_CONFIGURE+=--enable-cli
PHP_TARGET_DEPS+=$(TARGET_DIR)/usr/bin/php
endif
ifneq ($(BR2_PACKAGE_PHP_CGI),y)
- PHP_CGI=--disable-cgi
+ PHP_CONFIGURE+=--disable-cgi
else
- PHP_CGI=--enable-cgi
+ PHP_CONFIGURE=--enable-cgi
PHP_TARGET_DEPS+=$(TARGET_DIR)/usr/bin/php-cgi
ifeq ($(BR2_PACKAGE_PHP_FASTCGI),y)
- PHP_CGI+=--enable-fastcgi
+ PHP_CONFIGURE+=--enable-fastcgi
endif
endif
-ifeq ($(BR2_PACKAGE_PHP_OPENSSL),y)
- PHP_OPENSSL="--with-openssl=$(STAGING_DIR)/usr"
- PHP_DEPS+=openssl
+ifneq ($(BR2_INET_IPV6),y)
+ PHP_CONFIGURE+=--disable-ipv6
endif
-ifeq ($(BR2_PACKAGE_PHP_XML2),y)
- PHP_XML=--enable-libxml \
+### Extensions
+ifeq ($(BR2_PACKAGE_PHP_EXT_SOCKETS),y)
+ PHP_CONFIGURE+=--enable-sockets
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_POSIX),y)
+ PHP_CONFIGURE+=--enable-posix
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_SPL),y)
+ PHP_CONFIGURE+=--enable-spl
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_SESSION),y)
+ PHP_CONFIGURE+=--enable-session
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y)
+ PHP_CONFIGURE+=--with-openssl=$(STAGING_DIR)/usr
+ PHP_DEPS+=openssl
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y)
+ PHP_CONFIGURE+=--enable-libxml \
--with-libxml-dir=${STAGING_DIR}/usr \
--enable-xml \
--enable-xmlreader \
--enable-xmlwriter
PHP_DEPS+=libxml2
endif
-
-ifeq ($(BR2_PACKAGE_PHP_ZLIB),y)
- PHP_ZLIB="--with-zlib=$(STAGING_DIR)/usr"
+ifeq ($(BR2_PACKAGE_PHP_EXT_ZLIB),y)
+ PHP_CONFIGURE+=--with-zlib=$(STAGING_DIR)/usr
PHP_DEPS+=zlib
endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_EXIF),y)
+ PHP_CONFIGURE+=--enable-exif
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_FTP),y)
+ PHP_CONFIGURE+=--enable-ftp
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
+ PHP_CONFIGURE+=--with-gettext=$(STAGING_DIR)/usr
+ PHP_DEPS+=gettext
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)
+ PHP_CONFIGURE+=--with-gmp=$(STAGING_DIR)/usr
+ PHP_DEPS+=libgmp
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_JSON),y)
+ PHP_CONFIGURE+=--enable-json
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_READLINE),y)
+ PHP_CONFIGURE+=--with-readline=$(STAGING_DIR)/usr
+ PHP_DEPS+=readline
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_NCURSES),y)
+ PHP_CONFIGURE+=--with-ncurses=$(STATING_DIR)/usr
+ PHP_DEPS+=ncurses
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVMSG),y)
+ PHP_CONFIGURE+=--enable-sysvmsg
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVSEM),y)
+ PHP_CONFIGURE+=--enable-sysvsem
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVSHM),y)
+ PHP_CONFIGURE+=--enable-sysvshm
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_ZIP),y)
+ PHP_CONFIGURE+=--enable-zip
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_FILTER),y)
+ PHP_CONFIGURE+=--enable-filter
+endif
+### Database extensions
+ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
+ PHP_CONFIGURE+=--with-sql
+ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE_UTF8),y)
+ PHP_CONFIGURE+=--enable-sqlite-utf8
+endif
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y)
+ PHP_CONFIGURE+=--with-pdo
+ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y)
+ PHP_CONFIGURE+=--with-pdo-sqlite
+endif
+ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
+ PHP_CONFIGURE+=--with-pod-mysql
+endif
+endif
$(DL_DIR)/$(PHP_SOURCE):
$(WGET) -P $(DL_DIR) $(PHP_SITE)
@@ -62,7 +134,7 @@ $(PHP_DIR)/.configured: $(PHP_DIR)/.unpacked
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
CC=$(TARGET_CC) \
- ./configure \
+ ./configure $(DISABLE_NLS) \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
@@ -78,19 +150,9 @@ $(PHP_DIR)/.configured: $(PHP_DIR)/.unpacked
--mandir=/usr/man \
--infodir=/usr/info \
--disable-all \
- --enable-spl \
- --enable-session \
- --enable-sockets \
- --enable-posix \
--with-pcre-regex \
--without-pear \
- --disable-ipv6 \
- $(DISABLE_NLS) \
- $(PHP_OPENSSL) \
- $(PHP_XML) \
- $(PHP_CLI) \
- $(PHP_CGI) \
- $(PHP_ZLIB) \
+ $(PHP_CONFIGURE) \
)
touch $@
@@ -119,7 +181,7 @@ php: uclibc $(PHP_DEPS) $(PHP_TARGET_DEPS) $(TARGET_DIR)/etc/php.ini
php-clean:
rm -f $(PHP_DIR)/.configured $(PHP_DIR)/.built $(PHP_DIR)/.staged
- rm -f $(TARGET_DIR)/usr/bin/php $(TARGET_DIR)/usr/bin/php-cgi
+ rm -f $(PHP_TARGET_DEPS)
rm -f $(STAGING_DIR)/usr/bin/php* $(STAGING_DIR)/usr/man/man1/php*
rm -rf $(STAGING_DIR)/usr/include/php
-$(MAKE) -C $(PHP_DIR) clean