Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 2013 17:21:14 GMT
From:      Jesse <jessefrgsmith@yahoo.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/180173: new port: lang/php55-apache-mod -- PHP with Apache support
Message-ID:  <201307011721.r61HLE5u077760@oldred.freebsd.org>
Resent-Message-ID: <201307011730.r61HU1HD066427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180173
>Category:       ports
>Synopsis:       new port: lang/php55-apache-mod -- PHP with Apache support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 01 17:30:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jesse
>Release:        9.1
>Organization:
RM
>Environment:
>Description:
Please find attached a new port which provides the host system with PHP along with Apache module support. This port allows administrators to install Apache/MySQL/PHP support without resorting to manually configuring ports, that is an AMP stack can be installed in BATCH mode or using binary packages.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	php55-apache-mod/
#	php55-apache-mod/files
#	php55-apache-mod/files/php-fpm.in
#	php55-apache-mod/files/patch-Zend::zend.h
#	php55-apache-mod/files/patch-Zend_zend_list.c
#	php55-apache-mod/files/patch-Zend_zend_list.h
#	php55-apache-mod/files/patch-acinclude.m4
#	php55-apache-mod/files/patch-configure.in
#	php55-apache-mod/files/patch-ext_standard_basic_functions.c
#	php55-apache-mod/files/patch-ext_standard_image.c
#	php55-apache-mod/files/patch-ext_zlib_config0.m4
#	php55-apache-mod/files/patch-main::php_config.h.in
#	php55-apache-mod/files/patch-sapi_fpm_Makefile.frag
#	php55-apache-mod/files/patch-sapi_fpm_config.m4
#	php55-apache-mod/files/patch-sapi_fpm_php-fpm.conf.in
#	php55-apache-mod/files/patch-TSRM_threads.m4
#	php55-apache-mod/Makefile.ext
#	php55-apache-mod/distinfo
#	php55-apache-mod/Makefile
#	php55-apache-mod/pkg-descr
#	php55-apache-mod/pkg-message.mod
#	php55-apache-mod/pkg-plist
#
echo c - php55-apache-mod/
mkdir -p php55-apache-mod/ > /dev/null 2>&1
echo c - php55-apache-mod/files
mkdir -p php55-apache-mod/files > /dev/null 2>&1
echo x - php55-apache-mod/files/php-fpm.in
sed 's/^X//' >php55-apache-mod/files/php-fpm.in << '7484ed5d4efbb6c9f46a27c9acff3e8e'
X#!/bin/sh
X#
X# $FreeBSD: lang/php55/files/php-fpm.in 300896 2012-07-14 13:54:48Z beat $
X#
X
X# PROVIDE: php-fpm
X# REQUIRE: LOGIN
X# KEYWORD: shutdown
X
X#
X# Add the following line to /etc/rc.conf to enable php-fpm:
X# php_fpm_enable="YES"
X#
X
X. /etc/rc.subr
X
Xname="php_fpm"
Xrcvar=php_fpm_enable
X
Xload_rc_config "$name"
X
X: ${php_fpm_enable="NO"}
X
Xextra_commands="reload logrotate"
X
Xcommand="%%PREFIX%%/sbin/php-fpm"
Xpidfile="/var/run/php-fpm.pid"
Xsig_stop="QUIT"
Xsig_reload="USR2"
Xlogrotate_cmd="php_fpm_logrotate"
X
Xrequired_files="%%PREFIX%%/etc/php-fpm.conf"
X
Xphp_fpm_logrotate() {
X        if [ -z "$rc_pid" ]; then
X                _run_rc_notrunning
X                return 1
X        fi
X        echo "Rotating logs $name."
X        kill -USR1 $rc_pid
X}
X
Xrun_rc_command "$1"
7484ed5d4efbb6c9f46a27c9acff3e8e
echo x - php55-apache-mod/files/patch-Zend::zend.h
sed 's/^X//' >php55-apache-mod/files/patch-Zend::zend.h << 'cb28ef8371305203cdd8d661c012ec92'
X--- Zend/zend.h.orig	2008-08-15 21:47:23.000000000 +0200
X+++ Zend/zend.h	2008-09-25 22:52:50.000000000 +0200
X@@ -192,7 +192,7 @@
X # define ZEND_FASTCALL
X #endif
X 
X-#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
X+#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__))
X # define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
X # define ALLOCA_FLAG(name) \
X 	zend_bool name;
cb28ef8371305203cdd8d661c012ec92
echo x - php55-apache-mod/files/patch-Zend_zend_list.c
sed 's/^X//' >php55-apache-mod/files/patch-Zend_zend_list.c << '45ee3ed7b1a3998e7109ba4da9b9f3f7'
X--- Zend/zend_list.c.orig	2012-01-01 14:15:04.000000000 +0100
X+++ Zend/zend_list.c	2012-03-02 10:29:02.000000000 +0100
X@@ -47,7 +47,7 @@
X 	return index;
X }
X 
X-ZEND_API int _zend_list_delete(int id TSRMLS_DC)
X+ZEND_API int _zend_list_delete(ulong id TSRMLS_DC)
X {
X 	zend_rsrc_list_entry *le;
X 	
X@@ -64,7 +64,7 @@
X }
X 
X 
X-ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC)
X+ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC)
X {
X 	zend_rsrc_list_entry *le;
X 
X@@ -77,7 +77,7 @@
X 	}
X }
X 
X-ZEND_API int _zend_list_addref(int id TSRMLS_DC)
X+ZEND_API int _zend_list_addref(ulong id TSRMLS_DC)
X {
X 	zend_rsrc_list_entry *le;
X 	
X@@ -348,7 +348,7 @@
X }
X 
X 
X-const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC)
X+const char *zend_rsrc_list_get_rsrc_type(ulong resource TSRMLS_DC)
X {
X 	zend_rsrc_list_dtors_entry *lde;
X 	int rsrc_type;
45ee3ed7b1a3998e7109ba4da9b9f3f7
echo x - php55-apache-mod/files/patch-Zend_zend_list.h
sed 's/^X//' >php55-apache-mod/files/patch-Zend_zend_list.h << '42b855fcd7bbc706f7983c380bebeb13'
X--- Zend/zend_list.h.orig	2012-01-01 14:15:04.000000000 +0100
X+++ Zend/zend_list.h	2012-03-02 10:36:42.000000000 +0100
X@@ -71,9 +71,9 @@
X void zend_destroy_rsrc_list_dtors(void);
X 
X ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC);
X-ZEND_API int _zend_list_addref(int id TSRMLS_DC);
X-ZEND_API int _zend_list_delete(int id TSRMLS_DC);
X-ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC);
X+ZEND_API int _zend_list_addref(ulong id TSRMLS_DC);
X+ZEND_API int _zend_list_delete(ulong id TSRMLS_DC);
X+ZEND_API void *_zend_list_find(ulong id, int *type TSRMLS_DC);
X 
X #define zend_list_addref(id)		_zend_list_addref(id TSRMLS_CC)
X #define zend_list_delete(id)		_zend_list_delete(id TSRMLS_CC)
X@@ -82,7 +82,7 @@
X ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC);
X 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, ...);
X 
X-ZEND_API const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
X+ZEND_API const char *zend_rsrc_list_get_rsrc_type(ulong resource TSRMLS_DC);
X ZEND_API int zend_fetch_list_dtor_id(char *type_name);
X 
X extern ZEND_API int le_index_ptr;  /* list entry type for index pointers */
42b855fcd7bbc706f7983c380bebeb13
echo x - php55-apache-mod/files/patch-acinclude.m4
sed 's/^X//' >php55-apache-mod/files/patch-acinclude.m4 << '47a84b0fe63f917cc262d88d740c6dc6'
X--- acinclude.m4.orig	2009-05-09 22:28:02.000000000 +0200
X+++ acinclude.m4	2009-06-25 08:08:05.000000000 +0200
X@@ -968,15 +968,9 @@
X   if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
X dnl ---------------------------------------------- CLI static module
X     [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
X-    case "$PHP_SAPI" in
X-      cgi|embed[)]
X-        PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
X-        EXT_STATIC="$EXT_STATIC $1"
X-        ;;
X-      *[)]
X         PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
X-        ;;
X-    esac
X+        PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi)
X+        PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,fpm)
X     EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
X   fi
X   PHP_ADD_BUILD_DIR($ext_builddir)
X@@ -1026,12 +1020,6 @@
X build to be successful.
X ])
X   fi
X-  if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
X-    AC_MSG_ERROR([
X-You've configured extension $1, which depends on extension $2,
X-but you've either not enabled $2, or have disabled it.
X-])
X-  fi
X   dnl Some systems require that we link $2 to $1 when building
X ])
X 
X@@ -2303,9 +2291,9 @@
X   test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
X 
X   dnl Fallbacks for different configure options
X-  if test "$PHP_OPENSSL" != "no"; then
X+  if test -n "$PHP_OPENSSL" && test "$PHP_OPENSSL" != "no"; then
X     PHP_OPENSSL_DIR=$PHP_OPENSSL
X-  elif test "$PHP_IMAP_SSL" != "no"; then
X+  elif test -n "$PHP_IMAP_SSL" && test "$PHP_IMAP_SSL" != "no"; then
X     PHP_OPENSSL_DIR=$PHP_IMAP_SSL
X   fi
X 
47a84b0fe63f917cc262d88d740c6dc6
echo x - php55-apache-mod/files/patch-configure.in
sed 's/^X//' >php55-apache-mod/files/patch-configure.in << 'a881b1471253d4b322bf83569a860cb1'
X--- configure.in.orig	2011-03-04 10:10:54.000000000 +0100
X+++ configure.in	2011-03-04 10:11:01.000000000 +0100
X@@ -302,7 +302,6 @@
X dnl .
X dnl -------------------------------------------------------------------------
X 
X-PTHREADS_CHECK
X PHP_HELP_SEPARATOR([SAPI modules:])
X PHP_SHLIB_SUFFIX_NAMES
X PHP_SAPI=default
X@@ -327,7 +326,6 @@
X 
X if test "$enable_maintainer_zts" = "yes"; then
X   PTHREADS_ASSIGN_VARS
X-  PTHREADS_FLAGS
X fi
X 
X divert(3)
X@@ -612,7 +610,7 @@
X )
X 
X dnl Some systems (like OpenSolaris) do not have nanosleep in libc
X-PHP_CHECK_FUNC_LIB(nanosleep, rt)
X+PHP_CHECK_FUNC(nanosleep, rt)
X 
X dnl Check for getaddrinfo, should be a better way, but...
X dnl Also check for working getaddrinfo
X@@ -1162,7 +1160,7 @@
X EXPANDED_DATADIR=$datadir
X EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
X EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
X-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
X+INCLUDE_PATH=.:${prefix}/share/pear
X 
X exec_prefix=$old_exec_prefix
X libdir=$old_libdir
X@@ -1373,7 +1371,7 @@
X PHP_SUBST(all_targets)
X PHP_SUBST(install_targets)
X 
X-PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
X+PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
X 
X PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
X 
a881b1471253d4b322bf83569a860cb1
echo x - php55-apache-mod/files/patch-ext_standard_basic_functions.c
sed 's/^X//' >php55-apache-mod/files/patch-ext_standard_basic_functions.c << '8df536a3a0c8d2b0675acf5ac47dc6f2'
X--- ext/standard/basic_functions.c.orig	2008-06-09 14:06:40.000000000 +0200
X+++ ext/standard/basic_functions.c	2008-06-09 14:08:28.000000000 +0200
X@@ -3859,7 +3860,7 @@
X 		SetEnvironmentVariable(pe->key, "bugbug");
X #endif
X 		putenv(pe->previous_value);
X-# if defined(PHP_WIN32)
X+# if defined(PHP_WIN32) || __FreeBSD_version < 700050
X 		efree(pe->previous_value);
X # endif
X 	} else {
X@@ -4461,7 +4462,7 @@
X 		pe.previous_value = NULL;
X 		for (env = environ; env != NULL && *env != NULL; env++) {
X 			if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') {	/* found it */
X-#if defined(PHP_WIN32)
X+#if defined(PHP_WIN32) || __FreeBSD_version < 700050
X 				/* must copy previous value because MSVCRT's putenv can free the string without notice */
X 				pe.previous_value = estrdup(*env);
X #else
8df536a3a0c8d2b0675acf5ac47dc6f2
echo x - php55-apache-mod/files/patch-ext_standard_image.c
sed 's/^X//' >php55-apache-mod/files/patch-ext_standard_image.c << '489f8deb92c3ae9b44ffff93c11da0eb'
X--- ext/standard/image.c.orig	2007-10-04 15:31:11.000000000 +0200
X+++ ext/standard/image.c	2007-11-13 22:47:04.000000000 +0100
X@@ -31,9 +31,7 @@
X #endif
X #include "php_image.h"
X 
X-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
X #include "zlib.h"
X-#endif
X 
X /* file type markers */
X PHPAPI const char php_sig_gif[3] = {'G', 'I', 'F'};
X@@ -80,9 +78,7 @@
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);
X-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);
X-#endif	
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_WBMP",    IMAGE_FILETYPE_WBMP,    CONST_CS | CONST_PERSISTENT);
X 	REGISTER_LONG_CONSTANT("IMAGETYPE_JPEG2000",IMAGE_FILETYPE_JPC,     CONST_CS | CONST_PERSISTENT); /* keep alias */
X@@ -184,7 +180,6 @@
X }
X /* }}} */
X 
X-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
X /* {{{ php_handle_swc
X  */
X static struct gfxinfo *php_handle_swc(php_stream * stream TSRMLS_DC)
X@@ -255,7 +250,6 @@
X 	return result;
X }
X /* }}} */
X-#endif
X 
X /* {{{ php_handle_swf
X  */
X@@ -1314,11 +1308,7 @@
X 			result = php_handle_swf(stream TSRMLS_CC);
X 			break;
X 		case IMAGE_FILETYPE_SWC:
X-#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
X 			result = php_handle_swc(stream TSRMLS_CC);
X-#else
X-			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");
X-#endif
X 			break;
X 		case IMAGE_FILETYPE_PSD:
X 			result = php_handle_psd(stream TSRMLS_CC);
489f8deb92c3ae9b44ffff93c11da0eb
echo x - php55-apache-mod/files/patch-ext_zlib_config0.m4
sed 's/^X//' >php55-apache-mod/files/patch-ext_zlib_config0.m4 << '97f17bfb0006f55fd22d1b1258515173'
X--- ext/zlib/config0.m4.orig	2010-08-26 13:19:52.000000000 +0200
X+++ ext/zlib/config0.m4	2010-08-26 13:20:11.000000000 +0200
X@@ -8,7 +8,7 @@
X PHP_ARG_WITH(zlib-dir,if the location of ZLIB install directory is defined,
X [  --with-zlib-dir=<DIR>   Define the location of zlib install directory], no, no)
X 
X-if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then
X+if test "$PHP_ZLIB" != "no"; then
X   PHP_NEW_EXTENSION(zlib, zlib.c zlib_fopen_wrapper.c zlib_filter.c, $ext_shared)
X   PHP_SUBST(ZLIB_SHARED_LIBADD)
X   
97f17bfb0006f55fd22d1b1258515173
echo x - php55-apache-mod/files/patch-main::php_config.h.in
sed 's/^X//' >php55-apache-mod/files/patch-main::php_config.h.in << '7d1dac3b3e7d05c17bffcbd04e6d4209'
X--- main/php_config.h.in.orig	Wed Jan 11 15:25:52 2006
X+++ main/php_config.h.in	Wed May  3 09:38:09 2006
X@@ -2760,6 +2760,9 @@
X /* Define if uint32_t type is present.  */
X #undef HAVE_UINT32_T
X 
X+/* Include external shared modules configurations */
X+#include "ext/php_config.h"
X+
X /* Whether sprintf is broken */
X #undef ZEND_BROKEN_SPRINTF
X 
7d1dac3b3e7d05c17bffcbd04e6d4209
echo x - php55-apache-mod/files/patch-sapi_fpm_Makefile.frag
sed 's/^X//' >php55-apache-mod/files/patch-sapi_fpm_Makefile.frag << 'd6f7fc32537506c84c9b25dfc1c143b8'
X--- sapi/fpm/Makefile.frag.orig	2011-10-08 23:04:10.000000000 +0200
X+++ sapi/fpm/Makefile.frag	2012-02-09 16:43:25.000000000 +0100
X@@ -27,6 +27,6 @@
X 	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man8
X 	@$(INSTALL_DATA) sapi/fpm/php-fpm.8 $(INSTALL_ROOT)$(mandir)/man8/php-fpm$(program_suffix).8
X 
X-	@echo "Installing PHP FPM status page:      $(INSTALL_ROOT)$(datadir)/fpm/"
X-	@$(mkinstalldirs) $(INSTALL_ROOT)$(datadir)/fpm
X-	@$(INSTALL_DATA) sapi/fpm/status.html $(INSTALL_ROOT)$(datadir)/fpm/status.html
X+	@echo "Installing PHP FPM status page:      $(INSTALL_ROOT)$(datadir)/php/fpm/"
X+	@$(mkinstalldirs) $(INSTALL_ROOT)$(datadir)/php/fpm
X+	@$(INSTALL_DATA) sapi/fpm/status.html $(INSTALL_ROOT)$(datadir)/php/fpm/status.html
d6f7fc32537506c84c9b25dfc1c143b8
echo x - php55-apache-mod/files/patch-sapi_fpm_config.m4
sed 's/^X//' >php55-apache-mod/files/patch-sapi_fpm_config.m4 << 'bd58a522873b501f5972eab08f941e55'
X--- sapi/fpm/config.m4.orig	2011-06-26 17:48:11.000000000 +0200
X+++ sapi/fpm/config.m4	2011-11-18 11:05:21.000000000 +0100
X@@ -312,7 +312,7 @@
X 
X   AC_MSG_CHECKING([for TCP_INFO])
X 
X-  AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; int x = TCP_INFO;], [
X+  AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; ti.tcpi_sacked = 0; int x = TCP_INFO;], [
X     have_lq=tcp_info
X     AC_MSG_RESULT([yes])
X   ], [
X@@ -333,7 +333,7 @@
X       AC_MSG_RESULT([no])
X     ])
X 
X-    if test "$have_lq" = "tcp_info"; then
X+    if test "$have_lq" = "so_listenq"; then
X       AC_DEFINE([HAVE_LQ_SO_LISTENQ], 1, [do we have SO_LISTENQxxx?])
X     fi
X   fi
bd58a522873b501f5972eab08f941e55
echo x - php55-apache-mod/files/patch-sapi_fpm_php-fpm.conf.in
sed 's/^X//' >php55-apache-mod/files/patch-sapi_fpm_php-fpm.conf.in << 'c05466b9dd4a3afcb192cdf03c5f37ce'
X--- sapi/fpm/php-fpm.conf.in.orig	2012-02-08 15:50:42.000000000 +0100
X+++ sapi/fpm/php-fpm.conf.in	2012-02-08 15:50:54.000000000 +0100
X@@ -317,7 +317,7 @@
X ;   last request memory:  0
X ;
X ; Note: There is a real-time FPM status monitoring sample web page available
X-;       It's available in: @EXPANDED_DATADIR@/fpm/status.html
X+;       It's available in: @EXPANDED_DATADIR@/php/fpm/status.html
X ;
X ; Note: The value must start with a leading slash (/). The value can be
X ;       anything, but it may not be a good idea to use the .php extension or it
c05466b9dd4a3afcb192cdf03c5f37ce
echo x - php55-apache-mod/files/patch-TSRM_threads.m4
sed 's/^X//' >php55-apache-mod/files/patch-TSRM_threads.m4 << 'ee33a7b8d26dd5046972e09e731b5215'
X--- TSRM/threads.m4.orig	2005-04-27 15:22:18.000000000 +0200
X+++ TSRM/threads.m4	2009-09-22 10:01:37.000000000 +0200
X@@ -79,7 +79,7 @@
X     pthread_mutexattr_t mattr;
X     int data = 1;
X     pthread_mutexattr_init(&mattr);
X-    return pthread_create(&thd, NULL, thread_routine, &data);
X+    return 0;
X } ], [
X   pthreads_working=yes
X   ], [
ee33a7b8d26dd5046972e09e731b5215
echo x - php55-apache-mod/Makefile.ext
sed 's/^X//' >php55-apache-mod/Makefile.ext << 'e21d76ebecde38d723aa89059c6a5919'
XCOMMENT=	The ${PHP_MODNAME} shared extension for php
X
XUSE_PHP=	yes
XUSE_PHPEXT=	yes
XPHP_MODNAME=	${PKGNAMESUFFIX:S/-//}
XDEFAULT_PHP_VER=55
XIGNORE_WITH_PHP=52 53 54 5
X
XEXTSUBDIR=	${DISTNAME}/ext/${PHP_MODNAME}
XWRKSRC=		${WRKDIR}/${EXTSUBDIR}
XPATCHDIR=	${.CURDIR}/files
XPLIST=		${NONEXISTENT}
X
XEXTRACT_AFTER_ARGS?=	${EXTSUBDIR}
X
X.if ${PHP_MODNAME} == "bcmath"
XCONFIGURE_ARGS+=--enable-bcmath
X
XPHP_HEADER_DIRS=libbcmath libbcmath/src
X.endif
X
X.if ${PHP_MODNAME} == "bz2"
XCONFIGURE_ARGS+=--with-bz2=/usr
X.endif
X
X.if ${PHP_MODNAME} == "calendar"
XCONFIGURE_ARGS+=--enable-calendar
X.endif
X
X.if ${PHP_MODNAME} == "ctype"
XCONFIGURE_ARGS+=--enable-ctype
X.endif
X
X.if ${PHP_MODNAME} == "curl"
XLIB_DEPENDS+=	curl:${PORTSDIR}/ftp/curl
X
XCONFIGURE_ARGS+=--with-curl=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "dba"
XCONFIGURE_ARGS+=--enable-dba
X
XOPTIONS_DEFINE=	CDB DB4 GDBM QDBM TOKYO INIFILE FLATFILE
XOPTIONS_DEFAULT=CDB INIFILE FLATFILE
X
XCDB_DESC=	cdb database support
XDB4_DESC=	Berkeley DB4 support
XGDBM_DESC=	GDBM database support
XQDBM_DESC=	QDBM database support
XTOKYO_DESC=	Tokyo Cabinet database support
XINIFILE_DESC=	INI file support
XFLATFILE_DESC=	flatfile support
X
XPHP_HEADER_DIRS=	libcdb libflatfile libinifile
X.endif
X
X.if ${PHP_MODNAME} == "dom"
XCONFIGURE_ARGS+=--enable-dom \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X.endif
X
X.if ${PHP_MODNAME} == "exif"
XCONFIGURE_ARGS+=--enable-exif
X.endif
X
X.if ${PHP_MODNAME} == "fileinfo"
XCONFIGURE_ARGS+=--enable-fileinfo \
X		--with-pcre-dir=${LOCALBASE}
X
XPHP_HEADER_DIRS=	libmagic
X.endif
X
X.if ${PHP_MODNAME} == "filter"
XCONFIGURE_ARGS+=--enable-filter \
X		--with-pcre-dir=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "ftp"
XCONFIGURE_ARGS+=--enable-ftp \
X		--with-openssl-dir=${OPENSSLBASE}
X
XLDFLAGS+=	-L${OPENSSLLIB} -lcrypto -lssl
XUSE_OPENSSL=	yes
X.endif
X
X.if ${PHP_MODNAME} == "gd"
XLIB_DEPENDS=	freetype:${PORTSDIR}/print/freetype2 \
X		png15:${PORTSDIR}/graphics/png \
X		jpeg:${PORTSDIR}/graphics/jpeg
X
XCONFIGURE_ARGS+=--with-gd \
X		--with-freetype-dir=${LOCALBASE} \
X		--with-jpeg-dir=${LOCALBASE} \
X		--with-png-dir=${LOCALBASE} \
X		--with-zlib-dir=/usr
X
XOPTIONS_DEFINE=	T1LIB TRUETYPE JIS X11 VPX
XOPTIONS_DEFAULT=T1LIB TRUETYPE X11
X
XT1LIB_DESC=	Include T1lib support
XTRUETYPE_DESC=	Enable TrueType string function
XJIS_DESC=	Enable JIS-mapped Japanese font support
XX11_DESC=	Enable XPM support
XVPX_DESC=	Enable VP8 codec support
X
XPHP_HEADER_DIRS=libgd
X.endif
X
X.if ${PHP_MODNAME} == "gettext"
XCONFIGURE_ARGS+=--with-gettext=${LOCALBASE}
X
XUSES+=		gettext
X.endif
X
X.if ${PHP_MODNAME} == "gmp"
XLIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
X
XCONFIGURE_ARGS+=--with-gmp=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "hash"
XCONFIGURE_ARGS+=--enable-hash \
X		--with-mhash
X.endif
X
X.if ${PHP_MODNAME} == "iconv"
XCONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
X
XUSES+=	iconv
X.endif
X
X.if ${PHP_MODNAME} == "imap"
XLIB_DEPENDS+=	c-client4:${PORTSDIR}/mail/cclient
X
XCONFIGURE_ARGS+=--with-imap=${LOCALBASE} \
X		--with-pcre-dir=${LOCALBASE}
X.if !defined(WITHOUT_SSL)
XCONFIGURE_ARGS+=--with-imap-ssl=${OPENSSLBASE}
X
XLDFLAGS+=	-L${OPENSSLLIB} -lcrypto -lssl
XUSE_OPENSSL=	yes
X.endif
X.endif
X
X.if ${PHP_MODNAME} == "interbase"
XCONFIGURE_ARGS+=--with-interbase=${LOCALBASE}
X
XUSE_FIREBIRD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "json"
XCONFIGURE_ARGS+=--enable-json
X.endif
X
X.if ${PHP_MODNAME} == "ldap"
XCONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
X
XUSE_OPENLDAP=	yes
X
X. ifdef(WANT_OPENLDAP_SASL)
XCONFIGURE_ARGS+=--with-ldap-sasl
X. endif
X.endif
X
X.if ${PHP_MODNAME} == "mbstring"
X
XCONFIGURE_ARGS+=--enable-mbstring \
X		--with-pcre-dir=${LOCALBASE}
X
XOPTIONS_DEFINE=	REGEX
XOPTIONS_DEFAULT=REGEX
X
XREGEX_DESC=	Enable multibyte regex support
X
XPHP_HEADER_DIRS=libmbfl libmbfl/filters libmbfl/mbfl libmbfl/nls
X.endif
X
X.if ${PHP_MODNAME} == "mcrypt"
XLIB_DEPENDS+=	mcrypt:${PORTSDIR}/security/libmcrypt
X
XCONFIGURE_ARGS+=--with-mcrypt=${LOCALBASE}
X
XUSE_AUTOTOOLS=	libltdl
X.endif
X
X.if ${PHP_MODNAME} == "mssql"
XLIB_DEPENDS+=	sybdb:${PORTSDIR}/databases/freetds-msdblib
X
XCONFIGURE_ARGS+=--with-mssql=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "mysql"
XOPTIONS_DEFINE=	MYSQLND
XOPTIONS_DEFAULT=MYSQLND
X
XMYSQLND_DESC=	Use MySQL Native Driver
X.endif
X
X.if ${PHP_MODNAME} == "mysqli"
XOPTIONS_DEFINE=	MYSQLND
XOPTIONS_DEFAULT=MYSQLND
X
XMYSQLND_DESC=	Use MySQL Native Driver
X.endif
X
X.if ${PHP_MODNAME} == "odbc"
XCONFIGURE_ARGS+=--enable-odbc
X
XOPTIONS_DEFINE=	IODBC
X
XIODBC_DESC=	Use the iODBC driver instead of unixODBC
X.endif
X
X.if ${PHP_MODNAME} == "openssl"
XCONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
X
XLDFLAGS+=	-L${OPENSSLLIB} -lcrypto -lssl
XUSE_OPENSSL=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pcntl"
XCONFIGURE_ARGS+=--enable-pcntl
X.endif
X
X.if ${PHP_MODNAME} == "pdo"
XCONFIGURE_ARGS+=--enable-pdo
X.endif
X
X.if ${PHP_MODNAME} == "pdo_dblib"
XCONFIGURE_ARGS+=--with-pdo-dblib=${LOCALBASE}
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X
XOPTIONS_DEFINE=	MSSQL
X
XMSSQL_DESC=	Enable Microsoft SQL Server support
X.endif
X
X.if ${PHP_MODNAME} == "pdo_firebird"
XCONFIGURE_ARGS+=--with-pdo-firebird=${LOCALBASE}
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X
XUSE_FIREBIRD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pdo_mysql"
XOPTIONS_DEFINE=	MYSQLND
XOPTIONS_DEFAULT=MYSQLND
X
XMYSQLND_DESC=	Use MySQL Native Driver
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pdo_odbc"
XOPTIONS_DEFINE= IODBC
X
XIODBC_DESC=     Use the iODBC driver instead of unixODBC
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pdo_pgsql"
XUSE_PGSQL=	yes
X
XCONFIGURE_ARGS+=--with-pdo-pgsql=${LOCALBASE}
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pdo_sqlite"
XUSE_SQLITE=	yes
XCONFIGURE_ARGS+=--with-pdo-sqlite=${LOCALBASE}
X
XUSE_PHP=	pdo
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "pgsql"
XUSE_PGSQL=	yes
X
XCONFIGURE_ARGS+=--with-pgsql=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "phar"
XCONFIGURE_ARGS+=--enable-phar \
X		--with-pcre-dir=${LOCALBASE}
X
XUSE_PHP=	hash
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "posix"
XCONFIGURE_ARGS+=--enable-posix
X.endif
X
X.if ${PHP_MODNAME} == "pspell"
XLIB_DEPENDS+=	aspell:${PORTSDIR}/textproc/aspell
X
XCONFIGURE_ARGS+=--with-pspell=${LOCALBASE}
X
X# Ugly hack to load session before psell to avoid crashes
XUSE_PHP=	session
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "readline"
XCONFIGURE_ARGS+=--with-readline=/usr
X.endif
X
X.if ${PHP_MODNAME} == "recode"
XLIB_DEPENDS+=	recode:${PORTSDIR}/converters/recode
X
XCONFIGURE_ARGS+=--with-recode=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "session"
XCONFIGURE_ARGS+=--enable-session
X.endif
X
X.if ${PHP_MODNAME} == "shmop"
XCONFIGURE_ARGS+=--enable-shmop
X.endif
X
X.if ${PHP_MODNAME} == "simplexml"
XCONFIGURE_ARGS+=--enable-simplexml \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X.endif
X
X.if ${PHP_MODNAME} == "snmp"
XCONFIGURE_ARGS+=--with-snmp=${LOCALBASE} \
X		--with-openssl-dir=${OPENSSLBASE}
X
XCONFIGURE_ENV+=	ac_cv_buggy_snprint_value="no"
X
XLIB_DEPENDS+=   netsnmp:${PORTSDIR}/net-mgmt/net-snmp
XLDFLAGS+=	-L${OPENSSLLIB} -lcrypto -lssl
XUSE_OPENSSL=	yes
X.endif
X
X.if ${PHP_MODNAME} == "soap"
XCONFIGURE_ARGS+=--enable-soap \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X
XUSE_PHP=	session
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "sockets"
XCONFIGURE_ARGS+=--enable-sockets
X.endif
X
X.if ${PHP_MODNAME} == "sqlite3"
XUSE_SQLITE=	yes
XCONFIGURE_ARGS+=--with-sqlite3=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "sybase_ct"
XLIB_DEPENDS+=	ct:${PORTSDIR}/databases/freetds
X
XCONFIGURE_ARGS+=--with-sybase-ct=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "sysvmsg"
XCONFIGURE_ARGS+=--enable-sysvmsg
X.endif
X
X.if ${PHP_MODNAME} == "sysvsem"
XCONFIGURE_ARGS+=--enable-sysvsem
X.endif
X
X.if ${PHP_MODNAME} == "sysvshm"
XCONFIGURE_ARGS+=--enable-sysvshm
X.endif
X
X.if ${PHP_MODNAME} == "tidy"
XCONFIGURE_ARGS+=--with-tidy=${LOCALBASE}
X
XLIB_DEPENDS+=	tidy-0.99:${PORTSDIR}/www/tidy-lib
X.endif
X
X.if ${PHP_MODNAME} == "tokenizer"
XCONFIGURE_ARGS+=--enable-tokenizer
X.endif
X
X.if ${PHP_MODNAME} == "wddx"
XCONFIGURE_ARGS+=--enable-wddx \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X
XUSE_PHP=	xml session
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "xml"
XCONFIGURE_ARGS+=--enable-xml \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X.endif
X
X.if ${PHP_MODNAME} == "xmlreader"
XCONFIGURE_ARGS+=--enable-xmlreader \
X		--with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=	libxml2
X
XUSE_PHP=	dom
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "xmlrpc"
XCONFIGURE_ARGS+=--with-xmlrpc \
X		--with-libxml-dir=${LOCALBASE} \
X		--with-iconv-dir=${LOCALBASE}
X
XUSES+=		iconv
XUSE_GNOME=	libxml2
X
XPHP_HEADER_DIRS=libxmlrpc
X
XUSE_PHP=	xml
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "xmlwriter"
XCONFIGURE_ARGS+=--enable-xmlwriter \
X                --with-libxml-dir=${LOCALBASE}
X
XUSE_GNOME=      libxml2
X.endif
X
X.if ${PHP_MODNAME} == "xsl"
XCONFIGURE_ARGS+=--with-xsl=${LOCALBASE}
X
XUSE_GNOME=	libxslt
XUSE_PHP=	dom xml
XUSE_PHP_BUILD=	yes
X.endif
X
X.if ${PHP_MODNAME} == "zip"
XCONFIGURE_ARGS+=--enable-zip \
X		--with-zlib-dir=/usr \
X		--with-pcre-dir=${LOCALBASE}
X.endif
X
X.if ${PHP_MODNAME} == "zlib"
XCONFIGURE_ARGS+=--with-zlib=/usr
X.endif
X
X.include <bsd.port.pre.mk>
X
X.if ${PHP_MODNAME} == "dba"
X.	if empty(PORT_OPTIONS:MCDB)
XCONFIGURE_ARGS+=--without-cdb
X.	endif
X.	if ${PORT_OPTIONS:MDB4}
XCONFIGURE_ARGS+=--with-db4=${LOCALBASE}
X
XUSE_BDB=		40+
XWITH_BDB_HIGHEST=	yes
X.	endif
X.	if ${PORT_OPTIONS:MGDBM}
XLIB_DEPENDS+=	gdbm:${PORTSDIR}/databases/gdbm
X
XCONFIGURE_ARGS+=--with-gdbm=${LOCALBASE}
X.	endif
X.	if ${PORT_OPTIONS:MQDBM}
XLIB_DEPENDS+=	qdbm:${PORTSDIR}/databases/qdbm
X
XCONFIGURE_ARGS+=--with-qdbm=${LOCALBASE}
X.	endif
X.	if ${PORT_OPTIONS:MTOKYO}
XLIB_DEPENDS+=	tokyocabinet:${PORTSDIR}/databases/tokyocabinet
X
XCONFIGURE_ARGS+=--with-tcadb=${LOCALBASE}
X.	endif
X.	if empty(PORT_OPTIONS:MINIFILE)
XCONFIGURE_ARGS+=--disable-inifile
X.	endif
X.	if empty(PORT_OPTIONS:MFLATFILE)
XCONFIGURE_ARGS+=--disable-flatfile
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "gd"
X.	if ${PORT_OPTIONS:MT1LIB}
XLIB_DEPENDS+=	t1:${PORTSDIR}/devel/t1lib
X
XCONFIGURE_ARGS+=--with-t1lib=${LOCALBASE}
X.	endif
X.	if ${PORT_OPTIONS:MTRUETYPE}
XCONFIGURE_ARGS+=--enable-gd-native-ttf
X.	endif
X.	if ${PORT_OPTIONS:MJIS}
XCONFIGURE_ARGS+=--enable-gd-jis-conv
X.	endif
X.	if ${PORT_OPTIONS:MX11}
XUSE_XORG=	xpm
X
XCONFIGURE_ARGS+=--with-xpm-dir=${LOCALBASE}
X.	endif
X.	if ${PORT_OPTIONS:MVPX}
XLIB_DEPENDS+=	vpx:${PORTSDIR}/multimedia/libvpx
X
XCONFIGURE_ARGS+=--with-vpx-dir=${LOCALBASE}
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "mbstring"
X.	if ${PORT_OPTIONS:MREGEX}
XLIB_DEPENDS+=	onig:${PORTSDIR}/devel/oniguruma4
XCONFIGURE_ARGS+=--with-onig=${LOCALBASE}
X.	else
XCONFIGURE_ARGS+=--disable-mbregex
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "mysql"
X.	if ${PORT_OPTIONS:MMYSQLND}
XCONFIGURE_ARGS+=--with-mysql=mysqlnd
X.	else
XCONFIGURE_ARGS+=--with-mysql=${LOCALBASE} \
X		--with-zlib-dir=/usr
X
XUSE_MYSQL=	yes
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "mysqli"
X.	if ${PORT_OPTIONS:MMYSQLND}
XCONFIGURE_ARGS+=--with-mysqli=mysqlnd
X.	else
XCONFIGURE_ARGS+=--with-mysqli=${LOCALBASE}/bin/mysql_config
X
XUSE_MYSQL=	yes
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "openssl" || ${PHP_MODNAME} == "sqlite3"
Xpost-extract:
X	@${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4
X.endif
X
X.if ${PHP_MODNAME} == "odbc"
X.	if ${PORT_OPTIONS:MIODBC}
XLIB_DEPENDS+=	iodbc:${PORTSDIR}/databases/libiodbc
X
XCONFIGURE_ARGS+=--with-iodbc=${LOCALBASE}
X.	else
XLIB_DEPENDS+=	odbc:${PORTSDIR}/databases/unixODBC
X
XCONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE}
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "pdo_dblib"
X.	if ${PORT_OPTIONS:MMSSQL}
XLIB_DEPENDS+=	sybdb:${PORTSDIR}/databases/freetds-msdblib
X.	else
XLIB_DEPENDS+=	ct:${PORTSDIR}/databases/freetds
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "pdo_odbc"
X.	if ${PORT_OPTIONS:MIODBC}
XLIB_DEPENDS+=	iodbc:${PORTSDIR}/databases/libiodbc
X
XCONFIGURE_ARGS+=--with-pdo-odbc=iODBC,${LOCALBASE}
X.	else
XLIB_DEPENDS+=	odbc:${PORTSDIR}/databases/unixODBC
X
XCONFIGURE_ARGS+=--with-pdo-odbc=unixODBC,${LOCALBASE}
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "pdo_mysql"
X.	if ${PORT_OPTIONS:MMYSQLND}
XCONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd
X
XUSE_PHP+=	mysql
X.	else
XCONFIGURE_ARGS+=--with-pdo-mysql=${LOCALBASE} \
X		--with-zlib-dir=/usr
X
XUSE_MYSQL=	yes
X.	endif
X.endif
X
X.if ${PHP_MODNAME} == "xml"
Xpost-extract:
X	@${MKDIR} ${WRKSRC}/ext/xml
X	@${CP} ${WRKSRC}/expat_compat.h ${WRKSRC}/ext/xml
X.endif
X
X.if ${PHP_MODNAME} == "zlib"
Xpost-extract:
X	@${MV} ${WRKSRC}/config0.m4 ${WRKSRC}/config.m4
X.endif
e21d76ebecde38d723aa89059c6a5919
echo x - php55-apache-mod/distinfo
sed 's/^X//' >php55-apache-mod/distinfo << 'ea3c338f51ba82d22e53b38f1eb38220'
XSHA256 (php-5.5.0.tar.bz2) = 29bb5ea45256f3983fab95af1f18d76dcc045565b2f175f11817069cefcf6cd1
XSIZE (php-5.5.0.tar.bz2) = 12256814
ea3c338f51ba82d22e53b38f1eb38220
echo x - php55-apache-mod/Makefile
sed 's/^X//' >php55-apache-mod/Makefile << '35d9d8fe90335e4158d59dfff3a69974'
X# $FreeBSD: 
X
XPORTNAME=	php55-apache-mod
XPORTVERSION=	5.5.0
XPORTREVISION?=	0
XCATEGORIES?=	lang devel www
XMASTER_SITES=	${MASTER_SITE_PHP}
XMASTER_SITE_SUBDIR=	distributions
XDISTNAME=	php-${PORTVERSION}
X
XMAINTAINER=	jessefrgsmith@yahoo.ca
XCOMMENT=	PHP Scripting Language with Apache module support
X
XLICENSE=	PHP301
X
XLATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
X
XUSE_BZIP2=	yes
XMAKE_JOBS_SAFE=	yes
XNO_OPTIONS_SORT=yes
X.if !defined(PKGNAMESUFFIX)
XUSE_AUTOTOOLS=	autoconf
X
XLIB_DEPENDS=	pcre:${PORTSDIR}/devel/pcre
X
XCONFIGURE_ARGS=	\
X		--with-layout=GNU \
X		--localstatedir=/var \
X		--with-config-file-scan-dir=${PREFIX}/etc/php \
X		--disable-all \
X		--enable-libxml \
X		--enable-mysqlnd \
X		--with-libxml-dir=${LOCALBASE} \
X		--with-pcre-regex=${LOCALBASE} \
X		--with-zlib-dir=/usr \
X		--program-prefix=""
X
XUSE_GNOME=	libxml2
X
XOPTIONS_DEFINE=	CLI CGI FPM APACHE AP2FILTER EMBED DEBUG DTRACE IPV6 MAILHEAD LINKTHR
XOPTIONS_DEFAULT=CLI CGI APACHE IPV6 LINKTHR
X
XCLI_DESC=	Build CLI version
XCGI_DESC=	Build CGI version
XFPM_DESC=	Build FPM version
XAPACHE_DESC=	Build Apache module
XAP2FILTER_DESC=	Use Apache 2.x filter interface (experimental)
XEMBED_DESC=	Build embedded library
XDEBUG_DESC=	Enable debug
XDTRACE_DESC=	Enable DTrace support
XIPV6_DESC=	Enable ipv6 support
XMAILHEAD_DESC=	Enable mail header patch
XLINKTHR_DESC=	Link thread lib (for threaded extensions)
X
XCONFLICTS=	php52-5* php53-5* php54-5* php5-5* php55
X
XMAN1=		php-config.1 phpize.1
X
X.include <bsd.port.pre.mk>
X
XPATCH_DIST_STRIP=	-p1
X
XPATCH_SITES+=	${MASTER_SITE_LOCAL}
XPATCH_SITE_SUBDIR=	ale
X
X.if ${PORT_OPTIONS:MMAILHEAD}
XPATCHFILES+=	php-5.5.x-mail-header.patch:mail
XPATCH_SITES+=	http://choon.net/opensource/php/:mail
X.endif
X
X.if ${PORT_OPTIONS:MCLI}
XPHP_SAPI+=	cli
XPLIST_SUB+=	CLI=""
XMAN1+=		php.1
X.else
XPLIST_SUB+=	CLI="@comment "
XCONFIGURE_ARGS+=--disable-cli
X.endif
X
X.if ${PORT_OPTIONS:MCGI}
XPHP_SAPI+=	cgi
XPLIST_SUB+=	CGI=""
X.else
XPLIST_SUB+=	CGI="@comment "
XCONFIGURE_ARGS+=--disable-cgi
X.endif
X
X.if ${PORT_OPTIONS:MFPM}
XPHP_SAPI+=	fpm
XMAN8+=		php-fpm.8
XUSE_RC_SUBR+=	php-fpm
XCONFIGURE_ARGS+=--enable-fpm \
X		--with-fpm-user=${WWWOWN} \
X		--with-fpm-group=${WWWGRP}
XPLIST_SUB+=	FPM=""
X.else
XPLIST_SUB+=	FPM="@comment "
X.endif
X
X.if ${PORT_OPTIONS:MAPACHE} && ${PORT_OPTIONS:MEMBED}
XIGNORE=		cannot be built with multiple SAPI (apache and embedded)
X.endif
X
X.if ${PORT_OPTIONS:MAPACHE}
XPHP_SAPI+=	mod
XUSE_APACHE=	22+
X.include "${PORTSDIR}/Mk/bsd.apache.mk"
X.if ${PORT_OPTIONS:MAP2FILTER}
XCONFIGURE_ARGS+=--with-apxs2filter=${APXS}
X.else
XCONFIGURE_ARGS+=--with-apxs2=${APXS}
X.endif
XPKGMESSAGE=	${PKGDIR}/pkg-message.mod
XMODULENAME=	libphp5
XSHORTMODNAME=	php5
XPLIST_SUB+=	APACHE=""
X.else
XPLIST_SUB+=	APACHE="@comment "
X.endif
X
X.if ${PORT_OPTIONS:MEMBED}
XPHP_SAPI+=	embed
XCONFIGURE_ARGS+=--enable-embed
XPLIST_SUB+=	EMBED=""
X.else
XPLIST_SUB+=	EMBED="@comment "
X.endif
X
X.if !defined(WITH_REGEX_TYPE) || ${WITH_REGEX_TYPE} == "php"
XCONFIGURE_ARGS+=--with-regex=php
X.elif defined(WITH_REGEX_TYPE) && ${WITH_REGEX_TYPE} == "system"
XCONFIGURE_ARGS+=--with-regex=system
X.endif
X
X.if !defined(WITH_ZEND_VM) || ${WITH_ZEND_VM} == "CALL"
XCONFIGURE_ARGS+=--with-zend-vm=CALL
X.elif defined(WITH_ZEND_VM) && ${WITH_ZEND_VM} == "SWITCH"
XCONFIGURE_ARGS+=--with-zend-vm=SWITCH
X.elif defined(WITH_ZEND_VM) && ${WITH_ZEND_VM} == "GOTO"
XCONFIGURE_ARGS+=--with-zend-vm=GOTO
X.endif
X
XCONFIGURE_ENV+=	ac_cv_pthreads_lib="" \
X		ac_cv_pthreads_cflags="" \
X		pthreads_working="yes" \
X		lt_cv_path_SED="sed"
X
X.if ${PORT_OPTIONS:MLINKTHR}
XCONFIGURE_ENV+=	LIBS="${LIBS} ${PTHREAD_LIBS}"
X.endif
X
X.if ${PORT_OPTIONS:MDEBUG}
XCONFIGURE_ARGS+=--enable-debug
X.endif
X
X.if ${PORT_OPTIONS:MDTRACE}
X.if ${OSVERSION} < 900000
XIGNORE=		cannot be built with DTrace support on FreeBSD < 9.x
X.endif
XCONFIGURE_ARGS+=--enable-dtrace
X.endif
X
X.if empty(PORT_OPTIONS:MIPV6)
XCONFIGURE_ARGS+=--disable-ipv6
X.endif
X
Xpost-patch:
X	@${TOUCH} ${WRKSRC}/ext/php_config.h
X	@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*
X.if ${PORT_OPTIONS:MFPM}
X	@${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
X		${WRKSRC}/sapi/fpm/php-fpm.conf.in
X.endif
X
X# Work around issues with newer (>=2.64) autoconf
Xpre-configure:
X	@${REINPLACE_CMD} -E 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \
X		${WRKSRC}/configure.in `${FIND} ${WRKSRC} -name '*.m4'`
X	@${RM} ${WRKSRC}/configure
X	@${CAT} ${WRKSRC}/acinclude.m4 ${WRKSRC}/build/libtool.m4 > ${WRKSRC}/aclocal.m4
X
Xpost-build:
X	@${ECHO_CMD} "PHP_VER=55" > ${WRKDIR}/php.conf
X	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
X	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
X	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
X
Xtest: build
X	@(cd ${WRKSRC} && ${MAKE} test)
X
Xpost-install:
X	@${INSTALL_DATA} ${WRKSRC}/php.ini-development ${PREFIX}/etc
X	@${INSTALL_DATA} ${WRKSRC}/php.ini-production ${PREFIX}/etc
X	@${INSTALL_DATA} ${WRKDIR}/php.conf ${PREFIX}/etc
X	@${TOUCH} ${PREFIX}/include/php/ext/php_config.h
X.if ${PORT_OPTIONS:MFPM}
X	@${CP} -n ${PREFIX}/etc/php-fpm.conf.default ${PREFIX}/etc/php-fpm.conf || ${TRUE}
X.endif
X.if ${PORT_OPTIONS:MAPACHE}
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.else
X.include "${MASTERDIR}/Makefile.ext"
X.endif
X.include <bsd.port.post.mk>
35d9d8fe90335e4158d59dfff3a69974
echo x - php55-apache-mod/pkg-descr
sed 's/^X//' >php55-apache-mod/pkg-descr << '4c890152e993c41d0a61a3ff462a0cb0'
XPHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open
XSource general-purpose scripting language that is especially suited for
XWeb development and can be embedded into HTML.  Its syntax draws upon C,
XJava, and Perl, and is easy to learn.  The main goal of the language is to
Xallow web developers to write dynamically generated webpages quickly, but
Xyou can do much more with PHP.
X
XThis port includes Apache support on top of vanilla PHP.
X
XWWW: http://www.php.net/
4c890152e993c41d0a61a3ff462a0cb0
echo x - php55-apache-mod/pkg-message.mod
sed 's/^X//' >php55-apache-mod/pkg-message.mod << 'f22f9c8b944a0e6e3db3ab7c2e91b7e5'
X***************************************************************
X
XMake sure index.php is part of your DirectoryIndex.
X
XYou should add the following to your Apache configuration file:
X
XAddType application/x-httpd-php .php
XAddType application/x-httpd-php-source .phps
X
X***************************************************************
f22f9c8b944a0e6e3db3ab7c2e91b7e5
echo x - php55-apache-mod/pkg-plist
sed 's/^X//' >php55-apache-mod/pkg-plist << '81e3505ea44188081a23e33ce3bfc90a'
X%%CLI%%bin/php
X%%CGI%%bin/php-cgi
Xbin/php-config
Xbin/phpize
X%%FPM%%sbin/php-fpm
Xetc/php.conf
Xetc/php.ini-development
Xetc/php.ini-production
X%%FPM%%@unexec if cmp -s %D/etc/php-fpm.conf %D/etc/php-fpm.conf.default; then rm -f %D/etc/php-fpm.conf; fi
X%%FPM%%etc/php-fpm.conf.default
X%%FPM%%@exec cp -n %D/%F %B/php-fpm.conf
Xinclude/php/TSRM/TSRM.h
Xinclude/php/TSRM/readdir.h
Xinclude/php/TSRM/tsrm_config.h
Xinclude/php/TSRM/tsrm_config.w32.h
Xinclude/php/TSRM/tsrm_config_common.h
Xinclude/php/TSRM/tsrm_nw.h
Xinclude/php/TSRM/tsrm_strtok_r.h
Xinclude/php/TSRM/tsrm_virtual_cwd.h
Xinclude/php/TSRM/tsrm_win32.h
Xinclude/php/Zend/zend.h
Xinclude/php/Zend/zend_API.h
Xinclude/php/Zend/zend_alloc.h
Xinclude/php/Zend/zend_build.h
Xinclude/php/Zend/zend_builtin_functions.h
Xinclude/php/Zend/zend_closures.h
Xinclude/php/Zend/zend_compile.h
Xinclude/php/Zend/zend_config.h
Xinclude/php/Zend/zend_config.nw.h
Xinclude/php/Zend/zend_config.w32.h
Xinclude/php/Zend/zend_constants.h
Xinclude/php/Zend/zend_dtrace.h
Xinclude/php/Zend/zend_dynamic_array.h
Xinclude/php/Zend/zend_errors.h
Xinclude/php/Zend/zend_exceptions.h
Xinclude/php/Zend/zend_execute.h
Xinclude/php/Zend/zend_extensions.h
Xinclude/php/Zend/zend_float.h
Xinclude/php/Zend/zend_gc.h
Xinclude/php/Zend/zend_generators.h
Xinclude/php/Zend/zend_globals.h
Xinclude/php/Zend/zend_globals_macros.h
Xinclude/php/Zend/zend_hash.h
Xinclude/php/Zend/zend_highlight.h
Xinclude/php/Zend/zend_indent.h
Xinclude/php/Zend/zend_ini.h
Xinclude/php/Zend/zend_ini_parser.h
Xinclude/php/Zend/zend_ini_scanner.h
Xinclude/php/Zend/zend_ini_scanner_defs.h
Xinclude/php/Zend/zend_interfaces.h
Xinclude/php/Zend/zend_istdiostream.h
Xinclude/php/Zend/zend_iterators.h
Xinclude/php/Zend/zend_language_parser.h
Xinclude/php/Zend/zend_language_scanner.h
Xinclude/php/Zend/zend_language_scanner_defs.h
Xinclude/php/Zend/zend_list.h
Xinclude/php/Zend/zend_llist.h
Xinclude/php/Zend/zend_modules.h
Xinclude/php/Zend/zend_multibyte.h
Xinclude/php/Zend/zend_multiply.h
Xinclude/php/Zend/zend_object_handlers.h
Xinclude/php/Zend/zend_objects.h
Xinclude/php/Zend/zend_objects_API.h
Xinclude/php/Zend/zend_operators.h
Xinclude/php/Zend/zend_ptr_stack.h
Xinclude/php/Zend/zend_qsort.h
Xinclude/php/Zend/zend_signal.h
Xinclude/php/Zend/zend_stack.h
Xinclude/php/Zend/zend_static_allocator.h
Xinclude/php/Zend/zend_stream.h
Xinclude/php/Zend/zend_string.h
Xinclude/php/Zend/zend_strtod.h
Xinclude/php/Zend/zend_ts_hash.h
Xinclude/php/Zend/zend_types.h
Xinclude/php/Zend/zend_variables.h
Xinclude/php/Zend/zend_vm.h
Xinclude/php/Zend/zend_vm_def.h
Xinclude/php/Zend/zend_vm_execute.h
Xinclude/php/Zend/zend_vm_opcodes.h
Xinclude/php/ext/date/lib/timelib.h
Xinclude/php/ext/date/lib/timelib_config.h
Xinclude/php/ext/date/lib/timelib_structs.h
Xinclude/php/ext/date/php_date.h
Xinclude/php/ext/ereg/php_ereg.h
Xinclude/php/ext/ereg/php_regex.h
Xinclude/php/ext/ereg/regex/cclass.h
Xinclude/php/ext/ereg/regex/cname.h
Xinclude/php/ext/ereg/regex/regex.h
Xinclude/php/ext/ereg/regex/regex2.h
Xinclude/php/ext/ereg/regex/utils.h
Xinclude/php/ext/libxml/php_libxml.h
Xinclude/php/ext/mysqlnd/config-win.h
Xinclude/php/ext/mysqlnd/mysqlnd.h
Xinclude/php/ext/mysqlnd/mysqlnd_alloc.h
Xinclude/php/ext/mysqlnd/mysqlnd_block_alloc.h
Xinclude/php/ext/mysqlnd/mysqlnd_charset.h
Xinclude/php/ext/mysqlnd/mysqlnd_debug.h
Xinclude/php/ext/mysqlnd/mysqlnd_enum_n_def.h
Xinclude/php/ext/mysqlnd/mysqlnd_ext_plugin.h
Xinclude/php/ext/mysqlnd/mysqlnd_libmysql_compat.h
Xinclude/php/ext/mysqlnd/mysqlnd_net.h
Xinclude/php/ext/mysqlnd/mysqlnd_portability.h
Xinclude/php/ext/mysqlnd/mysqlnd_priv.h
Xinclude/php/ext/mysqlnd/mysqlnd_result.h
Xinclude/php/ext/mysqlnd/mysqlnd_result_meta.h
Xinclude/php/ext/mysqlnd/mysqlnd_reverse_api.h
Xinclude/php/ext/mysqlnd/mysqlnd_statistics.h
Xinclude/php/ext/mysqlnd/mysqlnd_structs.h
Xinclude/php/ext/mysqlnd/mysqlnd_wireprotocol.h
Xinclude/php/ext/mysqlnd/php_mysqlnd.h
Xinclude/php/ext/mysqlnd/php_mysqlnd_config.h
Xinclude/php/ext/pcre/php_pcre.h
Xinclude/php/ext/spl/php_spl.h
Xinclude/php/ext/spl/spl_array.h
Xinclude/php/ext/spl/spl_directory.h
Xinclude/php/ext/spl/spl_dllist.h
Xinclude/php/ext/spl/spl_engine.h
Xinclude/php/ext/spl/spl_exceptions.h
Xinclude/php/ext/spl/spl_fixedarray.h
Xinclude/php/ext/spl/spl_functions.h
Xinclude/php/ext/spl/spl_heap.h
Xinclude/php/ext/spl/spl_iterators.h
Xinclude/php/ext/spl/spl_observer.h
Xinclude/php/ext/standard/base64.h
Xinclude/php/ext/standard/basic_functions.h
Xinclude/php/ext/standard/crc32.h
Xinclude/php/ext/standard/credits.h
Xinclude/php/ext/standard/credits_ext.h
Xinclude/php/ext/standard/credits_sapi.h
Xinclude/php/ext/standard/crypt_blowfish.h
Xinclude/php/ext/standard/crypt_freesec.h
Xinclude/php/ext/standard/css.h
Xinclude/php/ext/standard/cyr_convert.h
Xinclude/php/ext/standard/datetime.h
Xinclude/php/ext/standard/dl.h
Xinclude/php/ext/standard/exec.h
Xinclude/php/ext/standard/file.h
Xinclude/php/ext/standard/flock_compat.h
Xinclude/php/ext/standard/fsock.h
Xinclude/php/ext/standard/head.h
Xinclude/php/ext/standard/html.h
Xinclude/php/ext/standard/html_tables.h
Xinclude/php/ext/standard/info.h
Xinclude/php/ext/standard/md5.h
Xinclude/php/ext/standard/microtime.h
Xinclude/php/ext/standard/pack.h
Xinclude/php/ext/standard/pageinfo.h
Xinclude/php/ext/standard/php_array.h
Xinclude/php/ext/standard/php_assert.h
Xinclude/php/ext/standard/php_browscap.h
Xinclude/php/ext/standard/php_crypt.h
Xinclude/php/ext/standard/php_crypt_r.h
Xinclude/php/ext/standard/php_dir.h
Xinclude/php/ext/standard/php_dns.h
Xinclude/php/ext/standard/php_ext_syslog.h
Xinclude/php/ext/standard/php_filestat.h
Xinclude/php/ext/standard/php_fopen_wrappers.h
Xinclude/php/ext/standard/php_ftok.h
Xinclude/php/ext/standard/php_http.h
Xinclude/php/ext/standard/php_image.h
Xinclude/php/ext/standard/php_incomplete_class.h
Xinclude/php/ext/standard/php_iptc.h
Xinclude/php/ext/standard/php_lcg.h
Xinclude/php/ext/standard/php_link.h
Xinclude/php/ext/standard/php_mail.h
Xinclude/php/ext/standard/php_math.h
Xinclude/php/ext/standard/php_metaphone.h
Xinclude/php/ext/standard/php_password.h
Xinclude/php/ext/standard/php_rand.h
Xinclude/php/ext/standard/php_smart_str.h
Xinclude/php/ext/standard/php_smart_str_public.h
Xinclude/php/ext/standard/php_standard.h
Xinclude/php/ext/standard/php_string.h
Xinclude/php/ext/standard/php_type.h
Xinclude/php/ext/standard/php_uuencode.h
Xinclude/php/ext/standard/php_var.h
Xinclude/php/ext/standard/php_versioning.h
Xinclude/php/ext/standard/proc_open.h
Xinclude/php/ext/standard/quot_print.h
Xinclude/php/ext/standard/scanf.h
Xinclude/php/ext/standard/sha1.h
Xinclude/php/ext/standard/streamsfuncs.h
Xinclude/php/ext/standard/uniqid.h
Xinclude/php/ext/standard/url.h
Xinclude/php/ext/standard/url_scanner_ex.h
Xinclude/php/ext/standard/winver.h
X@exec touch %D/include/php/ext/php_config.h
X@unexec [ -s %D/include/php/ext/php_config.h ] || rm %D/include/php/ext/php_config.h
Xinclude/php/main/SAPI.h
Xinclude/php/main/build-defs.h
Xinclude/php/main/fopen_wrappers.h
Xinclude/php/main/php.h
Xinclude/php/main/php_compat.h
Xinclude/php/main/php_config.h
Xinclude/php/main/php_content_types.h
Xinclude/php/main/php_getopt.h
Xinclude/php/main/php_globals.h
Xinclude/php/main/php_ini.h
Xinclude/php/main/php_main.h
Xinclude/php/main/php_memory_streams.h
Xinclude/php/main/php_network.h
Xinclude/php/main/php_open_temporary_file.h
Xinclude/php/main/php_output.h
Xinclude/php/main/php_reentrancy.h
Xinclude/php/main/php_scandir.h
Xinclude/php/main/php_streams.h
Xinclude/php/main/php_syslog.h
Xinclude/php/main/php_ticks.h
Xinclude/php/main/php_variables.h
Xinclude/php/main/php_version.h
Xinclude/php/main/rfc1867.h
Xinclude/php/main/snprintf.h
Xinclude/php/main/spprintf.h
Xinclude/php/main/streams/php_stream_context.h
Xinclude/php/main/streams/php_stream_filter_api.h
Xinclude/php/main/streams/php_stream_glob_wrapper.h
Xinclude/php/main/streams/php_stream_mmap.h
Xinclude/php/main/streams/php_streams_int.h
Xinclude/php/main/streams/php_stream_transport.h
Xinclude/php/main/streams/php_stream_userspace.h
Xinclude/php/main/streams/php_stream_plain_wrapper.h
X%%CLI%%include/php/sapi/cli/cli.h
X%%EMBED%%include/php/sapi/embed/php_embed.h
Xinclude/php/main/win32_internal_function_disabled.h
Xinclude/php/main/win95nt.h
X%%EMBED%%lib/libphp5.so
Xlib/php/build/Makefile.global
Xlib/php/build/acinclude.m4
Xlib/php/build/config.guess
Xlib/php/build/config.sub
Xlib/php/build/libtool.m4
Xlib/php/build/ltmain.sh
Xlib/php/build/mkdep.awk
Xlib/php/build/phpize.m4
Xlib/php/build/run-tests.php
Xlib/php/build/scan_makefile_in.awk
Xlib/php/build/shtool
X%%APACHE%%%%APACHEMODDIR%%/%%AP_MODULE%%
X%%APACHE%%@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %f
X%%APACHE%%@unexec %D/sbin/apxs -e -A -n %%AP_NAME%% %f
X%%FPM%%share/php/fpm/status.html
X@dirrm include/php/TSRM
X@dirrm include/php/Zend
X@dirrm include/php/ext/date/lib
X@dirrm include/php/ext/date
X@dirrm include/php/ext/ereg/regex
X@dirrm include/php/ext/ereg
X@dirrm include/php/ext/libxml
X@dirrm include/php/ext/mysqlnd
X@dirrm include/php/ext/pcre
X@dirrm include/php/ext/spl
X@dirrm include/php/ext/standard
X@dirrmtry include/php/ext
X@dirrm include/php/main/streams
X@dirrm include/php/main
X@dirrm include/php/sapi/cli
X%%EMBED%%@dirrm include/php/sapi/embed
X@dirrm include/php/sapi
X@dirrmtry include/php
X@dirrm lib/php/build
X@dirrmtry lib/php
X%%FPM%%@dirrm share/php/fpm
X%%FPM%%@dirrm share/php
81e3505ea44188081a23e33ce3bfc90a
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307011721.r61HLE5u077760>