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