Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/
Date: Fri, 17 Aug 2018 03:34:57
Message-Id: 1534476881.809f85abb7605d52846016c43cb922abddde2a22.grknight@gentoo
1 commit: 809f85abb7605d52846016c43cb922abddde2a22
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 17 03:29:07 2018 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 17 03:34:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=809f85ab
7
8 dev-lang/php: Drop old
9
10 Package-Manager: Portage-2.3.46, Repoman-2.3.10
11
12 dev-lang/php/Manifest | 2 -
13 dev-lang/php/php-7.2.8.ebuild | 740 ----------------------------------
14 dev-lang/php/php-7.3.0_alpha3.ebuild | 743 -----------------------------------
15 3 files changed, 1485 deletions(-)
16
17 diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
18 index 44d9c4d9a8b..375f5c6c25a 100644
19 --- a/dev-lang/php/Manifest
20 +++ b/dev-lang/php/Manifest
21 @@ -6,7 +6,5 @@ DIST php-7.0.31.tar.xz 12029516 BLAKE2B afb3c831b11b3aa4d3660ccef5b97e8282da2ad9
22 DIST php-7.1.16.tar.xz 12211512 BLAKE2B bf242e2438b2dc363368a9ef4478349a291f483477ccedf988abd0fbb78a6f1b31e3b86dcb39ed9a9a8151674a8373ae77d8420e77efd6a2e05d5cfc778ed40f SHA512 98e96f06a4912cfa6926be2f292ce7120ca893c9b779b2efef4120c1df3580fa427cd58f5e4977edb01a0ae3b85660d6ca79b2bd79b6cd830cd77f6c6588b5ea
23 DIST php-7.1.18.tar.xz 12213396 BLAKE2B f851c6eb261b8b532e84e73e6f173deb6ac00cd5168a02db9811843540aeadc390a4c5416eb17749cc950bbb1eda1045f538e2b80e4734ea2c0c4e264776bffb SHA512 7eacbc3b98d8b668c90d5c93030263f47ba2e0d4d7820594662590b8b68670f734a2274ae476e3aeac7e030c4ef10411a80da3523383e87a6757e87597caee90
24 DIST php-7.1.20.tar.xz 12227052 BLAKE2B c9872ffd1f8eb1a51a24d669965b0b908c3d233ad3eac86284e1edf7c6fa5e8099d5706bd1dd740cea039aeac2f66e60f96ccd15f1956eefe5635142b75857f1 SHA512 1f84ba63df45b0d32d704b74217b509807976e88ea953a330c06372491d6ca6e41891cf14bd16524b76f4b2f9007f1243845af7e652917de9325c022135ed9cf
25 -DIST php-7.2.8.tar.xz 12153548 BLAKE2B 3ea98862238ae036cde188cf92d6ead5686ecb6b5be41ab828983ff02a278907644e8f76b65025e5050337c28c3c81d9d86df9876bd70b82fdc69e89d569e0c6 SHA512 8a52f2401ce46921c5842ca98bb81da1f6287d0ba68825f53d16853f808e702967fa9b4bea81d49a3e91c95c0b9eb218169cd6f32a403f7d120348ba5e009bea
26 DIST php-7.2.9.tar.xz 12126780 BLAKE2B 0c509e281190e07199b189d220884b75fe6a81c64c7fdf271208b1d7f209c641defbd14aaa4e33b5a286bae8d9b40a72473e903b4349a36eca44499bf49757fd SHA512 b898e78fcb4aeeb441395dcabe2e7686425487e32dffbf0e99393aedb917da87a744b23f0be557c45e447433c8058df6e53c34869fc2dcf874cc1af97ff8331f
27 -DIST php-7.3.0alpha3.tar.xz 11890052 BLAKE2B 4e069bb3c68e4fd26bac319fe840ad683d42f5a7a3f16b907f1814290be77c018670fd342032b6514f1b76eb924da7a614d79ce9c4708837bdc9cd214d4614fc SHA512 7d867db75ac1d5648c0f52c58a6d955329967f7a9399d5fa7b403868ba1a3d72cebe1c4e97ccd79baefae61a6fb1ff2363a6894bd712e81074c7e743e9bc2f1e
28 DIST php-7.3.0beta2.tar.xz 11902672 BLAKE2B a7400b149b99ca70b6b18d7651726445d6c4aae0a03ed8b8bd8c55ef75de592cc61f4aa26dd9e3e0c2629e130bde600fcefc064560a8cf5aa3d3f817408f78d9 SHA512 adfa1d4a38fd4080a37e643c67f6cce0b71538e08ce0be3c124bda5d2b681355cbd040b6fc44f357b1c3a5a8542621f8b983c33ac7cfc262ad93d07c1ab4db98
29
30 diff --git a/dev-lang/php/php-7.2.8.ebuild b/dev-lang/php/php-7.2.8.ebuild
31 deleted file mode 100644
32 index 4bc61dfc550..00000000000
33 --- a/dev-lang/php/php-7.2.8.ebuild
34 +++ /dev/null
35 @@ -1,740 +0,0 @@
36 -# Copyright 1999-2018 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -
41 -inherit flag-o-matic versionator systemd
42 -
43 -DESCRIPTION="The PHP language runtime engine"
44 -HOMEPAGE="https://secure.php.net/"
45 -SRC_URI="https://secure.php.net/distributions/${P}.tar.xz"
46 -
47 -LICENSE="PHP-3.01
48 - BSD
49 - Zend-2.0
50 - bcmath? ( LGPL-2.1+ )
51 - fpm? ( BSD-2 )
52 - gd? ( gd )
53 - unicode? ( BSD-2 LGPL-2.1 )"
54 -
55 -SLOT="$(get_version_component_range 1-2)"
56 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
57 -
58 -# We can build the following SAPIs in the given order
59 -SAPIS="embed cli cgi fpm apache2 phpdbg"
60 -
61 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
62 -IUSE="${IUSE}
63 - ${SAPIS/cli/+cli}
64 - threads"
65 -
66 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
67 - coverage +ctype curl debug
68 - enchant exif +fileinfo +filter firebird
69 - flatfile ftp gd gdbm gmp +hash +iconv imap inifile
70 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
71 - mhash mssql mysql mysqli nls
72 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
73 - readline recode selinux +session session-mm sharedmem
74 - +simplexml snmp soap sockets sodium spell sqlite ssl
75 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
76 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
77 -
78 -# The supported (that is, autodetected) versions of BDB are listed in
79 -# the ./configure script. Other versions *work*, but we need to stick to
80 -# the ones that can be detected to avoid a repeat of bug #564824.
81 -COMMON_DEPEND="
82 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
83 - >=dev-libs/libpcre-8.32[unicode]
84 - fpm? ( acl? ( sys-apps/acl ) )
85 - apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
86 - <www-servers/apache-2.4[threads=] ) )
87 - argon2? ( app-crypt/argon2:= )
88 - berkdb? ( || ( sys-libs/db:5.3
89 - sys-libs/db:5.1
90 - sys-libs/db:4.8
91 - sys-libs/db:4.7
92 - sys-libs/db:4.6
93 - sys-libs/db:4.5 ) )
94 - bzip2? ( app-arch/bzip2:0= )
95 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
96 - coverage? ( dev-util/lcov )
97 - curl? ( >=net-misc/curl-7.10.5 )
98 - enchant? ( app-text/enchant )
99 - firebird? ( dev-db/firebird )
100 - gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
101 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
102 - gmp? ( dev-libs/gmp:0= )
103 - iconv? ( virtual/libiconv )
104 - imap? ( virtual/imap-c-client[kerberos=,ssl=] )
105 - intl? ( dev-libs/icu:= )
106 - iodbc? ( dev-db/libiodbc )
107 - kerberos? ( virtual/krb5 )
108 - ldap? ( >=net-nds/openldap-1.2.11 )
109 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
110 - libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
111 - lmdb? ( dev-db/lmdb:= )
112 - mssql? ( dev-db/freetds[mssql] )
113 - nls? ( sys-devel/gettext )
114 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
115 - odbc? ( >=dev-db/unixODBC-1.8.13 )
116 - postgres? ( dev-db/postgresql:* )
117 - qdbm? ( dev-db/qdbm )
118 - readline? ( sys-libs/readline:0= )
119 - recode? ( app-text/recode )
120 - session-mm? ( dev-libs/mm )
121 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
122 - snmp? ( >=net-analyzer/net-snmp-5.2 )
123 - soap? ( >=dev-libs/libxml2-2.6.8 )
124 - sodium? ( dev-libs/libsodium:= )
125 - spell? ( >=app-text/aspell-0.50 )
126 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
127 - ssl? (
128 - !libressl? ( dev-libs/openssl:0= )
129 - libressl? ( dev-libs/libressl:0= )
130 - )
131 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
132 - tokyocabinet? ( dev-db/tokyocabinet )
133 - truetype? ( =media-libs/freetype-2* )
134 - unicode? ( dev-libs/oniguruma:= )
135 - wddx? ( >=dev-libs/libxml2-2.6.8 )
136 - webp? ( media-libs/libwebp:0= )
137 - xml? ( >=dev-libs/libxml2-2.6.8 )
138 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
139 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
140 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
141 - xpm? ( x11-libs/libXpm )
142 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
143 - zip? ( sys-libs/zlib:0= )
144 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
145 - zlib? ( sys-libs/zlib:0= )
146 -"
147 -
148 -RDEPEND="${COMMON_DEPEND}
149 - virtual/mta
150 - fpm? (
151 - selinux? ( sec-policy/selinux-phpfpm )
152 - systemd? ( sys-apps/systemd ) )"
153 -
154 -# Bison isn't actually needed when building from a release tarball
155 -# However, the configure script will warn if it's absent or if you
156 -# have an incompatible version installed. See bug 593278.
157 -DEPEND="${COMMON_DEPEND}
158 - app-arch/xz-utils
159 - >=sys-devel/bison-3.0.1"
160 -
161 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
162 -REQUIRED_USE="
163 - || ( cli cgi fpm apache2 embed phpdbg )
164 - cli? ( ^^ ( readline libedit ) )
165 - truetype? ( gd zlib )
166 - webp? ( gd zlib )
167 - cjk? ( gd zlib )
168 - exif? ( gd zlib )
169 - xpm? ( gd zlib )
170 - gd? ( zlib )
171 - simplexml? ( xml )
172 - soap? ( xml )
173 - wddx? ( xml )
174 - xmlrpc? ( || ( xml iconv ) )
175 - xmlreader? ( xml )
176 - xslt? ( xml )
177 - ldap-sasl? ( ldap )
178 - mhash? ( hash )
179 - phar? ( hash )
180 - qdbm? ( !gdbm )
181 - readline? ( !libedit )
182 - recode? ( !imap !mysqli !mysql )
183 - session-mm? ( session !threads )
184 - mysql? ( || ( mysqli pdo ) )
185 - zip-encryption? ( zip )
186 -"
187 -PATCHES=(
188 - "${FILESDIR}/php-freetype-2.9.1.patch"
189 -)
190 -
191 -PHP_MV="$(get_major_version)"
192 -
193 -php_install_ini() {
194 - local phpsapi="${1}"
195 -
196 - # work out where we are installing the ini file
197 - php_set_ini_dir "${phpsapi}"
198 -
199 - # Always install the production INI file, bug 611214.
200 - local phpinisrc="php.ini-production-${phpsapi}"
201 - cp php.ini-production "${phpinisrc}" || die
202 -
203 - # default to /tmp for save_path, bug #282768
204 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
205 -
206 - # Set the extension dir
207 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
208 - -i "${phpinisrc}" || die
209 -
210 - # Set the include path to point to where we want to find PEAR packages
211 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
212 -
213 - dodir "${PHP_INI_DIR#${EPREFIX}}"
214 - insinto "${PHP_INI_DIR#${EPREFIX}}"
215 - newins "${phpinisrc}" php.ini
216 -
217 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
218 - elog
219 -
220 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
221 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
222 -
223 - if use opcache; then
224 - elog "Adding opcache to $PHP_EXT_INI_DIR"
225 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
226 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
227 - dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
228 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
229 - fi
230 -
231 - # SAPI-specific handling
232 - if [[ "${sapi}" == "fpm" ]] ; then
233 - einfo "Installing FPM config files php-fpm.conf and www.conf"
234 - insinto "${PHP_INI_DIR#${EPREFIX}}"
235 - doins sapi/fpm/php-fpm.conf
236 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
237 - doins sapi/fpm/www.conf
238 - fi
239 -
240 - dodoc php.ini-{development,production}
241 -}
242 -
243 -php_set_ini_dir() {
244 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
245 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
246 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
247 -}
248 -
249 -src_prepare() {
250 - default
251 -
252 - # In php-7.x, the FPM pool configuration files have been split off
253 - # of the main config. By default the pool config files go in
254 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
255 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
256 - # we'll install the pool configuration file "www.conf" there.
257 - php_set_ini_dir fpm
258 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
259 - sapi/fpm/php-fpm.conf.in \
260 - || die 'failed to move the include directory in php-fpm.conf'
261 -}
262 -
263 -src_configure() {
264 - addpredict /usr/share/snmp/mibs/.index #nowarn
265 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
266 -
267 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
268 -
269 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
270 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
271 - local our_conf=(
272 - --prefix="${PHP_DESTDIR}"
273 - --mandir="${PHP_DESTDIR}/man"
274 - --infodir="${PHP_DESTDIR}/info"
275 - --libdir="${PHP_DESTDIR}/lib"
276 - --with-libdir="$(get_libdir)"
277 - --localstatedir="${EPREFIX}/var"
278 - --without-pear
279 - $(use_enable threads maintainer-zts)
280 - )
281 -
282 - our_conf+=(
283 - $(use_with argon2 password-argon2 "${EPREFIX}/usr")
284 - $(use_enable bcmath bcmath)
285 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
286 - $(use_enable calendar calendar)
287 - $(use_enable coverage gcov)
288 - $(use_enable ctype ctype)
289 - $(use_with curl curl "${EPREFIX}/usr")
290 - $(use_enable xml dom)
291 - $(use_with enchant enchant "${EPREFIX}/usr")
292 - $(use_enable exif exif)
293 - $(use_enable fileinfo fileinfo)
294 - $(use_enable filter filter)
295 - $(use_enable ftp ftp)
296 - $(use_with nls gettext "${EPREFIX}/usr")
297 - $(use_with gmp gmp "${EPREFIX}/usr")
298 - $(use_enable hash hash)
299 - $(use_with mhash mhash "${EPREFIX}/usr")
300 - $(use_with iconv iconv \
301 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
302 - $(use_enable intl intl)
303 - $(use_enable ipv6 ipv6)
304 - $(use_enable json json)
305 - $(use_with kerberos kerberos "${EPREFIX}/usr")
306 - $(use_enable xml libxml)
307 - $(use_with xml libxml-dir "${EPREFIX}/usr")
308 - $(use_enable unicode mbstring)
309 - $(use_with unicode onig "${EPREFIX}/usr")
310 - $(use_with ssl openssl "${EPREFIX}/usr")
311 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
312 - $(use_enable pcntl pcntl)
313 - $(use_enable phar phar)
314 - $(use_enable pdo pdo)
315 - $(use_enable opcache opcache)
316 - $(use_with postgres pgsql "${EPREFIX}/usr")
317 - $(use_enable posix posix)
318 - $(use_with spell pspell "${EPREFIX}/usr")
319 - $(use_with recode recode "${EPREFIX}/usr")
320 - $(use_enable simplexml simplexml)
321 - $(use_enable sharedmem shmop)
322 - $(use_with snmp snmp "${EPREFIX}/usr")
323 - $(use_enable soap soap)
324 - $(use_enable sockets sockets)
325 - $(use_with sodium sodium "${EPREFIX}/usr")
326 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
327 - $(use_enable sysvipc sysvmsg)
328 - $(use_enable sysvipc sysvsem)
329 - $(use_enable sysvipc sysvshm)
330 - $(use_with tidy tidy "${EPREFIX}/usr")
331 - $(use_enable tokenizer tokenizer)
332 - $(use_enable wddx wddx)
333 - $(use_enable xml xml)
334 - $(use_enable xmlreader xmlreader)
335 - $(use_enable xmlwriter xmlwriter)
336 - $(use_with xmlrpc xmlrpc)
337 - $(use_with xslt xsl "${EPREFIX}/usr")
338 - $(use_enable zip zip)
339 - $(use_with zip-encryption libzip "${EPREFIX}/usr")
340 - $(use_with zlib zlib "${EPREFIX}/usr")
341 - $(use_enable debug debug)
342 - )
343 -
344 - # DBA support
345 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
346 - || use qdbm || use lmdb || use tokyocabinet ; then
347 - our_conf+=( "--enable-dba${shared}" )
348 - fi
349 -
350 - # DBA drivers support
351 - our_conf+=(
352 - $(use_with cdb cdb)
353 - $(use_with berkdb db4 "${EPREFIX}/usr")
354 - $(use_enable flatfile flatfile)
355 - $(use_with gdbm gdbm "${EPREFIX}/usr")
356 - $(use_enable inifile inifile)
357 - $(use_with qdbm qdbm "${EPREFIX}/usr")
358 - $(use_with lmdb lmdb "${EPREFIX}/usr")
359 - )
360 -
361 - # Support for the GD graphics library
362 - our_conf+=(
363 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
364 - $(use_enable cjk gd-jis-conv)
365 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
366 - $(use_with gd png-dir "${EPREFIX}/usr")
367 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
368 - )
369 - if use webp; then
370 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
371 - fi
372 - # enable gd last, so configure can pick up the previous settings
373 - our_conf+=( $(use_with gd gd) )
374 -
375 - # IMAP support
376 - if use imap ; then
377 - our_conf+=(
378 - $(use_with imap imap "${EPREFIX}/usr")
379 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
380 - )
381 - fi
382 -
383 - # Interbase/firebird support
384 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
385 -
386 - # LDAP support
387 - if use ldap ; then
388 - our_conf+=(
389 - $(use_with ldap ldap "${EPREFIX}/usr")
390 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
391 - )
392 - fi
393 -
394 - # MySQL support
395 - local mysqllib="mysqlnd"
396 - local mysqlilib="mysqlnd"
397 -
398 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
399 -
400 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
401 - if use mysql || use mysqli ; then
402 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
403 - fi
404 -
405 - # ODBC support
406 - our_conf+=(
407 - $(use_with odbc unixODBC "${EPREFIX}/usr")
408 - $(use_with iodbc iodbc "${EPREFIX}/usr")
409 - )
410 -
411 - # Oracle support
412 - our_conf+=( $(use_with oci8-instant-client oci8) )
413 -
414 - # PDO support
415 - if use pdo ; then
416 - our_conf+=(
417 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
418 - $(use_with mysql pdo-mysql "${mysqllib}")
419 - $(use_with postgres pdo-pgsql)
420 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
421 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
422 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
423 - $(use_with oci8-instant-client pdo-oci)
424 - )
425 - fi
426 -
427 - # readline/libedit support
428 - our_conf+=(
429 - $(use_with readline readline "${EPREFIX}/usr")
430 - $(use_with libedit libedit "${EPREFIX}/usr")
431 - )
432 -
433 - # Session support
434 - if use session ; then
435 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
436 - else
437 - our_conf+=( $(use_enable session session) )
438 - fi
439 -
440 - # Use pic for shared modules such as apache2's mod_php
441 - our_conf+=( --with-pic )
442 -
443 - # we use the system copy of pcre
444 - # --with-pcre-regex affects ext/pcre
445 - # --with-pcre-dir affects ext/filter and ext/zip
446 - # --with-pcre-valgrind cannot be enabled with system pcre
447 - # Many arches don't support pcre-jit
448 - our_conf+=(
449 - --with-pcre-regex="${EPREFIX}/usr"
450 - --with-pcre-dir="${EPREFIX}/usr"
451 - --without-pcre-valgrind
452 - --without-pcre-jit
453 - )
454 -
455 - # Catch CFLAGS problems
456 - # Fixes bug #14067.
457 - # Changed order to run it in reverse for bug #32022 and #12021.
458 - replace-cpu-flags "k6*" "i586"
459 -
460 - # Cache the ./configure test results between SAPIs.
461 - our_conf+=( --cache-file="${T}/config.cache" )
462 -
463 - # Support user-passed configuration parameters
464 - our_conf+=( ${EXTRA_ECONF:-} )
465 -
466 - # Support the Apache2 extras, they must be set globally for all
467 - # SAPIs to work correctly, especially for external PHP extensions
468 -
469 - mkdir -p "${WORKDIR}/sapis-build" || die
470 - for one_sapi in $SAPIS ; do
471 - use "${one_sapi}" || continue
472 - php_set_ini_dir "${one_sapi}"
473 -
474 - # The BUILD_DIR variable is used to determine where to output
475 - # the files that autotools creates. This was all originally
476 - # based on the autotools-utils eclass.
477 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
478 - cp -a "${S}" "${BUILD_DIR}" || die
479 - cd "${BUILD_DIR}" || die
480 -
481 - local sapi_conf=(
482 - --with-config-file-path="${PHP_INI_DIR}"
483 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
484 - )
485 -
486 - for sapi in $SAPIS ; do
487 - case "$sapi" in
488 - cli|cgi|embed|fpm|phpdbg)
489 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
490 - sapi_conf+=( "--enable-${sapi}" )
491 - if [[ "fpm" == "${sapi}" ]] ; then
492 - sapi_conf+=(
493 - $(use_with acl fpm-acl)
494 - $(use_with systemd fpm-systemd)
495 - )
496 - fi
497 - else
498 - sapi_conf+=( "--disable-${sapi}" )
499 - fi
500 - ;;
501 -
502 - apache2)
503 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
504 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
505 - else
506 - sapi_conf+=( --without-apxs2 )
507 - fi
508 - ;;
509 - esac
510 - done
511 -
512 - # Construct the $myeconfargs array by concatenating $our_conf
513 - # (the common args) and $sapi_conf (the SAPI-specific args).
514 - local myeconfargs=( "${our_conf[@]}" )
515 - myeconfargs+=( "${sapi_conf[@]}" )
516 -
517 - pushd "${BUILD_DIR}" > /dev/null || die
518 - econf "${myeconfargs[@]}"
519 - popd > /dev/null || die
520 - done
521 -}
522 -
523 -src_compile() {
524 - # snmp seems to run during src_compile, too (bug #324739)
525 - addpredict /usr/share/snmp/mibs/.index #nowarn
526 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
527 -
528 - for sapi in ${SAPIS} ; do
529 - if use "${sapi}"; then
530 - cd "${WORKDIR}/sapis-build/$sapi" || \
531 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
532 - emake
533 - fi
534 - done
535 -}
536 -
537 -src_install() {
538 - # see bug #324739 for what happens when we don't have that
539 - addpredict /usr/share/snmp/mibs/.index #nowarn
540 -
541 - # grab the first SAPI that got built and install common files from there
542 - local first_sapi=""
543 - for sapi in $SAPIS ; do
544 - if use $sapi ; then
545 - first_sapi=$sapi
546 - break
547 - fi
548 - done
549 -
550 - # Makefile forgets to create this before trying to write to it...
551 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
552 -
553 - # Install php environment (without any sapis)
554 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
555 - emake INSTALL_ROOT="${D}" \
556 - install-build install-headers install-programs
557 -
558 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
559 -
560 - # Create the directory where we'll put version-specific php scripts
561 - keepdir "/usr/share/php${PHP_MV}"
562 -
563 - local sapi="", file=""
564 - local sapi_list=""
565 -
566 - for sapi in ${SAPIS}; do
567 - if use "${sapi}" ; then
568 - einfo "Installing SAPI: ${sapi}"
569 - cd "${WORKDIR}/sapis-build/${sapi}" || die
570 -
571 - if [[ "${sapi}" == "apache2" ]] ; then
572 - # We're specifically not using emake install-sapi as libtool
573 - # may cause unnecessary relink failures (see bug #351266)
574 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
575 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
576 - "libphp${PHP_MV}$(get_libname)"
577 - keepdir "/usr/$(get_libdir)/apache2/modules"
578 - else
579 - # needed each time, php_install_ini would reset it
580 - local dest="${PHP_DESTDIR#${EPREFIX}}"
581 - into "${dest}"
582 - case "$sapi" in
583 - cli)
584 - source="sapi/cli/php"
585 - ;;
586 - cgi)
587 - source="sapi/cgi/php-cgi"
588 - ;;
589 - fpm)
590 - source="sapi/fpm/php-fpm"
591 - ;;
592 - embed)
593 - source="libs/libphp${PHP_MV}$(get_libname)"
594 - ;;
595 - phpdbg)
596 - source="sapi/phpdbg/phpdbg"
597 - ;;
598 - *)
599 - die "unhandled sapi in src_install"
600 - ;;
601 - esac
602 -
603 - if [[ "${source}" == *"$(get_libname)" ]]; then
604 - dolib.so "${source}"
605 - else
606 - dobin "${source}"
607 - local name="$(basename ${source})"
608 - dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
609 - fi
610 - fi
611 -
612 - php_install_ini "${sapi}"
613 -
614 - # construct correct SAPI string for php-config
615 - # thanks to ferringb for the bash voodoo
616 - if [[ "${sapi}" == "apache2" ]]; then
617 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
618 - else
619 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
620 - fi
621 - fi
622 - done
623 -
624 - # Installing opcache module
625 - if use opcache ; then
626 - into "${PHP_DESTDIR#${EPREFIX}}"
627 - dolib.so "modules/opcache$(get_libname)"
628 - fi
629 -
630 - # Install env.d files
631 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
632 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
633 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
634 -
635 - # set php-config variable correctly (bug #278439)
636 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
637 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
638 -
639 - if use fpm ; then
640 - if use systemd; then
641 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
642 - "php-fpm@${SLOT}.service"
643 - else
644 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
645 - "php-fpm@${SLOT}.service"
646 - fi
647 - fi
648 -}
649 -
650 -src_test() {
651 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
652 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
653 - if [[ ! -x "${PHP_BIN}" ]] ; then
654 - ewarn "Test phase requires USE=cli, skipping"
655 - return
656 - else
657 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
658 - fi
659 -
660 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
661 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
662 - fi
663 -
664 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
665 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
666 - fi
667 -
668 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
669 - "session.save_path=${T}" \
670 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
671 - "session.save_path=${T}"
672 -
673 - for name in ${EXPECTED_TEST_FAILURES}; do
674 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
675 - done
676 -
677 - local failed="$(find -name '*.out')"
678 - if [[ ${failed} != "" ]] ; then
679 - ewarn "The following test cases failed unexpectedly:"
680 - for name in ${failed}; do
681 - ewarn " ${name/.out/}"
682 - done
683 - else
684 - einfo "No unexpected test failures, all fine"
685 - fi
686 -
687 - if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
688 - local passed=""
689 - for name in ${EXPECTED_TEST_FAILURES}; do
690 - [[ -f "${name}.diff" ]] && continue
691 - passed="${passed} ${name}"
692 - done
693 - if [[ ${passed} != "" ]] ; then
694 - einfo "The following test cases passed unexpectedly:"
695 - for name in ${passed}; do
696 - ewarn " ${passed}"
697 - done
698 - else
699 - einfo "None of the known-to-fail tests passed, all fine"
700 - fi
701 - fi
702 -}
703 -
704 -pkg_postinst() {
705 - # Output some general info to the user
706 - if use apache2 ; then
707 - elog
708 - elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
709 - elog "your apache2 command. OpenRC users can append that string to"
710 - elog "APACHE2_OPTS in /etc/conf.d/apache2."
711 - elog
712 - elog "The apache module configuration file 70_mod_php.conf is"
713 - elog "provided (and maintained) by eselect-php."
714 - elog
715 - fi
716 -
717 - # Create the symlinks for php
718 - for m in ${SAPIS}; do
719 - [[ ${m} == 'embed' ]] && continue;
720 - if use $m ; then
721 - local ci=$(eselect php show $m)
722 - if [[ -z $ci ]]; then
723 - eselect php set $m php${SLOT} || die
724 - einfo "Switched ${m} to use php:${SLOT}"
725 - einfo
726 - elif [[ $ci != "php${SLOT}" ]] ; then
727 - elog "To switch $m to use php:${SLOT}, run"
728 - elog " eselect php set $m php${SLOT}"
729 - elog
730 - fi
731 - fi
732 - done
733 -
734 - # Remove dead symlinks for SAPIs that were just disabled. For
735 - # example, if the user has the cgi SAPI enabled, then he has an
736 - # eselect-php symlink for it. If he later reinstalls PHP with
737 - # USE="-cgi", that symlink will break. This call to eselect is
738 - # supposed to remove that dead link per bug 572436.
739 - eselect php cleanup || die
740 -
741 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
742 - elog "To build extensions for this version of PHP, you will need to"
743 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
744 - elog
745 - fi
746 -
747 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
748 - if [[ -n "${PHP_INI_VERSION}" ]]; then
749 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
750 - ewarn 'remove it from your configuration at your convenience. See'
751 - ewarn
752 - ewarn ' https://bugs.gentoo.org/611214'
753 - ewarn
754 - ewarn 'for more information.'
755 - fi
756 -
757 - elog "For details on how version slotting works, please see"
758 - elog "the wiki:"
759 - elog
760 - elog " https://wiki.gentoo.org/wiki/PHP"
761 - elog
762 -}
763 -
764 -pkg_postrm() {
765 - # This serves two purposes. First, if we have just removed the last
766 - # installed version of PHP, then this will remove any dead symlinks
767 - # belonging to eselect-php. Second, if a user upgrades slots from
768 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
769 - # his existing symlinks to point to the new 7.0 installation. The
770 - # latter is bug 432962.
771 - #
772 - # Note: the eselect-php package may not be installed at this point,
773 - # so we can't die() if this command fails.
774 - eselect php cleanup
775 -}
776
777 diff --git a/dev-lang/php/php-7.3.0_alpha3.ebuild b/dev-lang/php/php-7.3.0_alpha3.ebuild
778 deleted file mode 100644
779 index ecc2efff30e..00000000000
780 --- a/dev-lang/php/php-7.3.0_alpha3.ebuild
781 +++ /dev/null
782 @@ -1,743 +0,0 @@
783 -# Copyright 1999-2018 Gentoo Foundation
784 -# Distributed under the terms of the GNU General Public License v2
785 -
786 -EAPI=6
787 -
788 -inherit flag-o-matic versionator systemd
789 -
790 -MY_PV=${PV/_/}
791 -DESCRIPTION="The PHP language runtime engine"
792 -HOMEPAGE="https://secure.php.net/"
793 -SRC_URI="https://downloads.php.net/~cmb/${PN}-${MY_PV}.tar.xz"
794 -
795 -LICENSE="PHP-3.01
796 - BSD
797 - Zend-2.0
798 - bcmath? ( LGPL-2.1+ )
799 - fpm? ( BSD-2 )
800 - gd? ( gd )
801 - unicode? ( BSD-2 LGPL-2.1 )"
802 -
803 -SLOT="$(get_version_component_range 1-2)"
804 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
805 -
806 -S="${WORKDIR}/${PN}-${MY_PV}"
807 -
808 -# We can build the following SAPIs in the given order
809 -SAPIS="embed cli cgi fpm apache2 phpdbg"
810 -
811 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
812 -IUSE="${IUSE}
813 - ${SAPIS/cli/+cli}
814 - threads"
815 -
816 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
817 - coverage +ctype curl debug
818 - enchant exif +fileinfo +filter firebird
819 - flatfile ftp gd gdbm gmp +hash +iconv imap inifile
820 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
821 - mhash mssql mysql mysqli nls
822 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
823 - readline recode selinux +session session-mm sharedmem
824 - +simplexml snmp soap sockets sodium spell sqlite ssl
825 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
826 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
827 -
828 -# The supported (that is, autodetected) versions of BDB are listed in
829 -# the ./configure script. Other versions *work*, but we need to stick to
830 -# the ones that can be detected to avoid a repeat of bug #564824.
831 -COMMON_DEPEND="
832 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
833 - >=dev-libs/libpcre2-10.30[unicode]
834 - fpm? ( acl? ( sys-apps/acl ) )
835 - apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
836 - <www-servers/apache-2.4[threads=] ) )
837 - argon2? ( app-crypt/argon2:= )
838 - berkdb? ( || ( sys-libs/db:5.3
839 - sys-libs/db:5.1
840 - sys-libs/db:4.8
841 - sys-libs/db:4.7
842 - sys-libs/db:4.6
843 - sys-libs/db:4.5 ) )
844 - bzip2? ( app-arch/bzip2:0= )
845 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
846 - coverage? ( dev-util/lcov )
847 - curl? ( >=net-misc/curl-7.10.5 )
848 - enchant? ( app-text/enchant )
849 - firebird? ( dev-db/firebird )
850 - gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
851 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
852 - gmp? ( dev-libs/gmp:0= )
853 - iconv? ( virtual/libiconv )
854 - imap? ( virtual/imap-c-client[kerberos=,ssl=] )
855 - intl? ( dev-libs/icu:= )
856 - iodbc? ( dev-db/libiodbc )
857 - kerberos? ( virtual/krb5 )
858 - ldap? ( >=net-nds/openldap-1.2.11 )
859 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
860 - libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
861 - lmdb? ( dev-db/lmdb:= )
862 - mssql? ( dev-db/freetds[mssql] )
863 - nls? ( sys-devel/gettext )
864 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
865 - odbc? ( >=dev-db/unixODBC-1.8.13 )
866 - postgres? ( dev-db/postgresql:* )
867 - qdbm? ( dev-db/qdbm )
868 - readline? ( sys-libs/readline:0= )
869 - recode? ( app-text/recode )
870 - session-mm? ( dev-libs/mm )
871 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
872 - snmp? ( >=net-analyzer/net-snmp-5.2 )
873 - soap? ( >=dev-libs/libxml2-2.6.8 )
874 - sodium? ( dev-libs/libsodium:= )
875 - spell? ( >=app-text/aspell-0.50 )
876 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
877 - ssl? (
878 - !libressl? ( >=dev-libs/openssl-1.0.1:0= )
879 - libressl? ( dev-libs/libressl:0= )
880 - )
881 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
882 - tokyocabinet? ( dev-db/tokyocabinet )
883 - truetype? ( =media-libs/freetype-2* )
884 - unicode? ( dev-libs/oniguruma:= )
885 - wddx? ( >=dev-libs/libxml2-2.6.8 )
886 - webp? ( media-libs/libwebp:0= )
887 - xml? ( >=dev-libs/libxml2-2.6.8 )
888 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
889 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
890 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
891 - xpm? ( x11-libs/libXpm )
892 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
893 - zip? ( >=sys-libs/zlib-1.2.0.4:0= )
894 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
895 - zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
896 -"
897 -
898 -RDEPEND="${COMMON_DEPEND}
899 - virtual/mta
900 - fpm? (
901 - selinux? ( sec-policy/selinux-phpfpm )
902 - systemd? ( sys-apps/systemd ) )"
903 -
904 -# Bison isn't actually needed when building from a release tarball
905 -# However, the configure script will warn if it's absent or if you
906 -# have an incompatible version installed. See bug 593278.
907 -DEPEND="${COMMON_DEPEND}
908 - app-arch/xz-utils
909 - >=sys-devel/bison-3.0.1"
910 -
911 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
912 -REQUIRED_USE="
913 - || ( cli cgi fpm apache2 embed phpdbg )
914 - cli? ( ^^ ( readline libedit ) )
915 - truetype? ( gd zlib )
916 - webp? ( gd zlib )
917 - cjk? ( gd zlib )
918 - exif? ( gd zlib )
919 - xpm? ( gd zlib )
920 - gd? ( zlib )
921 - simplexml? ( xml )
922 - soap? ( xml )
923 - wddx? ( xml )
924 - xmlrpc? ( || ( xml iconv ) )
925 - xmlreader? ( xml )
926 - xslt? ( xml )
927 - ldap-sasl? ( ldap )
928 - mhash? ( hash )
929 - phar? ( hash )
930 - qdbm? ( !gdbm )
931 - readline? ( !libedit )
932 - recode? ( !imap !mysqli !mysql )
933 - session-mm? ( session !threads )
934 - mysql? ( || ( mysqli pdo ) )
935 - zip-encryption? ( zip )
936 -"
937 -PATCHES=(
938 - "${FILESDIR}/php-freetype-2.9.1.patch"
939 -)
940 -
941 -PHP_MV="$(get_major_version)"
942 -
943 -php_install_ini() {
944 - local phpsapi="${1}"
945 -
946 - # work out where we are installing the ini file
947 - php_set_ini_dir "${phpsapi}"
948 -
949 - # Always install the production INI file, bug 611214.
950 - local phpinisrc="php.ini-production-${phpsapi}"
951 - cp php.ini-production "${phpinisrc}" || die
952 -
953 - # default to /tmp for save_path, bug #282768
954 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
955 -
956 - # Set the extension dir
957 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
958 - -i "${phpinisrc}" || die
959 -
960 - # Set the include path to point to where we want to find PEAR packages
961 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
962 -
963 - dodir "${PHP_INI_DIR#${EPREFIX}}"
964 - insinto "${PHP_INI_DIR#${EPREFIX}}"
965 - newins "${phpinisrc}" php.ini
966 -
967 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
968 - elog
969 -
970 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
971 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
972 -
973 - if use opcache; then
974 - elog "Adding opcache to $PHP_EXT_INI_DIR"
975 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
976 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
977 - dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
978 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
979 - fi
980 -
981 - # SAPI-specific handling
982 - if [[ "${sapi}" == "fpm" ]] ; then
983 - einfo "Installing FPM config files php-fpm.conf and www.conf"
984 - insinto "${PHP_INI_DIR#${EPREFIX}}"
985 - doins sapi/fpm/php-fpm.conf
986 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
987 - doins sapi/fpm/www.conf
988 - fi
989 -
990 - dodoc php.ini-{development,production}
991 -}
992 -
993 -php_set_ini_dir() {
994 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
995 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
996 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
997 -}
998 -
999 -src_prepare() {
1000 - default
1001 -
1002 - # In php-7.x, the FPM pool configuration files have been split off
1003 - # of the main config. By default the pool config files go in
1004 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
1005 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
1006 - # we'll install the pool configuration file "www.conf" there.
1007 - php_set_ini_dir fpm
1008 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
1009 - sapi/fpm/php-fpm.conf.in \
1010 - || die 'failed to move the include directory in php-fpm.conf'
1011 -}
1012 -
1013 -src_configure() {
1014 - addpredict /usr/share/snmp/mibs/.index #nowarn
1015 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
1016 -
1017 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
1018 -
1019 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
1020 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
1021 - local our_conf=(
1022 - --prefix="${PHP_DESTDIR}"
1023 - --mandir="${PHP_DESTDIR}/man"
1024 - --infodir="${PHP_DESTDIR}/info"
1025 - --libdir="${PHP_DESTDIR}/lib"
1026 - --with-libdir="$(get_libdir)"
1027 - --localstatedir="${EPREFIX}/var"
1028 - --without-pear
1029 - $(use_enable threads maintainer-zts)
1030 - )
1031 -
1032 - our_conf+=(
1033 - $(use_with argon2 password-argon2 "${EPREFIX}/usr")
1034 - $(use_enable bcmath bcmath)
1035 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
1036 - $(use_enable calendar calendar)
1037 - $(use_enable coverage gcov)
1038 - $(use_enable ctype ctype)
1039 - $(use_with curl curl "${EPREFIX}/usr")
1040 - $(use_enable xml dom)
1041 - $(use_with enchant enchant "${EPREFIX}/usr")
1042 - $(use_enable exif exif)
1043 - $(use_enable fileinfo fileinfo)
1044 - $(use_enable filter filter)
1045 - $(use_enable ftp ftp)
1046 - $(use_with nls gettext "${EPREFIX}/usr")
1047 - $(use_with gmp gmp "${EPREFIX}/usr")
1048 - $(use_enable hash hash)
1049 - $(use_with mhash mhash "${EPREFIX}/usr")
1050 - $(use_with iconv iconv \
1051 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
1052 - $(use_enable intl intl)
1053 - $(use_enable ipv6 ipv6)
1054 - $(use_enable json json)
1055 - $(use_with kerberos kerberos "${EPREFIX}/usr")
1056 - $(use_enable xml libxml)
1057 - $(use_with xml libxml-dir "${EPREFIX}/usr")
1058 - $(use_enable unicode mbstring)
1059 - $(use_with unicode onig "${EPREFIX}/usr")
1060 - $(use_with ssl openssl "${EPREFIX}/usr")
1061 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
1062 - $(use_enable pcntl pcntl)
1063 - $(use_enable phar phar)
1064 - $(use_enable pdo pdo)
1065 - $(use_enable opcache opcache)
1066 - $(use_with postgres pgsql "${EPREFIX}/usr")
1067 - $(use_enable posix posix)
1068 - $(use_with spell pspell "${EPREFIX}/usr")
1069 - $(use_with recode recode "${EPREFIX}/usr")
1070 - $(use_enable simplexml simplexml)
1071 - $(use_enable sharedmem shmop)
1072 - $(use_with snmp snmp "${EPREFIX}/usr")
1073 - $(use_enable soap soap)
1074 - $(use_enable sockets sockets)
1075 - $(use_with sodium sodium "${EPREFIX}/usr")
1076 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
1077 - $(use_enable sysvipc sysvmsg)
1078 - $(use_enable sysvipc sysvsem)
1079 - $(use_enable sysvipc sysvshm)
1080 - $(use_with tidy tidy "${EPREFIX}/usr")
1081 - $(use_enable tokenizer tokenizer)
1082 - $(use_enable wddx wddx)
1083 - $(use_enable xml xml)
1084 - $(use_enable xmlreader xmlreader)
1085 - $(use_enable xmlwriter xmlwriter)
1086 - $(use_with xmlrpc xmlrpc)
1087 - $(use_with xslt xsl "${EPREFIX}/usr")
1088 - $(use_enable zip zip)
1089 - $(use_with zip-encryption libzip "${EPREFIX}/usr")
1090 - $(use_with zlib zlib "${EPREFIX}/usr")
1091 - $(use_enable debug debug)
1092 - )
1093 -
1094 - # DBA support
1095 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
1096 - || use qdbm || use lmdb || use tokyocabinet ; then
1097 - our_conf+=( "--enable-dba${shared}" )
1098 - fi
1099 -
1100 - # DBA drivers support
1101 - our_conf+=(
1102 - $(use_with cdb cdb)
1103 - $(use_with berkdb db4 "${EPREFIX}/usr")
1104 - $(use_enable flatfile flatfile)
1105 - $(use_with gdbm gdbm "${EPREFIX}/usr")
1106 - $(use_enable inifile inifile)
1107 - $(use_with qdbm qdbm "${EPREFIX}/usr")
1108 - $(use_with lmdb lmdb "${EPREFIX}/usr")
1109 - )
1110 -
1111 - # Support for the GD graphics library
1112 - our_conf+=(
1113 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
1114 - $(use_enable cjk gd-jis-conv)
1115 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
1116 - $(use_with gd png-dir "${EPREFIX}/usr")
1117 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
1118 - )
1119 - if use webp; then
1120 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
1121 - fi
1122 - # enable gd last, so configure can pick up the previous settings
1123 - our_conf+=( $(use_with gd gd) )
1124 -
1125 - # IMAP support
1126 - if use imap ; then
1127 - our_conf+=(
1128 - $(use_with imap imap "${EPREFIX}/usr")
1129 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
1130 - )
1131 - fi
1132 -
1133 - # Interbase/firebird support
1134 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
1135 -
1136 - # LDAP support
1137 - if use ldap ; then
1138 - our_conf+=(
1139 - $(use_with ldap ldap "${EPREFIX}/usr")
1140 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
1141 - )
1142 - fi
1143 -
1144 - # MySQL support
1145 - local mysqllib="mysqlnd"
1146 - local mysqlilib="mysqlnd"
1147 -
1148 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
1149 -
1150 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
1151 - if use mysql || use mysqli ; then
1152 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
1153 - fi
1154 -
1155 - # ODBC support
1156 - our_conf+=(
1157 - $(use_with odbc unixODBC "${EPREFIX}/usr")
1158 - $(use_with iodbc iodbc "${EPREFIX}/usr")
1159 - )
1160 -
1161 - # Oracle support
1162 - our_conf+=( $(use_with oci8-instant-client oci8) )
1163 -
1164 - # PDO support
1165 - if use pdo ; then
1166 - our_conf+=(
1167 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
1168 - $(use_with mysql pdo-mysql "${mysqllib}")
1169 - $(use_with postgres pdo-pgsql)
1170 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
1171 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
1172 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
1173 - $(use_with oci8-instant-client pdo-oci)
1174 - )
1175 - fi
1176 -
1177 - # readline/libedit support
1178 - our_conf+=(
1179 - $(use_with readline readline "${EPREFIX}/usr")
1180 - $(use_with libedit libedit "${EPREFIX}/usr")
1181 - )
1182 -
1183 - # Session support
1184 - if use session ; then
1185 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
1186 - else
1187 - our_conf+=( $(use_enable session session) )
1188 - fi
1189 -
1190 - # Use pic for shared modules such as apache2's mod_php
1191 - our_conf+=( --with-pic )
1192 -
1193 - # we use the system copy of pcre
1194 - # --with-pcre-regex affects ext/pcre
1195 - # --with-pcre-dir affects ext/filter and ext/zip
1196 - # --with-pcre-valgrind cannot be enabled with system pcre
1197 - # Many arches don't support pcre-jit
1198 - our_conf+=(
1199 - --with-pcre-regex="${EPREFIX}/usr"
1200 - --with-pcre-dir="${EPREFIX}/usr"
1201 - --without-pcre-valgrind
1202 - --without-pcre-jit
1203 - )
1204 -
1205 - # Catch CFLAGS problems
1206 - # Fixes bug #14067.
1207 - # Changed order to run it in reverse for bug #32022 and #12021.
1208 - replace-cpu-flags "k6*" "i586"
1209 -
1210 - # Cache the ./configure test results between SAPIs.
1211 - our_conf+=( --cache-file="${T}/config.cache" )
1212 -
1213 - # Support user-passed configuration parameters
1214 - our_conf+=( ${EXTRA_ECONF:-} )
1215 -
1216 - # Support the Apache2 extras, they must be set globally for all
1217 - # SAPIs to work correctly, especially for external PHP extensions
1218 -
1219 - mkdir -p "${WORKDIR}/sapis-build" || die
1220 - for one_sapi in $SAPIS ; do
1221 - use "${one_sapi}" || continue
1222 - php_set_ini_dir "${one_sapi}"
1223 -
1224 - # The BUILD_DIR variable is used to determine where to output
1225 - # the files that autotools creates. This was all originally
1226 - # based on the autotools-utils eclass.
1227 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
1228 - cp -a "${S}" "${BUILD_DIR}" || die
1229 - cd "${BUILD_DIR}" || die
1230 -
1231 - local sapi_conf=(
1232 - --with-config-file-path="${PHP_INI_DIR}"
1233 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
1234 - )
1235 -
1236 - for sapi in $SAPIS ; do
1237 - case "$sapi" in
1238 - cli|cgi|embed|fpm|phpdbg)
1239 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
1240 - sapi_conf+=( "--enable-${sapi}" )
1241 - if [[ "fpm" == "${sapi}" ]] ; then
1242 - sapi_conf+=(
1243 - $(use_with acl fpm-acl)
1244 - $(use_with systemd fpm-systemd)
1245 - )
1246 - fi
1247 - else
1248 - sapi_conf+=( "--disable-${sapi}" )
1249 - fi
1250 - ;;
1251 -
1252 - apache2)
1253 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
1254 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
1255 - else
1256 - sapi_conf+=( --without-apxs2 )
1257 - fi
1258 - ;;
1259 - esac
1260 - done
1261 -
1262 - # Construct the $myeconfargs array by concatenating $our_conf
1263 - # (the common args) and $sapi_conf (the SAPI-specific args).
1264 - local myeconfargs=( "${our_conf[@]}" )
1265 - myeconfargs+=( "${sapi_conf[@]}" )
1266 -
1267 - pushd "${BUILD_DIR}" > /dev/null || die
1268 - econf "${myeconfargs[@]}"
1269 - popd > /dev/null || die
1270 - done
1271 -}
1272 -
1273 -src_compile() {
1274 - # snmp seems to run during src_compile, too (bug #324739)
1275 - addpredict /usr/share/snmp/mibs/.index #nowarn
1276 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
1277 -
1278 - for sapi in ${SAPIS} ; do
1279 - if use "${sapi}"; then
1280 - cd "${WORKDIR}/sapis-build/$sapi" || \
1281 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
1282 - emake
1283 - fi
1284 - done
1285 -}
1286 -
1287 -src_install() {
1288 - # see bug #324739 for what happens when we don't have that
1289 - addpredict /usr/share/snmp/mibs/.index #nowarn
1290 -
1291 - # grab the first SAPI that got built and install common files from there
1292 - local first_sapi=""
1293 - for sapi in $SAPIS ; do
1294 - if use $sapi ; then
1295 - first_sapi=$sapi
1296 - break
1297 - fi
1298 - done
1299 -
1300 - # Makefile forgets to create this before trying to write to it...
1301 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
1302 -
1303 - # Install php environment (without any sapis)
1304 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
1305 - emake INSTALL_ROOT="${D}" \
1306 - install-build install-headers install-programs
1307 -
1308 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
1309 -
1310 - # Create the directory where we'll put version-specific php scripts
1311 - keepdir "/usr/share/php${PHP_MV}"
1312 -
1313 - local sapi="", file=""
1314 - local sapi_list=""
1315 -
1316 - for sapi in ${SAPIS}; do
1317 - if use "${sapi}" ; then
1318 - einfo "Installing SAPI: ${sapi}"
1319 - cd "${WORKDIR}/sapis-build/${sapi}" || die
1320 -
1321 - if [[ "${sapi}" == "apache2" ]] ; then
1322 - # We're specifically not using emake install-sapi as libtool
1323 - # may cause unnecessary relink failures (see bug #351266)
1324 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
1325 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
1326 - "libphp${PHP_MV}$(get_libname)"
1327 - keepdir "/usr/$(get_libdir)/apache2/modules"
1328 - else
1329 - # needed each time, php_install_ini would reset it
1330 - local dest="${PHP_DESTDIR#${EPREFIX}}"
1331 - into "${dest}"
1332 - case "$sapi" in
1333 - cli)
1334 - source="sapi/cli/php"
1335 - ;;
1336 - cgi)
1337 - source="sapi/cgi/php-cgi"
1338 - ;;
1339 - fpm)
1340 - source="sapi/fpm/php-fpm"
1341 - ;;
1342 - embed)
1343 - source="libs/libphp${PHP_MV}$(get_libname)"
1344 - ;;
1345 - phpdbg)
1346 - source="sapi/phpdbg/phpdbg"
1347 - ;;
1348 - *)
1349 - die "unhandled sapi in src_install"
1350 - ;;
1351 - esac
1352 -
1353 - if [[ "${source}" == *"$(get_libname)" ]]; then
1354 - dolib.so "${source}"
1355 - else
1356 - dobin "${source}"
1357 - local name="$(basename ${source})"
1358 - dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
1359 - fi
1360 - fi
1361 -
1362 - php_install_ini "${sapi}"
1363 -
1364 - # construct correct SAPI string for php-config
1365 - # thanks to ferringb for the bash voodoo
1366 - if [[ "${sapi}" == "apache2" ]]; then
1367 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
1368 - else
1369 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
1370 - fi
1371 - fi
1372 - done
1373 -
1374 - # Installing opcache module
1375 - if use opcache ; then
1376 - into "${PHP_DESTDIR#${EPREFIX}}"
1377 - dolib.so "modules/opcache$(get_libname)"
1378 - fi
1379 -
1380 - # Install env.d files
1381 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
1382 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
1383 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
1384 -
1385 - # set php-config variable correctly (bug #278439)
1386 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
1387 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
1388 -
1389 - if use fpm ; then
1390 - if use systemd; then
1391 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
1392 - "php-fpm@${SLOT}.service"
1393 - else
1394 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
1395 - "php-fpm@${SLOT}.service"
1396 - fi
1397 - fi
1398 -}
1399 -
1400 -src_test() {
1401 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
1402 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
1403 - if [[ ! -x "${PHP_BIN}" ]] ; then
1404 - ewarn "Test phase requires USE=cli, skipping"
1405 - return
1406 - else
1407 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
1408 - fi
1409 -
1410 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
1411 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
1412 - fi
1413 -
1414 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
1415 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
1416 - fi
1417 -
1418 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
1419 - "session.save_path=${T}" \
1420 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
1421 - "session.save_path=${T}"
1422 -
1423 - for name in ${EXPECTED_TEST_FAILURES}; do
1424 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
1425 - done
1426 -
1427 - local failed="$(find -name '*.out')"
1428 - if [[ ${failed} != "" ]] ; then
1429 - ewarn "The following test cases failed unexpectedly:"
1430 - for name in ${failed}; do
1431 - ewarn " ${name/.out/}"
1432 - done
1433 - else
1434 - einfo "No unexpected test failures, all fine"
1435 - fi
1436 -
1437 - if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
1438 - local passed=""
1439 - for name in ${EXPECTED_TEST_FAILURES}; do
1440 - [[ -f "${name}.diff" ]] && continue
1441 - passed="${passed} ${name}"
1442 - done
1443 - if [[ ${passed} != "" ]] ; then
1444 - einfo "The following test cases passed unexpectedly:"
1445 - for name in ${passed}; do
1446 - ewarn " ${passed}"
1447 - done
1448 - else
1449 - einfo "None of the known-to-fail tests passed, all fine"
1450 - fi
1451 - fi
1452 -}
1453 -
1454 -pkg_postinst() {
1455 - # Output some general info to the user
1456 - if use apache2 ; then
1457 - elog
1458 - elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
1459 - elog "your apache2 command. OpenRC users can append that string to"
1460 - elog "APACHE2_OPTS in /etc/conf.d/apache2."
1461 - elog
1462 - elog "The apache module configuration file 70_mod_php.conf is"
1463 - elog "provided (and maintained) by eselect-php."
1464 - elog
1465 - fi
1466 -
1467 - # Create the symlinks for php
1468 - for m in ${SAPIS}; do
1469 - [[ ${m} == 'embed' ]] && continue;
1470 - if use $m ; then
1471 - local ci=$(eselect php show $m)
1472 - if [[ -z $ci ]]; then
1473 - eselect php set $m php${SLOT} || die
1474 - einfo "Switched ${m} to use php:${SLOT}"
1475 - einfo
1476 - elif [[ $ci != "php${SLOT}" ]] ; then
1477 - elog "To switch $m to use php:${SLOT}, run"
1478 - elog " eselect php set $m php${SLOT}"
1479 - elog
1480 - fi
1481 - fi
1482 - done
1483 -
1484 - # Remove dead symlinks for SAPIs that were just disabled. For
1485 - # example, if the user has the cgi SAPI enabled, then he has an
1486 - # eselect-php symlink for it. If he later reinstalls PHP with
1487 - # USE="-cgi", that symlink will break. This call to eselect is
1488 - # supposed to remove that dead link per bug 572436.
1489 - eselect php cleanup || die
1490 -
1491 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
1492 - elog "To build extensions for this version of PHP, you will need to"
1493 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
1494 - elog
1495 - fi
1496 -
1497 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
1498 - if [[ -n "${PHP_INI_VERSION}" ]]; then
1499 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
1500 - ewarn 'remove it from your configuration at your convenience. See'
1501 - ewarn
1502 - ewarn ' https://bugs.gentoo.org/611214'
1503 - ewarn
1504 - ewarn 'for more information.'
1505 - fi
1506 -
1507 - elog "For details on how version slotting works, please see"
1508 - elog "the wiki:"
1509 - elog
1510 - elog " https://wiki.gentoo.org/wiki/PHP"
1511 - elog
1512 -}
1513 -
1514 -pkg_postrm() {
1515 - # This serves two purposes. First, if we have just removed the last
1516 - # installed version of PHP, then this will remove any dead symlinks
1517 - # belonging to eselect-php. Second, if a user upgrades slots from
1518 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
1519 - # his existing symlinks to point to the new 7.0 installation. The
1520 - # latter is bug 432962.
1521 - #
1522 - # Note: the eselect-php package may not be installed at this point,
1523 - # so we can't die() if this command fails.
1524 - eselect php cleanup
1525 -}