View | Details | Raw Unified | Return to bug 210323 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/Uses/php.mk (-93 / +96 lines)
Lines 1-15 Link Here
1
#
2
# bsd.php.mk - Support for PHP-based ports.
3
#
4
# Created by: Alex Dupre <ale@FreeBSD.org>
5
#
6
# For FreeBSD committers:
7
# Please send all suggested changes to the maintainer instead of committing
8
# them to SVN yourself.
9
#
10
# $FreeBSD$
1
# $FreeBSD$
11
#
2
#
12
# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.
3
# Support for PHP-based ports.
4
#
5
# Feature:	php
6
# Usage:	USES=php
7
# Valid ARGS:	(none)
8
#
13
# If the port requires a predefined set of PHP extensions, they can be
9
# If the port requires a predefined set of PHP extensions, they can be
14
# listed in this way:
10
# listed in this way:
15
#
11
#
Lines 35-159 Link Here
35
# If you are building PHP-based ports in poudriere(8) with ZTS enabled,
31
# If you are building PHP-based ports in poudriere(8) with ZTS enabled,
36
# add WITH_MPM=event to /etc/make.conf to prevent build failures.
32
# add WITH_MPM=event to /etc/make.conf to prevent build failures.
37
33
38
.if !defined(_PHPMKINCLUDED)
34
.if !defined(_INCLUDE_USES_PHP_MK)
39
35
40
PHP_Include_MAINTAINER=	ale@FreeBSD.org
36
PHP_Include_MAINTAINER=	ale@FreeBSD.org
41
37
42
_PHPMKINCLUDED=	yes
38
_INCLUDE_USES_PHP_MK=	yes
43
39
44
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
40
.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
45
41
46
.if defined(DEFAULT_PHP_VER)
42
.  if defined(DEFAULT_PHP_VER)
47
WARNING+=	"DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead"
43
WARNING+=	"DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead"
48
.endif
44
.  endif
49
45
50
PHPBASE?=	${LOCALBASE}
46
PHPBASE?=	${LOCALBASE}
51
.if exists(${PHPBASE}/etc/php.conf)
47
.  if exists(${PHPBASE}/etc/php.conf)
52
.include "${PHPBASE}/etc/php.conf"
48
.include "${PHPBASE}/etc/php.conf"
49
.    if !defined(PHP_EXT_DIR)
53
PHP_EXT_DIR!=	${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p'
50
PHP_EXT_DIR!=	${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p'
54
51
.    endif
55
.else
52
.  else
56
DEFAULT_PHP_VER?=	${PHP_DEFAULT:S/.//}
53
DEFAULT_PHP_VER?=	${PHP_DEFAULT:S/.//}
57
54
58
# When adding a version, please keep the comment in
55
# When adding a version, please keep the comment in
59
# Mk/bsd.default-versions.mk in sync.
56
# Mk/bsd.default-versions.mk in sync.
60
PHP_VER?=	${DEFAULT_PHP_VER}
57
PHP_VER?=	${DEFAULT_PHP_VER}
61
.if ${PHP_VER} == 70
58
.    if ${PHP_VER} == 70
62
PHP_EXT_DIR=   20151012
59
PHP_EXT_DIR=   20151012
63
PHP_EXT_INC=    pcre spl
60
PHP_EXT_INC=    pcre spl
64
.elif ${PHP_VER} == 56
61
.    elif ${PHP_VER} == 56
65
PHP_EXT_DIR=	20131226
62
PHP_EXT_DIR=	20131226
66
PHP_EXT_INC=	pcre spl
63
PHP_EXT_INC=	pcre spl
67
.elif ${PHP_VER} == 55
64
.    elif ${PHP_VER} == 55
68
PHP_EXT_DIR=	20121212
65
PHP_EXT_DIR=	20121212
69
PHP_EXT_INC=	pcre spl
66
PHP_EXT_INC=	pcre spl
70
.else
67
.    else
71
# (rene) default to DEFAULT_VERSIONS
68
# (rene) default to DEFAULT_VERSIONS
72
PHP_EXT_DIR=	20131226
69
PHP_EXT_DIR=	20131226
73
PHP_EXT_INC=	pcre spl
70
PHP_EXT_INC=	pcre spl
74
.endif
71
.    endif
75
72
76
HTTPD?=		${LOCALBASE}/sbin/httpd
73
HTTPD?=		${LOCALBASE}/sbin/httpd
77
.if exists(${HTTPD})
74
.    if exists(${HTTPD})
78
APACHE_THR!=	${HTTPD} -V | ${GREP} threaded
75
APACHE_THR!=	${HTTPD} -V | ${GREP} threaded
79
.	if ${APACHE_THR:Myes}
76
.      if ${APACHE_THR:Myes}
80
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
77
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
81
.	endif
78
.      endif
82
.elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "")
79
.    elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "")
83
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
80
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
84
.elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event")
81
.    elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event")
85
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
82
PHP_EXT_DIR:=	${PHP_EXT_DIR}-zts
86
.endif
83
.    endif
87
84
88
.if defined(WITH_DEBUG)
85
.    if defined(WITH_DEBUG)
89
PHP_EXT_DIR:=	${PHP_EXT_DIR}-debug
86
PHP_EXT_DIR:=	${PHP_EXT_DIR}-debug
90
.endif
87
.    endif
91
PHP_SAPI?=	""
88
PHP_SAPI?=	""
92
.endif	# .if exists(${PHPBASE}/etc/php.conf)
89
.  endif	# .if exists(${PHPBASE}/etc/php.conf)
93
PHP_EXT_INC?=	""
90
PHP_EXT_INC?=	""
94
91
95
.if defined(IGNORE_WITH_PHP)
92
.  if defined(IGNORE_WITH_PHP)
96
.	for VER in ${IGNORE_WITH_PHP}
93
.    for VER in ${IGNORE_WITH_PHP}
97
.		if ${PHP_VER} == "${VER}"
94
.      if ${PHP_VER} == "${VER}"
98
IGNORE=		cannot be installed: doesn't work with lang/php${PHP_VER} port\
95
IGNORE=		cannot be installed: doesn't work with lang/php${PHP_VER} port\
99
		(doesn't support PHP ${IGNORE_WITH_PHP:C/^5/5./})
96
		(doesn't support PHP ${IGNORE_WITH_PHP:C/^5/5./})
100
.		endif
97
.      endif
101
.	endfor
98
.    endfor
102
.endif
99
.  endif
103
100
104
.if defined(WANT_PHP_WEB)
101
.  if defined(WANT_PHP_WEB)
105
.	if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
102
.    if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
106
check-makevars::
103
check-makevars::
107
		@${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI"
104
		@${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI"
108
		@${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them."
105
		@${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them."
109
		@${FALSE}
106
		@${FALSE}
110
.	endif
107
.    endif
111
.endif
108
.  endif
112
109
113
.if defined(WANT_PHP_CGI)
110
.  if defined(WANT_PHP_CGI)
114
.	if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == ""
111
.    if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == ""
115
check-makevars::
112
check-makevars::
116
		@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
113
		@${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
117
		@${ECHO_CMD} "installed a PHP port without CGI."
114
		@${ECHO_CMD} "installed a PHP port without CGI."
118
		@${FALSE}
115
		@${FALSE}
119
.	endif
116
.    endif
120
.endif
117
.  endif
121
118
122
.if defined(WANT_PHP_CLI)
119
.  if defined(WANT_PHP_CLI)
123
.	if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
120
.    if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
124
check-makevars::
121
check-makevars::
125
		@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
122
		@${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
126
		@${ECHO_CMD} "installed a PHP port without CLI."
123
		@${ECHO_CMD} "installed a PHP port without CLI."
127
		@${FALSE}
124
		@${FALSE}
128
.	endif
125
.    endif
129
.endif
126
.  endif
130
127
131
.if defined(WANT_PHP_EMB)
128
.  if defined(WANT_PHP_EMB)
132
.	if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == ""
129
.    if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == ""
133
check-makevars::
130
check-makevars::
134
		@${ECHO_CMD} "This port requires the embedded library version of PHP, but you have already"
131
		@${ECHO_CMD} "This port requires the embedded library version of PHP, but you have already"
135
		@${ECHO_CMD} "installed a PHP port without the embedded library."
132
		@${ECHO_CMD} "installed a PHP port without the embedded library."
136
		@${FALSE}
133
		@${FALSE}
137
.	endif
134
.    endif
138
.endif
135
.  endif
139
136
140
PHP_PORT?=	lang/php${PHP_VER}
137
PHP_PORT?=	lang/php${PHP_VER}
141
MOD_PHP_PORT?=	www/mod_php${PHP_VER}
138
MOD_PHP_PORT?=	www/mod_php${PHP_VER}
142
139
143
.if defined(USE_PHP_BUILD)
140
.  if defined(USE_PHP_BUILD)
144
BUILD_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
141
BUILD_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
145
.endif
142
.  endif
146
RUN_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
143
RUN_DEPENDS+=	${PHPBASE}/include/php/main/php.h:${PHP_PORT}
147
.if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
144
.  if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
148
USE_APACHE_RUN=	22+
145
USE_APACHE_RUN=	22+
149
.include "${PORTSDIR}/Mk/bsd.apache.mk"
146
.include "${PORTSDIR}/Mk/bsd.apache.mk"
150
RUN_DEPENDS+=	${PHPBASE}/${APACHEMODDIR}/libphp5.so:${MOD_PHP_PORT}
147
RUN_DEPENDS+=	${PHPBASE}/${APACHEMODDIR}/libphp5.so:${MOD_PHP_PORT}
151
.endif
148
.  endif
152
149
153
PLIST_SUB+=	PHP_EXT_DIR=${PHP_EXT_DIR}
150
PLIST_SUB+=	PHP_EXT_DIR=${PHP_EXT_DIR}
154
SUB_LIST+=	PHP_EXT_DIR=${PHP_EXT_DIR}
151
SUB_LIST+=	PHP_EXT_DIR=${PHP_EXT_DIR}
155
152
156
.if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT)
153
.  if defined(USE_PHPIZE) || defined(USE_PHPEXT) || defined(USE_ZENDEXT)
157
BUILD_DEPENDS+=	${PHPBASE}/bin/phpize:${PHP_PORT}
154
BUILD_DEPENDS+=	${PHPBASE}/bin/phpize:${PHP_PORT}
158
GNU_CONFIGURE=	yes
155
GNU_CONFIGURE=	yes
159
USE_AUTOTOOLS+=	autoconf:env
156
USE_AUTOTOOLS+=	autoconf:env
Lines 166-176 phpize-message: Link Here
166
163
167
do-phpize:
164
do-phpize:
168
	@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize)
165
	@(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize)
169
.endif
166
.  endif
170
167
168
_USES_POST+=php
171
.endif
169
.endif
172
170
173
.if defined(_POSTMKINCLUDED) && (defined(USE_PHPEXT) || defined(USE_ZENDEXT))
171
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PHP_POST_MK)
172
173
_INCLUDE_USES_PHP_POST_MK=yes
174
175
.  if (defined(USE_PHPEXT) || defined(USE_ZENDEXT))
174
PHP_MODNAME?=	${PORTNAME}
176
PHP_MODNAME?=	${PORTNAME}
175
PHP_HEADER_DIRS?=	""
177
PHP_HEADER_DIRS?=	""
176
178
Lines 178-188 do-install: Link Here
178
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
180
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
179
	@${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \
181
	@${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \
180
		${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
182
		${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
181
.	for header in . ${PHP_HEADER_DIRS}
183
.    for header in . ${PHP_HEADER_DIRS}
182
		@${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
184
		@${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
183
		@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
185
		@${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
184
			${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
186
			${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
185
.	endfor
187
.    endfor
186
	@${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
188
	@${RM} -f ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
187
	@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
189
	@${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
188
		> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
190
		> ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
Lines 204-225 add-plist-phpext: Link Here
204
		>> ${TMPPLIST}
206
		>> ${TMPPLIST}
205
	@${ECHO_CMD} "@dir etc/php" \
207
	@${ECHO_CMD} "@dir etc/php" \
206
		>> ${TMPPLIST}
208
		>> ${TMPPLIST}
207
.if defined(USE_ZENDEXT)
209
.    if defined(USE_ZENDEXT)
208
	@${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
210
	@${ECHO_CMD} "@exec echo zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
209
		>> ${TMPPLIST}
211
		>> ${TMPPLIST}
210
.else
212
.    else
211
	@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
213
	@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
212
		>> ${TMPPLIST}
214
		>> ${TMPPLIST}
213
.endif
215
.    endif
214
	@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
216
	@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
215
		>> ${TMPPLIST}
217
		>> ${TMPPLIST}
216
.if defined(USE_ZENDEXT)
218
.    if defined(USE_ZENDEXT)
217
	@${ECHO_CMD} "@unexec grep -v zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
219
	@${ECHO_CMD} "@unexec grep -v zend_extension=%D/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
218
		>> ${TMPPLIST}
220
		>> ${TMPPLIST}
219
.else
221
.    else
220
	@${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
222
	@${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
221
		>> ${TMPPLIST}
223
		>> ${TMPPLIST}
222
.endif
224
.    endif
223
	@${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \
225
	@${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \
224
		>> ${TMPPLIST}
226
		>> ${TMPPLIST}
225
	@${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \
227
	@${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \
Lines 233-249 php-ini: Link Here
233
	@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
235
	@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
234
	@${ECHO_CMD} "configuration file to automatically load the installed extension:"
236
	@${ECHO_CMD} "configuration file to automatically load the installed extension:"
235
	@${ECHO_CMD} ""
237
	@${ECHO_CMD} ""
236
.if defined(USE_ZENDEXT)
238
.    if defined(USE_ZENDEXT)
237
	@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so"
239
	@${ECHO_CMD} "zend_extension=${PREFIX}/lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so"
238
.else
240
.    else
239
	@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
241
	@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
240
.endif
242
.    endif
241
	@${ECHO_CMD} ""
243
	@${ECHO_CMD} ""
242
	@${ECHO_CMD} "****************************************************************************"
244
	@${ECHO_CMD} "****************************************************************************"
243
.endif
245
.  endif
244
246
245
# Extensions
247
# Extensions
246
.if defined(_POSTMKINCLUDED) && ${USE_PHP:tl} != "yes"
248
.  if ${USE_PHP:tl} != "yes"
247
# non-version specific components
249
# non-version specific components
248
_USE_PHP_ALL=	apc bcmath bitset bz2 calendar ctype curl dba dom \
250
_USE_PHP_ALL=	apc bcmath bitset bz2 calendar ctype curl dba dom \
249
		exif fileinfo filter ftp gd gettext gmp \
251
		exif fileinfo filter ftp gd gettext gmp \
Lines 261-271 _USE_PHP_VER70= ${_USE_PHP_ALL} Link Here
261
263
262
apc_DEPENDS=	www/pecl-APC
264
apc_DEPENDS=	www/pecl-APC
263
bcmath_DEPENDS=	math/php${PHP_VER}-bcmath
265
bcmath_DEPENDS=	math/php${PHP_VER}-bcmath
264
.if ${PHP_VER} == 70
266
.    if ${PHP_VER} == 70
265
bitset_DEPENDS=	math/pecl-bitset
267
bitset_DEPENDS=	math/pecl-bitset
266
.else
268
.    else
267
bitset_DEPENDS=	math/pecl-bitset2
269
bitset_DEPENDS=	math/pecl-bitset2
268
.endif
270
.    endif
269
bz2_DEPENDS=	archivers/php${PHP_VER}-bz2
271
bz2_DEPENDS=	archivers/php${PHP_VER}-bz2
270
calendar_DEPENDS=	misc/php${PHP_VER}-calendar
272
calendar_DEPENDS=	misc/php${PHP_VER}-calendar
271
ctype_DEPENDS=	textproc/php${PHP_VER}-ctype
273
ctype_DEPENDS=	textproc/php${PHP_VER}-ctype
Lines 285-295 iconv_DEPENDS= converters/php${PHP_VER}-iconv Link Here
285
igbinary_DEPENDS=	converters/pecl-igbinary
287
igbinary_DEPENDS=	converters/pecl-igbinary
286
imap_DEPENDS=	mail/php${PHP_VER}-imap
288
imap_DEPENDS=	mail/php${PHP_VER}-imap
287
interbase_DEPENDS=	databases/php${PHP_VER}-interbase
289
interbase_DEPENDS=	databases/php${PHP_VER}-interbase
288
.if ${PHP_VER} == 70
290
.    if ${PHP_VER} == 70
289
intl_DEPENDS=	devel/php${PHP_VER}-intl
291
intl_DEPENDS=	devel/php${PHP_VER}-intl
290
.else
292
.    else
291
intl_DEPENDS=	devel/pecl-intl
293
intl_DEPENDS=	devel/pecl-intl
292
.endif
294
.    endif
293
json_DEPENDS=	devel/php${PHP_VER}-json
295
json_DEPENDS=	devel/php${PHP_VER}-json
294
ldap_DEPENDS=	net/php${PHP_VER}-ldap
296
ldap_DEPENDS=	net/php${PHP_VER}-ldap
295
mbstring_DEPENDS=	converters/php${PHP_VER}-mbstring
297
mbstring_DEPENDS=	converters/php${PHP_VER}-mbstring
Lines 344-369 xsl_DEPENDS= textproc/php${PHP_VER}-xsl Link Here
344
zip_DEPENDS=	archivers/php${PHP_VER}-zip
346
zip_DEPENDS=	archivers/php${PHP_VER}-zip
345
zlib_DEPENDS=	archivers/php${PHP_VER}-zlib
347
zlib_DEPENDS=	archivers/php${PHP_VER}-zlib
346
348
347
.	for extension in ${USE_PHP}
349
.    for extension in ${USE_PHP}
348
.		if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
350
.      if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
349
.			if ${PHP_EXT_INC:M${extension}} == ""
351
.        if ${PHP_EXT_INC:M${extension}} == ""
350
.				if defined(USE_PHP_BUILD)
352
.          if defined(USE_PHP_BUILD)
351
BUILD_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
353
BUILD_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
352
.				endif
354
.          endif
353
RUN_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
355
RUN_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${${extension}_DEPENDS}
354
.			endif
356
.        endif
355
.		else
357
.      else
356
ext=		${extension}
358
ext=		${extension}
357
.			if ${ext} == "mhash"
359
.        if ${ext} == "mhash"
358
.				if defined(USE_PHP_BUILD)
360
.          if defined(USE_PHP_BUILD)
359
BUILD_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
361
BUILD_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
360
.				endif
362
.          endif
361
RUN_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
363
RUN_DEPENDS+=	${PHPBASE}/lib/php/${PHP_EXT_DIR}/hash.so:${hash_DEPENDS}
362
.			elif ${ext:tl} != "yes"
364
.        elif ${ext:tl} != "yes"
363
check-makevars::
365
check-makevars::
364
			@${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
366
			@${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
365
			@${FALSE}
367
			@${FALSE}
366
.			endif
368
.        endif
367
.		endif
369
.      endif
368
.	endfor
370
.    endfor
371
.  endif
369
.endif
372
.endif
(-)Mk/bsd.port.mk (-4 / +6 lines)
Lines 1359-1366 PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg Link Here
1359
.include "${PORTSDIR}/Mk/bsd.emacs.mk"
1359
.include "${PORTSDIR}/Mk/bsd.emacs.mk"
1360
.endif
1360
.endif
1361
1361
1362
.if defined(USE_PHP)
1362
.if defined(USE_PHP) && !${USES:Mphp}
1363
.include "${PORTSDIR}/Mk/bsd.php.mk"
1363
DEV_WARNING+=		"Using USE_PHP alone is deprecated, please use USES=php"
1364
USES+=	php
1364
.endif
1365
.endif
1365
1366
1366
.if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL)
1367
.if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL)
Lines 1920-1927 _FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ Link Here
1920
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
1921
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
1921
.endif
1922
.endif
1922
1923
1923
.if defined(USE_PHP)
1924
.if defined(USE_PHP) && !${USES:Mphp}
1924
.include "${PORTSDIR}/Mk/bsd.php.mk"
1925
DEV_WARNING+=		"Using USE_PHP alone is deprecated, please use USES=php"
1926
_USES_POST+=	php
1925
.endif
1927
.endif
1926
1928
1927
.if defined(USE_WX) || defined(USE_WX_NOT)
1929
.if defined(USE_WX) || defined(USE_WX_NOT)
(-)lang/php55/Makefile (+2 lines)
Lines 185-190 post-build: Link Here
185
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
185
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
186
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
186
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
187
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
187
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
188
	@${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf
189
	@${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^/usr/local/lib/php/\(.*\),\1,p' >> ${WRKDIR}/php.conf
188
190
189
test: build
191
test: build
190
	@(cd ${WRKSRC} && ${MAKE} test)
192
	@(cd ${WRKSRC} && ${MAKE} test)
(-)lang/php56/Makefile (+2 lines)
Lines 188-193 post-build: Link Here
188
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
188
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
189
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
189
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
190
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
190
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
191
	@${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf
192
	@${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^${PREFIX}/lib/php/,,p' >> ${WRKDIR}/php.conf
191
193
192
test: build
194
test: build
193
	@(cd ${WRKSRC} && ${MAKE} test)
195
	@(cd ${WRKSRC} && ${MAKE} test)
(-)lang/php70/Makefile (+2 lines)
Lines 182-187 post-build: Link Here
182
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
182
	@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
183
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
183
	@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
184
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
184
	@${ECHO_CMD} "PHP_EXT_INC=pcre spl" >> ${WRKDIR}/php.conf
185
	@${ECHO_CMD} -n "PHP_EXT_DIR=" >> ${WRKDIR}/php.conf
186
	@${SH} ${WRKSRC}/scripts/php-config --extension-dir | sed -ne 's,^/usr/local/lib/php/\(.*\),\1,p' >> ${WRKDIR}/php.conf
185
187
186
test: build
188
test: build
187
	@(cd ${WRKSRC} && ${MAKE} test)
189
	@(cd ${WRKSRC} && ${MAKE} test)

Return to bug 210323