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