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