1 |
commit: 67f854094b164ec3b0628cc198c483da4aa65c4f |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 21:08:35 2021 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 22:10:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f85409 |
7 |
|
8 |
dev-lang/php: remove old vulnerable php-8.0.6.ebuild. |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
11 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
12 |
|
13 |
dev-lang/php/Manifest | 1 - |
14 |
dev-lang/php/php-8.0.6.ebuild | 748 ------------------------------------------ |
15 |
2 files changed, 749 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest |
18 |
index 0f6e5d6212b..fec89a7bdac 100644 |
19 |
--- a/dev-lang/php/Manifest |
20 |
+++ b/dev-lang/php/Manifest |
21 |
@@ -2,5 +2,4 @@ DIST php-7.3.28.tar.xz 12139380 BLAKE2B 696c573878866e97fcae5fe3e33e83e75bf706d0 |
22 |
DIST php-7.3.29.tar.xz 12139492 BLAKE2B 7e1287e0fd236252f5bc92009e4ff51676eccd197c1c579f0e79a5428fa3920b5d1f95a459cdd77c22699fbe83984a6d726ab4fc0fc1e309da8b34e0e3998071 SHA512 8a495546d575a31f864f85139d8d7931361e6ac421f2cf5ef3b4cb57f59c44568cb9ad0c8793f50169d8d9933abdcec14ab90add2d7fab056e19e7f66d60689f |
23 |
DIST php-7.4.19.tar.xz 10341424 BLAKE2B b5f549603a2d108d2d4c16dfb15c2088612e040e9e4756cc7c1403c67e152ad3461d84915e4f542b1e558469ae3143721c6d7ec25ef03c3b4a6142fe972bd775 SHA512 2ac51b9920069ebe8ac68a94f8e9aac2b3d44d69668f340aba95f8303632fe1bfc4c3f2ce398cc7e2c2ea48583d8e04dedfc66f7147c1f4470a55417554d0071 |
24 |
DIST php-7.4.21.tar.xz 10346628 BLAKE2B f758d6bef60f5e0c99bd097533d1663640362c2b752a3bd54389acc3bd7d173c1ba5d4b1c119b6ad50f5029aabe2349bb4646a33212dc3cf34fd294f24def401 SHA512 778ddbfe614fdc6a00bc82c61f4c636bdbe815ce3398415a29bd24a2fd4ca2113b3b804303585d8830242e04b0c202bbc7c725a46c9bad79b070a0e896e5e681 |
25 |
-DIST php-8.0.6.tar.xz 10764932 BLAKE2B 9ab23dfcefe2c94a88184fbb3e18267c38fdcabeca0e9ba12a616528895f85790b1238fdb6e0578db2183b6eee26f26d9d7b744b7344495ea20a6e58668136d1 SHA512 4915b9b5024ce1fb7bc3ba7c1a00831841bc970ebb68b6b1e6a00cbec4d8dcbbca3ca043882ffd9c4719a988d08275f77f9cee07ff3d45a71402dfc51bd31e04 |
26 |
DIST php-8.0.8.tar.xz 10674548 BLAKE2B d2446ae5b80e692106b89418864e4253e000741addb7526599ec8db96713f91a5ab3bccd5bbd2f536b16cc58afafdf22b19996d424dfdce3218a8083ee2bdf37 SHA512 1f8b94083b64705e24365af57169f8ff08115f31a7471238d9ed7a24b692e46c789f3fc00ff2bef2205243b9cd9c4736831e995a004afc7fc4127f3b74932428 |
27 |
|
28 |
diff --git a/dev-lang/php/php-8.0.6.ebuild b/dev-lang/php/php-8.0.6.ebuild |
29 |
deleted file mode 100644 |
30 |
index bf9240b404a..00000000000 |
31 |
--- a/dev-lang/php/php-8.0.6.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,748 +0,0 @@ |
34 |
-# Copyright 1999-2021 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI="7" |
38 |
- |
39 |
-WANT_AUTOMAKE="none" |
40 |
- |
41 |
-inherit flag-o-matic systemd autotools |
42 |
- |
43 |
-MY_PV=${PV/_rc/rc} |
44 |
-DESCRIPTION="The PHP language runtime engine" |
45 |
-HOMEPAGE="https://www.php.net/" |
46 |
-SRC_URI="https://www.php.net/distributions/${P}.tar.xz" |
47 |
- |
48 |
-LICENSE="PHP-3.01 |
49 |
- BSD |
50 |
- Zend-2.0 |
51 |
- bcmath? ( LGPL-2.1+ ) |
52 |
- fpm? ( BSD-2 ) |
53 |
- gd? ( gd ) |
54 |
- unicode? ( BSD-2 LGPL-2.1 )" |
55 |
- |
56 |
-SLOT="$(ver_cut 1-2)" |
57 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" |
58 |
- |
59 |
-S="${WORKDIR}/${PN}-${MY_PV}" |
60 |
- |
61 |
-# We can build the following SAPIs in the given order |
62 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
63 |
- |
64 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
65 |
-IUSE="${IUSE} |
66 |
- ${SAPIS/cli/+cli} |
67 |
- threads" |
68 |
- |
69 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
70 |
- coverage +ctype curl debug |
71 |
- enchant exif ffi +fileinfo +filter firebird |
72 |
- +flatfile ftp gd gdbm gmp +iconv imap inifile |
73 |
- intl iodbc ipv6 +jit kerberos ldap ldap-sasl libedit lmdb |
74 |
- mhash mssql mysql mysqli nls |
75 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
76 |
- readline selinux +session session-mm sharedmem |
77 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
78 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp |
79 |
- +xml xmlreader xmlwriter xpm xslt zip zlib" |
80 |
- |
81 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
82 |
-# The Oracle instant client provides its own incompatible ldap library. |
83 |
-REQUIRED_USE=" |
84 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
85 |
- cli? ( ^^ ( readline libedit ) ) |
86 |
- !cli? ( ?? ( readline libedit ) ) |
87 |
- truetype? ( gd zlib ) |
88 |
- webp? ( gd zlib ) |
89 |
- cjk? ( gd zlib ) |
90 |
- exif? ( gd zlib ) |
91 |
- xpm? ( gd zlib ) |
92 |
- gd? ( zlib ) |
93 |
- simplexml? ( xml ) |
94 |
- soap? ( xml ) |
95 |
- xmlreader? ( xml ) |
96 |
- xmlwriter? ( xml ) |
97 |
- xslt? ( xml ) |
98 |
- ldap-sasl? ( ldap ) |
99 |
- oci8-instant-client? ( !ldap ) |
100 |
- qdbm? ( !gdbm ) |
101 |
- session-mm? ( session !threads ) |
102 |
- mysql? ( || ( mysqli pdo ) ) |
103 |
- firebird? ( pdo ) |
104 |
- mssql? ( pdo ) |
105 |
-" |
106 |
- |
107 |
-RESTRICT="!test? ( test )" |
108 |
- |
109 |
-# The supported (that is, autodetected) versions of BDB are listed in |
110 |
-# the ./configure script. Other versions *work*, but we need to stick to |
111 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
112 |
-COMMON_DEPEND=" |
113 |
- >=app-eselect/eselect-php-0.9.7[apache2?,fpm?] |
114 |
- >=dev-libs/libpcre2-10.30[jit?,unicode] |
115 |
- fpm? ( acl? ( sys-apps/acl ) ) |
116 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
117 |
- argon2? ( app-crypt/argon2:= ) |
118 |
- berkdb? ( || ( sys-libs/db:5.3 |
119 |
- sys-libs/db:5.1 |
120 |
- sys-libs/db:4.8 |
121 |
- sys-libs/db:4.7 |
122 |
- sys-libs/db:4.6 |
123 |
- sys-libs/db:4.5 ) ) |
124 |
- bzip2? ( app-arch/bzip2:0= ) |
125 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
126 |
- coverage? ( dev-util/lcov ) |
127 |
- curl? ( >=net-misc/curl-7.29.0 ) |
128 |
- enchant? ( app-text/enchant:2 ) |
129 |
- ffi? ( >=dev-libs/libffi-3.0.11 ) |
130 |
- firebird? ( dev-db/firebird ) |
131 |
- gd? ( >=virtual/jpeg-0-r3:0 media-libs/libpng:0= ) |
132 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
133 |
- gmp? ( dev-libs/gmp:0= ) |
134 |
- iconv? ( virtual/libiconv ) |
135 |
- imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] ) |
136 |
- intl? ( dev-libs/icu:= ) |
137 |
- kerberos? ( virtual/krb5 ) |
138 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
139 |
- ldap-sasl? ( dev-libs/cyrus-sasl ) |
140 |
- libedit? ( dev-libs/libedit ) |
141 |
- lmdb? ( dev-db/lmdb:= ) |
142 |
- mssql? ( dev-db/freetds[mssql] ) |
143 |
- nls? ( sys-devel/gettext ) |
144 |
- oci8-instant-client? ( dev-db/oracle-instantclient[sdk] ) |
145 |
- odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) ) |
146 |
- postgres? ( >=dev-db/postgresql-9.1:* ) |
147 |
- qdbm? ( dev-db/qdbm ) |
148 |
- readline? ( sys-libs/readline:0= ) |
149 |
- session-mm? ( dev-libs/mm ) |
150 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
151 |
- sodium? ( dev-libs/libsodium:= ) |
152 |
- spell? ( >=app-text/aspell-0.50 ) |
153 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
154 |
- ssl? ( >=dev-libs/openssl-1.0.1:0= ) |
155 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
156 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
157 |
- truetype? ( =media-libs/freetype-2* ) |
158 |
- unicode? ( dev-libs/oniguruma:= ) |
159 |
- webp? ( media-libs/libwebp:0= ) |
160 |
- xml? ( >=dev-libs/libxml2-2.9.0 ) |
161 |
- xpm? ( x11-libs/libXpm ) |
162 |
- xslt? ( dev-libs/libxslt ) |
163 |
- zip? ( >=dev-libs/libzip-1.2.0:= ) |
164 |
- zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) |
165 |
-" |
166 |
- |
167 |
-RDEPEND="${COMMON_DEPEND} |
168 |
- virtual/mta |
169 |
- fpm? ( |
170 |
- selinux? ( sec-policy/selinux-phpfpm ) |
171 |
- systemd? ( sys-apps/systemd ) )" |
172 |
- |
173 |
-# Bison isn't actually needed when building from a release tarball |
174 |
-# However, the configure script will warn if it's absent or if you |
175 |
-# have an incompatible version installed. See bug 593278. |
176 |
-DEPEND="${COMMON_DEPEND} |
177 |
- app-arch/xz-utils |
178 |
- >=sys-devel/bison-3.0.1" |
179 |
- |
180 |
-BDEPEND="virtual/pkgconfig" |
181 |
- |
182 |
-PHP_MV="$(ver_cut 1)" |
183 |
- |
184 |
-PATCHES=( |
185 |
- "${FILESDIR}/php-iodbc-header-location.patch" |
186 |
- "${FILESDIR}/php80-firebird-warnings.patch" |
187 |
-) |
188 |
- |
189 |
-php_install_ini() { |
190 |
- local phpsapi="${1}" |
191 |
- |
192 |
- # work out where we are installing the ini file |
193 |
- php_set_ini_dir "${phpsapi}" |
194 |
- |
195 |
- # Always install the production INI file, bug 611214. |
196 |
- local phpinisrc="php.ini-production-${phpsapi}" |
197 |
- cp php.ini-production "${phpinisrc}" || die |
198 |
- |
199 |
- # default to /tmp for save_path, bug #282768 |
200 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
201 |
- |
202 |
- # Set the extension dir |
203 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
204 |
- -i "${phpinisrc}" || die |
205 |
- |
206 |
- # Set the include path to point to where we want to find PEAR packages |
207 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
208 |
- |
209 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
210 |
- newins "${phpinisrc}" php.ini |
211 |
- |
212 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
213 |
- elog |
214 |
- |
215 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
216 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
217 |
- |
218 |
- if use opcache; then |
219 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
220 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
221 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
222 |
- dosym "../ext/opcache.ini" \ |
223 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
224 |
- fi |
225 |
- |
226 |
- # SAPI-specific handling |
227 |
- if [[ "${sapi}" == "fpm" ]] ; then |
228 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
229 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
230 |
- doins sapi/fpm/php-fpm.conf |
231 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
232 |
- doins sapi/fpm/www.conf |
233 |
- fi |
234 |
- |
235 |
- dodoc php.ini-{development,production} |
236 |
-} |
237 |
- |
238 |
-php_set_ini_dir() { |
239 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
240 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
241 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
242 |
-} |
243 |
- |
244 |
-src_prepare() { |
245 |
- default |
246 |
- |
247 |
- # In php-7.x, the FPM pool configuration files have been split off |
248 |
- # of the main config. By default the pool config files go in |
249 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
250 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
251 |
- # we'll install the pool configuration file "www.conf" there. |
252 |
- php_set_ini_dir fpm |
253 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
254 |
- sapi/fpm/php-fpm.conf.in \ |
255 |
- || die 'failed to move the include directory in php-fpm.conf' |
256 |
- |
257 |
- # Emulate buildconf to support cross-compilation |
258 |
- rm -fr aclocal.m4 autom4te.cache config.cache \ |
259 |
- configure main/php_config.h.in || die |
260 |
- eautoconf --force |
261 |
- eautoheader |
262 |
-} |
263 |
- |
264 |
-src_configure() { |
265 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
266 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
267 |
- |
268 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
269 |
- |
270 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
271 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
272 |
- local our_conf=( |
273 |
- --prefix="${PHP_DESTDIR}" |
274 |
- --mandir="${PHP_DESTDIR}/man" |
275 |
- --infodir="${PHP_DESTDIR}/info" |
276 |
- --libdir="${PHP_DESTDIR}/lib" |
277 |
- --with-libdir="$(get_libdir)" |
278 |
- --localstatedir="${EPREFIX}/var" |
279 |
- --without-pear |
280 |
- $(use_enable threads zts) |
281 |
- ) |
282 |
- |
283 |
- our_conf+=( |
284 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
285 |
- $(use_enable bcmath) |
286 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
287 |
- $(use_enable calendar) |
288 |
- $(use_enable coverage gcov) |
289 |
- $(use_enable ctype) |
290 |
- $(use_with curl) |
291 |
- $(use_enable xml dom) |
292 |
- $(use_with enchant) |
293 |
- $(use_enable exif) |
294 |
- $(use_with ffi) |
295 |
- $(use_enable fileinfo) |
296 |
- $(use_enable filter) |
297 |
- $(use_enable ftp) |
298 |
- $(use_with nls gettext "${EPREFIX}/usr") |
299 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
300 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
301 |
- $(use_with iconv iconv \ |
302 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
303 |
- $(use_enable intl) |
304 |
- $(use_enable ipv6) |
305 |
- $(use_with kerberos) |
306 |
- $(use_with xml libxml) |
307 |
- $(use_enable unicode mbstring) |
308 |
- $(use_with ssl openssl) |
309 |
- $(use_enable pcntl) |
310 |
- $(use_enable phar) |
311 |
- $(use_enable pdo) |
312 |
- $(use_enable opcache) |
313 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
314 |
- $(use_enable posix) |
315 |
- $(use_with spell pspell "${EPREFIX}/usr") |
316 |
- $(use_enable simplexml) |
317 |
- $(use_enable sharedmem shmop) |
318 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
319 |
- $(use_enable soap) |
320 |
- $(use_enable sockets) |
321 |
- $(use_with sodium) |
322 |
- $(use_with sqlite sqlite3) |
323 |
- $(use_enable sysvipc sysvmsg) |
324 |
- $(use_enable sysvipc sysvsem) |
325 |
- $(use_enable sysvipc sysvshm) |
326 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
327 |
- $(use_enable tokenizer) |
328 |
- $(use_enable xml) |
329 |
- $(use_enable xmlreader) |
330 |
- $(use_enable xmlwriter) |
331 |
- $(use_with xslt xsl) |
332 |
- $(use_with zip) |
333 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
334 |
- $(use_enable debug) |
335 |
- ) |
336 |
- |
337 |
- # DBA support |
338 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
339 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
340 |
- our_conf+=( "--enable-dba" ) |
341 |
- fi |
342 |
- |
343 |
- # DBA drivers support |
344 |
- our_conf+=( |
345 |
- $(use_with cdb) |
346 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
347 |
- $(use_enable flatfile) |
348 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
349 |
- $(use_enable inifile) |
350 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
351 |
- $(use_with tokyocabinet tcadb "${EPREFIX}/usr") |
352 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
353 |
- ) |
354 |
- |
355 |
- # Support for the GD graphics library |
356 |
- our_conf+=( |
357 |
- $(use_with truetype freetype) |
358 |
- $(use_enable cjk gd-jis-conv) |
359 |
- $(use_with gd jpeg) |
360 |
- $(use_with xpm) |
361 |
- $(use_with webp) |
362 |
- ) |
363 |
- # enable gd last, so configure can pick up the previous settings |
364 |
- our_conf+=( $(use_enable gd) ) |
365 |
- |
366 |
- # IMAP support |
367 |
- if use imap ; then |
368 |
- our_conf+=( |
369 |
- $(use_with imap imap "${EPREFIX}/usr") |
370 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
371 |
- ) |
372 |
- fi |
373 |
- |
374 |
- # LDAP support |
375 |
- if use ldap ; then |
376 |
- our_conf+=( |
377 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
378 |
- $(use_with ldap-sasl) |
379 |
- ) |
380 |
- fi |
381 |
- |
382 |
- # MySQL support |
383 |
- local mysqllib="mysqlnd" |
384 |
- local mysqlilib="mysqlnd" |
385 |
- |
386 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
387 |
- |
388 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
389 |
- if use mysql || use mysqli ; then |
390 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
391 |
- fi |
392 |
- |
393 |
- # ODBC support |
394 |
- if use odbc && use iodbc ; then |
395 |
- our_conf+=( |
396 |
- --without-unixODBC |
397 |
- --with-iodbc |
398 |
- $(use_with pdo pdo-odbc "iODBC,${EPREFIX}/usr") |
399 |
- ) |
400 |
- elif use odbc ; then |
401 |
- our_conf+=( |
402 |
- --with-unixODBC="${EPREFIX}/usr" |
403 |
- --without-iodbc |
404 |
- $(use_with pdo pdo-odbc "unixODBC,${EPREFIX}/usr") |
405 |
- ) |
406 |
- else |
407 |
- our_conf+=( |
408 |
- --without-unixODBC |
409 |
- --without-iodbc |
410 |
- --without-pdo-odbc |
411 |
- ) |
412 |
- fi |
413 |
- |
414 |
- # Oracle support |
415 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
416 |
- |
417 |
- # PDO support |
418 |
- if use pdo ; then |
419 |
- our_conf+=( |
420 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
421 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
422 |
- $(use_with postgres pdo-pgsql) |
423 |
- $(use_with sqlite pdo-sqlite) |
424 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
425 |
- $(use_with oci8-instant-client pdo-oci) |
426 |
- ) |
427 |
- fi |
428 |
- |
429 |
- # readline/libedit support |
430 |
- our_conf+=( |
431 |
- $(use_with readline readline "${EPREFIX}/usr") |
432 |
- $(use_with libedit) |
433 |
- ) |
434 |
- |
435 |
- # Session support |
436 |
- if use session ; then |
437 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
438 |
- else |
439 |
- our_conf+=( $(use_enable session) ) |
440 |
- fi |
441 |
- |
442 |
- # Use pic for shared modules such as apache2's mod_php |
443 |
- our_conf+=( --with-pic ) |
444 |
- |
445 |
- # we use the system copy of pcre |
446 |
- # --with-external-pcre affects ext/pcre |
447 |
- our_conf+=( |
448 |
- --with-external-pcre |
449 |
- $(use_with jit pcre-jit) |
450 |
- ) |
451 |
- |
452 |
- # Catch CFLAGS problems |
453 |
- # Fixes bug #14067. |
454 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
455 |
- replace-cpu-flags "k6*" "i586" |
456 |
- |
457 |
- # Cache the ./configure test results between SAPIs. |
458 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
459 |
- |
460 |
- # Support user-passed configuration parameters |
461 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
462 |
- |
463 |
- # Support the Apache2 extras, they must be set globally for all |
464 |
- # SAPIs to work correctly, especially for external PHP extensions |
465 |
- |
466 |
- local one_sapi |
467 |
- local sapi |
468 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
469 |
- for one_sapi in $SAPIS ; do |
470 |
- use "${one_sapi}" || continue |
471 |
- php_set_ini_dir "${one_sapi}" |
472 |
- |
473 |
- # The BUILD_DIR variable is used to determine where to output |
474 |
- # the files that autotools creates. This was all originally |
475 |
- # based on the autotools-utils eclass. |
476 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
477 |
- cp -a "${S}" "${BUILD_DIR}" || die |
478 |
- cd "${BUILD_DIR}" || die |
479 |
- |
480 |
- local sapi_conf=( |
481 |
- --with-config-file-path="${PHP_INI_DIR}" |
482 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
483 |
- ) |
484 |
- |
485 |
- for sapi in $SAPIS ; do |
486 |
- case "$sapi" in |
487 |
- cli|cgi|embed|fpm|phpdbg) |
488 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
489 |
- sapi_conf+=( "--enable-${sapi}" ) |
490 |
- if [[ "fpm" == "${sapi}" ]] ; then |
491 |
- sapi_conf+=( |
492 |
- $(use_with acl fpm-acl) |
493 |
- $(use_with systemd fpm-systemd) |
494 |
- ) |
495 |
- fi |
496 |
- else |
497 |
- sapi_conf+=( "--disable-${sapi}" ) |
498 |
- fi |
499 |
- ;; |
500 |
- |
501 |
- apache2) |
502 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
503 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
504 |
- else |
505 |
- sapi_conf+=( --without-apxs2 ) |
506 |
- fi |
507 |
- ;; |
508 |
- esac |
509 |
- done |
510 |
- |
511 |
- # Construct the $myeconfargs array by concatenating $our_conf |
512 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
513 |
- local myeconfargs=( "${our_conf[@]}" ) |
514 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
515 |
- |
516 |
- pushd "${BUILD_DIR}" > /dev/null || die |
517 |
- econf "${myeconfargs[@]}" |
518 |
- popd > /dev/null || die |
519 |
- done |
520 |
-} |
521 |
- |
522 |
-src_compile() { |
523 |
- # snmp seems to run during src_compile, too (bug #324739) |
524 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
525 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
526 |
- |
527 |
- local sapi |
528 |
- for sapi in ${SAPIS} ; do |
529 |
- if use "${sapi}"; then |
530 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
531 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
532 |
- emake |
533 |
- fi |
534 |
- done |
535 |
-} |
536 |
- |
537 |
-src_install() { |
538 |
- # see bug #324739 for what happens when we don't have that |
539 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
540 |
- |
541 |
- # grab the first SAPI that got built and install common files from there |
542 |
- local first_sapi="", 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 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$(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 |
- # Install the "phar" archive utility. |
586 |
- if use phar ; then |
587 |
- emake INSTALL_ROOT="${D}" install-pharcmd |
588 |
- dosym "..${dest#/usr}/bin/phar" "/usr/bin/phar${SLOT}" |
589 |
- fi |
590 |
- ;; |
591 |
- cgi) |
592 |
- source="sapi/cgi/php-cgi" |
593 |
- ;; |
594 |
- fpm) |
595 |
- source="sapi/fpm/php-fpm" |
596 |
- ;; |
597 |
- embed) |
598 |
- source="libs/libphp$(get_libname)" |
599 |
- ;; |
600 |
- phpdbg) |
601 |
- source="sapi/phpdbg/phpdbg" |
602 |
- ;; |
603 |
- *) |
604 |
- die "unhandled sapi in src_install" |
605 |
- ;; |
606 |
- esac |
607 |
- |
608 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
609 |
- dolib.so "${source}" |
610 |
- else |
611 |
- dobin "${source}" |
612 |
- local name="$(basename ${source})" |
613 |
- dosym "..${dest#/usr}/bin/${name}" "/usr/bin/${name}${SLOT}" |
614 |
- fi |
615 |
- fi |
616 |
- |
617 |
- php_install_ini "${sapi}" |
618 |
- |
619 |
- # construct correct SAPI string for php-config |
620 |
- # thanks to ferringb for the bash voodoo |
621 |
- if [[ "${sapi}" == "apache2" ]]; then |
622 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
623 |
- else |
624 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
625 |
- fi |
626 |
- fi |
627 |
- done |
628 |
- |
629 |
- # Installing opcache module |
630 |
- if use opcache ; then |
631 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
632 |
- dolib.so "modules/opcache$(get_libname)" |
633 |
- fi |
634 |
- |
635 |
- # Install env.d files |
636 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
637 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
638 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
639 |
- |
640 |
- # set php-config variable correctly (bug #278439) |
641 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
642 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
643 |
- |
644 |
- if use fpm ; then |
645 |
- if use systemd; then |
646 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
647 |
- "php-fpm@${SLOT}.service" |
648 |
- else |
649 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
650 |
- "php-fpm@${SLOT}.service" |
651 |
- fi |
652 |
- fi |
653 |
-} |
654 |
- |
655 |
-src_test() { |
656 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
657 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
658 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
659 |
- ewarn "Test phase requires USE=cli, skipping" |
660 |
- return |
661 |
- else |
662 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
663 |
- fi |
664 |
- |
665 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
666 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
667 |
- fi |
668 |
- |
669 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
670 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
671 |
- fi |
672 |
- |
673 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
674 |
- "session.save_path=${T}" \ |
675 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
676 |
- "session.save_path=${T}" |
677 |
- |
678 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
679 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
680 |
- done |
681 |
- |
682 |
- local failed="$(find -name '*.out')" |
683 |
- if [[ ${failed} != "" ]] ; then |
684 |
- ewarn "The following test cases failed unexpectedly:" |
685 |
- for name in ${failed}; do |
686 |
- ewarn " ${name/.out/}" |
687 |
- done |
688 |
- else |
689 |
- einfo "No unexpected test failures, all fine" |
690 |
- fi |
691 |
- |
692 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
693 |
- local passed="" |
694 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
695 |
- [[ -f "${name}.diff" ]] && continue |
696 |
- passed="${passed} ${name}" |
697 |
- done |
698 |
- if [[ ${passed} != "" ]] ; then |
699 |
- einfo "The following test cases passed unexpectedly:" |
700 |
- for name in ${passed}; do |
701 |
- ewarn " ${passed}" |
702 |
- done |
703 |
- else |
704 |
- einfo "None of the known-to-fail tests passed, all fine" |
705 |
- fi |
706 |
- fi |
707 |
-} |
708 |
- |
709 |
-pkg_postinst() { |
710 |
- # Output some general info to the user |
711 |
- if use apache2 ; then |
712 |
- elog |
713 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
714 |
- elog "your apache2 command. OpenRC users can append that string to" |
715 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
716 |
- elog |
717 |
- elog "The apache module configuration file 70_mod_php.conf is" |
718 |
- elog "provided (and maintained) by eselect-php." |
719 |
- elog |
720 |
- fi |
721 |
- |
722 |
- # Create the symlinks for php |
723 |
- local m |
724 |
- for m in ${SAPIS}; do |
725 |
- [[ ${m} == 'embed' ]] && continue; |
726 |
- if use $m ; then |
727 |
- local ci=$(eselect php show $m) |
728 |
- if [[ -z $ci ]]; then |
729 |
- eselect php set $m php${SLOT} || die |
730 |
- einfo "Switched ${m} to use php:${SLOT}" |
731 |
- einfo |
732 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
733 |
- elog "To switch $m to use php:${SLOT}, run" |
734 |
- elog " eselect php set $m php${SLOT}" |
735 |
- elog |
736 |
- fi |
737 |
- fi |
738 |
- done |
739 |
- |
740 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
741 |
- # example, if the user has the cgi SAPI enabled, then he has an |
742 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
743 |
- # USE="-cgi", that symlink will break. This call to eselect is |
744 |
- # supposed to remove that dead link per bug 572436. |
745 |
- eselect php cleanup || die |
746 |
- |
747 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
748 |
- elog "To build extensions for this version of PHP, you will need to" |
749 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
750 |
- elog |
751 |
- fi |
752 |
- |
753 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
754 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
755 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
756 |
- ewarn 'remove it from your configuration at your convenience. See' |
757 |
- ewarn |
758 |
- ewarn ' https://bugs.gentoo.org/611214' |
759 |
- ewarn |
760 |
- ewarn 'for more information.' |
761 |
- fi |
762 |
- |
763 |
- elog "For details on how version slotting works, please see" |
764 |
- elog "the wiki:" |
765 |
- elog |
766 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
767 |
- elog |
768 |
-} |
769 |
- |
770 |
-pkg_postrm() { |
771 |
- # This serves two purposes. First, if we have just removed the last |
772 |
- # installed version of PHP, then this will remove any dead symlinks |
773 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
774 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
775 |
- # his existing symlinks to point to the new 7.0 installation. The |
776 |
- # latter is bug 432962. |
777 |
- # |
778 |
- # Note: the eselect-php package may not be installed at this point, |
779 |
- # so we can't die() if this command fails. |
780 |
- eselect php cleanup |
781 |
-} |