diff options
author | ale <ale@FreeBSD.org> | 2006-05-06 21:26:49 +0800 |
---|---|---|
committer | ale <ale@FreeBSD.org> | 2006-05-06 21:26:49 +0800 |
commit | fa0ee9787d6279766d468c4a27040d8c3ec0af7e (patch) | |
tree | d567d1a145942f125ce6aa31265d4c973fe16556 /lang | |
parent | d31a80e0f433ddb1e337f4e257ef88876b829db0 (diff) | |
download | freebsd-ports-gnome-fa0ee9787d6279766d468c4a27040d8c3ec0af7e.tar.gz freebsd-ports-gnome-fa0ee9787d6279766d468c4a27040d8c3ec0af7e.tar.zst freebsd-ports-gnome-fa0ee9787d6279766d468c4a27040d8c3ec0af7e.zip |
Simplify PHP base ports infrastructure:
- remove all slave ports
- add the ability to build all SAPIs concurrently
- update php5 to 5.1.4
*Read* the UPDATING file *before* trying to update PHP
(or at least before mailing me).
Diffstat (limited to 'lang')
38 files changed, 697 insertions, 504 deletions
diff --git a/lang/Makefile b/lang/Makefile index 00fb3ce50c19..482f366a22de 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -191,11 +191,9 @@ SUBDIR += pfe-devel SUBDIR += php-mode.el SUBDIR += php4 - SUBDIR += php4-cli SUBDIR += php4-extensions SUBDIR += php4-overload SUBDIR += php5 - SUBDIR += php5-cli SUBDIR += php5-extensions SUBDIR += php_doc SUBDIR += pike70 diff --git a/lang/php4-cli/Makefile b/lang/php4-cli/Makefile deleted file mode 100644 index b10eb5abacca..000000000000 --- a/lang/php4-cli/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# New ports collection makefile for: php4-cli -# Date created: Tue Feb 18 11:17:13 CET 2003 -# Whom: Alex Dupre <sysadmin@alexdupre.com> -# -# $FreeBSD$ -# - -CATEGORIES= lang -PKGNAMESUFFIX= -cli - -MAINTAINER= ale@FreeBSD.org -COMMENT= PHP Command Line Interpreter - -MASTERDIR= ${.CURDIR}/../php4 - -CONFLICTS= php4-4* php4-cgi-4* mod_php4-4* - -.include "${MASTERDIR}/Makefile" diff --git a/lang/php4/Makefile b/lang/php4/Makefile index f0f8d5adad77..23d81b91bfa1 100644 --- a/lang/php4/Makefile +++ b/lang/php4/Makefile @@ -7,7 +7,7 @@ PORTNAME= php4 PORTVERSION= 4.4.2 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES?= lang devel www MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \ http://downloads.php.net/ilia/:rc \ @@ -22,92 +22,99 @@ 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 \ --enable-memory-limit \ --with-layout=GNU \ --with-config-file-scan-dir=${PREFIX}/etc/php \ - --disable-all + --disable-all \ + --program-prefix="" -.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 \ + OPENSSL "Build static OpenSSL extension" off + +CONFLICTS= php5-5* + +MAN1= php-config.1 phpize.1 + +.include <bsd.port.pre.mk> -.if !defined(PKGNAMEPREFIX) && !defined(PKGNAMESUFFIX) -PHP_SAPI= full -WITH_APACHE= yes +.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 \ - OPENSSL "Build static OpenSSL extension" off - -CONFLICTS?= php4-cli-4* mod_php4-4* php4-cgi-4* -CONFLICTS+= php5-5* php5-cli-5* mod_php5-5* php5-cgi-5* - -.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}" + MAKE_ENV+= LDFLAGS="${LDFLAGS}" .if defined(WITH_OPENSSL) .include "${PORTSDIR}/Mk/bsd.openssl.mk" @@ -116,14 +123,6 @@ CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \ LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl .endif -.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 @@ -136,44 +135,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/php4-cli for Command Line Interpreter only" - @${ECHO_CMD} " www/php4-cgi for Common Gateway Interface only" - @${ECHO_CMD} " www/mod_php4 for Apache Module only" - @${ECHO_CMD} "" -.endif + @${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4 post-build: @${ECHO_CMD} "PHP_VER=4" > ${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 .if defined(WITH_OPENSSL) @${ECHO_CMD} "PHP_EXT_INC=openssl" >> ${WRKDIR}/php.conf @@ -184,6 +155,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/php4/files/patch-TSRM_threads.m4 b/lang/php4/files/patch-TSRM_threads.m4 new file mode 100644 index 000000000000..3f75b837b071 --- /dev/null +++ b/lang/php4/files/patch-TSRM_threads.m4 @@ -0,0 +1,11 @@ +--- TSRM/threads.m4.orig Fri May 5 08:02:38 2006 ++++ TSRM/threads.m4 Fri May 5 08:02:59 2006 +@@ -164,7 +164,7 @@ dnl + 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/php4/files/patch-acinclude.m4 b/lang/php4/files/patch-acinclude.m4 index 853082ef6319..94e15f9f3d58 100644 --- a/lang/php4/files/patch-acinclude.m4 +++ b/lang/php4/files/patch-acinclude.m4 @@ -1,6 +1,29 @@ ---- acinclude.m4.orig Fri Sep 23 11:20:22 2005 -+++ acinclude.m4 Tue Nov 15 23:25:54 2005 -@@ -1709,9 +1709,9 @@ +--- acinclude.m4.orig Mon Dec 19 23:29:11 2005 ++++ acinclude.m4 Fri May 5 08:05:43 2006 +@@ -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) +@@ -1305,12 +1305,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,cgi) + EXT_CLI_STATIC="$EXT_CLI_STATIC $1" + fi + PHP_ADD_BUILD_DIR($ext_builddir) +@@ -1713,9 +1709,9 @@ test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no dnl Fallbacks for different configure options diff --git a/lang/php4/files/patch-configure b/lang/php4/files/patch-configure deleted file mode 100644 index 0b4f226749ae..000000000000 --- a/lang/php4/files/patch-configure +++ /dev/null @@ -1,38 +0,0 @@ ---- configure.orig Sun Oct 30 12:06:37 2005 -+++ configure Tue Nov 15 23:25:55 2005 -@@ -2900,7 +2900,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 -@@ -9725,7 +9725,7 @@ - if test "$enable_experimental_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 -@@ -9742,8 +9742,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*) -@@ -98846,7 +98844,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 diff --git a/lang/php4/files/patch-configure.in b/lang/php4/files/patch-configure.in new file mode 100644 index 000000000000..b3e0c11e4777 --- /dev/null +++ b/lang/php4/files/patch-configure.in @@ -0,0 +1,42 @@ +--- configure.in.orig Fri May 5 08:06:58 2006 ++++ configure.in Fri May 5 08:09:15 2006 +@@ -261,7 +261,6 @@ dnl ## Apache module, CGI etc.) + dnl . + dnl ------------------------------------------------------------------------- + +-PTHREADS_CHECK + PHP_HELP_SEPARATOR([SAPI modules:]) + PHP_SHLIB_SUFFIX_NAME + PHP_SAPI=default +@@ -287,7 +286,6 @@ AC_MSG_RESULT([$PHP_SAPI]) + + if test "$enable_experimental_zts" = "yes"; then + PTHREADS_ASSIGN_VARS +- PTHREADS_FLAGS + fi + + if test "$PHP_ENABLE_FASTCGI" = "yes"; then +@@ -1235,18 +1233,15 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libto + INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" + CXXFLAGS="$CXXFLAGS $standard_libtool_flag" + +-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)' +-install_targets="$install_modules $install_pear install-build install-headers install-programs" ++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)' ++install_targets="$PHP_INSTALL_CLI_TARGET $PHP_INSTALL_CGI_TARGET $install_modules $install_pear install-build install-headers install-programs" + + 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 + diff --git a/lang/php4/files/patch-main::php_config.h.in b/lang/php4/files/patch-main::php_config.h.in index ca828a919078..0b470b3f484a 100644 --- a/lang/php4/files/patch-main::php_config.h.in +++ b/lang/php4/files/patch-main::php_config.h.in @@ -1,6 +1,6 @@ ---- main/php_config.h.in.orig Sun Oct 30 12:06:40 2005 -+++ main/php_config.h.in Wed Nov 16 09:18:14 2005 -@@ -2606,6 +2606,9 @@ +--- main/php_config.h.in.orig Thu Jan 12 19:24:28 2006 ++++ main/php_config.h.in Fri May 5 08:02:13 2006 +@@ -2624,6 +2624,9 @@ /* Whether to build zip as dynamic module */ #undef COMPILE_DL_ZIP diff --git a/lang/php4/files/patch-main_SAPI.c b/lang/php4/files/patch-main_SAPI.c index 2e7f7431d9cd..7064b4797140 100644 --- a/lang/php4/files/patch-main_SAPI.c +++ b/lang/php4/files/patch-main_SAPI.c @@ -1,6 +1,6 @@ ---- main/SAPI.c.orig Fri Apr 15 10:50:01 2005 -+++ main/SAPI.c Fri Apr 15 10:50:14 2005 -@@ -565,7 +565,7 @@ +--- main/SAPI.c.orig Sun Jan 1 14:46:59 2006 ++++ main/SAPI.c Fri May 5 08:02:13 2006 +@@ -582,7 +582,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); } -@@ -712,7 +712,7 @@ +@@ -729,7 +729,7 @@ return SUCCESS; } diff --git a/lang/php4/files/patch-sapi_cgi_Makefile.frag b/lang/php4/files/patch-sapi_cgi_Makefile.frag new file mode 100644 index 000000000000..c10be19f4703 --- /dev/null +++ b/lang/php4/files/patch-sapi_cgi_Makefile.frag @@ -0,0 +1,9 @@ +--- sapi/cgi/Makefile.frag.orig Fri May 5 08:09:42 2006 ++++ sapi/cgi/Makefile.frag Fri May 5 08:10:05 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/php4/files/patch-sapi_cgi_config9.m4 b/lang/php4/files/patch-sapi_cgi_config9.m4 new file mode 100644 index 000000000000..2d10bb0ac156 --- /dev/null +++ b/lang/php4/files/patch-sapi_cgi_config9.m4 @@ -0,0 +1,54 @@ +--- sapi/cgi/config9.m4.orig Fri May 5 08:10:10 2006 ++++ sapi/cgi/config9.m4 Fri May 5 08:15:23 2006 +@@ -81,7 +81,6 @@ main() + ]) + + +-if test "$PHP_SAPI" = "default"; then + AC_MSG_CHECKING(for CGI build) + if test "$PHP_SAPI_CGI" != "no"; then + AC_MSG_RESULT(yes) +@@ -149,25 +148,38 @@ if test "$PHP_SAPI" = "default"; then + 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)') ++ 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)" ++ 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_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/php4/files/patch-scripts::phpize.in b/lang/php4/files/patch-scripts::phpize.in index 83f38a656499..9db65b6f616a 100644 --- a/lang/php4/files/patch-scripts::phpize.in +++ b/lang/php4/files/patch-scripts::phpize.in @@ -1,5 +1,5 @@ ---- scripts/phpize.in.orig Wed Jun 15 19:13:52 2005 -+++ scripts/phpize.in Wed Jul 13 09:30:59 2005 +--- scripts/phpize.in.orig Sun Sep 4 06:41:00 2005 ++++ scripts/phpize.in Fri May 5 08:02:13 2006 @@ -94,8 +94,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/php4/pkg-plist b/lang/php4/pkg-plist index 209024ef1f08..26f9c70d1036 100644 --- a/lang/php4/pkg-plist +++ b/lang/php4/pkg-plist @@ -1,4 +1,5 @@ -%%CLICGI%%bin/php +%%CLI%%bin/php +%%CGI%%bin/php-cgi bin/php-config bin/phpize etc/php.conf diff --git a/lang/php5-cli/Makefile b/lang/php5-cli/Makefile deleted file mode 100644 index b53e46d354d6..000000000000 --- a/lang/php5-cli/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# New ports collection makefile for: php5-cli -# Date created: Tue Feb 18 11:17:13 CET 2003 -# Whom: Alex Dupre <sysadmin@alexdupre.com> -# -# $FreeBSD$ -# - -CATEGORIES= lang -PKGNAMESUFFIX= -cli - -MAINTAINER= ale@FreeBSD.org -COMMENT= PHP Command Line Interpreter - -MASTERDIR= ${.CURDIR}/../php5 - -CONFLICTS= php5-5* php5-cgi-5* mod_php5-5* - -.include "${MASTERDIR}/Makefile" 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 diff --git a/lang/php53/Makefile b/lang/php53/Makefile index fd677ae1c48e..47a564c6e1c8 100644 --- a/lang/php53/Makefile +++ b/lang/php53/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/php53/distinfo b/lang/php53/distinfo index 190c276dee62..aef36567bc96 100644 --- a/lang/php53/distinfo +++ b/lang/php53/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/php53/files/patch-TSRM_threads.m4 b/lang/php53/files/patch-TSRM_threads.m4 new file mode 100644 index 000000000000..6208eac7f79c --- /dev/null +++ b/lang/php53/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/php53/files/patch-acinclude.m4 b/lang/php53/files/patch-acinclude.m4 index 14396604f6e6..9c4094b8fd82 100644 --- a/lang/php53/files/patch-acinclude.m4 +++ b/lang/php53/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/php53/files/patch-configure b/lang/php53/files/patch-configure deleted file mode 100644 index 1ac8ec049e63..000000000000 --- a/lang/php53/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/php53/files/patch-configure.in b/lang/php53/files/patch-configure.in new file mode 100644 index 000000000000..dc9a457f077c --- /dev/null +++ b/lang/php53/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/php53/files/patch-main::php_config.h.in b/lang/php53/files/patch-main::php_config.h.in index 9c92108b381e..8e9938876421 100644 --- a/lang/php53/files/patch-main::php_config.h.in +++ b/lang/php53/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/php53/files/patch-main_SAPI.c b/lang/php53/files/patch-main_SAPI.c index 12744ba48346..1a965ddb778b 100644 --- a/lang/php53/files/patch-main_SAPI.c +++ b/lang/php53/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/php53/files/patch-sapi_cgi_Makefile.frag b/lang/php53/files/patch-sapi_cgi_Makefile.frag new file mode 100644 index 000000000000..26a0e4b1a3ba --- /dev/null +++ b/lang/php53/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/php53/files/patch-sapi_cgi_config9.m4 b/lang/php53/files/patch-sapi_cgi_config9.m4 new file mode 100644 index 000000000000..8677e0e9aa12 --- /dev/null +++ b/lang/php53/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/php53/files/patch-scripts::phpize.in b/lang/php53/files/patch-scripts::phpize.in index e70286dba4a9..4f655b5ae454 100644 --- a/lang/php53/files/patch-scripts::phpize.in +++ b/lang/php53/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/php53/pkg-plist b/lang/php53/pkg-plist index 4e08b934c5c3..b7d6a7f1d9c7 100644 --- a/lang/php53/pkg-plist +++ b/lang/php53/pkg-plist @@ -1,4 +1,5 @@ -%%CLICGI%%bin/php +%%CLI%%bin/php +%%CGI%%bin/php-cgi bin/php-config bin/phpize etc/php.conf |