[PATCH] Support for SPL (Standard PHP Library)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@15671 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@ -30,9 +30,27 @@ define Package/php5/Default/description
|
|||||||
suited for Web development and can be embedded into HTML.
|
suited for Web development and can be embedded into HTML.
|
||||||
endef
|
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
|
define Package/php5
|
||||||
$(call Package/php5/Default)
|
$(call Package/php5/Default)
|
||||||
DEPENDS:=+libopenssl +zlib
|
ifneq ($(CONFIG_PACKAGE_php5_with_spl),)
|
||||||
|
DEPENDS:=+libopenssl +zlib
|
||||||
|
CONFIG_PACKAGE_php5-mod-pcre:=
|
||||||
|
else
|
||||||
|
DEPENDS:=+libopenssl +zlib +libpcre
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/php5/description
|
define Package/php5/description
|
||||||
@ -183,7 +201,6 @@ PKG_CONFIGURE_OPTS:= \
|
|||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
--without-pear \
|
--without-pear \
|
||||||
--disable-spl \
|
|
||||||
\
|
\
|
||||||
--with-config-file-path=/etc \
|
--with-config-file-path=/etc \
|
||||||
--disable-ipv6 \
|
--disable-ipv6 \
|
||||||
@ -225,7 +242,11 @@ ifneq ($(SDK),)
|
|||||||
CONFIG_PACKAGE_php5-mod-gmp:=m
|
CONFIG_PACKAGE_php5-mod-gmp:=m
|
||||||
CONFIG_PACKAGE_php5-mod-ldap:=m
|
CONFIG_PACKAGE_php5-mod-ldap:=m
|
||||||
CONFIG_PACKAGE_php5-mod-mysql:=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-pgsql:=m
|
||||||
CONFIG_PACKAGE_php5-mod-sqlite:=m
|
CONFIG_PACKAGE_php5-mod-sqlite:=m
|
||||||
CONFIG_PACKAGE_php5-mod-xml:=m
|
CONFIG_PACKAGE_php5-mod-xml:=m
|
||||||
@ -265,11 +286,17 @@ ifneq ($(CONFIG_PACKAGE_php5-mod-mysql),)
|
|||||||
else
|
else
|
||||||
PKG_CONFIGURE_OPTS+= --without-mysql
|
PKG_CONFIGURE_OPTS+= --without-mysql
|
||||||
endif
|
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),)
|
ifneq ($(CONFIG_PACKAGE_php5-mod-pcre),)
|
||||||
PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
|
PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
|
||||||
else
|
else
|
||||||
PKG_CONFIGURE_OPTS+= --without-pcre-regex
|
PKG_CONFIGURE_OPTS+= --without-pcre-regex
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifneq ($(CONFIG_PACKAGE_php5-mod-pgsql),)
|
ifneq ($(CONFIG_PACKAGE_php5-mod-pgsql),)
|
||||||
PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
|
PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
|
||||||
else
|
else
|
||||||
@ -404,7 +431,8 @@ define BuildPlugin
|
|||||||
define Package/$(1)/install
|
define Package/$(1)/install
|
||||||
[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/php
|
[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/php
|
||||||
for m in $(2); do \
|
for m in $(2); do \
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$$$$$$$${m}.so $$(1)/usr/lib/php/ ; \
|
[ -z "$(CONFIG_PACKAGE_$(1))" ] \
|
||||||
|
|| $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$$$$$$$${m}.so $$(1)/usr/lib/php/ ; \
|
||||||
done
|
done
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user