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