diff options
Diffstat (limited to 'dev-lang/php/files/5.1-any/php5-fastbuild.patch')
-rw-r--r-- | dev-lang/php/files/5.1-any/php5-fastbuild.patch | 234 |
1 files changed, 234 insertions, 0 deletions
diff --git a/dev-lang/php/files/5.1-any/php5-fastbuild.patch b/dev-lang/php/files/5.1-any/php5-fastbuild.patch new file mode 100644 index 0000000..5c3ea85 --- /dev/null +++ b/dev-lang/php/files/5.1-any/php5-fastbuild.patch @@ -0,0 +1,234 @@ +diff -u --recursive php-5.1.0RC1/acinclude.m4 php-5.1.0RC1-cgi/acinclude.m4 +--- php-5.1.0RC1/acinclude.m4 2005-09-14 22:40:54.000000000 +0200 ++++ php-5.1.0RC1/acinclude.m4 2005-09-14 22:41:14.000000000 +0200 +@@ -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 +@@ -962,12 +962,8 @@ + + if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then + dnl ---------------------------------------------- CLI static module +- 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,cli) ++ 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) +diff -u --recursive php-5.1.0RC1/sapi/cgi/Makefile.frag php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag +--- php-5.1.0RC1/sapi/cgi/Makefile.frag 2003-07-02 02:08:26.000000000 +0100 ++++ php-5.1.0RC1-cgi/sapi/cgi/Makefile.frag 2005-08-31 08:38:32.000000000 +0100 +@@ -1,2 +1,6 @@ +-$(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) ++ @echo "Installing CGI binary $(INSTALL_ROOT)$(bindir)/" ++ @$(INSTALL_CGI) +diff -u --recursive php-5.1.0RC1/sapi/cgi/config9.m4 php-5.1.0RC1-cgi/sapi/cgi/config9.m4 +--- php-5.1.0RC1/sapi/cgi/config9.m4 2005-07-07 06:54:43.000000000 +0100 ++++ php-5.1.0RC1-cgi/sapi/cgi/config9.m4 2005-08-31 08:54:01.000000000 +0100 +@@ -80,96 +80,109 @@ + ]) + + +-if test "$PHP_SAPI" = "default"; then +- AC_MSG_CHECKING(for CGI build) +- if test "$PHP_SAPI_CGI" != "no"; then +- AC_MSG_RESULT(yes) +- +- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) +- case $host_alias in +- *cygwin* ) +- SAPI_CGI_PATH=sapi/cgi/php.exe +- ;; +- * ) +- SAPI_CGI_PATH=sapi/cgi/php +- ;; +- esac +- PHP_SUBST(SAPI_CGI_PATH) +- +- PHP_TEST_WRITE_STDOUT +- +- AC_MSG_CHECKING(whether to force Apache CGI redirect) +- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then +- REDIRECT=1 +- else +- REDIRECT=0 +- fi +- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) +- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) ++AC_MSG_CHECKING(for CGI build) ++if test "$PHP_SAPI_CGI" != "no"; then ++ AC_MSG_RESULT(yes) ++ ++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) ++ case $host_alias in ++ *cygwin* ) ++ SAPI_CGI_PATH=sapi/cgi/php.exe ++ ;; ++ * ) ++ SAPI_CGI_PATH=sapi/cgi/php ++ ;; ++ esac ++ PHP_SUBST(SAPI_CGI_PATH) + ++ PHP_TEST_WRITE_STDOUT + +- AC_MSG_CHECKING(whether to discard path_info + path_translated) +- if test "$PHP_DISCARD_PATH" = "yes"; then +- DISCARD_PATH=1 +- else +- DISCARD_PATH=0 +- fi +- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) +- AC_MSG_RESULT($PHP_DISCARD_PATH) ++ AC_MSG_CHECKING(whether to force Apache CGI redirect) ++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then ++ REDIRECT=1 ++ else ++ REDIRECT=0 ++ fi ++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) ++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) + +- AC_MSG_CHECKING(whether to enable path info checking) +- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then +- ENABLE_PATHINFO_CHECK=1 +- else +- ENABLE_PATHINFO_CHECK=0 +- fi +- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) +- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) + +- AC_MSG_CHECKING(whether to enable fastcgi support) +- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" +- if test -z $PHP_LIBFCGI_DIR; then +- echo "$PHP_LIBFCGI_DIR does not exist" +- exit 1 +- fi +- if test "$PHP_ENABLE_FASTCGI" = "yes"; then +- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) +- PHP_FASTCGI=1 +- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" +- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" +- PHP_FCGI_STATIC=1 +- else +- PHP_FASTCGI=0 +- PHP_FCGI_FILES="" +- PHP_FCGI_INCLUDE="" +- PHP_FCGI_STATIC=0 +- fi +- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) +- 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, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)') +- +- case $host_alias in +- *aix*) +- BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" +- ;; +- *darwin*) +- 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)" ++ AC_MSG_CHECKING(whether to discard path_info + path_translated) ++ if test "$PHP_DISCARD_PATH" = "yes"; then ++ DISCARD_PATH=1 ++ else ++ DISCARD_PATH=0 ++ fi ++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) ++ AC_MSG_RESULT($PHP_DISCARD_PATH) ++ ++ AC_MSG_CHECKING(whether to enable path info checking) ++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then ++ ENABLE_PATHINFO_CHECK=1 ++ else ++ ENABLE_PATHINFO_CHECK=0 ++ fi ++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK) ++ ++ AC_MSG_CHECKING(whether to enable fastcgi support) ++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi" ++ if test -z $PHP_LIBFCGI_DIR; then ++ echo "$PHP_LIBFCGI_DIR does not exist" ++ exit 1 ++ fi ++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then ++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi) ++ PHP_FASTCGI=1 ++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c" ++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include" ++ PHP_FCGI_STATIC=1 ++ else ++ PHP_FASTCGI=0 ++ PHP_FCGI_FILES="" ++ PHP_FCGI_INCLUDE="" ++ PHP_FCGI_STATIC=0 ++ fi ++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ]) ++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) ++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI) ++ ++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)\$(EXEEXT)" ++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi) ++ PHP_ADD_SOURCES(/main, internal_functions_cli.c,,cgi) ++ ++ case $host_alias in ++ *aix*) ++ BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/.libs\/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ ;; ++ *darwin*) ++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_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 ++ esac + +- PHP_SUBST(BUILD_CGI) ++ PHP_CGI_TARGET="\$(SAPI_CGI_PATH)" ++ PHP_INSTALL_CGI_TARGET="install-cgi" + +- elif test "$PHP_SAPI_CLI" != "no"; then +- AC_MSG_RESULT(no) +- OVERALL_TARGET= +- PHP_SAPI=cli +- else +- AC_MSG_ERROR([No SAPIs selected.]) ++ PHP_SUBST(BUILD_CGI) ++ PHP_SUBST(INSTALL_CGI) ++ PHP_SUBST(PHP_CGI_OBJS) ++ PHP_SUBST(PHP_CGI_TARGET) ++ PHP_SUBST(PHP_INSTALL_CGI_TARGET) ++ ++ if test "$PHP_SAPI" = "default" ; then ++ PHP_BUILD_PROGRAM($SAP_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 |