diff --git a/converters/php5-mbstring/files/patch-config.m4 b/converters/php5-mbstring/files/patch-config.m4 index 619440601c7a..026798f26a5a 100644 --- a/converters/php5-mbstring/files/patch-config.m4 +++ b/converters/php5-mbstring/files/patch-config.m4 @@ -1,6 +1,37 @@ ---- config.m4.orig Fri Sep 8 07:42:50 2006 -+++ config.m4 Fri Sep 8 07:43:00 2006 -@@ -66,7 +66,6 @@ +--- config.m4.orig 2009-11-25 02:30:06.000000000 +0100 ++++ config.m4 2010-04-12 09:59:54.000000000 +0200 +@@ -43,6 +43,30 @@ + PHP_ADD_INCLUDE([$ext_builddir/$dir]) + done + ++ dnl This is PECL build, check if bundled PCRE library is used ++ old_CPPFLAGS=$CPPFLAGS ++ CPPFLAGS=$INCLUDES ++ AC_EGREP_CPP(yes,[ ++#include
++#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) ++yes ++#endif ++ ],[ ++ PHP_PCRE_REGEX=yes ++ ],[ ++ AC_EGREP_CPP(yes,[ ++#include
++#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) ++yes ++#endif ++ ],[ ++ PHP_PCRE_REGEX=pecl ++ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include) ++ ],[ ++ PHP_PCRE_REGEX=no ++ ]) ++ ]) ++ + if test "$ext_shared" = "no"; then + PHP_ADD_SOURCES(PHP_EXT_DIR(mbstring), $PHP_MBSTRING_BASE_SOURCES) + out="php_config.h" +@@ -80,7 +104,6 @@ int foo(int x, ...) { va_list va; va_start(va, x); @@ -8,3 +39,13 @@ va_arg(va, char *); va_arg(va, double); return 0; +@@ -347,6 +370,9 @@ + [ --with-onig[=DIR] MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix. + If DIR is not set, the bundled oniguruma will be used], no, no) + ++PHP_ARG_WITH(pcre-dir, pcre install prefix, ++[ --with-pcre-dir MBSTRING: pcre install prefix], no, no) ++ + if test "$PHP_MBSTRING" != "no"; then + AC_DEFINE([HAVE_MBSTRING],1,[whether to have multibyte string support]) + diff --git a/lang/php5/Makefile.ext b/lang/php5/Makefile.ext index 074baf86071d..72b30400e301 100644 --- a/lang/php5/Makefile.ext +++ b/lang/php5/Makefile.ext @@ -155,10 +155,9 @@ CONFIGURE_ARGS+=--with-ldap-sasl .endif .if ${PHP_MODNAME} == "mbstring" -LIB_DEPENDS+= onig.1:${PORTSDIR}/devel/oniguruma4 CONFIGURE_ARGS+=--enable-mbstring \ - --with-onig=${LOCALBASE} + --with-pcre-dir=${LOCALBASE} OPTIONS= REGEX "Enable multibyte regex support" on @@ -488,6 +487,9 @@ CONFIGURE_ARGS+=--enable-gd-jis-conv .if ${PHP_MODNAME} == "mbstring" . if defined(WITHOUT_REGEX) CONFIGURE_ARGS+=--disable-mbregex +. else +LIB_DEPENDS+= onig.1:${PORTSDIR}/devel/oniguruma4 +CONFIGURE_ARGS+=--with-onig=${LOCALBASE} . endif .endif diff --git a/lang/php53/Makefile.ext b/lang/php53/Makefile.ext index 074baf86071d..72b30400e301 100644 --- a/lang/php53/Makefile.ext +++ b/lang/php53/Makefile.ext @@ -155,10 +155,9 @@ CONFIGURE_ARGS+=--with-ldap-sasl .endif .if ${PHP_MODNAME} == "mbstring" -LIB_DEPENDS+= onig.1:${PORTSDIR}/devel/oniguruma4 CONFIGURE_ARGS+=--enable-mbstring \ - --with-onig=${LOCALBASE} + --with-pcre-dir=${LOCALBASE} OPTIONS= REGEX "Enable multibyte regex support" on @@ -488,6 +487,9 @@ CONFIGURE_ARGS+=--enable-gd-jis-conv .if ${PHP_MODNAME} == "mbstring" . if defined(WITHOUT_REGEX) CONFIGURE_ARGS+=--disable-mbregex +. else +LIB_DEPENDS+= onig.1:${PORTSDIR}/devel/oniguruma4 +CONFIGURE_ARGS+=--with-onig=${LOCALBASE} . endif .endif