[PATCH] Support for SPL (Standard PHP Library)

Signed-off-by: Henning Meyer <henning.me...@gmx.eu>

--- a/feeds/packages/lang/php5/Makefile
+++ b/feeds/packages/lang/php5/Makefile
@@ -31,9 +31,27 @@ define Package/php5/Default/description
  suited for Web development and can be embedded into HTML.
 endef

+define Package/php5/config
+       choice
+               prompt "PHP5 SPL Options"
+               default PACKAGE_php5_without_spl
+
+       config PACKAGE_php5_with_spl
+               bool "With SPL (and pcre) static"
+
+       config PACKAGE_php5_without_spl
+               bool "without SPL (pcre may be enabled)"
+       endchoice
+endef
+
 define Package/php5
   $(call Package/php5/Default)
-  DEPENDS:=+libopenssl +zlib
+       ifneq ($(CONFIG_PACKAGE_php5_with_spl),)
+               DEPENDS:=+libopenssl +zlib
+               CONFIG_PACKAGE_php5-mod-pcre:=n
+       else
+               DEPENDS:=+libopenssl +zlib +libpcre
+       endif
 endef

 define Package/php5/description
@@ -184,7 +202,6 @@ PKG_CONFIGURE_OPTS:= \
        --disable-rpath \
        --disable-debug \
        --without-pear \
-       --disable-spl \
        \
        --with-config-file-path=/etc \
        --disable-ipv6 \
@@ -226,7 +243,11 @@ ifneq ($(SDK),)
   CONFIG_PACKAGE_php5-mod-gmp:=m
   CONFIG_PACKAGE_php5-mod-ldap:=m
   CONFIG_PACKAGE_php5-mod-mysql:=m
-  CONFIG_PACKAGE_php5-mod-pcre:=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-xml:=m
@@ -266,11 +287,17 @@ 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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to