Lines 16-21
Link Here
|
16 |
# - web : Want the Apache Module or the CGI version of PHP. |
16 |
# - web : Want the Apache Module or the CGI version of PHP. |
17 |
# - embed : Want the embedded library version of PHP. |
17 |
# - embed : Want the embedded library version of PHP. |
18 |
# - pecl : Fetches from PECL. |
18 |
# - pecl : Fetches from PECL. |
|
|
19 |
# - flavors : Generates flavors for supported versions. |
20 |
# (implied by phpize,ext,zend,pecl) |
21 |
# - noflavors: Prevents generation of flavor. |
19 |
# |
22 |
# |
20 |
# If the port requires a predefined set of PHP extensions, they can be |
23 |
# If the port requires a predefined set of PHP extensions, they can be |
21 |
# listed in this way: |
24 |
# listed in this way: |
Lines 43-49
Link Here
|
43 |
# |
46 |
# |
44 |
# The port can set these options in its Makefile before bsd.port.pre.mk: |
47 |
# The port can set these options in its Makefile before bsd.port.pre.mk: |
45 |
# |
48 |
# |
46 |
# DEFAULT_PHP_VER=N - Use PHP version N if PHP is not yet installed. |
|
|
47 |
# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N. |
49 |
# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N. |
48 |
# |
50 |
# |
49 |
# You may combine multiple WANT_PHP_* knobs. |
51 |
# You may combine multiple WANT_PHP_* knobs. |
Lines 58-67
PHP_Include_MAINTAINER= ale@FreeBSD.org
Link Here
|
58 |
|
60 |
|
59 |
_INCLUDE_USES_PHP_MK= yes |
61 |
_INCLUDE_USES_PHP_MK= yes |
60 |
|
62 |
|
61 |
. if defined(DEFAULT_PHP_VER) |
|
|
62 |
WARNING+= "DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=${DEFAULT_PHP_VER} instead" |
63 |
. endif |
64 |
|
65 |
. if defined(USE_PHPIZE) && empty(php_ARGS:Mphpize) |
63 |
. if defined(USE_PHPIZE) && empty(php_ARGS:Mphpize) |
66 |
php_ARGS+= phpize |
64 |
php_ARGS+= phpize |
67 |
. endif |
65 |
. endif |
Lines 84-89
php_ARGS+= embed
Link Here
|
84 |
. if ${php_ARGS:Mbuild} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) |
82 |
. if ${php_ARGS:Mbuild} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) |
85 |
DEV_WARNING+= "USES=php:build is included in USES=php:phpize, USES=php:ext, and USES=php:zend, so it is not needed" |
83 |
DEV_WARNING+= "USES=php:build is included in USES=php:phpize, USES=php:ext, and USES=php:zend, so it is not needed" |
86 |
. endif |
84 |
. endif |
|
|
85 |
. if ${php_ARGS:Mflavors} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) |
86 |
DEV_WARNINGS+= "USES=php:flavors is included in phpize, ext, zend and pecl, so it is not needed." |
87 |
. endif |
87 |
. if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) |
88 |
. if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) |
88 |
DEV_WARNING+= "USES=php:phpize is included in USES=php:ext and USES=php:zend, so it is not needed" |
89 |
DEV_WARNING+= "USES=php:phpize is included in USES=php:ext and USES=php:zend, so it is not needed" |
89 |
. endif |
90 |
. endif |
Lines 94-119
DEV_WARNING+= "USES=php:ext is included in USES=php:zend, so it is not needed"
Link Here
|
94 |
DEV_WARNING+= "USES=php:ext is included in USES=php:pecl, so it is not needed" |
95 |
DEV_WARNING+= "USES=php:ext is included in USES=php:pecl, so it is not needed" |
95 |
. endif |
96 |
. endif |
96 |
|
97 |
|
|
|
98 |
. if ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) && !${php_ARGS:Mnoflavors} |
99 |
php_ARGS+= flavors |
100 |
. endif |
101 |
|
102 |
. if ${php_ARGS:Mnoflavors} && ${php_ARGS:Mflavors} |
103 |
php_ARGS:= ${php_ARGS:Nflavors} |
104 |
. endif |
105 |
|
106 |
|
97 |
. if ${php_ARGS:Mpecl} |
107 |
. if ${php_ARGS:Mpecl} |
98 |
php_ARGS+= ext |
108 |
php_ARGS+= ext |
|
|
109 |
. if !defined(USE_GITHUB) |
99 |
EXTRACT_SUFX= .tgz |
110 |
EXTRACT_SUFX= .tgz |
100 |
MASTER_SITES= http://pecl.php.net/get/ |
111 |
MASTER_SITES= http://pecl.php.net/get/ |
101 |
PKGNAMEPREFIX= pecl- |
112 |
. endif |
|
|
113 |
PKGNAMEPREFIX= ${PECL_PKGNAMEPREFIX} |
102 |
DIST_SUBDIR= PECL |
114 |
DIST_SUBDIR= PECL |
103 |
. endif |
115 |
. endif |
104 |
|
116 |
|
105 |
PHPBASE?= ${LOCALBASE} |
117 |
PHPBASE?= ${LOCALBASE} |
|
|
118 |
|
119 |
_ALL_PHP_VERSIONS= 56 70 71 72 |
120 |
|
121 |
# Make the already installed PHP the default one. |
106 |
. if exists(${PHPBASE}/etc/php.conf) |
122 |
. if exists(${PHPBASE}/etc/php.conf) |
107 |
.include "${PHPBASE}/etc/php.conf" |
123 |
.include "${PHPBASE}/etc/php.conf" |
108 |
. if !defined(PHP_EXT_DIR) |
124 |
. if !defined(PHP_EXT_DIR) |
109 |
PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' |
125 |
PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' |
110 |
. endif |
126 |
. endif |
|
|
127 |
_INSTALLED_PHP_VER:= ${PHP_VER} |
128 |
# If we have an installed version of PHP, and this does not support it, set |
129 |
# IGNORE to fail early as you cannot install two different versions of PHP at |
130 |
# the same time anyway. |
131 |
. if defined(IGNORE_WITH_PHP) && ${IGNORE_WITH_PHP:M${_INSTALLED_PHP_VER}} |
132 |
IGNORE= does not work with PHP versions "${IGNORE_WITH_PHP}" and "${_INSTALLED_PHP_VER}" is installed. |
133 |
. endif |
134 |
|
111 |
. else |
135 |
. else |
112 |
DEFAULT_PHP_VER?= ${PHP_DEFAULT:S/.//} |
136 |
PHP_VER?= ${PHP_DEFAULT:S/.//} |
|
|
137 |
. endif # .if exists(${PHPBASE}/etc/php.conf) |
138 |
|
139 |
# Use the "default" php version as th first version for flavors, so that it |
140 |
# gets to be the default flavor. |
141 |
_ALL_FLAVOR_VERSIONS= ${PHP_VER} ${_ALL_PHP_VERSIONS:N${PHP_VER}} |
142 |
|
143 |
# If we want flavors, fill in FLAVORS with the allowed PHP versions, if some |
144 |
# cannot be used, or all of them if they all can. |
145 |
# Then if there is no flavor set, use the first one as the default. |
146 |
. if ${php_ARGS:Mflavors} |
147 |
. if empty(FLAVORS) |
148 |
. if defined(IGNORE_WITH_PHP) |
149 |
. for _v in ${_ALL_FLAVOR_VERSIONS} |
150 |
. if empty(IGNORE_WITH_PHP:M${_v}) |
151 |
# Avoid a leading space in FLAVORS. |
152 |
. if empty(FLAVORS) |
153 |
FLAVORS:= php${_v} |
154 |
. else |
155 |
FLAVORS:= ${FLAVORS} php${_v} |
156 |
. endif |
157 |
. endif |
158 |
. endfor |
159 |
. else # defined(IGNORE_WITH_PHP) |
160 |
FLAVORS:= ${_ALL_FLAVOR_VERSIONS:S/^/php/} |
161 |
. endif # defined(IGNORE_WITH_PHP) |
162 |
. endif |
163 |
. if empty(FLAVOR) |
164 |
FLAVOR= ${FLAVORS:[1]} |
165 |
. endif |
166 |
. endif |
167 |
|
168 |
# This variable is for dependencies lines, so you write: |
169 |
# ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} |
170 |
PHP_FLAVOR= php${PHP_VER} |
113 |
|
171 |
|
|
|
172 |
# So, we have PHP flavors, set PHP_VER accordingly. |
173 |
. if ${FLAVOR:Mphp[0-9][0-9]} |
174 |
PHP_VER= ${FLAVOR:S/^php//} |
175 |
. endif |
176 |
|
177 |
# If lang/php is not installed, or if we have a php flavor but want a non |
178 |
# default one, we need to overwrite those. |
179 |
. if empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || \ |
180 |
(${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) |
114 |
# When adding a version, please keep the comment in |
181 |
# When adding a version, please keep the comment in |
115 |
# Mk/bsd.default-versions.mk in sync. |
182 |
# Mk/bsd.default-versions.mk in sync. |
116 |
PHP_VER?= ${DEFAULT_PHP_VER} |
|
|
117 |
. if ${PHP_VER} == 72 |
183 |
. if ${PHP_VER} == 72 |
118 |
PHP_EXT_DIR= 20170718 |
184 |
PHP_EXT_DIR= 20170718 |
119 |
PHP_EXT_INC= pcre spl |
185 |
PHP_EXT_INC= pcre spl |
Lines 132-137
PHP_EXT_DIR= 20131226
Link Here
|
132 |
PHP_EXT_INC= pcre spl |
198 |
PHP_EXT_INC= pcre spl |
133 |
. endif |
199 |
. endif |
134 |
|
200 |
|
|
|
201 |
# Try to figure out what the PHP_EXT_DIR should be WRT the |
202 |
# installed Apache port. |
135 |
HTTPD?= ${LOCALBASE}/sbin/httpd |
203 |
HTTPD?= ${LOCALBASE}/sbin/httpd |
136 |
. if exists(${HTTPD}) |
204 |
. if exists(${HTTPD}) |
137 |
APACHE_THR!= ${HTTPD} -V | ${AWK} '/threaded/ {print $2}' |
205 |
APACHE_THR!= ${HTTPD} -V | ${AWK} '/threaded/ {print $2}' |
Lines 148-155
PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
Link Here
|
148 |
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug |
216 |
PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug |
149 |
. endif |
217 |
. endif |
150 |
PHP_SAPI?= "" |
218 |
PHP_SAPI?= "" |
151 |
. endif # .if exists(${PHPBASE}/etc/php.conf) |
219 |
. endif # empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || (${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) |
152 |
PHP_EXT_INC?= "" |
220 |
|
|
|
221 |
# Set a few PKGNAME(PRE|SUF)FIX to be used in ports. |
222 |
PHP_PKGNAMEPREFIX= php${PHP_VER}- |
223 |
PHP_PKGNAMESUFFIX= -php${PHP_VER} |
224 |
PECL_PKGNAMEPREFIX= php${PHP_VER}-pecl- |
153 |
|
225 |
|
154 |
. if defined(IGNORE_WITH_PHP) |
226 |
. if defined(IGNORE_WITH_PHP) |
155 |
. for VER in ${IGNORE_WITH_PHP} |
227 |
. for VER in ${IGNORE_WITH_PHP} |
Lines 220-226
BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT} \
Link Here
|
220 |
GNU_CONFIGURE= yes |
292 |
GNU_CONFIGURE= yes |
221 |
CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config |
293 |
CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config |
222 |
|
294 |
|
223 |
configure-message: phpize-message do-phpize |
295 |
_USES_configure+= 190:phpize-message 250:do-phpize |
224 |
|
296 |
|
225 |
phpize-message: |
297 |
phpize-message: |
226 |
@${ECHO_MSG} "===> PHPizing for ${PKGNAME}" |
298 |
@${ECHO_MSG} "===> PHPizing for ${PKGNAME}" |
Lines 308-316
_USE_PHP_VER72= ${_USE_PHP_ALL} sodium
Link Here
|
308 |
|
380 |
|
309 |
bcmath_DEPENDS= math/php${PHP_VER}-bcmath |
381 |
bcmath_DEPENDS= math/php${PHP_VER}-bcmath |
310 |
. if ${PHP_VER} == 70 || ${PHP_VER} == 71 || ${PHP_VER} == 72 |
382 |
. if ${PHP_VER} == 70 || ${PHP_VER} == 71 || ${PHP_VER} == 72 |
311 |
bitset_DEPENDS= math/pecl-bitset |
383 |
bitset_DEPENDS= math/pecl-bitset@${PHP_FLAVOR} |
312 |
. else |
384 |
. else |
313 |
bitset_DEPENDS= math/pecl-bitset2 |
385 |
bitset_DEPENDS= math/pecl-bitset2@${PHP_FLAVOR} |
314 |
. endif |
386 |
. endif |
315 |
bz2_DEPENDS= archivers/php${PHP_VER}-bz2 |
387 |
bz2_DEPENDS= archivers/php${PHP_VER}-bz2 |
316 |
calendar_DEPENDS= misc/php${PHP_VER}-calendar |
388 |
calendar_DEPENDS= misc/php${PHP_VER}-calendar |
Lines 329-359
gettext_DEPENDS=devel/php${PHP_VER}-gettext
Link Here
|
329 |
gmp_DEPENDS= math/php${PHP_VER}-gmp |
401 |
gmp_DEPENDS= math/php${PHP_VER}-gmp |
330 |
hash_DEPENDS= security/php${PHP_VER}-hash |
402 |
hash_DEPENDS= security/php${PHP_VER}-hash |
331 |
iconv_DEPENDS= converters/php${PHP_VER}-iconv |
403 |
iconv_DEPENDS= converters/php${PHP_VER}-iconv |
332 |
igbinary_DEPENDS= converters/pecl-igbinary |
404 |
igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} |
333 |
imap_DEPENDS= mail/php${PHP_VER}-imap |
405 |
imap_DEPENDS= mail/php${PHP_VER}-imap |
334 |
interbase_DEPENDS= databases/php${PHP_VER}-interbase |
406 |
interbase_DEPENDS= databases/php${PHP_VER}-interbase |
335 |
. if ${PHP_VER} == 70 || ${PHP_VER} == 71 || ${PHP_VER} == 72 |
407 |
. if ${PHP_VER} == 70 || ${PHP_VER} == 71 || ${PHP_VER} == 72 |
336 |
intl_DEPENDS= devel/php${PHP_VER}-intl |
408 |
intl_DEPENDS= devel/php${PHP_VER}-intl |
337 |
. else |
409 |
. else |
338 |
intl_DEPENDS= devel/pecl-intl |
410 |
intl_DEPENDS= devel/pecl-intl@${PHP_FLAVOR} |
339 |
. endif |
411 |
. endif |
340 |
json_DEPENDS= devel/php${PHP_VER}-json |
412 |
json_DEPENDS= devel/php${PHP_VER}-json |
341 |
ldap_DEPENDS= net/php${PHP_VER}-ldap |
413 |
ldap_DEPENDS= net/php${PHP_VER}-ldap |
342 |
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring |
414 |
mbstring_DEPENDS= converters/php${PHP_VER}-mbstring |
343 |
. if ${PHP_VER} >= 72 |
415 |
. if ${PHP_VER} >= 72 |
344 |
mcrypt_DEPENDS= security/pecl-mcrypt |
416 |
mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR} |
345 |
. else |
417 |
. else |
346 |
mcrypt_DEPENDS= security/php${PHP_VER}-mcrypt |
418 |
mcrypt_DEPENDS= security/php${PHP_VER}-mcrypt |
347 |
. endif |
419 |
. endif |
348 |
. if ${PHP_VER} >= 70 |
420 |
. if ${PHP_VER} >= 70 |
349 |
memcache_DEPENDS= databases/php${PHP_VER}-memcache |
421 |
memcache_DEPENDS= databases/php-memcache@${PHP_FLAVOR} |
350 |
. else |
422 |
. else |
351 |
memcache_DEPENDS= databases/pecl-memcache |
423 |
memcache_DEPENDS= databases/pecl-memcache@${PHP_FLAVOR} |
352 |
. endif |
424 |
. endif |
353 |
. if ${PHP_VER} >= 70 |
425 |
. if ${PHP_VER} >= 70 |
354 |
memcached_DEPENDS= databases/pecl-memcached |
426 |
memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR} |
355 |
. else |
427 |
. else |
356 |
memcached_DEPENDS= databases/pecl-memcached2 |
428 |
memcached_DEPENDS= databases/pecl-memcached2@${PHP_FLAVOR} |
357 |
. endif |
429 |
. endif |
358 |
mssql_DEPENDS= databases/php${PHP_VER}-mssql |
430 |
mssql_DEPENDS= databases/php${PHP_VER}-mssql |
359 |
mysql_DEPENDS= databases/php${PHP_VER}-mysql |
431 |
mysql_DEPENDS= databases/php${PHP_VER}-mysql |
Lines 364-370
oci8_DEPENDS= databases/php${PHP_VER}-oci8
Link Here
|
364 |
opcache_DEPENDS= www/php${PHP_VER}-opcache |
436 |
opcache_DEPENDS= www/php${PHP_VER}-opcache |
365 |
openssl_DEPENDS=security/php${PHP_VER}-openssl |
437 |
openssl_DEPENDS=security/php${PHP_VER}-openssl |
366 |
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl |
438 |
pcntl_DEPENDS= devel/php${PHP_VER}-pcntl |
367 |
pdf_DEPENDS= print/pecl-pdflib |
439 |
pdf_DEPENDS= print/pecl-pdflib@${PHP_FLAVOR} |
368 |
pdo_DEPENDS= databases/php${PHP_VER}-pdo |
440 |
pdo_DEPENDS= databases/php${PHP_VER}-pdo |
369 |
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib |
441 |
pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib |
370 |
pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird |
442 |
pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird |
Lines 376-385
pgsql_DEPENDS= databases/php${PHP_VER}-pgsql
Link Here
|
376 |
phar_DEPENDS= archivers/php${PHP_VER}-phar |
448 |
phar_DEPENDS= archivers/php${PHP_VER}-phar |
377 |
posix_DEPENDS= sysutils/php${PHP_VER}-posix |
449 |
posix_DEPENDS= sysutils/php${PHP_VER}-posix |
378 |
pspell_DEPENDS= textproc/php${PHP_VER}-pspell |
450 |
pspell_DEPENDS= textproc/php${PHP_VER}-pspell |
379 |
radius_DEPENDS= net/pecl-radius |
451 |
radius_DEPENDS= net/pecl-radius@${PHP_FLAVOR} |
380 |
readline_DEPENDS= devel/php${PHP_VER}-readline |
452 |
readline_DEPENDS= devel/php${PHP_VER}-readline |
381 |
recode_DEPENDS= converters/php${PHP_VER}-recode |
453 |
recode_DEPENDS= converters/php${PHP_VER}-recode |
382 |
redis_DEPENDS= databases/pecl-redis |
454 |
redis_DEPENDS= databases/pecl-redis@${PHP_FLAVOR} |
383 |
session_DEPENDS=www/php${PHP_VER}-session |
455 |
session_DEPENDS=www/php${PHP_VER}-session |
384 |
shmop_DEPENDS= devel/php${PHP_VER}-shmop |
456 |
shmop_DEPENDS= devel/php${PHP_VER}-shmop |
385 |
simplexml_DEPENDS= textproc/php${PHP_VER}-simplexml |
457 |
simplexml_DEPENDS= textproc/php${PHP_VER}-simplexml |