Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-acinclude.m4,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- acinclude.m4.orig 2015-06-23 17:33:33.000000000 +0000
+++ acinclude.m4
@@ -2354,7 +2354,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
fi
for i in $PHP_OPENSSL_DIR; do

View File

@@ -0,0 +1,91 @@
$NetBSD: patch-configure,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- configure.orig 2016-04-28 18:12:26.000000000 +0000
+++ configure
@@ -6930,27 +6930,6 @@ EOF
;;
esac
- if test "$APACHE_VERSION" -lt 2004001; then
- APXS_MPM=`$APXS -q MPM_NAME`
- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
-
- enable_maintainer_zts=yes
- if test "$pthreads_working" != "yes"; then
- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
- fi
-
- fi
- else
- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
- if test -n "$APACHE_THREADED_MPM"; then
-
- enable_maintainer_zts=yes
- if test "$pthreads_working" != "yes"; then
- as_fn_error $? "ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads." "$LINENO" 5
- fi
-
- fi
- fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -18408,7 +18387,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
fi
for i in $PHP_OPENSSL_DIR; do
@@ -20572,7 +20551,7 @@ $as_echo "yes" >&6; }
PHP_SQLITE3_CFLAGS="-I@ext_srcdir@/libsqlite $other_flags $threadsafe_flags $debug_flags"
- for header_file in ext/sqlite3/libsqlite/sqlite3.h; do
+ for header_file; do
unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -31742,7 +31721,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
fi
for i in $PHP_OPENSSL_DIR; do
@@ -42631,7 +42610,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
fi
for i in $PHP_OPENSSL_DIR; do
@@ -92806,7 +92785,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
- PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+ PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl /"
fi
for i in $PHP_OPENSSL_DIR; do
@@ -96439,12 +96418,7 @@ old_CC=$CC
if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
- cat >meta_ccld<<EOF
-#! /bin/sh
-exec $CC $ac_cv_pthreads_cflags \$@
-EOF
- CC="$abs_builddir/meta_ccld"
- chmod +x meta_ccld
+ CPPFLAGS="$CPPFLAGS $ac_cv_pthreads_cflags"
fi
if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then

View File

@@ -0,0 +1,60 @@
$NetBSD: patch-ext_gd_config.m4,v 1.2 2016/08/13 17:34:41 taca Exp $
--- ext/gd/config.m4.orig 2016-08-05 21:30:28.000000000 +0000
+++ ext/gd/config.m4
@@ -46,18 +46,7 @@ dnl Checks for the configure options
dnl
AC_DEFUN([PHP_GD_ZLIB],[
- if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
- else
- AC_MSG_ERROR([Can't find zlib headers under "$PHP_ZLIB_DIR"])
- fi
- else
- for i in /usr/local /usr; do
+ for i in "$PHP_ZLIB_DIR" /usr/local /usr; do
if test -f "$i/include/zlib/zlib.h"; then
PHP_ZLIB_DIR="$i"
PHP_ZLIB_INCDIR="$i/include/zlib"
@@ -66,7 +55,6 @@ AC_DEFUN([PHP_GD_ZLIB],[
PHP_ZLIB_INCDIR="$i/include"
fi
done
- fi
])
AC_DEFUN([PHP_GD_WEBP],[
@@ -143,13 +131,13 @@ AC_DEFUN([PHP_GD_PNG],[
AC_MSG_ERROR([PNG support requires ZLIB. Use --with-zlib-dir=<DIR>])
fi
- PHP_CHECK_LIBRARY(png,png_write_image,
+ PHP_CHECK_LIBRARY(png16,png_write_image,
[
PHP_ADD_INCLUDE($GD_PNG_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
+ PHP_ADD_LIBRARY_WITH_PATH(png16, $GD_PNG_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
],[
- AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.])
+ AC_MSG_ERROR([Problem with libpng16.(a|so) or libz.(a|so). Please check config.log for more information.])
],[
-L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR
])
@@ -230,7 +218,9 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[
PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
- PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
+ if test "$PHP_XPM_DIR" != "no"; then
+ PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
+ fi
PHP_CHECK_LIBRARY(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_FREETYPE, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdVersionString, [AC_DEFINE(HAVE_GD_LIBVERSION, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
])

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-ext_imap_config.m4,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/imap/config.m4.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/imap/config.m4
@@ -48,6 +48,14 @@ AC_DEFUN([PHP_IMAP_TEST_BUILD], [
])
])
+dsl Must be before --with-kerberos, affects the check
+PHP_ARG_WITH(imap-linkage,use IMAP c-client linkage,
+[ --with-imap-linkage Use IMAP c-client linkage to determine supported items.])
+
+if test "$PHP_IMAP_LINKAGE" != "no"; then
+ AC_DEFINE(HAVE_IMAP_LINKAGE, 1, [ ])
+fi
+
AC_DEFUN([PHP_IMAP_KRB_CHK], [
if test "$PHP_KERBEROS" != "no"; then
PHP_SETUP_KERBEROS(IMAP_SHARED_LIBADD,
@@ -59,7 +67,7 @@ AC_DEFUN([PHP_IMAP_KRB_CHK], [
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
])
])
- else
+ elif test "$PHP_IMAP_LINKAGE" != "yes"; then
AC_EGREP_HEADER(auth_gss, $IMAP_INC_DIR/linkage.h, [
AC_MSG_ERROR([This c-client library is built with Kerberos support.

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-ext_pcre_pcrelib_config.h,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/pcre/pcrelib/config.h.orig 2016-02-02 16:32:32.000000000 +0000
+++ ext/pcre/pcrelib/config.h
@@ -397,7 +397,20 @@ them both to 0; an emulation function wi
#undef SUPPORT_GCOV
/* Define to any value to enable support for Just-In-Time compiling. */
-#define SUPPORT_JIT
+#if defined(__i386__) || defined(__i386) \
+|| defined(__x86_64__) \
+|| defined(__arm__) || defined(__ARM__) \
+|| defined (__aarch64__) \
+|| defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) \
+|| (defined(_POWER) && defined(__64BIT__)) \
+|| defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) \
+|| defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER) \
+|| (defined(__mips__) && !defined(_LP64)) \
+|| defined(__mips64) \
+|| defined(__sparc__) || defined(__sparc) \
+|| defined(__tilegx__)
+ #define SUPPORT_JIT
+#endif
/* Define to any value to allow pcregrep to be linked with libbz2, so that it
is able to handle .bz2 files. */

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ext_pdo__mysql_config.m4,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/pdo_mysql/config.m4.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/pdo_mysql/config.m4
@@ -156,7 +156,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
fi
dnl fix after renaming to pdo_mysql
- PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_cv_inc_path -I -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+ PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
ifdef([PHP_ADD_EXTENSION_DEP],
[
PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-ext_pdo_config.m4,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/pdo/config.m4.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/pdo/config.m4
@@ -37,20 +37,6 @@ if test "$PHP_PDO" != "no"; then
PHP_PDO_PEAR_CHECK
- if test "$ext_shared" = "yes" ; then
- case $host_alias in
- *darwin*)
- AC_MSG_ERROR([
-Due to the way that loadable modules work on OSX/Darwin, you need to
-compile the PDO package statically into the PHP core.
-
-Please follow the instructions at: http://netevil.org/node.php?nid=202
-for more detail on this issue.
- ])
- ext_shared=no
- ;;
- esac
- fi
PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
ifdef([PHP_ADD_EXTENSION_DEP],
[

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ext_phar_Makefile.frag,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/phar/Makefile.frag.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/phar/Makefile.frag
@@ -18,7 +18,7 @@ PHP_PHARCMD_EXECUTABLE = ` \
else \
$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
fi;`
-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
$(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
-@test -d $(builddir)/phar || mkdir $(builddir)/phar

View File

@@ -0,0 +1,10 @@
$NetBSD: patch-ext_phar_phar_phar.php,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/phar/phar/phar.php.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/phar/phar/phar.php
@@ -1,4 +1,4 @@
-#!/usr/local/bin/php
+#!@PREFIX@/bin/php
<?php
/** @file phar.php

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-ext_recode_recode.c,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
program_name is expected variable, is required by recode 3.5 and recode 3.6 to actually work.
The config.m4 test for it is broken at least for some platforms - it only tests if program without it compiles, but on Solaris and MacOS/Darwin at least it only fails when run.
--- ext/recode/recode.c.orig 2016-07-24 13:07:47.000000000 +0000
+++ ext/recode/recode.c
@@ -29,11 +29,8 @@
#if HAVE_LIBRECODE
-/* For recode 3.5 */
-#if HAVE_BROKEN_RECODE
-extern char *program_name;
-char *program_name = "php";
-#endif
+extern const char *program_name;
+const char *program_name = "php";
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ext_sqlite3_libsqlite_sqlite3.c,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/sqlite3/libsqlite/sqlite3.c.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/sqlite3/libsqlite/sqlite3.c
@@ -8408,7 +8408,7 @@ struct sqlite3_rtree_query_info {
** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit
** it.
*/
-#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__)
+#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__sun)
# define _XOPEN_SOURCE 600
#endif

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ext_standard_basic__functions.c,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- ext/standard/basic_functions.c.orig 2015-06-23 17:33:33.000000000 +0000
+++ ext/standard/basic_functions.c
@@ -3499,7 +3499,7 @@ PHPAPI double php_get_nan(void) /* {{{ *
PHPAPI double php_get_inf(void) /* {{{ */
{
-#if HAVE_HUGE_VAL_INF
+#if defined(HAVE_HUGE_VAL_INF) || defined(__vax__)
return HUGE_VAL;
#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
double val = 0.0;

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-ext_standard_php__dns.h,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
Fix memory leak.
--- ext/standard/php_dns.h.orig 2016-04-28 18:13:00.000000000 +0000
+++ ext/standard/php_dns.h
@@ -32,9 +32,15 @@
#elif defined(HAVE_RES_NSEARCH)
#define php_dns_search(res, dname, class, type, answer, anslen) \
res_nsearch(res, dname, class, type, answer, anslen);
+#ifdef __GLIBC__
#define php_dns_free_handle(res) \
- res_nclose(res); \
+ res_nclose(res); \
+ php_dns_free_res(*res)
+#else
+#define php_dns_free_handle(res) \
+ res_ndestroy(res); \
php_dns_free_res(res)
+#endif
#elif defined(HAVE_RES_SEARCH)
#define php_dns_search(res, dname, class, type, answer, anslen) \

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-makedist,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- makedist.orig 2015-06-23 17:33:33.000000000 +0000
+++ makedist
@@ -35,7 +35,7 @@ if test "${1}" = "1" -a "${2}" -lt "28";
fi
IFS="$old_IFS"
-if test "x$PHPROOT" == "x"; then
+if test "x$PHPROOT" = "x"; then
PHPROOT=git@git.php.net:php-src.git;
fi

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-php.ini-development,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- php.ini-development.orig 2015-06-23 17:33:33.000000000 +0000
+++ php.ini-development
@@ -697,7 +697,7 @@ default_charset = "UTF-8"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+include_path = ".:@PREFIX@/lib/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
@@ -718,8 +718,8 @@ doc_root =
; http://php.net/user-dir
user_dir =
-; Directory in which the loadable extensions (modules) reside.
-; http://php.net/extension-dir
+; Directory in which the loadable extensions (modules) reside. If not
+; defined, then use the extension directory specified at compile-time.
; extension_dir = "./"
; On windows:
; extension_dir = "ext"
@@ -792,7 +792,7 @@ file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
-;upload_tmp_dir =
+upload_tmp_dir = /tmp
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-php.ini-production,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- php.ini-production.orig 2015-06-23 17:33:33.000000000 +0000
+++ php.ini-production
@@ -697,7 +697,7 @@ default_charset = "UTF-8"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+include_path = ".:@PREFIX@/lib/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
@@ -718,8 +718,8 @@ doc_root =
; http://php.net/user-dir
user_dir =
-; Directory in which the loadable extensions (modules) reside.
-; http://php.net/extension-dir
+; Directory in which the loadable extensions (modules) reside. If not
+; defined, then use the extension directory specified at compile-time.
; extension_dir = "./"
; On windows:
; extension_dir = "ext"
@@ -792,7 +792,7 @@ file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
; http://php.net/upload-tmp-dir
-;upload_tmp_dir =
+upload_tmp_dir = /tmp
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize

View File

@@ -0,0 +1,10 @@
$NetBSD: patch-run-tests.php,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- run-tests.php.orig 2015-06-23 17:33:33.000000000 +0000
+++ run-tests.php
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!@PREFIX@/bin/php
<?php
/*
+----------------------------------------------------------------------+

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-sapi_cgi_Makefile.frag,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- sapi/cgi/Makefile.frag.orig 2015-06-23 17:33:33.000000000 +0000
+++ sapi/cgi/Makefile.frag
@@ -4,9 +4,9 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(P
$(BUILD_CGI)
install-cgi: $(SAPI_CGI_PATH)
- @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
+ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)@CGIDIR@/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
- @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php-cgi$(program_suffix)$(EXEEXT)
+ @$(INSTALL) -m 0755 $(SAPI_CGI_PATH) $(INSTALL_ROOT)@CGIDIR@/$(program_prefix)php$(program_suffix)$(EXEEXT)
@echo "Installing PHP CGI man page: $(INSTALL_ROOT)$(mandir)/man1/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) sapi/cgi/php-cgi.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)php-cgi$(program_suffix).1

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-sapi_cli_Makefile.frag,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
Needed on NetBSD with PaX MPROTEXT, otherwise core dump with:
#1 0x00000000004d0d87 in _pcre_jit_exec ()
#2 0x00000000004a53f1 in php_pcre_exec ()
https://bugs.php.net/bug.php?id=72281
--- sapi/cli/Makefile.frag.orig 2016-04-28 18:12:27.000000000 +0000
+++ sapi/cli/Makefile.frag
@@ -2,6 +2,9 @@ cli: $(SAPI_CLI_PATH)
$(SAPI_CLI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CLI_OBJS)
$(BUILD_CLI)
+ @if test -x /usr/sbin/paxctl; then \
+ /usr/sbin/paxctl +m $(SAPI_CLI_PATH); \
+ fi
install-cli: $(SAPI_CLI_PATH)
@echo "Installing PHP CLI binary: $(INSTALL_ROOT)$(bindir)/"

View File

@@ -0,0 +1,45 @@
$NetBSD: patch-sapi_fpm_fpm_events_port.c,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- sapi/fpm/fpm/events/port.c.orig 2015-06-23 17:33:33.000000000 +0000
+++ sapi/fpm/fpm/events/port.c
@@ -124,6 +124,7 @@ static int fpm_event_port_wait(struct fp
t.tv_nsec = (timeout % 1000) * 1000 * 1000;
/* wait for inconming event or timeout. We want at least one event or timeout */
+again:
nget = 1;
ret = port_getn(pfd, events, nevents, &nget, &t);
if (ret < 0) {
@@ -133,17 +134,31 @@ static int fpm_event_port_wait(struct fp
zlog(ZLOG_WARNING, "poll() returns %d", errno);
return -1;
}
+
+ if (errno == EINTR)
+ goto again;
+
+ return 0;
}
for (i = 0; i < nget; i++) {
+ struct fpm_event_s *ev;
/* do we have a ptr to the event ? */
if (!events[i].portev_user) {
continue;
}
+ ev = (struct fpm_event_s *)events[i].portev_user;
+
+ if (port_associate(pfd, PORT_SOURCE_FD,
+ ev->fd, POLLIN, (void *)ev) < 0) {
+ zlog(ZLOG_ERROR, "port: unable to add the event");
+ return -1;
+ }
+
/* fire the event */
- fpm_event_fire((struct fpm_event_s *)events[i].portev_user);
+ fpm_event_fire(ev);
/* sanity check */
if (fpm_globals.parent_pid != getpid()) {

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-sapi_fpm_php-fpm.conf.in,v 1.1 2016/08/04 14:09:03 jdolecek Exp $
--- sapi/fpm/php-fpm.conf.in.orig 2015-06-23 17:33:33.000000000 +0000
+++ sapi/fpm/php-fpm.conf.in
@@ -14,7 +14,7 @@
; Pid file
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
; Default Value: none
-;pid = run/php-fpm.pid
+pid = run/php-fpm.pid
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written