diff options
Diffstat (limited to 'lang/php55/files')
-rw-r--r-- | lang/php55/files/patch-TSRM_threads.m4 | 11 | ||||
-rw-r--r-- | lang/php55/files/patch-Zend::zend.h | 11 | ||||
-rw-r--r-- | lang/php55/files/patch-Zend_zend_list.c | 38 | ||||
-rw-r--r-- | lang/php55/files/patch-Zend_zend_list.h | 24 | ||||
-rw-r--r-- | lang/php55/files/patch-acinclude.m4 | 45 | ||||
-rw-r--r-- | lang/php55/files/patch-configure.in | 45 | ||||
-rw-r--r-- | lang/php55/files/patch-ext_standard_basic_functions.c | 20 | ||||
-rw-r--r-- | lang/php55/files/patch-ext_standard_image.c | 50 | ||||
-rw-r--r-- | lang/php55/files/patch-ext_zlib_config0.m4 | 11 | ||||
-rw-r--r-- | lang/php55/files/patch-main::php_config.h.in | 12 | ||||
-rw-r--r-- | lang/php55/files/patch-sapi_fpm_Makefile.frag | 12 | ||||
-rw-r--r-- | lang/php55/files/patch-sapi_fpm_config.m4 | 20 | ||||
-rw-r--r-- | lang/php55/files/patch-sapi_fpm_php-fpm.conf.in | 11 | ||||
-rw-r--r-- | lang/php55/files/php-fpm.in | 43 |
14 files changed, 353 insertions, 0 deletions
diff --git a/lang/php55/files/patch-TSRM_threads.m4 b/lang/php55/files/patch-TSRM_threads.m4 new file mode 100644 index 000000000000..227f6d26c9d5 --- /dev/null +++ b/lang/php55/files/patch-TSRM_threads.m4 @@ -0,0 +1,11 @@ +--- TSRM/threads.m4.orig 2005-04-27 15:22:18.000000000 +0200 ++++ TSRM/threads.m4 2009-09-22 10:01:37.000000000 +0200 +@@ -79,7 +79,7 @@ + pthread_mutexattr_t mattr; + int data = 1; + pthread_mutexattr_init(&mattr); +- return pthread_create(&thd, NULL, thread_routine, &data); ++ return 0; + } ], [ + pthreads_working=yes + ], [ diff --git a/lang/php55/files/patch-Zend::zend.h b/lang/php55/files/patch-Zend::zend.h new file mode 100644 index 000000000000..0fb2398f171d --- /dev/null +++ b/lang/php55/files/patch-Zend::zend.h @@ -0,0 +1,11 @@ +--- Zend/zend.h.orig 2008-08-15 21:47:23.000000000 +0200 ++++ Zend/zend.h 2008-09-25 22:52:50.000000000 +0200 +@@ -192,7 +192,7 @@ + # define ZEND_FASTCALL + #endif + +-#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) ++#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) && !(defined(ZTS) && defined(__FreeBSD__)) + # define ZEND_ALLOCA_MAX_SIZE (32 * 1024) + # define ALLOCA_FLAG(name) \ + zend_bool name; diff --git a/lang/php55/files/patch-Zend_zend_list.c b/lang/php55/files/patch-Zend_zend_list.c new file mode 100644 index 000000000000..f71b6f6ac0e2 --- /dev/null +++ b/lang/php55/files/patch-Zend_zend_list.c @@ -0,0 +1,38 @@ +--- Zend/zend_list.c.orig 2012-01-01 14:15:04.000000000 +0100 ++++ Zend/zend_list.c 2012-03-02 10:29:02.000000000 +0100 +@@ -47,7 +47,7 @@ + return index; + } + +-ZEND_API int _zend_list_delete(int id TSRMLS_DC) ++ZEND_API int _zend_list_delete(ulong id TSRMLS_DC) + { + zend_rsrc_list_entry *le; + +@@ -64,7 +64,7 @@ + } + + +-ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) ++ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC) + { + zend_rsrc_list_entry *le; + +@@ -77,7 +77,7 @@ + } + } + +-ZEND_API int _zend_list_addref(int id TSRMLS_DC) ++ZEND_API int _zend_list_addref(ulong id TSRMLS_DC) + { + zend_rsrc_list_entry *le; + +@@ -348,7 +348,7 @@ + } + + +-const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC) ++const char *zend_rsrc_list_get_rsrc_type(ulong resource TSRMLS_DC) + { + zend_rsrc_list_dtors_entry *lde; + int rsrc_type; diff --git a/lang/php55/files/patch-Zend_zend_list.h b/lang/php55/files/patch-Zend_zend_list.h new file mode 100644 index 000000000000..cbfedf6a8a62 --- /dev/null +++ b/lang/php55/files/patch-Zend_zend_list.h @@ -0,0 +1,24 @@ +--- Zend/zend_list.h.orig 2012-01-01 14:15:04.000000000 +0100 ++++ Zend/zend_list.h 2012-03-02 10:36:42.000000000 +0100 +@@ -71,9 +71,9 @@ + void zend_destroy_rsrc_list_dtors(void); + + ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC); +-ZEND_API int _zend_list_addref(int id TSRMLS_DC); +-ZEND_API int _zend_list_delete(int id TSRMLS_DC); +-ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC); ++ZEND_API int _zend_list_addref(ulong id TSRMLS_DC); ++ZEND_API int _zend_list_delete(ulong id TSRMLS_DC); ++ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC); + + #define zend_list_addref(id) _zend_list_addref(id TSRMLS_CC) + #define zend_list_delete(id) _zend_list_delete(id TSRMLS_CC) +@@ -82,7 +82,7 @@ + ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC); + ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, const char *resource_type_name, int *found_resource_type, int num_resource_types, ...); + +-ZEND_API const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC); ++ZEND_API const char *zend_rsrc_list_get_rsrc_type(ulong resource TSRMLS_DC); + ZEND_API int zend_fetch_list_dtor_id(char *type_name); + + extern ZEND_API int le_index_ptr; /* list entry type for index pointers */ diff --git a/lang/php55/files/patch-acinclude.m4 b/lang/php55/files/patch-acinclude.m4 new file mode 100644 index 000000000000..29bb5a5d78ca --- /dev/null +++ b/lang/php55/files/patch-acinclude.m4 @@ -0,0 +1,45 @@ +--- acinclude.m4.orig 2009-05-09 22:28:02.000000000 +0200 ++++ acinclude.m4 2009-06-25 08:08:05.000000000 +0200 +@@ -968,15 +968,9 @@ + if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then + dnl ---------------------------------------------- CLI static module + [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no +- case "$PHP_SAPI" in +- cgi|embed[)] +- PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) +- EXT_STATIC="$EXT_STATIC $1" +- ;; +- *[)] + PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) +- ;; +- esac ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi) ++ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,fpm) + EXT_CLI_STATIC="$EXT_CLI_STATIC $1" + fi + PHP_ADD_BUILD_DIR($ext_builddir) +@@ -1026,12 +1020,6 @@ + build to be successful. + ]) + fi +- 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. +-]) +- fi + dnl Some systems require that we link $2 to $1 when building + ]) + +@@ -2303,9 +2291,9 @@ + test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no + + dnl Fallbacks for different configure options +- if test "$PHP_OPENSSL" != "no"; then ++ if test -n "$PHP_OPENSSL" && test "$PHP_OPENSSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_OPENSSL +- elif test "$PHP_IMAP_SSL" != "no"; then ++ elif test -n "$PHP_IMAP_SSL" && test "$PHP_IMAP_SSL" != "no"; then + PHP_OPENSSL_DIR=$PHP_IMAP_SSL + fi + diff --git a/lang/php55/files/patch-configure.in b/lang/php55/files/patch-configure.in new file mode 100644 index 000000000000..69c05a77124b --- /dev/null +++ b/lang/php55/files/patch-configure.in @@ -0,0 +1,45 @@ +--- configure.in.orig 2011-03-04 10:10:54.000000000 +0100 ++++ configure.in 2011-03-04 10:11:01.000000000 +0100 +@@ -302,7 +302,6 @@ + dnl . + dnl ------------------------------------------------------------------------- + +-PTHREADS_CHECK + PHP_HELP_SEPARATOR([SAPI modules:]) + PHP_SHLIB_SUFFIX_NAMES + PHP_SAPI=default +@@ -327,7 +326,6 @@ + + if test "$enable_maintainer_zts" = "yes"; then + PTHREADS_ASSIGN_VARS +- PTHREADS_FLAGS + fi + + divert(3) +@@ -612,7 +610,7 @@ + ) + + dnl Some systems (like OpenSolaris) do not have nanosleep in libc +-PHP_CHECK_FUNC_LIB(nanosleep, rt) ++PHP_CHECK_FUNC(nanosleep, rt) + + dnl Check for getaddrinfo, should be a better way, but... + dnl Also check for working getaddrinfo +@@ -1162,7 +1160,7 @@ + EXPANDED_DATADIR=$datadir + EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"` + EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"` +-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR ++INCLUDE_PATH=.:${prefix}/share/pear + + exec_prefix=$old_exec_prefix + libdir=$old_libdir +@@ -1373,7 +1371,7 @@ + PHP_SUBST(all_targets) + PHP_SUBST(install_targets) + +-PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/]) ++PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/]) + + PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c) + diff --git a/lang/php55/files/patch-ext_standard_basic_functions.c b/lang/php55/files/patch-ext_standard_basic_functions.c new file mode 100644 index 000000000000..1907338d0298 --- /dev/null +++ b/lang/php55/files/patch-ext_standard_basic_functions.c @@ -0,0 +1,20 @@ +--- ext/standard/basic_functions.c.orig 2008-06-09 14:06:40.000000000 +0200 ++++ ext/standard/basic_functions.c 2008-06-09 14:08:28.000000000 +0200 +@@ -3859,7 +3860,7 @@ + SetEnvironmentVariable(pe->key, "bugbug"); + #endif + putenv(pe->previous_value); +-# if defined(PHP_WIN32) ++# if defined(PHP_WIN32) || __FreeBSD_version < 700050 + efree(pe->previous_value); + # endif + } else { +@@ -4461,7 +4462,7 @@ + pe.previous_value = NULL; + for (env = environ; env != NULL && *env != NULL; env++) { + if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */ +-#if defined(PHP_WIN32) ++#if defined(PHP_WIN32) || __FreeBSD_version < 700050 + /* must copy previous value because MSVCRT's putenv can free the string without notice */ + pe.previous_value = estrdup(*env); + #else diff --git a/lang/php55/files/patch-ext_standard_image.c b/lang/php55/files/patch-ext_standard_image.c new file mode 100644 index 000000000000..be29b54b2650 --- /dev/null +++ b/lang/php55/files/patch-ext_standard_image.c @@ -0,0 +1,50 @@ +--- ext/standard/image.c.orig 2007-10-04 15:31:11.000000000 +0200 ++++ ext/standard/image.c 2007-11-13 22:47:04.000000000 +0100 +@@ -31,9 +31,7 @@ + #endif + #include "php_image.h" + +-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) + #include "zlib.h" +-#endif + + /* file type markers */ + PHPAPI const char php_sig_gif[3] = {'G', 'I', 'F'}; +@@ -80,9 +78,7 @@ + REGISTER_LONG_CONSTANT("IMAGETYPE_JP2", IMAGE_FILETYPE_JP2, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMAGETYPE_JPX", IMAGE_FILETYPE_JPX, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMAGETYPE_JB2", IMAGE_FILETYPE_JB2, CONST_CS | CONST_PERSISTENT); +-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) + REGISTER_LONG_CONSTANT("IMAGETYPE_SWC", IMAGE_FILETYPE_SWC, CONST_CS | CONST_PERSISTENT); +-#endif + REGISTER_LONG_CONSTANT("IMAGETYPE_IFF", IMAGE_FILETYPE_IFF, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMAGETYPE_WBMP", IMAGE_FILETYPE_WBMP, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMAGETYPE_JPEG2000",IMAGE_FILETYPE_JPC, CONST_CS | CONST_PERSISTENT); /* keep alias */ +@@ -184,7 +180,6 @@ + } + /* }}} */ + +-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) + /* {{{ php_handle_swc + */ + static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC) +@@ -255,7 +250,6 @@ + return result; + } + /* }}} */ +-#endif + + /* {{{ php_handle_swf + */ +@@ -1314,11 +1308,7 @@ + result = php_handle_swf(stream TSRMLS_CC); + break; + case IMAGE_FILETYPE_SWC: +-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) + result = php_handle_swc(stream TSRMLS_CC); +-#else +- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled"); +-#endif + break; + case IMAGE_FILETYPE_PSD: + result = php_handle_psd(stream TSRMLS_CC); diff --git a/lang/php55/files/patch-ext_zlib_config0.m4 b/lang/php55/files/patch-ext_zlib_config0.m4 new file mode 100644 index 000000000000..249c85b498d3 --- /dev/null +++ b/lang/php55/files/patch-ext_zlib_config0.m4 @@ -0,0 +1,11 @@ +--- ext/zlib/config0.m4.orig 2010-08-26 13:19:52.000000000 +0200 ++++ ext/zlib/config0.m4 2010-08-26 13:20:11.000000000 +0200 +@@ -8,7 +8,7 @@ + PHP_ARG_WITH(zlib-dir,if the location of ZLIB install directory is defined, + [ --with-zlib-dir=<DIR> Define the location of zlib install directory], no, no) + +-if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then ++if test "$PHP_ZLIB" != "no"; then + PHP_NEW_EXTENSION(zlib, zlib.c zlib_fopen_wrapper.c zlib_filter.c, $ext_shared) + PHP_SUBST(ZLIB_SHARED_LIBADD) + diff --git a/lang/php55/files/patch-main::php_config.h.in b/lang/php55/files/patch-main::php_config.h.in new file mode 100644 index 000000000000..8e9938876421 --- /dev/null +++ b/lang/php55/files/patch-main::php_config.h.in @@ -0,0 +1,12 @@ +--- 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 + ++/* Include external shared modules configurations */ ++#include "ext/php_config.h" ++ + /* Whether sprintf is broken */ + #undef ZEND_BROKEN_SPRINTF + diff --git a/lang/php55/files/patch-sapi_fpm_Makefile.frag b/lang/php55/files/patch-sapi_fpm_Makefile.frag new file mode 100644 index 000000000000..3d777795dd86 --- /dev/null +++ b/lang/php55/files/patch-sapi_fpm_Makefile.frag @@ -0,0 +1,12 @@ +--- sapi/fpm/Makefile.frag.orig 2011-10-08 23:04:10.000000000 +0200 ++++ sapi/fpm/Makefile.frag 2012-02-09 16:43:25.000000000 +0100 +@@ -27,6 +27,6 @@ + @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8 + @$(INSTALL_DATA) sapi/fpm/php-fpm.8 $(INSTALL_ROOT)$(mandir)/man8/php-fpm$(program_suffix).8 + +- @echo "Installing PHP FPM status page: $(INSTALL_ROOT)$(datadir)/fpm/" +- @$(mkinstalldirs) $(INSTALL_ROOT)$(datadir)/fpm +- @$(INSTALL_DATA) sapi/fpm/status.html $(INSTALL_ROOT)$(datadir)/fpm/status.html ++ @echo "Installing PHP FPM status page: $(INSTALL_ROOT)$(datadir)/php/fpm/" ++ @$(mkinstalldirs) $(INSTALL_ROOT)$(datadir)/php/fpm ++ @$(INSTALL_DATA) sapi/fpm/status.html $(INSTALL_ROOT)$(datadir)/php/fpm/status.html diff --git a/lang/php55/files/patch-sapi_fpm_config.m4 b/lang/php55/files/patch-sapi_fpm_config.m4 new file mode 100644 index 000000000000..a9db5afbe0af --- /dev/null +++ b/lang/php55/files/patch-sapi_fpm_config.m4 @@ -0,0 +1,20 @@ +--- sapi/fpm/config.m4.orig 2011-06-26 17:48:11.000000000 +0200 ++++ sapi/fpm/config.m4 2011-11-18 11:05:21.000000000 +0100 +@@ -312,7 +312,7 @@ + + AC_MSG_CHECKING([for TCP_INFO]) + +- AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; int x = TCP_INFO;], [ ++ AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; ti.tcpi_sacked = 0; int x = TCP_INFO;], [ + have_lq=tcp_info + AC_MSG_RESULT([yes]) + ], [ +@@ -333,7 +333,7 @@ + AC_MSG_RESULT([no]) + ]) + +- if test "$have_lq" = "tcp_info"; then ++ if test "$have_lq" = "so_listenq"; then + AC_DEFINE([HAVE_LQ_SO_LISTENQ], 1, [do we have SO_LISTENQxxx?]) + fi + fi diff --git a/lang/php55/files/patch-sapi_fpm_php-fpm.conf.in b/lang/php55/files/patch-sapi_fpm_php-fpm.conf.in new file mode 100644 index 000000000000..315f2470a773 --- /dev/null +++ b/lang/php55/files/patch-sapi_fpm_php-fpm.conf.in @@ -0,0 +1,11 @@ +--- sapi/fpm/php-fpm.conf.in.orig 2012-02-08 15:50:42.000000000 +0100 ++++ sapi/fpm/php-fpm.conf.in 2012-02-08 15:50:54.000000000 +0100 +@@ -317,7 +317,7 @@ + ; last request memory: 0 + ; + ; Note: There is a real-time FPM status monitoring sample web page available +-; It's available in: @EXPANDED_DATADIR@/fpm/status.html ++; It's available in: @EXPANDED_DATADIR@/php/fpm/status.html + ; + ; Note: The value must start with a leading slash (/). The value can be + ; anything, but it may not be a good idea to use the .php extension or it diff --git a/lang/php55/files/php-fpm.in b/lang/php55/files/php-fpm.in new file mode 100644 index 000000000000..55e2ac992408 --- /dev/null +++ b/lang/php55/files/php-fpm.in @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: php-fpm +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable php-fpm: +# php_fpm_enable="YES" +# + +. /etc/rc.subr + +name="php_fpm" +rcvar=php_fpm_enable + +load_rc_config "$name" + +: ${php_fpm_enable="NO"} + +extra_commands="reload logrotate" + +command="%%PREFIX%%/sbin/php-fpm" +pidfile="/var/run/php-fpm.pid" +sig_stop="QUIT" +sig_reload="USR2" +logrotate_cmd="php_fpm_logrotate" + +required_files="%%PREFIX%%/etc/php-fpm.conf" + +php_fpm_logrotate() { + if [ -z "$rc_pid" ]; then + _run_rc_notrunning + return 1 + fi + echo "Rotating logs $name." + kill -USR1 $rc_pid +} + +run_rc_command "$1" |