Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/
Date: Tue, 01 Sep 2020 11:42:26
Message-Id: 1598960365.7476c2a596118d7287feb80a487f8e204f495334.mjo@gentoo
1 commit: 7476c2a596118d7287feb80a487f8e204f495334
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 1 11:39:25 2020 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 1 11:39:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7476c2a5
7
8 dev-lang/php: remove old versions vulnerable to CVE-2020-7068.
9
10 Bug: https://bugs.gentoo.org/736158
11 Package-Manager: Portage-2.3.103, Repoman-2.3.23
12 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
13
14 dev-lang/php/Manifest | 8 -
15 dev-lang/php/php-7.2.31.ebuild | 759 --------------------------------------
16 dev-lang/php/php-7.2.32.ebuild | 759 --------------------------------------
17 dev-lang/php/php-7.3.18.ebuild | 760 ---------------------------------------
18 dev-lang/php/php-7.3.19.ebuild | 760 ---------------------------------------
19 dev-lang/php/php-7.3.20.ebuild | 760 ---------------------------------------
20 dev-lang/php/php-7.4.6.ebuild | 750 --------------------------------------
21 dev-lang/php/php-7.4.7.ebuild | 750 --------------------------------------
22 dev-lang/php/php-7.4.8-r1.ebuild | 750 --------------------------------------
23 9 files changed, 6056 deletions(-)
24
25 diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
26 index a95fa81e71b..715c9298ee8 100644
27 --- a/dev-lang/php/Manifest
28 +++ b/dev-lang/php/Manifest
29 @@ -1,11 +1,3 @@
30 -DIST php-7.2.31.tar.xz 12309936 BLAKE2B fc81f41dd4ec8695029bfe1993d76b1fdfe7f16d926f57302b9e85f3acd250967db9b9f0597c47589ae553d5faaaf0266e24b5b64247e017361d991bf96cd4de SHA512 b21c504d0af2c095e4ae5a62c810af96171b927a27ea4694f59555c0d47798d61c3491a92941099cd9c978b3b0f41852ca2cf745e42ee3d9a6d107a5a884c9ee
31 -DIST php-7.2.32.tar.xz 12251152 BLAKE2B ae4cf19c2c61ea149b423248feef31e34fa697e60782e8a4fdf9bee430703e9bd8251e4140042148aa73dfbf4d39d215be498d1273e1c68bf52a14e4126d2e1d SHA512 47e84f9f493951b33625e149291bcde87189ecb28636809b3ec6264ed17e85f842fa40f3a53754f7bf948a5a6963f8773d35f773760c0c2bf21a9dbd0314736e
32 DIST php-7.2.33.tar.xz 12310624 BLAKE2B 3eca6a2aee79b791abb6b0427496e6041b63800ac1aeea86b4465e9326fdcde5d7a69e6323902b6874f27cf6197b705397381319d0b5ff6f93605e791bf0eb86 SHA512 1c28e741fc6de88a33e1307bc88ba8dddf1ba767ce6eb9c1f0da35482c7d3ee1154831b997fa746340c4b7ec8de9196b21a9b1cf319c8e69eca2c92602ceee4a
33 -DIST php-7.3.18.tar.xz 12116280 BLAKE2B 73d82e4a22f29dbeec221ef3109592a40e559238a0093e80e8e10bcd7de64f3bd58dd6f0835ddf3d9c2323fc37d738301b07291ca11a84c70ddced172676bc20 SHA512 e626091c835f6d165ff48ae3be8ddf7a66b0a320c6d77dc98fb73235d560814c180112a9e5478a5b3b6bb01ed99a50f8025fdc3d1ef80cca59e04ac248f9b0bf
34 -DIST php-7.3.19.tar.xz 12117968 BLAKE2B 84172d2aad901cdca97a6f4c3405d3f4f25c72053ca09ef8a5c6ef93d35b23ac3a7771ff9f2c4ddd000512fe288f3fb25b17bb023f3fed16735f0d6ea5bda790 SHA512 f37800d9e1bf808ad1099f6190965cc75781e7bf6d2c341a7143aca435abc9974a2987cbfeb8c2b35805c946218343612906fde3cc84b195c2c586945869b760
35 -DIST php-7.3.20.tar.xz 12118188 BLAKE2B add1e0dcc264cd12ea9ee000becb83c42b2607c0c9ae828994856a183ae94e9a580226559ccfa28dece225ad9a1c6bd4989ada08f09bbc461b33f0b1b30b12ea SHA512 4d035e7420ceb64d912a1936db5d311c06c61d09c9d4665c27fba9709fe45b30d5771bb485fb24393d9ee689a0f7ddcbc577e9ee7a7b31341b0203f1b805b886
36 DIST php-7.3.21.tar.xz 12123192 BLAKE2B ff5fca092f6c4e92c009ade9f4bee01ec07686645a4844297cee0518f12b3ebc16a7322b64579d9ee2d3a3f7cd62ed9184d0afbe77dbcf2d24a11139242c88c5 SHA512 fc2b9a40c92a6e79522a49cd025e56c0a52c2c2bd3f7379aaf004ca6b67957cf4ad059c40a5daac45665710abd07962562870430338f700f573856d797df3ff4
37 -DIST php-7.4.6.tar.xz 10284824 BLAKE2B 83bbbb536e48c6ab6ef357283d2f99a0f1825fdbb1867598514dc87cb8a7181298aa1e6d45659b7a4343fdacdacbbfec9e4cca89f85fe53c9e48696e534da710 SHA512 786634d53ed100cc7638e64ca340efdd42405c258638f3f97fcd1816d4f0c643dc8d8b2b0f60d36904343dc8c2af7f9b8e4a652ea66ec2fe324290c72bc09c13
38 -DIST php-7.4.7.tar.xz 10286580 BLAKE2B fb297cc5847012e1d222479e00132c8838cb990a5face43620ced6fb82cabeb544c0de230e24e25ed5449b3050158e836743e514197180b40ebf240ceca45db6 SHA512 5b3ba690e610e0511675f06a10afe9edbcfa90b5b16956d22aab225cdf140b55e5a8a551e7b189d30404981c94c6921b8c4aed00102546cfa38784a719704b80
39 -DIST php-7.4.8.tar.xz 10281976 BLAKE2B c85dfacd259e78de69348c3af7c02c866622a414cbb78ef5f53aa739bcf150921c272b26f578f18734dc6f566f19f4d890b6a64aabf04ad9e6b53f11757c3b8a SHA512 cfb23eac731a0eabed83908d7c056a123cd9a73ccc091d92b8601366da4cd95ded8623156eaa0458405f23d8bb9dc244d117bd99876f916ef582e3966dc78b44
40 DIST php-7.4.9.tar.xz 10289560 BLAKE2B 0fd9d82539a46f7ce58857560f5aeb4be6dfe5f5a05f8b8c55c30d6000d19408b4ecc460c9135736298cdb8312ec958ab8358110b2b265bb8c185f80b1522dc6 SHA512 6179c2d867d6775d7f41785003c36d06ce620e7746ea7e6a4d275264e814a66d465776b47b04e2926ed1228cf58f2c15cdda74faf10372435c74ede7aeb79e18
41
42 diff --git a/dev-lang/php/php-7.2.31.ebuild b/dev-lang/php/php-7.2.31.ebuild
43 deleted file mode 100644
44 index 20ab7418c2a..00000000000
45 --- a/dev-lang/php/php-7.2.31.ebuild
46 +++ /dev/null
47 @@ -1,759 +0,0 @@
48 -# Copyright 1999-2020 Gentoo Authors
49 -# Distributed under the terms of the GNU General Public License v2
50 -
51 -EAPI="7"
52 -
53 -inherit flag-o-matic systemd autotools
54 -
55 -DESCRIPTION="The PHP language runtime engine"
56 -HOMEPAGE="https://www.php.net/"
57 -SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
58 -
59 -LICENSE="PHP-3.01
60 - BSD
61 - Zend-2.0
62 - bcmath? ( LGPL-2.1+ )
63 - fpm? ( BSD-2 )
64 - gd? ( gd )
65 - unicode? ( BSD-2 LGPL-2.1 )"
66 -
67 -SLOT="$(ver_cut 1-2)"
68 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
69 -
70 -# We can build the following SAPIs in the given order
71 -SAPIS="embed cli cgi fpm apache2 phpdbg"
72 -
73 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
74 -IUSE="${IUSE}
75 - ${SAPIS/cli/+cli}
76 - threads"
77 -
78 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
79 - coverage +ctype curl debug
80 - enchant exif +fileinfo +filter firebird
81 - +flatfile ftp gd gdbm gmp +hash +iconv imap inifile
82 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
83 - mhash mssql mysql mysqli nls
84 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
85 - readline recode selinux +session session-mm sharedmem
86 - +simplexml snmp soap sockets sodium spell sqlite ssl
87 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
88 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
89 -
90 -# The supported (that is, autodetected) versions of BDB are listed in
91 -# the ./configure script. Other versions *work*, but we need to stick to
92 -# the ones that can be detected to avoid a repeat of bug #564824.
93 -COMMON_DEPEND="
94 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
95 - >=dev-libs/libpcre-8.32[unicode]
96 - fpm? ( acl? ( sys-apps/acl ) )
97 - apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
98 - argon2? ( app-crypt/argon2:= )
99 - berkdb? ( || ( sys-libs/db:5.3
100 - sys-libs/db:5.1
101 - sys-libs/db:4.8
102 - sys-libs/db:4.7
103 - sys-libs/db:4.6
104 - sys-libs/db:4.5 ) )
105 - bzip2? ( app-arch/bzip2:0= )
106 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
107 - coverage? ( dev-util/lcov )
108 - curl? ( >=net-misc/curl-7.10.5 )
109 - enchant? ( <app-text/enchant-2.0:0 )
110 - firebird? ( dev-db/firebird )
111 - gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= sys-libs/zlib )
112 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
113 - gmp? ( dev-libs/gmp:0= )
114 - iconv? ( virtual/libiconv )
115 - imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
116 - intl? ( dev-libs/icu:= )
117 - iodbc? ( dev-db/libiodbc )
118 - kerberos? ( virtual/krb5 )
119 - ldap? ( >=net-nds/openldap-1.2.11 )
120 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
121 - libedit? ( dev-libs/libedit )
122 - lmdb? ( dev-db/lmdb:= )
123 - mssql? ( dev-db/freetds[mssql] )
124 - nls? ( sys-devel/gettext )
125 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
126 - odbc? ( >=dev-db/unixODBC-1.8.13 )
127 - postgres? ( dev-db/postgresql:* )
128 - qdbm? ( dev-db/qdbm )
129 - readline? ( sys-libs/readline:0= )
130 - recode? ( app-text/recode )
131 - session-mm? ( dev-libs/mm )
132 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
133 - snmp? ( >=net-analyzer/net-snmp-5.2 )
134 - soap? ( >=dev-libs/libxml2-2.6.8 )
135 - sodium? ( dev-libs/libsodium:= )
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:0= )
141 - )
142 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
143 - tokyocabinet? ( dev-db/tokyocabinet )
144 - truetype? ( =media-libs/freetype-2* )
145 - unicode? ( dev-libs/oniguruma:= )
146 - wddx? ( >=dev-libs/libxml2-2.6.8 )
147 - webp? ( media-libs/libwebp:0= )
148 - xml? ( >=dev-libs/libxml2-2.6.8 )
149 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
150 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
151 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
152 - xpm? ( x11-libs/libXpm )
153 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
154 - zip? ( sys-libs/zlib:0= )
155 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
156 - zlib? ( sys-libs/zlib:0= )
157 -"
158 -
159 -RDEPEND="${COMMON_DEPEND}
160 - virtual/mta
161 - fpm? (
162 - selinux? ( sec-policy/selinux-phpfpm )
163 - systemd? ( sys-apps/systemd ) )"
164 -
165 -# Bison isn't actually needed when building from a release tarball
166 -# However, the configure script will warn if it's absent or if you
167 -# have an incompatible version installed. See bug 593278.
168 -DEPEND="${COMMON_DEPEND}
169 - app-arch/xz-utils
170 - >=sys-devel/bison-3.0.1"
171 -
172 -BDEPEND="virtual/pkgconfig"
173 -
174 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
175 -REQUIRED_USE="
176 - || ( cli cgi fpm apache2 embed phpdbg )
177 - cli? ( ^^ ( readline libedit ) )
178 - truetype? ( gd zlib )
179 - webp? ( gd zlib )
180 - cjk? ( gd zlib )
181 - exif? ( gd zlib )
182 - xpm? ( gd zlib )
183 - gd? ( zlib )
184 - simplexml? ( xml )
185 - soap? ( xml )
186 - wddx? ( xml )
187 - xmlrpc? ( || ( xml iconv ) )
188 - xmlreader? ( xml )
189 - xslt? ( xml )
190 - ldap-sasl? ( ldap )
191 - mhash? ( hash )
192 - phar? ( hash )
193 - qdbm? ( !gdbm )
194 - readline? ( !libedit )
195 - recode? ( !imap !mysqli !mysql )
196 - session-mm? ( session !threads )
197 - mysql? ( hash || ( mysqli pdo ) )
198 - mysqli? ( hash )
199 - zip-encryption? ( zip )
200 -"
201 -
202 -RESTRICT="!test? ( test )"
203 -
204 -PATCHES=(
205 - "${FILESDIR}/php-freetype-2.9.1.patch"
206 - "${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch"
207 -)
208 -
209 -PHP_MV="$(ver_cut 1)"
210 -
211 -php_install_ini() {
212 - local phpsapi="${1}"
213 -
214 - # work out where we are installing the ini file
215 - php_set_ini_dir "${phpsapi}"
216 -
217 - # Always install the production INI file, bug 611214.
218 - local phpinisrc="php.ini-production-${phpsapi}"
219 - cp php.ini-production "${phpinisrc}" || die
220 -
221 - # default to /tmp for save_path, bug #282768
222 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
223 -
224 - # Set the extension dir
225 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
226 - -i "${phpinisrc}" || die
227 -
228 - # Set the include path to point to where we want to find PEAR packages
229 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
230 -
231 - insinto "${PHP_INI_DIR#${EPREFIX}}"
232 - newins "${phpinisrc}" php.ini
233 -
234 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
235 - elog
236 -
237 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
238 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
239 -
240 - if use opcache; then
241 - elog "Adding opcache to $PHP_EXT_INI_DIR"
242 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
243 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
244 - dosym "../ext/opcache.ini" \
245 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
246 - fi
247 -
248 - # SAPI-specific handling
249 - if [[ "${sapi}" == "fpm" ]] ; then
250 - einfo "Installing FPM config files php-fpm.conf and www.conf"
251 - insinto "${PHP_INI_DIR#${EPREFIX}}"
252 - doins sapi/fpm/php-fpm.conf
253 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
254 - doins sapi/fpm/www.conf
255 - fi
256 -
257 - dodoc php.ini-{development,production}
258 -}
259 -
260 -php_set_ini_dir() {
261 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
262 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
263 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
264 -}
265 -
266 -src_prepare() {
267 - default
268 -
269 - # In php-7.x, the FPM pool configuration files have been split off
270 - # of the main config. By default the pool config files go in
271 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
272 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
273 - # we'll install the pool configuration file "www.conf" there.
274 - php_set_ini_dir fpm
275 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
276 - sapi/fpm/php-fpm.conf.in \
277 - || die 'failed to move the include directory in php-fpm.conf'
278 -
279 - # Bug 669566 - necessary so that build tools are updated for commands like pecl
280 - # Force rebuilding aclocal.m4
281 - rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
282 - eautoreconf
283 -}
284 -
285 -src_configure() {
286 - addpredict /usr/share/snmp/mibs/.index #nowarn
287 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
288 -
289 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
290 -
291 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
292 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
293 - local our_conf=(
294 - --prefix="${PHP_DESTDIR}"
295 - --mandir="${PHP_DESTDIR}/man"
296 - --infodir="${PHP_DESTDIR}/info"
297 - --libdir="${PHP_DESTDIR}/lib"
298 - --with-libdir="$(get_libdir)"
299 - --localstatedir="${EPREFIX}/var"
300 - --without-pear
301 - $(use_enable threads maintainer-zts)
302 - )
303 -
304 - our_conf+=(
305 - $(use_with argon2 password-argon2 "${EPREFIX}/usr")
306 - $(use_enable bcmath bcmath)
307 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
308 - $(use_enable calendar calendar)
309 - $(use_enable coverage gcov)
310 - $(use_enable ctype ctype)
311 - $(use_with curl curl "${EPREFIX}/usr")
312 - $(use_enable xml dom)
313 - $(use_with enchant enchant "${EPREFIX}/usr")
314 - $(use_enable exif exif)
315 - $(use_enable fileinfo fileinfo)
316 - $(use_enable filter filter)
317 - $(use_enable ftp ftp)
318 - $(use_with nls gettext "${EPREFIX}/usr")
319 - $(use_with gmp gmp "${EPREFIX}/usr")
320 - $(use_enable hash hash)
321 - $(use_with mhash mhash "${EPREFIX}/usr")
322 - $(use_with iconv iconv \
323 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
324 - $(use_enable intl intl)
325 - $(use_enable ipv6 ipv6)
326 - $(use_enable json json)
327 - $(use_with kerberos kerberos "${EPREFIX}/usr")
328 - $(use_enable xml libxml)
329 - $(use_with xml libxml-dir "${EPREFIX}/usr")
330 - $(use_enable unicode mbstring)
331 - $(use_with unicode onig "${EPREFIX}/usr")
332 - $(use_with ssl openssl "${EPREFIX}/usr")
333 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
334 - $(use_enable pcntl pcntl)
335 - $(use_enable phar phar)
336 - $(use_enable pdo pdo)
337 - $(use_enable opcache opcache)
338 - $(use_with postgres pgsql "${EPREFIX}/usr")
339 - $(use_enable posix posix)
340 - $(use_with spell pspell "${EPREFIX}/usr")
341 - $(use_with recode recode "${EPREFIX}/usr")
342 - $(use_enable simplexml simplexml)
343 - $(use_enable sharedmem shmop)
344 - $(use_with snmp snmp "${EPREFIX}/usr")
345 - $(use_enable soap soap)
346 - $(use_enable sockets sockets)
347 - $(use_with sodium sodium "${EPREFIX}/usr")
348 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
349 - $(use_enable sysvipc sysvmsg)
350 - $(use_enable sysvipc sysvsem)
351 - $(use_enable sysvipc sysvshm)
352 - $(use_with tidy tidy "${EPREFIX}/usr")
353 - $(use_enable tokenizer tokenizer)
354 - $(use_enable wddx wddx)
355 - $(use_enable xml xml)
356 - $(use_enable xmlreader xmlreader)
357 - $(use_enable xmlwriter xmlwriter)
358 - $(use_with xmlrpc xmlrpc)
359 - $(use_with xslt xsl "${EPREFIX}/usr")
360 - $(use_enable zip zip)
361 - $(use_with zip-encryption libzip "${EPREFIX}/usr")
362 - $(use_with zlib zlib "${EPREFIX}/usr")
363 - $(use_enable debug debug)
364 - )
365 -
366 - # DBA support
367 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
368 - || use qdbm || use lmdb || use tokyocabinet ; then
369 - our_conf+=( "--enable-dba${shared}" )
370 - fi
371 -
372 - # DBA drivers support
373 - our_conf+=(
374 - $(use_with cdb cdb)
375 - $(use_with berkdb db4 "${EPREFIX}/usr")
376 - $(use_enable flatfile flatfile)
377 - $(use_with gdbm gdbm "${EPREFIX}/usr")
378 - $(use_enable inifile inifile)
379 - $(use_with qdbm qdbm "${EPREFIX}/usr")
380 - $(use_with lmdb lmdb "${EPREFIX}/usr")
381 - )
382 -
383 - # Support for the GD graphics library
384 - our_conf+=(
385 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
386 - $(use_enable cjk gd-jis-conv)
387 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
388 - $(use_with gd png-dir "${EPREFIX}/usr")
389 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
390 - )
391 - if use webp; then
392 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
393 - fi
394 - # enable gd last, so configure can pick up the previous settings
395 - our_conf+=( $(use_with gd gd) )
396 -
397 - # IMAP support
398 - if use imap ; then
399 - our_conf+=(
400 - $(use_with imap imap "${EPREFIX}/usr")
401 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
402 - )
403 - fi
404 -
405 - # Interbase/firebird support
406 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
407 -
408 - # LDAP support
409 - if use ldap ; then
410 - our_conf+=(
411 - $(use_with ldap ldap "${EPREFIX}/usr")
412 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
413 - )
414 - fi
415 -
416 - # MySQL support
417 - local mysqllib="mysqlnd"
418 - local mysqlilib="mysqlnd"
419 -
420 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
421 -
422 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
423 - if use mysql || use mysqli ; then
424 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
425 - fi
426 -
427 - # ODBC support
428 - our_conf+=(
429 - $(use_with odbc unixODBC "${EPREFIX}/usr")
430 - $(use_with iodbc iodbc "${EPREFIX}/usr")
431 - )
432 -
433 - # Oracle support
434 - our_conf+=( $(use_with oci8-instant-client oci8) )
435 -
436 - # PDO support
437 - if use pdo ; then
438 - our_conf+=(
439 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
440 - $(use_with mysql pdo-mysql "${mysqllib}")
441 - $(use_with postgres pdo-pgsql)
442 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
443 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
444 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
445 - $(use_with oci8-instant-client pdo-oci)
446 - )
447 - fi
448 -
449 - # readline/libedit support
450 - our_conf+=(
451 - $(use_with readline readline "${EPREFIX}/usr")
452 - $(use_with libedit libedit "${EPREFIX}/usr")
453 - )
454 -
455 - # Session support
456 - if use session ; then
457 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
458 - else
459 - our_conf+=( $(use_enable session session) )
460 - fi
461 -
462 - # Use pic for shared modules such as apache2's mod_php
463 - our_conf+=( --with-pic )
464 -
465 - # we use the system copy of pcre
466 - # --with-pcre-regex affects ext/pcre
467 - # --with-pcre-dir affects ext/filter and ext/zip
468 - # --with-pcre-valgrind cannot be enabled with system pcre
469 - # Many arches don't support pcre-jit
470 - our_conf+=(
471 - --with-pcre-regex="${EPREFIX}/usr"
472 - --with-pcre-dir="${EPREFIX}/usr"
473 - --without-pcre-valgrind
474 - --without-pcre-jit
475 - )
476 -
477 - # Catch CFLAGS problems
478 - # Fixes bug #14067.
479 - # Changed order to run it in reverse for bug #32022 and #12021.
480 - replace-cpu-flags "k6*" "i586"
481 -
482 - # Cache the ./configure test results between SAPIs.
483 - our_conf+=( --cache-file="${T}/config.cache" )
484 -
485 - # Support user-passed configuration parameters
486 - our_conf+=( ${EXTRA_ECONF:-} )
487 -
488 - # Support the Apache2 extras, they must be set globally for all
489 - # SAPIs to work correctly, especially for external PHP extensions
490 -
491 - local one_sapi
492 - local sapi
493 - mkdir -p "${WORKDIR}/sapis-build" || die
494 - for one_sapi in $SAPIS ; do
495 - use "${one_sapi}" || continue
496 - php_set_ini_dir "${one_sapi}"
497 -
498 - # The BUILD_DIR variable is used to determine where to output
499 - # the files that autotools creates. This was all originally
500 - # based on the autotools-utils eclass.
501 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
502 - cp -a "${S}" "${BUILD_DIR}" || die
503 - cd "${BUILD_DIR}" || die
504 -
505 - local sapi_conf=(
506 - --with-config-file-path="${PHP_INI_DIR}"
507 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
508 - )
509 -
510 - for sapi in $SAPIS ; do
511 - case "$sapi" in
512 - cli|cgi|embed|fpm|phpdbg)
513 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
514 - sapi_conf+=( "--enable-${sapi}" )
515 - if [[ "fpm" == "${sapi}" ]] ; then
516 - sapi_conf+=(
517 - $(use_with acl fpm-acl)
518 - $(use_with systemd fpm-systemd)
519 - )
520 - fi
521 - else
522 - sapi_conf+=( "--disable-${sapi}" )
523 - fi
524 - ;;
525 -
526 - apache2)
527 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
528 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
529 - else
530 - sapi_conf+=( --without-apxs2 )
531 - fi
532 - ;;
533 - esac
534 - done
535 -
536 - # Construct the $myeconfargs array by concatenating $our_conf
537 - # (the common args) and $sapi_conf (the SAPI-specific args).
538 - local myeconfargs=( "${our_conf[@]}" )
539 - myeconfargs+=( "${sapi_conf[@]}" )
540 -
541 - pushd "${BUILD_DIR}" > /dev/null || die
542 - econf "${myeconfargs[@]}"
543 - popd > /dev/null || die
544 - done
545 -}
546 -
547 -src_compile() {
548 - # snmp seems to run during src_compile, too (bug #324739)
549 - addpredict /usr/share/snmp/mibs/.index #nowarn
550 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
551 -
552 - local sapi
553 - for sapi in ${SAPIS} ; do
554 - if use "${sapi}"; then
555 - cd "${WORKDIR}/sapis-build/$sapi" || \
556 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
557 - emake
558 - fi
559 - done
560 -}
561 -
562 -src_install() {
563 - # see bug #324739 for what happens when we don't have that
564 - addpredict /usr/share/snmp/mibs/.index #nowarn
565 -
566 - # grab the first SAPI that got built and install common files from there
567 - local first_sapi="",sapi=""
568 - for sapi in $SAPIS ; do
569 - if use $sapi ; then
570 - first_sapi=$sapi
571 - break
572 - fi
573 - done
574 -
575 - # Makefile forgets to create this before trying to write to it...
576 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
577 -
578 - # Install php environment (without any sapis)
579 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
580 - emake INSTALL_ROOT="${D}" \
581 - install-build install-headers install-programs
582 -
583 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
584 -
585 - # Create the directory where we'll put version-specific php scripts
586 - keepdir "/usr/share/php${PHP_MV}"
587 -
588 - local file=""
589 - local sapi_list=""
590 -
591 - for sapi in ${SAPIS}; do
592 - if use "${sapi}" ; then
593 - einfo "Installing SAPI: ${sapi}"
594 - cd "${WORKDIR}/sapis-build/${sapi}" || die
595 -
596 - if [[ "${sapi}" == "apache2" ]] ; then
597 - # We're specifically not using emake install-sapi as libtool
598 - # may cause unnecessary relink failures (see bug #351266)
599 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
600 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
601 - "libphp${PHP_MV}$(get_libname)"
602 - keepdir "/usr/$(get_libdir)/apache2/modules"
603 - else
604 - # needed each time, php_install_ini would reset it
605 - local dest="${PHP_DESTDIR#${EPREFIX}}"
606 - into "${dest}"
607 - case "$sapi" in
608 - cli)
609 - source="sapi/cli/php"
610 - # Install the "phar" archive utility.
611 - if use phar ; then
612 - emake INSTALL_ROOT="${D}" install-pharcmd
613 - dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
614 - fi
615 - ;;
616 - cgi)
617 - source="sapi/cgi/php-cgi"
618 - ;;
619 - fpm)
620 - source="sapi/fpm/php-fpm"
621 - ;;
622 - embed)
623 - source="libs/libphp${PHP_MV}$(get_libname)"
624 - ;;
625 - phpdbg)
626 - source="sapi/phpdbg/phpdbg"
627 - ;;
628 - *)
629 - die "unhandled sapi in src_install"
630 - ;;
631 - esac
632 -
633 - if [[ "${source}" == *"$(get_libname)" ]]; then
634 - dolib.so "${source}"
635 - else
636 - dobin "${source}"
637 - local name="$(basename ${source})"
638 - dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
639 - fi
640 - fi
641 -
642 - php_install_ini "${sapi}"
643 -
644 - # construct correct SAPI string for php-config
645 - # thanks to ferringb for the bash voodoo
646 - if [[ "${sapi}" == "apache2" ]]; then
647 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
648 - else
649 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
650 - fi
651 - fi
652 - done
653 -
654 - # Installing opcache module
655 - if use opcache ; then
656 - into "${PHP_DESTDIR#${EPREFIX}}"
657 - dolib.so "modules/opcache$(get_libname)"
658 - fi
659 -
660 - # Install env.d files
661 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
662 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
663 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
664 -
665 - # set php-config variable correctly (bug #278439)
666 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
667 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
668 -
669 - if use fpm ; then
670 - if use systemd; then
671 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
672 - "php-fpm@${SLOT}.service"
673 - else
674 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
675 - "php-fpm@${SLOT}.service"
676 - fi
677 - fi
678 -}
679 -
680 -src_test() {
681 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
682 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
683 - if [[ ! -x "${PHP_BIN}" ]] ; then
684 - ewarn "Test phase requires USE=cli, skipping"
685 - return
686 - else
687 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
688 - fi
689 -
690 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
691 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
692 - fi
693 -
694 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
695 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
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 - local m
749 - for m in ${SAPIS}; do
750 - [[ ${m} == 'embed' ]] && continue;
751 - if use $m ; then
752 - local ci=$(eselect php show $m)
753 - if [[ -z $ci ]]; then
754 - eselect php set $m php${SLOT} || die
755 - einfo "Switched ${m} to use php:${SLOT}"
756 - einfo
757 - elif [[ $ci != "php${SLOT}" ]] ; then
758 - elog "To switch $m to use php:${SLOT}, run"
759 - elog " eselect php set $m php${SLOT}"
760 - elog
761 - fi
762 - fi
763 - done
764 -
765 - # Remove dead symlinks for SAPIs that were just disabled. For
766 - # example, if the user has the cgi SAPI enabled, then he has an
767 - # eselect-php symlink for it. If he later reinstalls PHP with
768 - # USE="-cgi", that symlink will break. This call to eselect is
769 - # supposed to remove that dead link per bug 572436.
770 - eselect php cleanup || die
771 -
772 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
773 - elog "To build extensions for this version of PHP, you will need to"
774 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
775 - elog
776 - fi
777 -
778 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
779 - if [[ -n "${PHP_INI_VERSION}" ]]; then
780 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
781 - ewarn 'remove it from your configuration at your convenience. See'
782 - ewarn
783 - ewarn ' https://bugs.gentoo.org/611214'
784 - ewarn
785 - ewarn 'for more information.'
786 - fi
787 -
788 - elog "For details on how version slotting works, please see"
789 - elog "the wiki:"
790 - elog
791 - elog " https://wiki.gentoo.org/wiki/PHP"
792 - elog
793 -}
794 -
795 -pkg_postrm() {
796 - # This serves two purposes. First, if we have just removed the last
797 - # installed version of PHP, then this will remove any dead symlinks
798 - # belonging to eselect-php. Second, if a user upgrades slots from
799 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
800 - # his existing symlinks to point to the new 7.0 installation. The
801 - # latter is bug 432962.
802 - #
803 - # Note: the eselect-php package may not be installed at this point,
804 - # so we can't die() if this command fails.
805 - eselect php cleanup
806 -}
807
808 diff --git a/dev-lang/php/php-7.2.32.ebuild b/dev-lang/php/php-7.2.32.ebuild
809 deleted file mode 100644
810 index 20ab7418c2a..00000000000
811 --- a/dev-lang/php/php-7.2.32.ebuild
812 +++ /dev/null
813 @@ -1,759 +0,0 @@
814 -# Copyright 1999-2020 Gentoo Authors
815 -# Distributed under the terms of the GNU General Public License v2
816 -
817 -EAPI="7"
818 -
819 -inherit flag-o-matic systemd autotools
820 -
821 -DESCRIPTION="The PHP language runtime engine"
822 -HOMEPAGE="https://www.php.net/"
823 -SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
824 -
825 -LICENSE="PHP-3.01
826 - BSD
827 - Zend-2.0
828 - bcmath? ( LGPL-2.1+ )
829 - fpm? ( BSD-2 )
830 - gd? ( gd )
831 - unicode? ( BSD-2 LGPL-2.1 )"
832 -
833 -SLOT="$(ver_cut 1-2)"
834 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
835 -
836 -# We can build the following SAPIs in the given order
837 -SAPIS="embed cli cgi fpm apache2 phpdbg"
838 -
839 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
840 -IUSE="${IUSE}
841 - ${SAPIS/cli/+cli}
842 - threads"
843 -
844 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
845 - coverage +ctype curl debug
846 - enchant exif +fileinfo +filter firebird
847 - +flatfile ftp gd gdbm gmp +hash +iconv imap inifile
848 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
849 - mhash mssql mysql mysqli nls
850 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
851 - readline recode selinux +session session-mm sharedmem
852 - +simplexml snmp soap sockets sodium spell sqlite ssl
853 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
854 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
855 -
856 -# The supported (that is, autodetected) versions of BDB are listed in
857 -# the ./configure script. Other versions *work*, but we need to stick to
858 -# the ones that can be detected to avoid a repeat of bug #564824.
859 -COMMON_DEPEND="
860 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
861 - >=dev-libs/libpcre-8.32[unicode]
862 - fpm? ( acl? ( sys-apps/acl ) )
863 - apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
864 - argon2? ( app-crypt/argon2:= )
865 - berkdb? ( || ( sys-libs/db:5.3
866 - sys-libs/db:5.1
867 - sys-libs/db:4.8
868 - sys-libs/db:4.7
869 - sys-libs/db:4.6
870 - sys-libs/db:4.5 ) )
871 - bzip2? ( app-arch/bzip2:0= )
872 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
873 - coverage? ( dev-util/lcov )
874 - curl? ( >=net-misc/curl-7.10.5 )
875 - enchant? ( <app-text/enchant-2.0:0 )
876 - firebird? ( dev-db/firebird )
877 - gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= sys-libs/zlib )
878 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
879 - gmp? ( dev-libs/gmp:0= )
880 - iconv? ( virtual/libiconv )
881 - imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
882 - intl? ( dev-libs/icu:= )
883 - iodbc? ( dev-db/libiodbc )
884 - kerberos? ( virtual/krb5 )
885 - ldap? ( >=net-nds/openldap-1.2.11 )
886 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
887 - libedit? ( dev-libs/libedit )
888 - lmdb? ( dev-db/lmdb:= )
889 - mssql? ( dev-db/freetds[mssql] )
890 - nls? ( sys-devel/gettext )
891 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
892 - odbc? ( >=dev-db/unixODBC-1.8.13 )
893 - postgres? ( dev-db/postgresql:* )
894 - qdbm? ( dev-db/qdbm )
895 - readline? ( sys-libs/readline:0= )
896 - recode? ( app-text/recode )
897 - session-mm? ( dev-libs/mm )
898 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
899 - snmp? ( >=net-analyzer/net-snmp-5.2 )
900 - soap? ( >=dev-libs/libxml2-2.6.8 )
901 - sodium? ( dev-libs/libsodium:= )
902 - spell? ( >=app-text/aspell-0.50 )
903 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
904 - ssl? (
905 - !libressl? ( dev-libs/openssl:0= )
906 - libressl? ( dev-libs/libressl:0= )
907 - )
908 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
909 - tokyocabinet? ( dev-db/tokyocabinet )
910 - truetype? ( =media-libs/freetype-2* )
911 - unicode? ( dev-libs/oniguruma:= )
912 - wddx? ( >=dev-libs/libxml2-2.6.8 )
913 - webp? ( media-libs/libwebp:0= )
914 - xml? ( >=dev-libs/libxml2-2.6.8 )
915 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
916 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
917 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
918 - xpm? ( x11-libs/libXpm )
919 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
920 - zip? ( sys-libs/zlib:0= )
921 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
922 - zlib? ( sys-libs/zlib:0= )
923 -"
924 -
925 -RDEPEND="${COMMON_DEPEND}
926 - virtual/mta
927 - fpm? (
928 - selinux? ( sec-policy/selinux-phpfpm )
929 - systemd? ( sys-apps/systemd ) )"
930 -
931 -# Bison isn't actually needed when building from a release tarball
932 -# However, the configure script will warn if it's absent or if you
933 -# have an incompatible version installed. See bug 593278.
934 -DEPEND="${COMMON_DEPEND}
935 - app-arch/xz-utils
936 - >=sys-devel/bison-3.0.1"
937 -
938 -BDEPEND="virtual/pkgconfig"
939 -
940 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
941 -REQUIRED_USE="
942 - || ( cli cgi fpm apache2 embed phpdbg )
943 - cli? ( ^^ ( readline libedit ) )
944 - truetype? ( gd zlib )
945 - webp? ( gd zlib )
946 - cjk? ( gd zlib )
947 - exif? ( gd zlib )
948 - xpm? ( gd zlib )
949 - gd? ( zlib )
950 - simplexml? ( xml )
951 - soap? ( xml )
952 - wddx? ( xml )
953 - xmlrpc? ( || ( xml iconv ) )
954 - xmlreader? ( xml )
955 - xslt? ( xml )
956 - ldap-sasl? ( ldap )
957 - mhash? ( hash )
958 - phar? ( hash )
959 - qdbm? ( !gdbm )
960 - readline? ( !libedit )
961 - recode? ( !imap !mysqli !mysql )
962 - session-mm? ( session !threads )
963 - mysql? ( hash || ( mysqli pdo ) )
964 - mysqli? ( hash )
965 - zip-encryption? ( zip )
966 -"
967 -
968 -RESTRICT="!test? ( test )"
969 -
970 -PATCHES=(
971 - "${FILESDIR}/php-freetype-2.9.1.patch"
972 - "${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch"
973 -)
974 -
975 -PHP_MV="$(ver_cut 1)"
976 -
977 -php_install_ini() {
978 - local phpsapi="${1}"
979 -
980 - # work out where we are installing the ini file
981 - php_set_ini_dir "${phpsapi}"
982 -
983 - # Always install the production INI file, bug 611214.
984 - local phpinisrc="php.ini-production-${phpsapi}"
985 - cp php.ini-production "${phpinisrc}" || die
986 -
987 - # default to /tmp for save_path, bug #282768
988 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
989 -
990 - # Set the extension dir
991 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
992 - -i "${phpinisrc}" || die
993 -
994 - # Set the include path to point to where we want to find PEAR packages
995 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
996 -
997 - insinto "${PHP_INI_DIR#${EPREFIX}}"
998 - newins "${phpinisrc}" php.ini
999 -
1000 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
1001 - elog
1002 -
1003 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
1004 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
1005 -
1006 - if use opcache; then
1007 - elog "Adding opcache to $PHP_EXT_INI_DIR"
1008 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
1009 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
1010 - dosym "../ext/opcache.ini" \
1011 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
1012 - fi
1013 -
1014 - # SAPI-specific handling
1015 - if [[ "${sapi}" == "fpm" ]] ; then
1016 - einfo "Installing FPM config files php-fpm.conf and www.conf"
1017 - insinto "${PHP_INI_DIR#${EPREFIX}}"
1018 - doins sapi/fpm/php-fpm.conf
1019 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
1020 - doins sapi/fpm/www.conf
1021 - fi
1022 -
1023 - dodoc php.ini-{development,production}
1024 -}
1025 -
1026 -php_set_ini_dir() {
1027 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
1028 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
1029 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
1030 -}
1031 -
1032 -src_prepare() {
1033 - default
1034 -
1035 - # In php-7.x, the FPM pool configuration files have been split off
1036 - # of the main config. By default the pool config files go in
1037 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
1038 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
1039 - # we'll install the pool configuration file "www.conf" there.
1040 - php_set_ini_dir fpm
1041 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
1042 - sapi/fpm/php-fpm.conf.in \
1043 - || die 'failed to move the include directory in php-fpm.conf'
1044 -
1045 - # Bug 669566 - necessary so that build tools are updated for commands like pecl
1046 - # Force rebuilding aclocal.m4
1047 - rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
1048 - eautoreconf
1049 -}
1050 -
1051 -src_configure() {
1052 - addpredict /usr/share/snmp/mibs/.index #nowarn
1053 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
1054 -
1055 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
1056 -
1057 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
1058 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
1059 - local our_conf=(
1060 - --prefix="${PHP_DESTDIR}"
1061 - --mandir="${PHP_DESTDIR}/man"
1062 - --infodir="${PHP_DESTDIR}/info"
1063 - --libdir="${PHP_DESTDIR}/lib"
1064 - --with-libdir="$(get_libdir)"
1065 - --localstatedir="${EPREFIX}/var"
1066 - --without-pear
1067 - $(use_enable threads maintainer-zts)
1068 - )
1069 -
1070 - our_conf+=(
1071 - $(use_with argon2 password-argon2 "${EPREFIX}/usr")
1072 - $(use_enable bcmath bcmath)
1073 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
1074 - $(use_enable calendar calendar)
1075 - $(use_enable coverage gcov)
1076 - $(use_enable ctype ctype)
1077 - $(use_with curl curl "${EPREFIX}/usr")
1078 - $(use_enable xml dom)
1079 - $(use_with enchant enchant "${EPREFIX}/usr")
1080 - $(use_enable exif exif)
1081 - $(use_enable fileinfo fileinfo)
1082 - $(use_enable filter filter)
1083 - $(use_enable ftp ftp)
1084 - $(use_with nls gettext "${EPREFIX}/usr")
1085 - $(use_with gmp gmp "${EPREFIX}/usr")
1086 - $(use_enable hash hash)
1087 - $(use_with mhash mhash "${EPREFIX}/usr")
1088 - $(use_with iconv iconv \
1089 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
1090 - $(use_enable intl intl)
1091 - $(use_enable ipv6 ipv6)
1092 - $(use_enable json json)
1093 - $(use_with kerberos kerberos "${EPREFIX}/usr")
1094 - $(use_enable xml libxml)
1095 - $(use_with xml libxml-dir "${EPREFIX}/usr")
1096 - $(use_enable unicode mbstring)
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 sodium sodium "${EPREFIX}/usr")
1114 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
1115 - $(use_enable sysvipc sysvmsg)
1116 - $(use_enable sysvipc sysvsem)
1117 - $(use_enable sysvipc sysvshm)
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 zip-encryption libzip "${EPREFIX}/usr")
1128 - $(use_with zlib zlib "${EPREFIX}/usr")
1129 - $(use_enable debug debug)
1130 - )
1131 -
1132 - # DBA support
1133 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
1134 - || use qdbm || use lmdb || use tokyocabinet ; then
1135 - our_conf+=( "--enable-dba${shared}" )
1136 - fi
1137 -
1138 - # DBA drivers support
1139 - our_conf+=(
1140 - $(use_with cdb cdb)
1141 - $(use_with berkdb db4 "${EPREFIX}/usr")
1142 - $(use_enable flatfile flatfile)
1143 - $(use_with gdbm gdbm "${EPREFIX}/usr")
1144 - $(use_enable inifile inifile)
1145 - $(use_with qdbm qdbm "${EPREFIX}/usr")
1146 - $(use_with lmdb lmdb "${EPREFIX}/usr")
1147 - )
1148 -
1149 - # Support for the GD graphics library
1150 - our_conf+=(
1151 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
1152 - $(use_enable cjk gd-jis-conv)
1153 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
1154 - $(use_with gd png-dir "${EPREFIX}/usr")
1155 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
1156 - )
1157 - if use webp; then
1158 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
1159 - fi
1160 - # enable gd last, so configure can pick up the previous settings
1161 - our_conf+=( $(use_with gd gd) )
1162 -
1163 - # IMAP support
1164 - if use imap ; then
1165 - our_conf+=(
1166 - $(use_with imap imap "${EPREFIX}/usr")
1167 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
1168 - )
1169 - fi
1170 -
1171 - # Interbase/firebird support
1172 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
1173 -
1174 - # LDAP support
1175 - if use ldap ; then
1176 - our_conf+=(
1177 - $(use_with ldap ldap "${EPREFIX}/usr")
1178 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
1179 - )
1180 - fi
1181 -
1182 - # MySQL support
1183 - local mysqllib="mysqlnd"
1184 - local mysqlilib="mysqlnd"
1185 -
1186 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
1187 -
1188 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
1189 - if use mysql || use mysqli ; then
1190 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
1191 - fi
1192 -
1193 - # ODBC support
1194 - our_conf+=(
1195 - $(use_with odbc unixODBC "${EPREFIX}/usr")
1196 - $(use_with iodbc iodbc "${EPREFIX}/usr")
1197 - )
1198 -
1199 - # Oracle support
1200 - our_conf+=( $(use_with oci8-instant-client oci8) )
1201 -
1202 - # PDO support
1203 - if use pdo ; then
1204 - our_conf+=(
1205 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
1206 - $(use_with mysql pdo-mysql "${mysqllib}")
1207 - $(use_with postgres pdo-pgsql)
1208 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
1209 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
1210 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
1211 - $(use_with oci8-instant-client pdo-oci)
1212 - )
1213 - fi
1214 -
1215 - # readline/libedit support
1216 - our_conf+=(
1217 - $(use_with readline readline "${EPREFIX}/usr")
1218 - $(use_with libedit libedit "${EPREFIX}/usr")
1219 - )
1220 -
1221 - # Session support
1222 - if use session ; then
1223 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
1224 - else
1225 - our_conf+=( $(use_enable session session) )
1226 - fi
1227 -
1228 - # Use pic for shared modules such as apache2's mod_php
1229 - our_conf+=( --with-pic )
1230 -
1231 - # we use the system copy of pcre
1232 - # --with-pcre-regex affects ext/pcre
1233 - # --with-pcre-dir affects ext/filter and ext/zip
1234 - # --with-pcre-valgrind cannot be enabled with system pcre
1235 - # Many arches don't support pcre-jit
1236 - our_conf+=(
1237 - --with-pcre-regex="${EPREFIX}/usr"
1238 - --with-pcre-dir="${EPREFIX}/usr"
1239 - --without-pcre-valgrind
1240 - --without-pcre-jit
1241 - )
1242 -
1243 - # Catch CFLAGS problems
1244 - # Fixes bug #14067.
1245 - # Changed order to run it in reverse for bug #32022 and #12021.
1246 - replace-cpu-flags "k6*" "i586"
1247 -
1248 - # Cache the ./configure test results between SAPIs.
1249 - our_conf+=( --cache-file="${T}/config.cache" )
1250 -
1251 - # Support user-passed configuration parameters
1252 - our_conf+=( ${EXTRA_ECONF:-} )
1253 -
1254 - # Support the Apache2 extras, they must be set globally for all
1255 - # SAPIs to work correctly, especially for external PHP extensions
1256 -
1257 - local one_sapi
1258 - local sapi
1259 - mkdir -p "${WORKDIR}/sapis-build" || die
1260 - for one_sapi in $SAPIS ; do
1261 - use "${one_sapi}" || continue
1262 - php_set_ini_dir "${one_sapi}"
1263 -
1264 - # The BUILD_DIR variable is used to determine where to output
1265 - # the files that autotools creates. This was all originally
1266 - # based on the autotools-utils eclass.
1267 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
1268 - cp -a "${S}" "${BUILD_DIR}" || die
1269 - cd "${BUILD_DIR}" || die
1270 -
1271 - local sapi_conf=(
1272 - --with-config-file-path="${PHP_INI_DIR}"
1273 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
1274 - )
1275 -
1276 - for sapi in $SAPIS ; do
1277 - case "$sapi" in
1278 - cli|cgi|embed|fpm|phpdbg)
1279 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
1280 - sapi_conf+=( "--enable-${sapi}" )
1281 - if [[ "fpm" == "${sapi}" ]] ; then
1282 - sapi_conf+=(
1283 - $(use_with acl fpm-acl)
1284 - $(use_with systemd fpm-systemd)
1285 - )
1286 - fi
1287 - else
1288 - sapi_conf+=( "--disable-${sapi}" )
1289 - fi
1290 - ;;
1291 -
1292 - apache2)
1293 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
1294 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
1295 - else
1296 - sapi_conf+=( --without-apxs2 )
1297 - fi
1298 - ;;
1299 - esac
1300 - done
1301 -
1302 - # Construct the $myeconfargs array by concatenating $our_conf
1303 - # (the common args) and $sapi_conf (the SAPI-specific args).
1304 - local myeconfargs=( "${our_conf[@]}" )
1305 - myeconfargs+=( "${sapi_conf[@]}" )
1306 -
1307 - pushd "${BUILD_DIR}" > /dev/null || die
1308 - econf "${myeconfargs[@]}"
1309 - popd > /dev/null || die
1310 - done
1311 -}
1312 -
1313 -src_compile() {
1314 - # snmp seems to run during src_compile, too (bug #324739)
1315 - addpredict /usr/share/snmp/mibs/.index #nowarn
1316 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
1317 -
1318 - local sapi
1319 - for sapi in ${SAPIS} ; do
1320 - if use "${sapi}"; then
1321 - cd "${WORKDIR}/sapis-build/$sapi" || \
1322 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
1323 - emake
1324 - fi
1325 - done
1326 -}
1327 -
1328 -src_install() {
1329 - # see bug #324739 for what happens when we don't have that
1330 - addpredict /usr/share/snmp/mibs/.index #nowarn
1331 -
1332 - # grab the first SAPI that got built and install common files from there
1333 - local first_sapi="",sapi=""
1334 - for sapi in $SAPIS ; do
1335 - if use $sapi ; then
1336 - first_sapi=$sapi
1337 - break
1338 - fi
1339 - done
1340 -
1341 - # Makefile forgets to create this before trying to write to it...
1342 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
1343 -
1344 - # Install php environment (without any sapis)
1345 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
1346 - emake INSTALL_ROOT="${D}" \
1347 - install-build install-headers install-programs
1348 -
1349 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
1350 -
1351 - # Create the directory where we'll put version-specific php scripts
1352 - keepdir "/usr/share/php${PHP_MV}"
1353 -
1354 - local file=""
1355 - local sapi_list=""
1356 -
1357 - for sapi in ${SAPIS}; do
1358 - if use "${sapi}" ; then
1359 - einfo "Installing SAPI: ${sapi}"
1360 - cd "${WORKDIR}/sapis-build/${sapi}" || die
1361 -
1362 - if [[ "${sapi}" == "apache2" ]] ; then
1363 - # We're specifically not using emake install-sapi as libtool
1364 - # may cause unnecessary relink failures (see bug #351266)
1365 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
1366 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
1367 - "libphp${PHP_MV}$(get_libname)"
1368 - keepdir "/usr/$(get_libdir)/apache2/modules"
1369 - else
1370 - # needed each time, php_install_ini would reset it
1371 - local dest="${PHP_DESTDIR#${EPREFIX}}"
1372 - into "${dest}"
1373 - case "$sapi" in
1374 - cli)
1375 - source="sapi/cli/php"
1376 - # Install the "phar" archive utility.
1377 - if use phar ; then
1378 - emake INSTALL_ROOT="${D}" install-pharcmd
1379 - dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
1380 - fi
1381 - ;;
1382 - cgi)
1383 - source="sapi/cgi/php-cgi"
1384 - ;;
1385 - fpm)
1386 - source="sapi/fpm/php-fpm"
1387 - ;;
1388 - embed)
1389 - source="libs/libphp${PHP_MV}$(get_libname)"
1390 - ;;
1391 - phpdbg)
1392 - source="sapi/phpdbg/phpdbg"
1393 - ;;
1394 - *)
1395 - die "unhandled sapi in src_install"
1396 - ;;
1397 - esac
1398 -
1399 - if [[ "${source}" == *"$(get_libname)" ]]; then
1400 - dolib.so "${source}"
1401 - else
1402 - dobin "${source}"
1403 - local name="$(basename ${source})"
1404 - dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
1405 - fi
1406 - fi
1407 -
1408 - php_install_ini "${sapi}"
1409 -
1410 - # construct correct SAPI string for php-config
1411 - # thanks to ferringb for the bash voodoo
1412 - if [[ "${sapi}" == "apache2" ]]; then
1413 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
1414 - else
1415 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
1416 - fi
1417 - fi
1418 - done
1419 -
1420 - # Installing opcache module
1421 - if use opcache ; then
1422 - into "${PHP_DESTDIR#${EPREFIX}}"
1423 - dolib.so "modules/opcache$(get_libname)"
1424 - fi
1425 -
1426 - # Install env.d files
1427 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
1428 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
1429 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
1430 -
1431 - # set php-config variable correctly (bug #278439)
1432 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
1433 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
1434 -
1435 - if use fpm ; then
1436 - if use systemd; then
1437 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
1438 - "php-fpm@${SLOT}.service"
1439 - else
1440 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
1441 - "php-fpm@${SLOT}.service"
1442 - fi
1443 - fi
1444 -}
1445 -
1446 -src_test() {
1447 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
1448 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
1449 - if [[ ! -x "${PHP_BIN}" ]] ; then
1450 - ewarn "Test phase requires USE=cli, skipping"
1451 - return
1452 - else
1453 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
1454 - fi
1455 -
1456 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
1457 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
1458 - fi
1459 -
1460 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
1461 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
1462 - fi
1463 -
1464 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
1465 - "session.save_path=${T}" \
1466 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
1467 - "session.save_path=${T}"
1468 -
1469 - for name in ${EXPECTED_TEST_FAILURES}; do
1470 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
1471 - done
1472 -
1473 - local failed="$(find -name '*.out')"
1474 - if [[ ${failed} != "" ]] ; then
1475 - ewarn "The following test cases failed unexpectedly:"
1476 - for name in ${failed}; do
1477 - ewarn " ${name/.out/}"
1478 - done
1479 - else
1480 - einfo "No unexpected test failures, all fine"
1481 - fi
1482 -
1483 - if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
1484 - local passed=""
1485 - for name in ${EXPECTED_TEST_FAILURES}; do
1486 - [[ -f "${name}.diff" ]] && continue
1487 - passed="${passed} ${name}"
1488 - done
1489 - if [[ ${passed} != "" ]] ; then
1490 - einfo "The following test cases passed unexpectedly:"
1491 - for name in ${passed}; do
1492 - ewarn " ${passed}"
1493 - done
1494 - else
1495 - einfo "None of the known-to-fail tests passed, all fine"
1496 - fi
1497 - fi
1498 -}
1499 -
1500 -pkg_postinst() {
1501 - # Output some general info to the user
1502 - if use apache2 ; then
1503 - elog
1504 - elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
1505 - elog "your apache2 command. OpenRC users can append that string to"
1506 - elog "APACHE2_OPTS in /etc/conf.d/apache2."
1507 - elog
1508 - elog "The apache module configuration file 70_mod_php.conf is"
1509 - elog "provided (and maintained) by eselect-php."
1510 - elog
1511 - fi
1512 -
1513 - # Create the symlinks for php
1514 - local m
1515 - for m in ${SAPIS}; do
1516 - [[ ${m} == 'embed' ]] && continue;
1517 - if use $m ; then
1518 - local ci=$(eselect php show $m)
1519 - if [[ -z $ci ]]; then
1520 - eselect php set $m php${SLOT} || die
1521 - einfo "Switched ${m} to use php:${SLOT}"
1522 - einfo
1523 - elif [[ $ci != "php${SLOT}" ]] ; then
1524 - elog "To switch $m to use php:${SLOT}, run"
1525 - elog " eselect php set $m php${SLOT}"
1526 - elog
1527 - fi
1528 - fi
1529 - done
1530 -
1531 - # Remove dead symlinks for SAPIs that were just disabled. For
1532 - # example, if the user has the cgi SAPI enabled, then he has an
1533 - # eselect-php symlink for it. If he later reinstalls PHP with
1534 - # USE="-cgi", that symlink will break. This call to eselect is
1535 - # supposed to remove that dead link per bug 572436.
1536 - eselect php cleanup || die
1537 -
1538 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
1539 - elog "To build extensions for this version of PHP, you will need to"
1540 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
1541 - elog
1542 - fi
1543 -
1544 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
1545 - if [[ -n "${PHP_INI_VERSION}" ]]; then
1546 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
1547 - ewarn 'remove it from your configuration at your convenience. See'
1548 - ewarn
1549 - ewarn ' https://bugs.gentoo.org/611214'
1550 - ewarn
1551 - ewarn 'for more information.'
1552 - fi
1553 -
1554 - elog "For details on how version slotting works, please see"
1555 - elog "the wiki:"
1556 - elog
1557 - elog " https://wiki.gentoo.org/wiki/PHP"
1558 - elog
1559 -}
1560 -
1561 -pkg_postrm() {
1562 - # This serves two purposes. First, if we have just removed the last
1563 - # installed version of PHP, then this will remove any dead symlinks
1564 - # belonging to eselect-php. Second, if a user upgrades slots from
1565 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
1566 - # his existing symlinks to point to the new 7.0 installation. The
1567 - # latter is bug 432962.
1568 - #
1569 - # Note: the eselect-php package may not be installed at this point,
1570 - # so we can't die() if this command fails.
1571 - eselect php cleanup
1572 -}
1573
1574 diff --git a/dev-lang/php/php-7.3.18.ebuild b/dev-lang/php/php-7.3.18.ebuild
1575 deleted file mode 100644
1576 index 4583dedfe50..00000000000
1577 --- a/dev-lang/php/php-7.3.18.ebuild
1578 +++ /dev/null
1579 @@ -1,760 +0,0 @@
1580 -# Copyright 1999-2020 Gentoo Authors
1581 -# Distributed under the terms of the GNU General Public License v2
1582 -
1583 -EAPI="7"
1584 -
1585 -inherit flag-o-matic systemd autotools
1586 -
1587 -MY_PV=${PV/_rc/RC}
1588 -DESCRIPTION="The PHP language runtime engine"
1589 -HOMEPAGE="https://www.php.net/"
1590 -SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
1591 -
1592 -LICENSE="PHP-3.01
1593 - BSD
1594 - Zend-2.0
1595 - bcmath? ( LGPL-2.1+ )
1596 - fpm? ( BSD-2 )
1597 - gd? ( gd )
1598 - unicode? ( BSD-2 LGPL-2.1 )"
1599 -
1600 -SLOT="$(ver_cut 1-2)"
1601 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
1602 -
1603 -S="${WORKDIR}/${PN}-${MY_PV}"
1604 -
1605 -# We can build the following SAPIs in the given order
1606 -SAPIS="embed cli cgi fpm apache2 phpdbg"
1607 -
1608 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
1609 -IUSE="${IUSE}
1610 - ${SAPIS/cli/+cli}
1611 - threads"
1612 -
1613 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
1614 - coverage +ctype curl debug
1615 - enchant exif +fileinfo +filter firebird
1616 - +flatfile ftp gd gdbm gmp +hash +iconv imap inifile
1617 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
1618 - mhash mssql mysql mysqli nls
1619 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
1620 - readline recode selinux +session session-mm sharedmem
1621 - +simplexml snmp soap sockets sodium spell sqlite ssl
1622 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
1623 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
1624 -
1625 -# The supported (that is, autodetected) versions of BDB are listed in
1626 -# the ./configure script. Other versions *work*, but we need to stick to
1627 -# the ones that can be detected to avoid a repeat of bug #564824.
1628 -COMMON_DEPEND="
1629 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
1630 - >=dev-libs/libpcre2-10.30[unicode]
1631 - fpm? ( acl? ( sys-apps/acl ) )
1632 - apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
1633 - argon2? ( app-crypt/argon2:= )
1634 - berkdb? ( || ( sys-libs/db:5.3
1635 - sys-libs/db:5.1
1636 - sys-libs/db:4.8
1637 - sys-libs/db:4.7
1638 - sys-libs/db:4.6
1639 - sys-libs/db:4.5 ) )
1640 - bzip2? ( app-arch/bzip2:0= )
1641 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
1642 - coverage? ( dev-util/lcov )
1643 - curl? ( >=net-misc/curl-7.10.5 )
1644 - enchant? ( <app-text/enchant-2.0:0 )
1645 - firebird? ( dev-db/firebird )
1646 - gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
1647 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
1648 - gmp? ( dev-libs/gmp:0= )
1649 - iconv? ( virtual/libiconv )
1650 - imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
1651 - intl? ( dev-libs/icu:= )
1652 - iodbc? ( dev-db/libiodbc )
1653 - kerberos? ( virtual/krb5 )
1654 - ldap? ( >=net-nds/openldap-1.2.11 )
1655 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
1656 - libedit? ( dev-libs/libedit )
1657 - lmdb? ( dev-db/lmdb:= )
1658 - mssql? ( dev-db/freetds[mssql] )
1659 - nls? ( sys-devel/gettext )
1660 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
1661 - odbc? ( >=dev-db/unixODBC-1.8.13 )
1662 - postgres? ( dev-db/postgresql:* )
1663 - qdbm? ( dev-db/qdbm )
1664 - readline? ( sys-libs/readline:0= )
1665 - recode? ( app-text/recode )
1666 - session-mm? ( dev-libs/mm )
1667 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
1668 - snmp? ( >=net-analyzer/net-snmp-5.2 )
1669 - soap? ( >=dev-libs/libxml2-2.6.8 )
1670 - sodium? ( dev-libs/libsodium:= )
1671 - spell? ( >=app-text/aspell-0.50 )
1672 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
1673 - ssl? (
1674 - !libressl? ( >=dev-libs/openssl-1.0.1:0= )
1675 - libressl? ( dev-libs/libressl:0= )
1676 - )
1677 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
1678 - tokyocabinet? ( dev-db/tokyocabinet )
1679 - truetype? ( =media-libs/freetype-2* )
1680 - unicode? ( dev-libs/oniguruma:= )
1681 - wddx? ( >=dev-libs/libxml2-2.6.8 )
1682 - webp? ( media-libs/libwebp:0= )
1683 - xml? ( >=dev-libs/libxml2-2.6.8 )
1684 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
1685 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
1686 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
1687 - xpm? ( x11-libs/libXpm )
1688 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
1689 - zip? ( >=sys-libs/zlib-1.2.0.4:0= )
1690 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
1691 - zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
1692 -"
1693 -
1694 -RDEPEND="${COMMON_DEPEND}
1695 - virtual/mta
1696 - fpm? (
1697 - selinux? ( sec-policy/selinux-phpfpm )
1698 - systemd? ( sys-apps/systemd ) )"
1699 -
1700 -# Bison isn't actually needed when building from a release tarball
1701 -# However, the configure script will warn if it's absent or if you
1702 -# have an incompatible version installed. See bug 593278.
1703 -DEPEND="${COMMON_DEPEND}
1704 - app-arch/xz-utils
1705 - >=sys-devel/bison-3.0.1"
1706 -
1707 -BDEPEND="virtual/pkgconfig"
1708 -
1709 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
1710 -REQUIRED_USE="
1711 - || ( cli cgi fpm apache2 embed phpdbg )
1712 - cli? ( ^^ ( readline libedit ) )
1713 - truetype? ( gd zlib )
1714 - webp? ( gd zlib )
1715 - cjk? ( gd zlib )
1716 - exif? ( gd zlib )
1717 - xpm? ( gd zlib )
1718 - gd? ( zlib )
1719 - simplexml? ( xml )
1720 - soap? ( xml )
1721 - wddx? ( xml )
1722 - xmlrpc? ( || ( xml iconv ) )
1723 - xmlreader? ( xml )
1724 - xslt? ( xml )
1725 - ldap-sasl? ( ldap )
1726 - mhash? ( hash )
1727 - phar? ( hash )
1728 - qdbm? ( !gdbm )
1729 - readline? ( !libedit )
1730 - recode? ( !imap !mysqli !mysql )
1731 - session-mm? ( session !threads )
1732 - mysql? ( || ( mysqli pdo ) )
1733 - zip-encryption? ( zip )
1734 -"
1735 -
1736 -RESTRICT="!test? ( test )"
1737 -
1738 -PATCHES=(
1739 - "${FILESDIR}/php-freetype-2.9.1.patch"
1740 -)
1741 -
1742 -PHP_MV="$(ver_cut 1)"
1743 -
1744 -php_install_ini() {
1745 - local phpsapi="${1}"
1746 -
1747 - # work out where we are installing the ini file
1748 - php_set_ini_dir "${phpsapi}"
1749 -
1750 - # Always install the production INI file, bug 611214.
1751 - local phpinisrc="php.ini-production-${phpsapi}"
1752 - cp php.ini-production "${phpinisrc}" || die
1753 -
1754 - # default to /tmp for save_path, bug #282768
1755 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
1756 -
1757 - # Set the extension dir
1758 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
1759 - -i "${phpinisrc}" || die
1760 -
1761 - # Set the include path to point to where we want to find PEAR packages
1762 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
1763 -
1764 - insinto "${PHP_INI_DIR#${EPREFIX}}"
1765 - newins "${phpinisrc}" php.ini
1766 -
1767 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
1768 - elog
1769 -
1770 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
1771 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
1772 -
1773 - if use opcache; then
1774 - elog "Adding opcache to $PHP_EXT_INI_DIR"
1775 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
1776 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
1777 - dosym "../ext/opcache.ini" \
1778 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
1779 - fi
1780 -
1781 - # SAPI-specific handling
1782 - if [[ "${sapi}" == "fpm" ]] ; then
1783 - einfo "Installing FPM config files php-fpm.conf and www.conf"
1784 - insinto "${PHP_INI_DIR#${EPREFIX}}"
1785 - doins sapi/fpm/php-fpm.conf
1786 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
1787 - doins sapi/fpm/www.conf
1788 - fi
1789 -
1790 - dodoc php.ini-{development,production}
1791 -}
1792 -
1793 -php_set_ini_dir() {
1794 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
1795 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
1796 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
1797 -}
1798 -
1799 -src_prepare() {
1800 - default
1801 -
1802 - # In php-7.x, the FPM pool configuration files have been split off
1803 - # of the main config. By default the pool config files go in
1804 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
1805 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
1806 - # we'll install the pool configuration file "www.conf" there.
1807 - php_set_ini_dir fpm
1808 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
1809 - sapi/fpm/php-fpm.conf.in \
1810 - || die 'failed to move the include directory in php-fpm.conf'
1811 -
1812 - # Bug 669566 - necessary so that build tools are updated for commands like pecl
1813 - # Force rebuilding aclocal.m4
1814 - rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
1815 - eautoreconf
1816 -}
1817 -
1818 -src_configure() {
1819 - addpredict /usr/share/snmp/mibs/.index #nowarn
1820 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
1821 -
1822 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
1823 -
1824 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
1825 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
1826 - local our_conf=(
1827 - --prefix="${PHP_DESTDIR}"
1828 - --mandir="${PHP_DESTDIR}/man"
1829 - --infodir="${PHP_DESTDIR}/info"
1830 - --libdir="${PHP_DESTDIR}/lib"
1831 - --with-libdir="$(get_libdir)"
1832 - --localstatedir="${EPREFIX}/var"
1833 - --without-pear
1834 - $(use_enable threads maintainer-zts)
1835 - )
1836 -
1837 - our_conf+=(
1838 - $(use_with argon2 password-argon2 "${EPREFIX}/usr")
1839 - $(use_enable bcmath bcmath)
1840 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
1841 - $(use_enable calendar calendar)
1842 - $(use_enable coverage gcov)
1843 - $(use_enable ctype ctype)
1844 - $(use_with curl curl "${EPREFIX}/usr")
1845 - $(use_enable xml dom)
1846 - $(use_with enchant enchant "${EPREFIX}/usr")
1847 - $(use_enable exif exif)
1848 - $(use_enable fileinfo fileinfo)
1849 - $(use_enable filter filter)
1850 - $(use_enable ftp ftp)
1851 - $(use_with nls gettext "${EPREFIX}/usr")
1852 - $(use_with gmp gmp "${EPREFIX}/usr")
1853 - $(use_enable hash hash)
1854 - $(use_with mhash mhash "${EPREFIX}/usr")
1855 - $(use_with iconv iconv \
1856 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
1857 - $(use_enable intl intl)
1858 - $(use_enable ipv6 ipv6)
1859 - $(use_enable json json)
1860 - $(use_with kerberos kerberos "${EPREFIX}/usr")
1861 - $(use_enable xml libxml)
1862 - $(use_with xml libxml-dir "${EPREFIX}/usr")
1863 - $(use_enable unicode mbstring)
1864 - $(use_with unicode onig "${EPREFIX}/usr")
1865 - $(use_with ssl openssl "${EPREFIX}/usr")
1866 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
1867 - $(use_enable pcntl pcntl)
1868 - $(use_enable phar phar)
1869 - $(use_enable pdo pdo)
1870 - $(use_enable opcache opcache)
1871 - $(use_with postgres pgsql "${EPREFIX}/usr")
1872 - $(use_enable posix posix)
1873 - $(use_with spell pspell "${EPREFIX}/usr")
1874 - $(use_with recode recode "${EPREFIX}/usr")
1875 - $(use_enable simplexml simplexml)
1876 - $(use_enable sharedmem shmop)
1877 - $(use_with snmp snmp "${EPREFIX}/usr")
1878 - $(use_enable soap soap)
1879 - $(use_enable sockets sockets)
1880 - $(use_with sodium sodium "${EPREFIX}/usr")
1881 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
1882 - $(use_enable sysvipc sysvmsg)
1883 - $(use_enable sysvipc sysvsem)
1884 - $(use_enable sysvipc sysvshm)
1885 - $(use_with tidy tidy "${EPREFIX}/usr")
1886 - $(use_enable tokenizer tokenizer)
1887 - $(use_enable wddx wddx)
1888 - $(use_enable xml xml)
1889 - $(use_enable xmlreader xmlreader)
1890 - $(use_enable xmlwriter xmlwriter)
1891 - $(use_with xmlrpc xmlrpc)
1892 - $(use_with xslt xsl "${EPREFIX}/usr")
1893 - $(use_enable zip zip)
1894 - $(use_with zip-encryption libzip "${EPREFIX}/usr")
1895 - $(use_with zlib zlib "${EPREFIX}/usr")
1896 - $(use_enable debug debug)
1897 - )
1898 -
1899 - # DBA support
1900 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
1901 - || use qdbm || use lmdb || use tokyocabinet ; then
1902 - our_conf+=( "--enable-dba${shared}" )
1903 - fi
1904 -
1905 - # DBA drivers support
1906 - our_conf+=(
1907 - $(use_with cdb cdb)
1908 - $(use_with berkdb db4 "${EPREFIX}/usr")
1909 - $(use_enable flatfile flatfile)
1910 - $(use_with gdbm gdbm "${EPREFIX}/usr")
1911 - $(use_enable inifile inifile)
1912 - $(use_with qdbm qdbm "${EPREFIX}/usr")
1913 - $(use_with lmdb lmdb "${EPREFIX}/usr")
1914 - )
1915 -
1916 - # Support for the GD graphics library
1917 - our_conf+=(
1918 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
1919 - $(use_enable cjk gd-jis-conv)
1920 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
1921 - $(use_with gd png-dir "${EPREFIX}/usr")
1922 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
1923 - )
1924 - if use webp; then
1925 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
1926 - fi
1927 - # enable gd last, so configure can pick up the previous settings
1928 - our_conf+=( $(use_with gd gd) )
1929 -
1930 - # IMAP support
1931 - if use imap ; then
1932 - our_conf+=(
1933 - $(use_with imap imap "${EPREFIX}/usr")
1934 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
1935 - )
1936 - fi
1937 -
1938 - # Interbase/firebird support
1939 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
1940 -
1941 - # LDAP support
1942 - if use ldap ; then
1943 - our_conf+=(
1944 - $(use_with ldap ldap "${EPREFIX}/usr")
1945 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
1946 - )
1947 - fi
1948 -
1949 - # MySQL support
1950 - local mysqllib="mysqlnd"
1951 - local mysqlilib="mysqlnd"
1952 -
1953 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
1954 -
1955 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
1956 - if use mysql || use mysqli ; then
1957 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
1958 - fi
1959 -
1960 - # ODBC support
1961 - our_conf+=(
1962 - $(use_with odbc unixODBC "${EPREFIX}/usr")
1963 - $(use_with iodbc iodbc "${EPREFIX}/usr")
1964 - )
1965 -
1966 - # Oracle support
1967 - our_conf+=( $(use_with oci8-instant-client oci8) )
1968 -
1969 - # PDO support
1970 - if use pdo ; then
1971 - our_conf+=(
1972 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
1973 - $(use_with mysql pdo-mysql "${mysqllib}")
1974 - $(use_with postgres pdo-pgsql)
1975 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
1976 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
1977 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
1978 - $(use_with oci8-instant-client pdo-oci)
1979 - )
1980 - fi
1981 -
1982 - # readline/libedit support
1983 - our_conf+=(
1984 - $(use_with readline readline "${EPREFIX}/usr")
1985 - $(use_with libedit libedit "${EPREFIX}/usr")
1986 - )
1987 -
1988 - # Session support
1989 - if use session ; then
1990 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
1991 - else
1992 - our_conf+=( $(use_enable session session) )
1993 - fi
1994 -
1995 - # Use pic for shared modules such as apache2's mod_php
1996 - our_conf+=( --with-pic )
1997 -
1998 - # we use the system copy of pcre
1999 - # --with-pcre-regex affects ext/pcre
2000 - # --with-pcre-dir affects ext/filter and ext/zip
2001 - # --with-pcre-valgrind cannot be enabled with system pcre
2002 - # Many arches don't support pcre-jit
2003 - our_conf+=(
2004 - --with-pcre-regex="${EPREFIX}/usr"
2005 - --with-pcre-dir="${EPREFIX}/usr"
2006 - --without-pcre-valgrind
2007 - --without-pcre-jit
2008 - )
2009 -
2010 - # Catch CFLAGS problems
2011 - # Fixes bug #14067.
2012 - # Changed order to run it in reverse for bug #32022 and #12021.
2013 - replace-cpu-flags "k6*" "i586"
2014 -
2015 - # Cache the ./configure test results between SAPIs.
2016 - our_conf+=( --cache-file="${T}/config.cache" )
2017 -
2018 - # Support user-passed configuration parameters
2019 - our_conf+=( ${EXTRA_ECONF:-} )
2020 -
2021 - # Support the Apache2 extras, they must be set globally for all
2022 - # SAPIs to work correctly, especially for external PHP extensions
2023 -
2024 - local one_sapi
2025 - local sapi
2026 - mkdir -p "${WORKDIR}/sapis-build" || die
2027 - for one_sapi in $SAPIS ; do
2028 - use "${one_sapi}" || continue
2029 - php_set_ini_dir "${one_sapi}"
2030 -
2031 - # The BUILD_DIR variable is used to determine where to output
2032 - # the files that autotools creates. This was all originally
2033 - # based on the autotools-utils eclass.
2034 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
2035 - cp -a "${S}" "${BUILD_DIR}" || die
2036 - cd "${BUILD_DIR}" || die
2037 -
2038 - local sapi_conf=(
2039 - --with-config-file-path="${PHP_INI_DIR}"
2040 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
2041 - )
2042 -
2043 - for sapi in $SAPIS ; do
2044 - case "$sapi" in
2045 - cli|cgi|embed|fpm|phpdbg)
2046 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
2047 - sapi_conf+=( "--enable-${sapi}" )
2048 - if [[ "fpm" == "${sapi}" ]] ; then
2049 - sapi_conf+=(
2050 - $(use_with acl fpm-acl)
2051 - $(use_with systemd fpm-systemd)
2052 - )
2053 - fi
2054 - else
2055 - sapi_conf+=( "--disable-${sapi}" )
2056 - fi
2057 - ;;
2058 -
2059 - apache2)
2060 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
2061 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
2062 - else
2063 - sapi_conf+=( --without-apxs2 )
2064 - fi
2065 - ;;
2066 - esac
2067 - done
2068 -
2069 - # Construct the $myeconfargs array by concatenating $our_conf
2070 - # (the common args) and $sapi_conf (the SAPI-specific args).
2071 - local myeconfargs=( "${our_conf[@]}" )
2072 - myeconfargs+=( "${sapi_conf[@]}" )
2073 -
2074 - pushd "${BUILD_DIR}" > /dev/null || die
2075 - econf "${myeconfargs[@]}"
2076 - popd > /dev/null || die
2077 - done
2078 -}
2079 -
2080 -src_compile() {
2081 - # snmp seems to run during src_compile, too (bug #324739)
2082 - addpredict /usr/share/snmp/mibs/.index #nowarn
2083 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
2084 -
2085 - local sapi
2086 - for sapi in ${SAPIS} ; do
2087 - if use "${sapi}"; then
2088 - cd "${WORKDIR}/sapis-build/$sapi" || \
2089 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
2090 - emake
2091 - fi
2092 - done
2093 -}
2094 -
2095 -src_install() {
2096 - # see bug #324739 for what happens when we don't have that
2097 - addpredict /usr/share/snmp/mibs/.index #nowarn
2098 -
2099 - # grab the first SAPI that got built and install common files from there
2100 - local first_sapi="", sapi=""
2101 - for sapi in $SAPIS ; do
2102 - if use $sapi ; then
2103 - first_sapi=$sapi
2104 - break
2105 - fi
2106 - done
2107 -
2108 - # Makefile forgets to create this before trying to write to it...
2109 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
2110 -
2111 - # Install php environment (without any sapis)
2112 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
2113 - emake INSTALL_ROOT="${D}" \
2114 - install-build install-headers install-programs
2115 -
2116 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
2117 -
2118 - # Create the directory where we'll put version-specific php scripts
2119 - keepdir "/usr/share/php${PHP_MV}"
2120 -
2121 - local file=""
2122 - local sapi_list=""
2123 -
2124 - for sapi in ${SAPIS}; do
2125 - if use "${sapi}" ; then
2126 - einfo "Installing SAPI: ${sapi}"
2127 - cd "${WORKDIR}/sapis-build/${sapi}" || die
2128 -
2129 - if [[ "${sapi}" == "apache2" ]] ; then
2130 - # We're specifically not using emake install-sapi as libtool
2131 - # may cause unnecessary relink failures (see bug #351266)
2132 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
2133 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
2134 - "libphp${PHP_MV}$(get_libname)"
2135 - keepdir "/usr/$(get_libdir)/apache2/modules"
2136 - else
2137 - # needed each time, php_install_ini would reset it
2138 - local dest="${PHP_DESTDIR#${EPREFIX}}"
2139 - into "${dest}"
2140 - case "$sapi" in
2141 - cli)
2142 - source="sapi/cli/php"
2143 - # Install the "phar" archive utility.
2144 - if use phar ; then
2145 - emake INSTALL_ROOT="${D}" install-pharcmd
2146 - dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}"
2147 - fi
2148 - ;;
2149 - cgi)
2150 - source="sapi/cgi/php-cgi"
2151 - ;;
2152 - fpm)
2153 - source="sapi/fpm/php-fpm"
2154 - ;;
2155 - embed)
2156 - source="libs/libphp${PHP_MV}$(get_libname)"
2157 - ;;
2158 - phpdbg)
2159 - source="sapi/phpdbg/phpdbg"
2160 - ;;
2161 - *)
2162 - die "unhandled sapi in src_install"
2163 - ;;
2164 - esac
2165 -
2166 - if [[ "${source}" == *"$(get_libname)" ]]; then
2167 - dolib.so "${source}"
2168 - else
2169 - dobin "${source}"
2170 - local name="$(basename ${source})"
2171 - dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}"
2172 - fi
2173 - fi
2174 -
2175 - php_install_ini "${sapi}"
2176 -
2177 - # construct correct SAPI string for php-config
2178 - # thanks to ferringb for the bash voodoo
2179 - if [[ "${sapi}" == "apache2" ]]; then
2180 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
2181 - else
2182 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
2183 - fi
2184 - fi
2185 - done
2186 -
2187 - # Installing opcache module
2188 - if use opcache ; then
2189 - into "${PHP_DESTDIR#${EPREFIX}}"
2190 - dolib.so "modules/opcache$(get_libname)"
2191 - fi
2192 -
2193 - # Install env.d files
2194 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
2195 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
2196 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
2197 -
2198 - # set php-config variable correctly (bug #278439)
2199 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
2200 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
2201 -
2202 - if use fpm ; then
2203 - if use systemd; then
2204 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
2205 - "php-fpm@${SLOT}.service"
2206 - else
2207 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
2208 - "php-fpm@${SLOT}.service"
2209 - fi
2210 - fi
2211 -}
2212 -
2213 -src_test() {
2214 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
2215 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
2216 - if [[ ! -x "${PHP_BIN}" ]] ; then
2217 - ewarn "Test phase requires USE=cli, skipping"
2218 - return
2219 - else
2220 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
2221 - fi
2222 -
2223 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
2224 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
2225 - fi
2226 -
2227 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
2228 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
2229 - fi
2230 -
2231 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
2232 - "session.save_path=${T}" \
2233 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
2234 - "session.save_path=${T}"
2235 -
2236 - for name in ${EXPECTED_TEST_FAILURES}; do
2237 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
2238 - done
2239 -
2240 - local failed="$(find -name '*.out')"
2241 - if [[ ${failed} != "" ]] ; then
2242 - ewarn "The following test cases failed unexpectedly:"
2243 - for name in ${failed}; do
2244 - ewarn " ${name/.out/}"
2245 - done
2246 - else
2247 - einfo "No unexpected test failures, all fine"
2248 - fi
2249 -
2250 - if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
2251 - local passed=""
2252 - for name in ${EXPECTED_TEST_FAILURES}; do
2253 - [[ -f "${name}.diff" ]] && continue
2254 - passed="${passed} ${name}"
2255 - done
2256 - if [[ ${passed} != "" ]] ; then
2257 - einfo "The following test cases passed unexpectedly:"
2258 - for name in ${passed}; do
2259 - ewarn " ${passed}"
2260 - done
2261 - else
2262 - einfo "None of the known-to-fail tests passed, all fine"
2263 - fi
2264 - fi
2265 -}
2266 -
2267 -pkg_postinst() {
2268 - # Output some general info to the user
2269 - if use apache2 ; then
2270 - elog
2271 - elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
2272 - elog "your apache2 command. OpenRC users can append that string to"
2273 - elog "APACHE2_OPTS in /etc/conf.d/apache2."
2274 - elog
2275 - elog "The apache module configuration file 70_mod_php.conf is"
2276 - elog "provided (and maintained) by eselect-php."
2277 - elog
2278 - fi
2279 -
2280 - # Create the symlinks for php
2281 - local m
2282 - for m in ${SAPIS}; do
2283 - [[ ${m} == 'embed' ]] && continue;
2284 - if use $m ; then
2285 - local ci=$(eselect php show $m)
2286 - if [[ -z $ci ]]; then
2287 - eselect php set $m php${SLOT} || die
2288 - einfo "Switched ${m} to use php:${SLOT}"
2289 - einfo
2290 - elif [[ $ci != "php${SLOT}" ]] ; then
2291 - elog "To switch $m to use php:${SLOT}, run"
2292 - elog " eselect php set $m php${SLOT}"
2293 - elog
2294 - fi
2295 - fi
2296 - done
2297 -
2298 - # Remove dead symlinks for SAPIs that were just disabled. For
2299 - # example, if the user has the cgi SAPI enabled, then he has an
2300 - # eselect-php symlink for it. If he later reinstalls PHP with
2301 - # USE="-cgi", that symlink will break. This call to eselect is
2302 - # supposed to remove that dead link per bug 572436.
2303 - eselect php cleanup || die
2304 -
2305 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
2306 - elog "To build extensions for this version of PHP, you will need to"
2307 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
2308 - elog
2309 - fi
2310 -
2311 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
2312 - if [[ -n "${PHP_INI_VERSION}" ]]; then
2313 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
2314 - ewarn 'remove it from your configuration at your convenience. See'
2315 - ewarn
2316 - ewarn ' https://bugs.gentoo.org/611214'
2317 - ewarn
2318 - ewarn 'for more information.'
2319 - fi
2320 -
2321 - elog "For details on how version slotting works, please see"
2322 - elog "the wiki:"
2323 - elog
2324 - elog " https://wiki.gentoo.org/wiki/PHP"
2325 - elog
2326 -}
2327 -
2328 -pkg_postrm() {
2329 - # This serves two purposes. First, if we have just removed the last
2330 - # installed version of PHP, then this will remove any dead symlinks
2331 - # belonging to eselect-php. Second, if a user upgrades slots from
2332 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
2333 - # his existing symlinks to point to the new 7.0 installation. The
2334 - # latter is bug 432962.
2335 - #
2336 - # Note: the eselect-php package may not be installed at this point,
2337 - # so we can't die() if this command fails.
2338 - eselect php cleanup
2339 -}
2340
2341 diff --git a/dev-lang/php/php-7.3.19.ebuild b/dev-lang/php/php-7.3.19.ebuild
2342 deleted file mode 100644
2343 index 705d68d153f..00000000000
2344 --- a/dev-lang/php/php-7.3.19.ebuild
2345 +++ /dev/null
2346 @@ -1,760 +0,0 @@
2347 -# Copyright 1999-2020 Gentoo Authors
2348 -# Distributed under the terms of the GNU General Public License v2
2349 -
2350 -EAPI="7"
2351 -
2352 -inherit flag-o-matic systemd autotools
2353 -
2354 -MY_PV=${PV/_rc/RC}
2355 -DESCRIPTION="The PHP language runtime engine"
2356 -HOMEPAGE="https://www.php.net/"
2357 -SRC_URI="https://www.php.net/distributions/${P}.tar.xz"
2358 -
2359 -LICENSE="PHP-3.01
2360 - BSD
2361 - Zend-2.0
2362 - bcmath? ( LGPL-2.1+ )
2363 - fpm? ( BSD-2 )
2364 - gd? ( gd )
2365 - unicode? ( BSD-2 LGPL-2.1 )"
2366 -
2367 -SLOT="$(ver_cut 1-2)"
2368 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
2369 -
2370 -S="${WORKDIR}/${PN}-${MY_PV}"
2371 -
2372 -# We can build the following SAPIs in the given order
2373 -SAPIS="embed cli cgi fpm apache2 phpdbg"
2374 -
2375 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
2376 -IUSE="${IUSE}
2377 - ${SAPIS/cli/+cli}
2378 - threads"
2379 -
2380 -IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
2381 - coverage +ctype curl debug
2382 - enchant exif +fileinfo +filter firebird
2383 - +flatfile ftp gd gdbm gmp +hash +iconv imap inifile
2384 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
2385 - mhash mssql mysql mysqli nls
2386 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
2387 - readline recode selinux +session session-mm sharedmem
2388 - +simplexml snmp soap sockets sodium spell sqlite ssl
2389 - sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
2390 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
2391 -
2392 -# The supported (that is, autodetected) versions of BDB are listed in
2393 -# the ./configure script. Other versions *work*, but we need to stick to
2394 -# the ones that can be detected to avoid a repeat of bug #564824.
2395 -COMMON_DEPEND="
2396 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
2397 - >=dev-libs/libpcre2-10.30[unicode]
2398 - fpm? ( acl? ( sys-apps/acl ) )
2399 - apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] )
2400 - argon2? ( app-crypt/argon2:= )
2401 - berkdb? ( || ( sys-libs/db:5.3
2402 - sys-libs/db:5.1
2403 - sys-libs/db:4.8
2404 - sys-libs/db:4.7
2405 - sys-libs/db:4.6
2406 - sys-libs/db:4.5 ) )
2407 - bzip2? ( app-arch/bzip2:0= )
2408 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
2409 - coverage? ( dev-util/lcov )
2410 - curl? ( >=net-misc/curl-7.10.5 )
2411 - enchant? ( <app-text/enchant-2.0:0 )
2412 - firebird? ( dev-db/firebird )
2413 - gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 )
2414 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
2415 - gmp? ( dev-libs/gmp:0= )
2416 - iconv? ( virtual/libiconv )
2417 - imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] )
2418 - intl? ( dev-libs/icu:= )
2419 - iodbc? ( dev-db/libiodbc )
2420 - kerberos? ( virtual/krb5 )
2421 - ldap? ( >=net-nds/openldap-1.2.11 )
2422 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
2423 - libedit? ( dev-libs/libedit )
2424 - lmdb? ( dev-db/lmdb:= )
2425 - mssql? ( dev-db/freetds[mssql] )
2426 - nls? ( sys-devel/gettext )
2427 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
2428 - odbc? ( >=dev-db/unixODBC-1.8.13 )
2429 - postgres? ( dev-db/postgresql:* )
2430 - qdbm? ( dev-db/qdbm )
2431 - readline? ( sys-libs/readline:0= )
2432 - recode? ( app-text/recode )
2433 - session-mm? ( dev-libs/mm )
2434 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
2435 - snmp? ( >=net-analyzer/net-snmp-5.2 )
2436 - soap? ( >=dev-libs/libxml2-2.6.8 )
2437 - sodium? ( dev-libs/libsodium:= )
2438 - spell? ( >=app-text/aspell-0.50 )
2439 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
2440 - ssl? (
2441 - !libressl? ( >=dev-libs/openssl-1.0.1:0= )
2442 - libressl? ( dev-libs/libressl:0= )
2443 - )
2444 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
2445 - tokyocabinet? ( dev-db/tokyocabinet )
2446 - truetype? ( =media-libs/freetype-2* )
2447 - unicode? ( dev-libs/oniguruma:= )
2448 - wddx? ( >=dev-libs/libxml2-2.6.8 )
2449 - webp? ( media-libs/libwebp:0= )
2450 - xml? ( >=dev-libs/libxml2-2.6.8 )
2451 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
2452 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
2453 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
2454 - xpm? ( x11-libs/libXpm )
2455 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
2456 - zip? ( >=sys-libs/zlib-1.2.0.4:0= )
2457 - zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
2458 - zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
2459 -"
2460 -
2461 -RDEPEND="${COMMON_DEPEND}
2462 - virtual/mta
2463 - fpm? (
2464 - selinux? ( sec-policy/selinux-phpfpm )
2465 - systemd? ( sys-apps/systemd ) )"
2466 -
2467 -# Bison isn't actually needed when building from a release tarball
2468 -# However, the configure script will warn if it's absent or if you
2469 -# have an incompatible version installed. See bug 593278.
2470 -DEPEND="${COMMON_DEPEND}
2471 - app-arch/xz-utils
2472 - >=sys-devel/bison-3.0.1"
2473 -
2474 -BDEPEND="virtual/pkgconfig"
2475 -
2476 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
2477 -REQUIRED_USE="
2478 - || ( cli cgi fpm apache2 embed phpdbg )
2479 - cli? ( ^^ ( readline libedit ) )
2480 - truetype? ( gd zlib )
2481 - webp? ( gd zlib )
2482 - cjk? ( gd zlib )
2483 - exif? ( gd zlib )
2484 - xpm? ( gd zlib )
2485 - gd? ( zlib )
2486 - simplexml? ( xml )
2487 - soap? ( xml )
2488 - wddx? ( xml )
2489 - xmlrpc? ( || ( xml iconv ) )
2490 - xmlreader? ( xml )
2491 - xslt? ( xml )
2492 - ldap-sasl? ( ldap )
2493 - mhash? ( hash )
2494 - phar? ( hash )
2495 - qdbm? ( !gdbm )
2496 - readline? ( !libedit )
2497 - recode? ( !imap !mysqli !mysql )
2498 - session-mm? ( session !threads )
2499 - mysql? ( || ( mysqli pdo ) )
2500 - zip-encryption? ( zip )
2501 -"
2502 -
2503 -RESTRICT="!test? ( test )"
2504 -
2505 -PATCHES=(
2506 - "${FILESDIR}/php-freetype-2.9.1.patch"
2507 -)
2508 -
2509 -PHP_MV="$(ver_cut 1)"
2510 -
2511 -php_install_ini() {
2512 - local phpsapi="${1}"
2513 -
2514 - # work out where we are installing the ini file
2515 - php_set_ini_dir "${phpsapi}"
2516 -
2517 - # Always install the production INI file, bug 611214.
2518 - local phpinisrc="php.ini-production-${phpsapi}"
2519 - cp php.ini-production "${phpinisrc}" || die
2520 -
2521 - # default to /tmp for save_path, bug #282768
2522 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
2523 -
2524 - # Set the extension dir
2525 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
2526 - -i "${phpinisrc}" || die
2527 -
2528 - # Set the include path to point to where we want to find PEAR packages
2529 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
2530 -
2531 - insinto "${PHP_INI_DIR#${EPREFIX}}"
2532 - newins "${phpinisrc}" php.ini
2533 -
2534 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
2535 - elog
2536 -
2537 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
2538 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
2539 -
2540 - if use opcache; then
2541 - elog "Adding opcache to $PHP_EXT_INI_DIR"
2542 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
2543 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
2544 - dosym "../ext/opcache.ini" \
2545 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
2546 - fi
2547 -
2548 - # SAPI-specific handling
2549 - if [[ "${sapi}" == "