summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/4.4.0/fastbuild.patch')
-rw-r--r--dev-lang/php/files/4.4.0/fastbuild.patch250
1 files changed, 250 insertions, 0 deletions
diff --git a/dev-lang/php/files/4.4.0/fastbuild.patch b/dev-lang/php/files/4.4.0/fastbuild.patch
new file mode 100644
index 000000000000..0af555e9bcb6
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/fastbuild.patch
@@ -0,0 +1,250 @@
+diff -u --recursive php-4.4.0/aclocal.m4 php-4.4.0-cgi/aclocal.m4
+--- php-4.4.0/aclocal.m4 2005-07-11 11:07:27.000000000 +0100
++++ php-4.4.0-cgi/aclocal.m4 2005-09-01 08:03:20.000000000 +0100
+@@ -84,7 +84,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
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
+diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in
+--- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100
++++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100
+@@ -1216,20 +1216,20 @@
+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)'
+ install_targets="$install_modules $install_pear install-build install-headers install-programs"
+
+-case $PHP_SAPI in
+- cgi)
+- 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"
+- ;;
+-esac
++if test "$PHP_SAPI_CGI" != "no" ; then
++ install_targets="install-sapi $install_targets"
++fi
++
++if test "$PHP_SAPI_CLI" != "no" ; then
++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
++fi
++
++if test "$PHP_SAPI" != "default" ; then
++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
++fi
+
+ PHP_SUBST(all_targets)
+ PHP_SUBST(install_targets)
+diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag
+--- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100
++++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.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 PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @$(INSTALL_CGI)
+diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4
+--- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000
++++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100
+@@ -81,93 +81,107 @@
+ ])
+
+
+-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)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+- case $host_alias in
+- *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)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
++
++ case $host_alias in
++ *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($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