3 |
3 |
|
4 |
4 |
EAPI="7"
|
5 |
5 |
|
|
6 |
WANT_AUTOMAKE="none"
|
|
7 |
|
6 |
8 |
inherit flag-o-matic systemd autotools
|
7 |
9 |
|
8 |
10 |
MY_PV=${PV/_rc/RC}
|
... | ... | |
33 |
35 |
|
34 |
36 |
IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
|
35 |
37 |
coverage +ctype curl debug
|
36 |
|
enchant exif +fileinfo +filter firebird
|
37 |
|
+flatfile ftp gd gdbm gmp +hash +iconv imap inifile
|
38 |
|
intl iodbc ipv6 +jit +json kerberos ldap ldap-sasl libedit libressl lmdb
|
|
38 |
enchant exif ffi +fileinfo +filter firebird
|
|
39 |
+flatfile ftp gd gdbm gmp +iconv imap inifile
|
|
40 |
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
|
39 |
41 |
mhash mssql mysql mysqli nls
|
40 |
42 |
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
|
41 |
|
readline recode selinux +session session-mm sharedmem
|
|
43 |
readline selinux +session session-mm sharedmem
|
42 |
44 |
+simplexml snmp soap sockets sodium spell sqlite ssl
|
43 |
|
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
|
44 |
|
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
|
|
45 |
sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp
|
|
46 |
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
|
|
47 |
|
|
48 |
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
|
49 |
# The Oracle instant client provides its own incompatible ldap library.
|
|
50 |
REQUIRED_USE="
|
|
51 |
|| ( cli cgi fpm apache2 embed phpdbg )
|
|
52 |
cli? ( ^^ ( readline libedit ) )
|
|
53 |
!cli? ( ?? ( readline libedit ) )
|
|
54 |
truetype? ( gd zlib )
|
|
55 |
webp? ( gd zlib )
|
|
56 |
cjk? ( gd zlib )
|
|
57 |
exif? ( gd zlib )
|
|
58 |
xpm? ( gd zlib )
|
|
59 |
gd? ( zlib )
|
|
60 |
simplexml? ( xml )
|
|
61 |
soap? ( xml )
|
|
62 |
xmlrpc? ( xml iconv )
|
|
63 |
xmlreader? ( xml )
|
|
64 |
xmlwriter? ( xml )
|
|
65 |
xslt? ( xml )
|
|
66 |
ldap-sasl? ( ldap )
|
|
67 |
oci8-instant-client? ( !ldap )
|
|
68 |
qdbm? ( !gdbm )
|
|
69 |
session-mm? ( session !threads )
|
|
70 |
mysql? ( || ( mysqli pdo ) )
|
|
71 |
firebird? ( pdo )
|
|
72 |
mssql? ( pdo )
|
|
73 |
"
|
|
74 |
|
|
75 |
RESTRICT="!test? ( test )"
|
45 |
76 |
|
46 |
77 |
# The supported (that is, autodetected) versions of BDB are listed in
|
47 |
78 |
# the ./configure script. Other versions *work*, but we need to stick to
|
48 |
79 |
# the ones that can be detected to avoid a repeat of bug #564824.
|
49 |
80 |
COMMON_DEPEND="
|
50 |
81 |
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
|
51 |
|
>=dev-libs/libpcre2-10.30[jit?,unicode]
|
|
82 |
>=dev-libs/libpcre2-10.30[unicode]
|
52 |
83 |
fpm? ( acl? ( sys-apps/acl ) )
|
53 |
84 |
apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
|
54 |
85 |
argon2? ( app-crypt/argon2:= )
|
... | ... | |
63 |
94 |
coverage? ( dev-util/lcov )
|
64 |
95 |
curl? ( >=net-misc/curl-7.10.5 )
|
65 |
96 |
enchant? ( <app-text/enchant-2.0:0 )
|
|
97 |
ffi? ( >=dev-libs/libffi-3.0.11 )
|
66 |
98 |
firebird? ( dev-db/firebird )
|
67 |
|
gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
|
|
99 |
gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= )
|
68 |
100 |
gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
|
69 |
101 |
gmp? ( dev-libs/gmp:0= )
|
70 |
102 |
iconv? ( virtual/libiconv )
|
71 |
103 |
imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
|
72 |
104 |
intl? ( dev-libs/icu:= )
|
73 |
|
iodbc? ( dev-db/libiodbc )
|
74 |
105 |
kerberos? ( virtual/krb5 )
|
75 |
106 |
ldap? ( >=net-nds/openldap-1.2.11 )
|
76 |
|
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
|
|
107 |
ldap-sasl? ( dev-libs/cyrus-sasl )
|
77 |
108 |
libedit? ( dev-libs/libedit )
|
78 |
109 |
lmdb? ( dev-db/lmdb:= )
|
79 |
110 |
mssql? ( dev-db/freetds[mssql] )
|
80 |
111 |
nls? ( sys-devel/gettext )
|
81 |
112 |
oci8-instant-client? ( dev-db/oracle-instantclient[sdk] )
|
82 |
|
odbc? ( >=dev-db/unixODBC-1.8.13 )
|
|
113 |
odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) )
|
83 |
114 |
postgres? ( dev-db/postgresql:* )
|
84 |
115 |
qdbm? ( dev-db/qdbm )
|
85 |
116 |
readline? ( sys-libs/readline:0= )
|
86 |
|
recode? ( app-text/recode:0= )
|
87 |
117 |
session-mm? ( dev-libs/mm )
|
88 |
|
simplexml? ( >=dev-libs/libxml2-2.6.8 )
|
89 |
118 |
snmp? ( >=net-analyzer/net-snmp-5.2 )
|
90 |
|
soap? ( >=dev-libs/libxml2-2.6.8 )
|
91 |
119 |
sodium? ( dev-libs/libsodium:= )
|
92 |
120 |
spell? ( >=app-text/aspell-0.50 )
|
93 |
121 |
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
|
... | ... | |
99 |
127 |
tokyocabinet? ( dev-db/tokyocabinet )
|
100 |
128 |
truetype? ( =media-libs/freetype-2* )
|
101 |
129 |
unicode? ( dev-libs/oniguruma:= )
|
102 |
|
wddx? ( >=dev-libs/libxml2-2.6.8 )
|
103 |
130 |
webp? ( media-libs/libwebp:0= )
|
104 |
|
xml? ( >=dev-libs/libxml2-2.6.8 )
|
105 |
|
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
|
106 |
|
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
|
107 |
|
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
|
|
131 |
xml? ( >=dev-libs/libxml2-2.7.6 )
|
108 |
132 |
xpm? ( x11-libs/libXpm )
|
109 |
|
xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
|
110 |
|
zip? ( >=sys-libs/zlib-1.2.0.4:0= )
|
111 |
|
zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
|
|
133 |
xslt? ( dev-libs/libxslt )
|
|
134 |
zip? ( >=dev-libs/libzip-1.2.0:= )
|
112 |
135 |
zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
|
113 |
136 |
"
|
114 |
137 |
|
... | ... | |
127 |
150 |
|
128 |
151 |
BDEPEND="virtual/pkgconfig"
|
129 |
152 |
|
130 |
|
# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
|
131 |
|
# The Oracle instant client provides its own incompatible ldap library.
|
132 |
|
REQUIRED_USE="
|
133 |
|
|| ( cli cgi fpm apache2 embed phpdbg )
|
134 |
|
cli? ( ^^ ( readline libedit ) )
|
135 |
|
truetype? ( gd zlib )
|
136 |
|
webp? ( gd zlib )
|
137 |
|
cjk? ( gd zlib )
|
138 |
|
exif? ( gd zlib )
|
139 |
|
xpm? ( gd zlib )
|
140 |
|
gd? ( zlib )
|
141 |
|
simplexml? ( xml )
|
142 |
|
soap? ( xml )
|
143 |
|
wddx? ( xml )
|
144 |
|
xmlrpc? ( || ( xml iconv ) )
|
145 |
|
xmlreader? ( xml )
|
146 |
|
xslt? ( xml )
|
147 |
|
ldap-sasl? ( ldap )
|
148 |
|
mhash? ( hash )
|
149 |
|
oci8-instant-client? ( !ldap )
|
150 |
|
phar? ( hash )
|
151 |
|
qdbm? ( !gdbm )
|
152 |
|
readline? ( !libedit )
|
153 |
|
recode? ( !imap !mysqli !mysql )
|
154 |
|
session-mm? ( session !threads )
|
155 |
|
mysql? ( || ( mysqli pdo ) )
|
156 |
|
zip-encryption? ( zip )
|
157 |
|
"
|
158 |
|
|
159 |
|
RESTRICT="!test? ( test )"
|
|
153 |
PHP_MV="$(ver_cut 1)"
|
160 |
154 |
|
161 |
155 |
PATCHES=(
|
162 |
|
"${FILESDIR}/php-freetype-2.9.1.patch"
|
|
156 |
"${FILESDIR}"/php-iodbc-header-location.patch
|
163 |
157 |
)
|
164 |
158 |
|
165 |
|
PHP_MV="$(ver_cut 1)"
|
166 |
|
|
167 |
159 |
php_install_ini() {
|
168 |
160 |
local phpsapi="${1}"
|
169 |
161 |
|
... | ... | |
232 |
224 |
sapi/fpm/php-fpm.conf.in \
|
233 |
225 |
|| die 'failed to move the include directory in php-fpm.conf'
|
234 |
226 |
|
235 |
|
# Bug 669566 - necessary so that build tools are updated for commands like pecl
|
236 |
|
# Force rebuilding aclocal.m4
|
237 |
|
rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
|
238 |
|
eautoreconf
|
|
227 |
# Emulate buildconf to support cross-compilation
|
|
228 |
rm -fr aclocal.m4 autom4te.cache config.cache \
|
|
229 |
configure main/php_config.h.in || die
|
|
230 |
eautoconf --force
|
|
231 |
eautoheader
|
239 |
232 |
}
|
240 |
233 |
|
241 |
234 |
src_configure() {
|
... | ... | |
259 |
252 |
|
260 |
253 |
our_conf+=(
|
261 |
254 |
$(use_with argon2 password-argon2 "${EPREFIX}/usr")
|
262 |
|
$(use_enable bcmath bcmath)
|
|
255 |
$(use_enable bcmath)
|
263 |
256 |
$(use_with bzip2 bz2 "${EPREFIX}/usr")
|
264 |
|
$(use_enable calendar calendar)
|
|
257 |
$(use_enable calendar)
|
265 |
258 |
$(use_enable coverage gcov)
|
266 |
|
$(use_enable ctype ctype)
|
267 |
|
$(use_with curl curl "${EPREFIX}/usr")
|
|
259 |
$(use_enable ctype)
|
|
260 |
$(use_with curl)
|
268 |
261 |
$(use_enable xml dom)
|
269 |
|
$(use_with enchant enchant "${EPREFIX}/usr")
|
270 |
|
$(use_enable exif exif)
|
271 |
|
$(use_enable fileinfo fileinfo)
|
272 |
|
$(use_enable filter filter)
|
273 |
|
$(use_enable ftp ftp)
|
|
262 |
$(use_with enchant)
|
|
263 |
$(use_enable exif)
|
|
264 |
$(use_with ffi)
|
|
265 |
$(use_enable fileinfo)
|
|
266 |
$(use_enable filter)
|
|
267 |
$(use_enable ftp)
|
274 |
268 |
$(use_with nls gettext "${EPREFIX}/usr")
|
275 |
269 |
$(use_with gmp gmp "${EPREFIX}/usr")
|
276 |
|
$(use_enable hash hash)
|
277 |
270 |
$(use_with mhash mhash "${EPREFIX}/usr")
|
278 |
271 |
$(use_with iconv iconv \
|
279 |
272 |
$(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
|
280 |
|
$(use_enable intl intl)
|
281 |
|
$(use_enable ipv6 ipv6)
|
282 |
|
$(use_enable json json)
|
283 |
|
$(use_with kerberos kerberos "${EPREFIX}/usr")
|
284 |
|
$(use_enable xml libxml)
|
285 |
|
$(use_with xml libxml-dir "${EPREFIX}/usr")
|
|
273 |
$(use_enable intl)
|
|
274 |
$(use_enable ipv6)
|
|
275 |
$(use_enable json)
|
|
276 |
$(use_with kerberos)
|
|
277 |
$(use_with xml libxml)
|
286 |
278 |
$(use_enable unicode mbstring)
|
287 |
|
$(use_with unicode onig "${EPREFIX}/usr")
|
288 |
|
$(use_with ssl openssl "${EPREFIX}/usr")
|
289 |
|
$(use_with ssl openssl-dir "${EPREFIX}/usr")
|
290 |
|
$(use_enable pcntl pcntl)
|
291 |
|
$(use_enable phar phar)
|
292 |
|
$(use_enable pdo pdo)
|
293 |
|
$(use_enable opcache opcache)
|
|
279 |
$(use_with ssl openssl)
|
|
280 |
$(use_enable pcntl)
|
|
281 |
$(use_enable phar)
|
|
282 |
$(use_enable pdo)
|
|
283 |
$(use_enable opcache)
|
294 |
284 |
$(use_with postgres pgsql "${EPREFIX}/usr")
|
295 |
|
$(use_enable posix posix)
|
|
285 |
$(use_enable posix)
|
296 |
286 |
$(use_with spell pspell "${EPREFIX}/usr")
|
297 |
|
$(use_with recode recode "${EPREFIX}/usr")
|
298 |
|
$(use_enable simplexml simplexml)
|
|
287 |
$(use_enable simplexml)
|
299 |
288 |
$(use_enable sharedmem shmop)
|
300 |
289 |
$(use_with snmp snmp "${EPREFIX}/usr")
|
301 |
|
$(use_enable soap soap)
|
302 |
|
$(use_enable sockets sockets)
|
303 |
|
$(use_with sodium sodium "${EPREFIX}/usr")
|
304 |
|
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
|
|
290 |
$(use_enable soap)
|
|
291 |
$(use_enable sockets)
|
|
292 |
$(use_with sodium)
|
|
293 |
$(use_with sqlite sqlite3)
|
305 |
294 |
$(use_enable sysvipc sysvmsg)
|
306 |
295 |
$(use_enable sysvipc sysvsem)
|
307 |
296 |
$(use_enable sysvipc sysvshm)
|
308 |
297 |
$(use_with tidy tidy "${EPREFIX}/usr")
|
309 |
|
$(use_enable tokenizer tokenizer)
|
310 |
|
$(use_enable wddx wddx)
|
311 |
|
$(use_enable xml xml)
|
312 |
|
$(use_enable xmlreader xmlreader)
|
313 |
|
$(use_enable xmlwriter xmlwriter)
|
314 |
|
$(use_with xmlrpc xmlrpc)
|
315 |
|
$(use_with xslt xsl "${EPREFIX}/usr")
|
316 |
|
$(use_enable zip zip)
|
317 |
|
$(use_with zip-encryption libzip "${EPREFIX}/usr")
|
|
298 |
$(use_enable tokenizer)
|
|
299 |
$(use_enable xml)
|
|
300 |
$(use_enable xmlreader)
|
|
301 |
$(use_enable xmlwriter)
|
|
302 |
$(use_with xmlrpc)
|
|
303 |
$(use_with xslt xsl)
|
|
304 |
$(use_with zip)
|
318 |
305 |
$(use_with zlib zlib "${EPREFIX}/usr")
|
319 |
|
$(use_enable debug debug)
|
|
306 |
$(use_enable debug)
|
320 |
307 |
)
|
321 |
308 |
|
322 |
309 |
# DBA support
|
323 |
310 |
if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
|
324 |
311 |
|| use qdbm || use lmdb || use tokyocabinet ; then
|
325 |
|
our_conf+=( "--enable-dba${shared}" )
|
|
312 |
our_conf+=( "--enable-dba" )
|
326 |
313 |
fi
|
327 |
314 |
|
328 |
315 |
# DBA drivers support
|
329 |
316 |
our_conf+=(
|
330 |
|
$(use_with cdb cdb)
|
|
317 |
$(use_with cdb)
|
331 |
318 |
$(use_with berkdb db4 "${EPREFIX}/usr")
|
332 |
|
$(use_enable flatfile flatfile)
|
|
319 |
$(use_enable flatfile)
|
333 |
320 |
$(use_with gdbm gdbm "${EPREFIX}/usr")
|
334 |
|
$(use_enable inifile inifile)
|
|
321 |
$(use_enable inifile)
|
335 |
322 |
$(use_with qdbm qdbm "${EPREFIX}/usr")
|
|
323 |
$(use_with tokyocabinet tcadb "${EPREFIX}/usr")
|
336 |
324 |
$(use_with lmdb lmdb "${EPREFIX}/usr")
|
337 |
325 |
)
|
338 |
326 |
|
339 |
327 |
# Support for the GD graphics library
|
340 |
328 |
our_conf+=(
|
341 |
|
$(use_with truetype freetype-dir "${EPREFIX}/usr")
|
|
329 |
$(use_with truetype freetype)
|
342 |
330 |
$(use_enable cjk gd-jis-conv)
|
343 |
|
$(use_with gd jpeg-dir "${EPREFIX}/usr")
|
344 |
|
$(use_with gd png-dir "${EPREFIX}/usr")
|
345 |
|
$(use_with xpm xpm-dir "${EPREFIX}/usr")
|
|
331 |
$(use_with gd jpeg)
|
|
332 |
$(use_with xpm)
|
|
333 |
$(use_with webp)
|
346 |
334 |
)
|
347 |
|
if use webp; then
|
348 |
|
our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
|
349 |
|
fi
|
350 |
335 |
# enable gd last, so configure can pick up the previous settings
|
351 |
|
our_conf+=( $(use_with gd gd) )
|
|
336 |
our_conf+=( $(use_enable gd) )
|
352 |
337 |
|
353 |
338 |
# IMAP support
|
354 |
339 |
if use imap ; then
|
... | ... | |
358 |
343 |
)
|
359 |
344 |
fi
|
360 |
345 |
|
361 |
|
# Interbase/firebird support
|
362 |
|
our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
|
363 |
|
|
364 |
346 |
# LDAP support
|
365 |
347 |
if use ldap ; then
|
366 |
348 |
our_conf+=(
|
367 |
349 |
$(use_with ldap ldap "${EPREFIX}/usr")
|
368 |
|
$(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
|
|
350 |
$(use_with ldap-sasl)
|
369 |
351 |
)
|
370 |
352 |
fi
|
371 |
353 |
|
... | ... | |
381 |
363 |
fi
|
382 |
364 |
|
383 |
365 |
# ODBC support
|
384 |
|
our_conf+=(
|
385 |
|
$(use_with odbc unixODBC "${EPREFIX}/usr")
|
386 |
|
$(use_with iodbc iodbc "${EPREFIX}/usr")
|
387 |
|
)
|
|
366 |
if use odbc && use iodbc ; then
|
|
367 |
our_conf+=(
|
|
368 |
--without-unixODBC
|
|
369 |
--with-iodbc
|
|
370 |
$(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr")
|
|
371 |
)
|
|
372 |
elif use odbc ; then
|
|
373 |
our_conf+=(
|
|
374 |
--with-unixODBC="${EPREFIX}/usr"
|
|
375 |
--without-iodbc
|
|
376 |
$(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr")
|
|
377 |
)
|
|
378 |
else
|
|
379 |
our_conf+=(
|
|
380 |
--without-unixODBC
|
|
381 |
--without-iodbc
|
|
382 |
--without-pdo-odbc
|
|
383 |
)
|
|
384 |
fi
|
388 |
385 |
|
389 |
386 |
# Oracle support
|
390 |
387 |
our_conf+=( $(use_with oci8-instant-client oci8) )
|
... | ... | |
395 |
392 |
$(use_with mssql pdo-dblib "${EPREFIX}/usr")
|
396 |
393 |
$(use_with mysql pdo-mysql "${mysqllib}")
|
397 |
394 |
$(use_with postgres pdo-pgsql)
|
398 |
|
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
|
|
395 |
$(use_with sqlite pdo-sqlite)
|
399 |
396 |
$(use_with firebird pdo-firebird "${EPREFIX}/usr")
|
400 |
|
$(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
|
401 |
397 |
$(use_with oci8-instant-client pdo-oci)
|
402 |
398 |
)
|
403 |
399 |
fi
|
... | ... | |
405 |
401 |
# readline/libedit support
|
406 |
402 |
our_conf+=(
|
407 |
403 |
$(use_with readline readline "${EPREFIX}/usr")
|
408 |
|
$(use_with libedit libedit "${EPREFIX}/usr")
|
|
404 |
$(use_with libedit)
|
409 |
405 |
)
|
410 |
406 |
|
411 |
407 |
# Session support
|
412 |
408 |
if use session ; then
|
413 |
409 |
our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
|
414 |
410 |
else
|
415 |
|
our_conf+=( $(use_enable session session) )
|
|
411 |
our_conf+=( $(use_enable session) )
|
416 |
412 |
fi
|
417 |
413 |
|
418 |
414 |
# Use pic for shared modules such as apache2's mod_php
|
419 |
415 |
our_conf+=( --with-pic )
|
420 |
416 |
|
421 |
417 |
# we use the system copy of pcre
|
422 |
|
# --with-pcre-regex affects ext/pcre
|
423 |
|
# --with-pcre-dir affects ext/filter and ext/zip
|
424 |
|
# --with-pcre-valgrind cannot be enabled with system pcre
|
|
418 |
# --with-external-pcre affects ext/pcre
|
|
419 |
# Many arches don't support pcre-jit
|
425 |
420 |
our_conf+=(
|
426 |
|
--with-pcre-regex="${EPREFIX}/usr"
|
427 |
|
--with-pcre-dir="${EPREFIX}/usr"
|
428 |
|
--without-pcre-valgrind
|
429 |
|
$(use_with jit pcre-jit)
|
|
421 |
--with-external-pcre
|
|
422 |
--without-pcre-jit
|
430 |
423 |
)
|
431 |
424 |
|
432 |
425 |
# Catch CFLAGS problems
|