aboutsummaryrefslogtreecommitdiff
path: root/lang/php5
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2006-05-06 13:26:49 +0000
committerAlex Dupre <ale@FreeBSD.org>2006-05-06 13:26:49 +0000
commitf12d3a0ccb6b5f12408152f1e699e0d91ebfe909 (patch)
tree7e77ab1846eeb19035bf34f40c8aa72a0f2fd4db /lang/php5
parentc98b5156448cba566825c999725c2c7f544414a5 (diff)
downloadports-f12d3a0ccb6b5f12408152f1e699e0d91ebfe909.tar.gz
ports-f12d3a0ccb6b5f12408152f1e699e0d91ebfe909.zip
Notes
Diffstat (limited to 'lang/php5')
-rw-r--r--lang/php5/Makefile161
-rw-r--r--lang/php5/distinfo6
-rw-r--r--lang/php5/files/patch-TSRM_threads.m411
-rw-r--r--lang/php5/files/patch-acinclude.m433
-rw-r--r--lang/php5/files/patch-configure47
-rw-r--r--lang/php5/files/patch-configure.in50
-rw-r--r--lang/php5/files/patch-main::php_config.h.in6
-rw-r--r--lang/php5/files/patch-main_SAPI.c8
-rw-r--r--lang/php5/files/patch-sapi_cgi_Makefile.frag9
-rw-r--r--lang/php5/files/patch-sapi_cgi_config9.m455
-rw-r--r--lang/php5/files/patch-scripts::phpize.in8
-rw-r--r--lang/php5/pkg-plist3
12 files changed, 237 insertions, 160 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
index fd677ae1c48e..47a564c6e1c8 100644
--- a/lang/php5/Makefile
+++ b/lang/php5/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= php5
-PORTVERSION= 5.1.2
-PORTREVISION?= 1
+PORTVERSION= 5.1.4
+PORTREVISION?= 0
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \
http://downloads.php.net/ilia/:rc \
@@ -22,9 +22,8 @@ COMMENT?= PHP Scripting Language (Apache Module and CLI)
LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
USE_BZIP2= yes
-.if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX} == "-cgi" || ${PKGNAMESUFFIX} == "-cli"
-GNU_CONFIGURE= yes
-USE_REINPLACE= yes
+.if !defined(PKGNAMESUFFIX)
+USE_AUTOTOOLS= autoconf:259
USE_GETOPT_LONG=yes
CONFIGURE_ARGS= --enable-versioning \
@@ -35,93 +34,93 @@ CONFIGURE_ARGS= --enable-versioning \
--enable-libxml \
--with-libxml-dir=${LOCALBASE} \
--enable-reflection \
- --enable-spl
+ --enable-spl \
+ --program-prefix=""
USE_GNOME= libxml2
-.if !defined(WITH_REGEX_TYPE) || ${WITH_REGEX_TYPE} == "php"
-CONFIGURE_ARGS+=--with-regex=php
-.else
-.if ${WITH_REGEX_TYPE} == "system"
-CONFIGURE_ARGS+=--with-regex=system
-.else
-.if ${WITH_REGEX_TYPE} == "apache"
-CONFIGURE_ARGS+=--with-regex=apache
-.endif
-.endif
-.endif
+OPTIONS= CLI "Build CLI version" on \
+ CGI "Build CGI version" on \
+ APACHE "Build Apache module" off \
+ DEBUG "Enable debug" off \
+ MULTIBYTE "Enable zend multibyte support" off \
+ IPV6 "Enable ipv6 support" on \
+ REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
+ DISCARD "Enable discard-path support (CGI only)" off \
+ FASTCGI "Enable fastcgi support (CGI only)" on \
+ PATHINFO "Enable path-info-check support (CGI only)" on
-.if !defined(PKGNAMEPREFIX) && !defined(PKGNAMESUFFIX)
-PHP_SAPI= full
-WITH_APACHE= yes
+CONFLICTS= php4-4*
+
+MAN1= php-config.1 phpize.1
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_CLI)
+PHP_SAPI+= cli
+PLIST_SUB+= CLI=""
+MAN1+= php.1
.else
-.if !defined(PKGNAMEPREFIX)
-PHP_SAPI= ${PKGNAMESUFFIX:S/-//}
+# XXX Temporary hack
+.if !defined(WITHOUT_CGI)
+PLIST_SUB+= CLI=""
.else
-PHP_SAPI= ${PKGNAMEPREFIX:S/_//}
-WITH_APACHE= yes
+PLIST_SUB+= CLI="@comment "
.endif
+CONFIGURE_ARGS+=--disable-cli
.endif
-.if defined(WITH_APACHE)
-PKGMESSAGE= ${PKGDIR}/pkg-message.mod
-USE_APACHE= 1.3+
-MODULENAME= lib${PORTNAME}
-SHORTMODNAME= ${PORTNAME}
+.if !defined(WITHOUT_CGI)
+PHP_SAPI+= cgi
+PLIST_SUB+= CGI=""
+.if defined(WITH_REDIRECT)
+CONFIGURE_ARGS+=--enable-force-cgi-redirect
.endif
-
-.if ${PHP_SAPI} == "cgi"
-OPTIONS= REDIRECT "Enable force-cgi-redirect support" off \
- DISCARD "Enable discard-path support" off \
- FASTCGI "Enable fastcgi support" off \
- PATHINFO "Enable path-info-check support" on
+.if defined(WITH_DISCARD)
+CONFIGURE_ARGS+=--enable-discard-path
.endif
-OPTIONS+= DEBUG "Enable debug" off \
- MULTIBYTE "Enable zend multibyte support" off \
- IPV6 "Enable ipv6 support" on
-
-CONFLICTS?= php5-cli-5* mod_php5-5* php5-cgi-5*
-CONFLICTS+= php4-4* php4-cli-4* mod_php4-4* php4-cgi-4*
-
-.if ${PHP_SAPI} == "cgi" || ${PHP_SAPI} == "mod"
-CONFIGURE_ARGS+=--disable-cli
+.if !defined(WITHOUT_FASTCGI)
+CONFIGURE_ARGS+=--enable-fastcgi
.endif
-
-MAN1= php-config.1 phpize.1
-.if ${PHP_SAPI} != "mod"
-PLIST_SUB+= CLICGI=""
-.if ${PHP_SAPI} != "cgi"
-MAN1+= php.1
+.if defined(WITHOUT_PATHINFO)
+CONFIGURE_ARGS+=--disable-path-info-check
.endif
.else
-PLIST_SUB+= CLICGI="@comment "
+PLIST_SUB+= CGI="@comment "
+CONFIGURE_ARGS+=--disable-cgi
.endif
.if defined(WITH_APACHE)
+PHP_SAPI+= mod
+USE_APACHE= 1.3+
+.include "${PORTSDIR}/Mk/bsd.apache.mk"
+.if ${APACHE_VERSION} > 13
+CONFIGURE_ARGS+=--with-apxs2=${APXS}
+.else
+CONFIGURE_ARGS+=--with-apxs=${APXS}
+.endif
+PKGMESSAGE= ${PKGDIR}/pkg-message.mod
+MODULENAME= lib${PORTNAME}
+SHORTMODNAME= ${PORTNAME}
PLIST_SUB+= APACHE=""
.else
PLIST_SUB+= APACHE="@comment "
.endif
-.if ${PHP_SAPI} == "cli"
-CONFIGURE_ARGS+=--disable-cgi
+.if !defined(WITH_REGEX_TYPE) || ${WITH_REGEX_TYPE} == "php"
+CONFIGURE_ARGS+=--with-regex=php
+.elif defined(WITH_REGEX_TYPE) && ${WITH_REGEX_TYPE} == "system"
+CONFIGURE_ARGS+=--with-regex=system
+.elif defined(WITH_REGEX_TYPE) && ${WITH_REGEX_TYPE} == "apache"
+CONFIGURE_ARGS+=--with-regex=apache
.endif
-.include <bsd.port.pre.mk>
-
CONFIGURE_ENV+= ac_cv_pthreads_lib=${PTHREAD_LIBS} \
- ac_cv_pthreads_cflags=${PTHREAD_CFLAGS}
+ ac_cv_pthreads_cflags=${PTHREAD_CFLAGS} \
+ pthreads_working="yes"
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
-.if defined(WITH_APACHE)
-.if ${APACHE_VERSION} > 13
-CONFIGURE_ARGS+=--with-apxs2=${APXS}
-.else
-CONFIGURE_ARGS+=--with-apxs=${APXS}
-.endif
-.endif
-
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif
@@ -134,44 +133,16 @@ CONFIGURE_ARGS+=--enable-zend-multibyte
CONFIGURE_ARGS+=--disable-ipv6
.endif
-.if ${PHP_SAPI} == "cgi"
-.if defined(WITH_REDIRECT)
-CONFIGURE_ARGS+=--enable-force-cgi-redirect
-.endif
-.if defined(WITH_DISCARD)
-CONFIGURE_ARGS+=--enable-discard-path
-.endif
-.if defined(WITH_FASTCGI)
-CONFIGURE_ARGS+=--enable-fastcgi
-.endif
-.if defined(WITHOUT_PATHINFO)
-CONFIGURE_ARGS+=--disable-path-info-check
-.endif
-.endif
-
-_PORTSDIR!= ${REALPATH} ${PORTSDIR}
-PHP_PORT= ${.CURDIR:S|^${_PORTSDIR}||:S|^/||}
-
post-patch:
@${TOUCH} ${WRKSRC}/ext/php_config.h
@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
-.if ${PHP_SAPI} == "full"
pre-configure:
- @${ECHO_CMD} ""
- @${ECHO_CMD} "You are building the Apache Module and the Command Line Interpreter of PHP."
- @${ECHO_CMD} ""
- @${ECHO_CMD} "Use port:"
- @${ECHO_CMD} " lang/php5-cli for Command Line Interpreter only"
- @${ECHO_CMD} " www/php5-cgi for Common Gateway Interface only"
- @${ECHO_CMD} " www/mod_php5 for Apache Module only"
- @${ECHO_CMD} ""
-.endif
+ @${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4
post-build:
@${ECHO_CMD} "PHP_VER=5" > ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
- @${ECHO_CMD} "PHP_PORT=\$${PORTSDIR}/${PHP_PORT}" >> ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
post-install:
@@ -179,6 +150,10 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/php.ini-recommended ${PREFIX}/etc
@${INSTALL_DATA} ${WRKDIR}/php.conf ${PREFIX}/etc
@${TOUCH} ${PREFIX}/include/php/ext/php_config.h
+# XXX Temporary hack
+.if !defined(WITHOUT_CGI) && defined(WITHOUT_CLI)
+ @${LN} -sf ${PREFIX}/bin/php-cgi ${PREFIX}/bin/php
+.endif
.if defined(WITH_APACHE)
@${CAT} ${PKGMESSAGE}
.endif
diff --git a/lang/php5/distinfo b/lang/php5/distinfo
index 190c276dee62..aef36567bc96 100644
--- a/lang/php5/distinfo
+++ b/lang/php5/distinfo
@@ -1,3 +1,3 @@
-MD5 (php-5.1.2.tar.bz2) = 79cee17e9db85be878000a2a4198378e
-SHA256 (php-5.1.2.tar.bz2) = a18399360e1c5dcbdfed4f7215ae8fd2a5e057c24b86392392e832216aa63202
-SIZE (php-5.1.2.tar.bz2) = 6319905
+MD5 (php-5.1.4.tar.bz2) = b55e633bdc80ab30da7c92f760fc4b58
+SHA256 (php-5.1.4.tar.bz2) = 43d323b1730e2bc77ec16ee374effb38ec5be0f22e906c55c2e30dfaf22bb865
+SIZE (php-5.1.4.tar.bz2) = 5992825
diff --git a/lang/php5/files/patch-TSRM_threads.m4 b/lang/php5/files/patch-TSRM_threads.m4
new file mode 100644
index 000000000000..6208eac7f79c
--- /dev/null
+++ b/lang/php5/files/patch-TSRM_threads.m4
@@ -0,0 +1,11 @@
+--- TSRM/threads.m4.orig Wed Apr 27 15:22:18 2005
++++ TSRM/threads.m4 Wed May 3 10:02:34 2006
+@@ -164,7 +164,7 @@
+ dnl
+ AC_DEFUN([PTHREADS_ASSIGN_VARS],[
+ if test -n "$ac_cv_pthreads_lib"; then
+- LIBS="$LIBS -l$ac_cv_pthreads_lib"
++ LIBS="$LIBS $ac_cv_pthreads_lib"
+ fi
+
+ if test -n "$ac_cv_pthreads_cflags"; then
diff --git a/lang/php5/files/patch-acinclude.m4 b/lang/php5/files/patch-acinclude.m4
index 14396604f6e6..9c4094b8fd82 100644
--- a/lang/php5/files/patch-acinclude.m4
+++ b/lang/php5/files/patch-acinclude.m4
@@ -1,10 +1,33 @@
---- acinclude.m4.orig Sat Dec 24 12:38:05 2005
-+++ acinclude.m4 Mon Jan 16 12:20:17 2006
-@@ -1021,12 +1021,6 @@
+--- acinclude.m4.orig Mon Apr 10 14:17:36 2006
++++ acinclude.m4 Thu May 4 08:10:56 2006
+@@ -194,7 +194,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+
+ dnl
+@@ -966,12 +966,8 @@
+ if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
+ dnl ---------------------------------------------- CLI static module
+ [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
+- if test "$PHP_SAPI" = "cgi"; then
+- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
+- EXT_STATIC="$EXT_STATIC $1"
+- else
+ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
+- fi
++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi)
+ EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+ fi
+ PHP_ADD_BUILD_DIR($ext_builddir)
+@@ -1021,12 +1017,6 @@
build to be successful.
])
fi
-- if test "x$is_it_shared" = "x" && test "x$3" != "xtrue"; then
+- if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
- AC_MSG_ERROR([
-You've configured extension $1, which depends on extension $2,
-but you've either not enabled $2, or have disabled it.
@@ -13,7 +36,7 @@
dnl Some systems require that we link $2 to $1 when building
])
-@@ -2151,9 +2145,9 @@
+@@ -2158,9 +2148,9 @@
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
dnl Fallbacks for different configure options
diff --git a/lang/php5/files/patch-configure b/lang/php5/files/patch-configure
deleted file mode 100644
index 1ac8ec049e63..000000000000
--- a/lang/php5/files/patch-configure
+++ /dev/null
@@ -1,47 +0,0 @@
---- configure.orig Wed Nov 23 22:37:49 2005
-+++ configure Fri Nov 25 10:39:54 2005
-@@ -3654,7 +3654,7 @@
- save_LIBS=$LIBS
-
- if test -n "$ac_cv_pthreads_lib"; then
-- LIBS="$LIBS -l$ac_cv_pthreads_lib"
-+ LIBS="$LIBS $ac_cv_pthreads_lib"
- fi
-
- if test -n "$ac_cv_pthreads_cflags"; then
-@@ -12074,7 +12074,7 @@
- if test "$enable_maintainer_zts" = "yes"; then
-
- if test -n "$ac_cv_pthreads_lib"; then
-- LIBS="$LIBS -l$ac_cv_pthreads_lib"
-+ LIBS="$LIBS $ac_cv_pthreads_lib"
- fi
-
- if test -n "$ac_cv_pthreads_cflags"; then
-@@ -12091,8 +12091,6 @@
- case $host_alias in
- *solaris*)
- PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
-- *freebsd*)
-- PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
- *linux*)
- PTHREAD_FLAGS=-D_REENTRANT;;
- *aix*)
-@@ -100076,7 +100074,7 @@
- save_LIBS=$LIBS
-
- if test -n "$ac_cv_pthreads_lib"; then
-- LIBS="$LIBS -l$ac_cv_pthreads_lib"
-+ LIBS="$LIBS $ac_cv_pthreads_lib"
- fi
-
- if test -n "$ac_cv_pthreads_cflags"; then
-@@ -108808,7 +108806,7 @@
-
-
-
-- for header_file in Zend/ TSRM/ include/ main/ main/streams/ regex/; do
-+ for header_file in Zend/ TSRM/ main/ main/streams/ regex/ ext/spl/; do
-
-
- unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
diff --git a/lang/php5/files/patch-configure.in b/lang/php5/files/patch-configure.in
new file mode 100644
index 000000000000..dc9a457f077c
--- /dev/null
+++ b/lang/php5/files/patch-configure.in
@@ -0,0 +1,50 @@
+--- configure.in.orig Wed Apr 26 16:08:26 2006
++++ configure.in Thu May 4 08:55:35 2006
+@@ -222,7 +222,6 @@
+ dnl .
+ dnl -------------------------------------------------------------------------
+
+-PTHREADS_CHECK
+ PHP_HELP_SEPARATOR([SAPI modules:])
+ PHP_SHLIB_SUFFIX_NAMES
+ PHP_SAPI=default
+@@ -247,7 +246,6 @@
+
+ if test "$enable_maintainer_zts" = "yes"; then
+ PTHREADS_ASSIGN_VARS
+- PTHREADS_FLAGS
+ fi
+
+ if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+@@ -1248,25 +1246,22 @@
+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+-all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)"
+-install_targets="$install_modules install-build install-headers install-programs $install_pear"
++all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET) \$(PHP_CGI_TARGET)"
++install_targets="$PHP_INSTALL_CLI_TARGET $PHP_INSTALL_CGI_TARGET $install_modules install-build install-headers install-programs $install_pear"
+
+ case $PHP_SAPI in
+- cgi)
++ apache)
+ install_targets="install-sapi $install_targets"
+ ;;
+- cli)
+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+- *)
+- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
++ apache2handler)
++ install_targets="install-sapi $install_targets"
+ ;;
+ esac
+
+ PHP_SUBST(all_targets)
+ PHP_SUBST(install_targets)
+
+-PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/ regex/])
++PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/ regex/ ext/spl/])
+
+ PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
+
diff --git a/lang/php5/files/patch-main::php_config.h.in b/lang/php5/files/patch-main::php_config.h.in
index 9c92108b381e..8e9938876421 100644
--- a/lang/php5/files/patch-main::php_config.h.in
+++ b/lang/php5/files/patch-main::php_config.h.in
@@ -1,6 +1,6 @@
---- main/php_config.h.in.orig Mon Sep 5 13:16:27 2005
-+++ main/php_config.h.in Wed Nov 16 09:30:03 2005
-@@ -2454,6 +2454,9 @@
+--- main/php_config.h.in.orig Wed Jan 11 15:25:52 2006
++++ main/php_config.h.in Wed May 3 09:38:09 2006
+@@ -2760,6 +2760,9 @@
/* Define if uint32_t type is present. */
#undef HAVE_UINT32_T
diff --git a/lang/php5/files/patch-main_SAPI.c b/lang/php5/files/patch-main_SAPI.c
index 12744ba48346..1a965ddb778b 100644
--- a/lang/php5/files/patch-main_SAPI.c
+++ b/lang/php5/files/patch-main_SAPI.c
@@ -1,6 +1,6 @@
---- main/SAPI.c.orig Fri Apr 15 10:31:02 2005
-+++ main/SAPI.c Fri Apr 15 10:34:11 2005
-@@ -569,7 +569,7 @@
+--- main/SAPI.c.orig Sun Jan 1 13:50:17 2006
++++ main/SAPI.c Wed May 3 09:38:09 2006
+@@ -602,7 +602,7 @@
ptr++;
len--;
}
@@ -9,7 +9,7 @@
if(!strncmp(ptr, "image/", sizeof("image/")-1)) {
zend_alter_ini_entry("zlib.output_compression", sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
-@@ -716,7 +716,7 @@
+@@ -756,7 +756,7 @@
return SUCCESS;
}
diff --git a/lang/php5/files/patch-sapi_cgi_Makefile.frag b/lang/php5/files/patch-sapi_cgi_Makefile.frag
new file mode 100644
index 000000000000..26a0e4b1a3ba
--- /dev/null
+++ b/lang/php5/files/patch-sapi_cgi_Makefile.frag
@@ -0,0 +1,9 @@
+--- sapi/cgi/Makefile.frag.orig Wed May 3 10:09:02 2006
++++ sapi/cgi/Makefile.frag Wed May 3 10:08:54 2006
+@@ -1,2 +1,5 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+ $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++ @$(INSTALL_CGI)
diff --git a/lang/php5/files/patch-sapi_cgi_config9.m4 b/lang/php5/files/patch-sapi_cgi_config9.m4
new file mode 100644
index 000000000000..8677e0e9aa12
--- /dev/null
+++ b/lang/php5/files/patch-sapi_cgi_config9.m4
@@ -0,0 +1,55 @@
+--- sapi/cgi/config9.m4.orig Thu Feb 2 10:59:23 2006
++++ sapi/cgi/config9.m4 Thu May 4 11:19:41 2006
+@@ -80,7 +80,6 @@
+ ])
+
+
+-if test "$PHP_SAPI" = "default"; then
+ AC_MSG_CHECKING(for CGI build)
+ if test "$PHP_SAPI_CGI" != "no"; then
+ AC_MSG_RESULT(yes)
+@@ -145,8 +144,9 @@
+ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+ AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+
+- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, , '$(SAPI_CGI_PATH)')
++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c,, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
+
+ case $host_alias in
+ *aix*)
+@@ -156,17 +156,29 @@
+ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+ *)
+- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+ esac
+
++ PHP_CGI_TARGET="\$(SAPI_CGI_PATH)"
++ PHP_INSTALL_CGI_TARGET="install-cgi"
+ PHP_SUBST(BUILD_CGI)
++ PHP_SUBST(INSTALL_CGI)
++ PHP_SUBST(PHP_CGI_OBJS)
++ PHP_SUBST(PHP_CGI_TARGET)
++ PHP_SUBST(PHP_INSTALL_CGI_TARGET)
+
+- elif test "$PHP_SAPI_CLI" != "no"; then
+- AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ PHP_BUILD_PROGRAM($SAPI_CGI_PATH)
++ fi
++ else
++ AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ if test "$PHP_SAPI_CLI" != "no" ; then
+ OVERALL_TARGET=
+ PHP_SAPI=cli
+ else
+ AC_MSG_ERROR([No SAPIs selected.])
+ fi
++ fi
+ fi
diff --git a/lang/php5/files/patch-scripts::phpize.in b/lang/php5/files/patch-scripts::phpize.in
index e70286dba4a9..4f655b5ae454 100644
--- a/lang/php5/files/patch-scripts::phpize.in
+++ b/lang/php5/files/patch-scripts::phpize.in
@@ -1,6 +1,6 @@
---- scripts/phpize.in.orig Wed Jun 15 19:19:41 2005
-+++ scripts/phpize.in Wed Sep 7 17:52:24 2005
-@@ -94,8 +94,8 @@
+--- scripts/phpize.in.orig Mon Dec 12 12:51:45 2005
++++ scripts/phpize.in Wed May 3 09:38:09 2006
+@@ -99,8 +99,8 @@
phpize_check_autotools()
{
@@ -9,5 +9,5 @@
+ test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf259
+ test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader259
- if ! test -x "`$php_shtool path $PHP_AUTOCONF`"; then
+ if test ! -x "`$php_shtool path $PHP_AUTOCONF`"; then
cat <<EOF
diff --git a/lang/php5/pkg-plist b/lang/php5/pkg-plist
index 4e08b934c5c3..b7d6a7f1d9c7 100644
--- a/lang/php5/pkg-plist
+++ b/lang/php5/pkg-plist
@@ -1,4 +1,5 @@
-%%CLICGI%%bin/php
+%%CLI%%bin/php
+%%CGI%%bin/php-cgi
bin/php-config
bin/phpize
etc/php.conf