Changeset 15671


Ignore:
Timestamp:
2009-05-07T15:21:57+02:00 (9 years ago)
Author:
jow
Message:

[PATCH] Support for SPL (Standard PHP Library)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/lang/php5/Makefile

    r15247 r15671  
    3131endef 
    3232 
     33define Package/php5/config 
     34       choice 
     35               prompt "PHP5 SPL Options" 
     36               default PACKAGE_php5_without_spl 
     37 
     38       config PACKAGE_php5_with_spl 
     39               bool "With SPL (and pcre) static" 
     40 
     41       config PACKAGE_php5_without_spl 
     42               bool "without SPL (pcre may be enabled)" 
     43       endchoice 
     44endef 
     45 
    3346define Package/php5 
    3447  $(call Package/php5/Default) 
    35   DEPENDS:=+libopenssl +zlib 
     48        ifneq ($(CONFIG_PACKAGE_php5_with_spl),) 
     49                DEPENDS:=+libopenssl +zlib 
     50                CONFIG_PACKAGE_php5-mod-pcre:= 
     51        else 
     52                DEPENDS:=+libopenssl +zlib +libpcre 
     53        endif 
    3654endef 
    3755 
     
    184202        --disable-debug \ 
    185203        --without-pear \ 
    186         --disable-spl \ 
    187204        \ 
    188205        --with-config-file-path=/etc \ 
     
    226243  CONFIG_PACKAGE_php5-mod-ldap:=m 
    227244  CONFIG_PACKAGE_php5-mod-mysql:=m 
    228   CONFIG_PACKAGE_php5-mod-pcre:=m 
     245  ifneq ($(CONFIG_PACKAGE_php5_with_spl),) 
     246        CONFIG_PACKAGE_php5-mod-pcre:=n 
     247  else 
     248        CONFIG_PACKAGE_php5-mod-pcre:=m 
     249  endif 
    229250  CONFIG_PACKAGE_php5-mod-pgsql:=m 
    230251  CONFIG_PACKAGE_php5-mod-sqlite:=m 
     
    266287  PKG_CONFIGURE_OPTS+= --without-mysql 
    267288endif 
     289ifneq ($(CONFIG_PACKAGE_php5_with_spl),) 
     290  PKG_CONFIGURE_OPTS+= --with-pcre-dir="$(STAGING_DIR)/usr" 
     291  PKG_CONFIGURE_OPTS+= --enable-spl 
     292else 
     293  PKG_CONFIGURE_OPTS+= --disable-spl 
    268294ifneq ($(CONFIG_PACKAGE_php5-mod-pcre),) 
    269295  PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr" 
    270296else 
    271297  PKG_CONFIGURE_OPTS+= --without-pcre-regex 
     298endif 
    272299endif 
    273300ifneq ($(CONFIG_PACKAGE_php5-mod-pgsql),) 
     
    405432        [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/php 
    406433        for m in $(2); do \ 
    407                 $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$$$$$$$${m}.so $$(1)/usr/lib/php/ ; \ 
     434                [ -z "$(CONFIG_PACKAGE_$(1))" ] \ 
     435                         || $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$$$$$$$${m}.so $$(1)/usr/lib/php/ ; \ 
    408436        done 
    409437  endef 
Note: See TracChangeset for help on using the changeset viewer.