1 |
commit: da326181d5975a80ef06de1f0a732fc3a4c2a4dd |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 1 17:41:17 2019 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 1 17:41:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da326181 |
7 |
|
8 |
dev-lang/php: Drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
11 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
12 |
|
13 |
dev-lang/php/Manifest | 7 - |
14 |
dev-lang/php/php-7.1.31.ebuild | 736 ------------------------------------- |
15 |
dev-lang/php/php-7.2.21.ebuild | 748 ------------------------------------- |
16 |
dev-lang/php/php-7.2.23.ebuild | 748 ------------------------------------- |
17 |
dev-lang/php/php-7.3.10.ebuild | 749 -------------------------------------- |
18 |
dev-lang/php/php-7.3.8.ebuild | 749 -------------------------------------- |
19 |
dev-lang/php/php-7.4.0_rc3.ebuild | 724 ------------------------------------ |
20 |
dev-lang/php/php-7.4.0_rc4.ebuild | 724 ------------------------------------ |
21 |
8 files changed, 5185 deletions(-) |
22 |
|
23 |
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest |
24 |
index 907a11e612a..55011d31703 100644 |
25 |
--- a/dev-lang/php/Manifest |
26 |
+++ b/dev-lang/php/Manifest |
27 |
@@ -1,16 +1,9 @@ |
28 |
DIST php-5.6.40.tar.xz 12472236 BLAKE2B f41147eaec9b15e965540f9e871691cc88848dd619bae6af85e7bba0130b71ce91bad5cdbbadbb537c42df83369f5c731007339a9d9e21e689e913c135201afc SHA512 997b5a952a60cf9166671cc91fcc34c674dd62bfd5cb0a9cdf3fdf2d088b5d19943d94c1cf193f8ab71fc4957d9a9a4c7c2fb8826f937501c1c0a0858f10e329 |
29 |
-DIST php-7.1.31.tar.xz 12370928 BLAKE2B 18b7d5398380324243321a39d337bd10a7eb82812f3dbb9b2ea9eb4808ef585d6452cc5953b56d24bcf817994e249b8b20cd9b4658e1df6c77de78eecb48a3a7 SHA512 989cd157e0d67c6f03192ce9e1afaa01ff72ccc83f3e6b94ac8dc3d4c2717258a46bd64fb20e4649baec1fe2545805013eedc1de78e556d09c2b0ae64d4272d8 |
30 |
DIST php-7.1.32.tar.xz 12369916 BLAKE2B 26f3756bfa15d8caa9f99f48526eabe66cb389d0ecf534700dcf9e2514de12c1b9d45c634b8e5ce07d1e28cce4c5b5a9cda7780013a7af070fd5e3d250a92616 SHA512 090dd6d79514f97be125e86d741094c149250a11a4f7d5f8dd08e028ae5f0b347afc58787b2002cc7b183d08a56562042e33ef7f1eeb060aafaf6fef67646ab1 |
31 |
DIST php-7.1.33.tar.xz 12370228 BLAKE2B 610f501c1729ca3f5fa6f104b9f229046cf1e497f2fdc1194b80b4a5f9ca7f799dc6a458de34dd7a87976b7252ba2f548a8d689e4b2a45c025f1807ab8489f12 SHA512 ed37a79e3402c767f20e55c1cbe27957cc78240eafc719fffccd7d29ae10a45112aa0f29082f56133cd9c25f2750e9e57246d95b4f38d766f49bd29d1397eb1d |
32 |
-DIST php-7.2.21.tar.xz 12298448 BLAKE2B f82b35fd3cdf45d8c84639d044729602340c2d34695b5603a194e2d504627c0e041ab156c3720d218d8d6ca51c9ef71d8d0ee37585142aa30ed0cce51fbcb91e SHA512 c7fe01626c1e25e8882d8f2b69d77a5479567d2daa3bf25d1ce3f45314a882f79ce9914a2aa1b3052b6289b46873f466e457049ce1db6e31b60ba4995187507c |
33 |
DIST php-7.2.22.tar.xz 12271632 BLAKE2B be3089066ba1c25c479eedaf3e6dd8f7773a6d87a16ce49d8c5379bc9b25d073b497004ccb219795bcfdc3af1310570f94f109754120c254ea5bbaaf1a5e953f SHA512 526dbcc03726d6e2f146adbdf8d89f0c8acb2575a3c21e5ef14ae256f29447d82154e0b1869c0143d831f81c2da0d943957c51144fb458457d3681cdfbc6d49b |
34 |
-DIST php-7.2.23.tar.xz 12273340 BLAKE2B a3cad87bc23534953a71834347b4e2ff44512c2a0a5ef3ee9fcf8df6dde5c59033963333cb746303131078ff8129e98e6515cd55f80a8f70faa34bcd43e93495 SHA512 8ba928ae8b5f5b698400fc2a10170c06763b3c300889e9b79618c58d40db05997def9eff715b276495172b50aadb46f43719a0635545b476c04cd3abea363b0b |
35 |
DIST php-7.2.24.tar.xz 12302284 BLAKE2B 3c864e72d9fce1f13295385e20708a632087b2e4ffdc9e0012191cb2e17a3530f26797ad03c595bea60cccf850fe17028f2a379e50f32bd4db82530e0fcd727f SHA512 39597b8328cb4d5284288bdce8dd9c7ef8446e46914de93203700efaf67f85ad5b69df777bea14eef9160b233fb79bcb60f6750c0df011bbf610b62a524689e3 |
36 |
-DIST php-7.3.10.tar.xz 12086948 BLAKE2B 0dec94952fde19619d2f27ec9e4076a41d51ba704a0d4ec818d33ecedab1b2fae445e5b6437e4a1a4f689db8b9e4b93ceaec55174f0b1c89670083f9b62522d3 SHA512 b6c5d439db015cf902cd1823a2cbd509221866a416fc02e0382322a15165fcd04d3fe5d6fa2a9efc37a69f2becf4453d5f1ccecf4b1f035b5be7a550f3f97fc9 |
37 |
DIST php-7.3.11.tar.xz 12092412 BLAKE2B 0f326b85756cfb5ca96a43d7bfbe8aebd3bb9e9ede06734fb00dc3551372d53befba9e87f5f6a0b0b9e62d35a2eedacd1fa500e1eeff908e05ff52be730c61b4 SHA512 150cb202efc4cc1df042a2cbb9368a2d29aefd1d0cf1a0b0bd7238ba5cb6c4b828e23f2d42b4ecd77dd54f73141a33fc3b36ca0764320e9ba470c9549a7f0291 |
38 |
-DIST php-7.3.8.tar.xz 12064620 BLAKE2B cfe2fde5e48080e13bd21cb2e2ca0c0ae38da03c94d0692e11bfe6722e50bd0b864d629a0ef6aed4ac5d9830ec4b4b214b9abdf917519a0c0cb70a4362fc8390 SHA512 9e9e13845350f3d4a8a80c3e2fe8291996e2749b2c862261b96346c01e5e24640cb81adad5e3b7668b56b2266c1fcbb713e8c38da4f9aa474f5f632f91378a8d |
39 |
DIST php-7.3.9.tar.xz 12064244 BLAKE2B 2837463a74a0ccffc1a2193f9fbce78c98c15dd60214cb5d5d704aed7d74449696c3a516e86f440aed9ff3dc2ed8e7bbebcaf0a1268afa55aca2b642e958abf1 SHA512 017d2ae3cd499a7f6ee30111baf0a119e2f404919575acc5ae91fa6e53a303c9d1b5d165205eec3943c3547ff8759e21fbccc62845e3269176f6fc0f2ba88490 |
40 |
-DIST php-7.4.0RC3.tar.xz 10220844 BLAKE2B dc3912533dc52234c5733c89e9353391ddffebe0f08e0de4b9155707d49db43700bfffb91d27391f56fbb2663752742346d7b2947ea77c4175322003b53d1bb4 SHA512 433f5bdafe753948f9ea837205988ae3c779a03c23505795f4c7c71a6cc62354cf61a2f30aa3480a588b9b44faa184664322616025af74627784d5b64b1e8dfb |
41 |
-DIST php-7.4.0RC4.tar.xz 10223780 BLAKE2B 03c19129fbe6e7326144660321769a31b832afbf9c468a4502e8e055be049bc39407003799f1c86bc96141d112571f3f12efb7c8d1d65acf96baae21c8a17423 SHA512 473bd7dd021d2377957799b36b410b29b6650c4813431ff27884e6b0511d4af32ed0500f241b449fefeb562538b0db81df76c14d84654c1d6faaee6e4c560a70 |
42 |
DIST php-7.4.0RC5.tar.xz 10229964 BLAKE2B 0525553bbcd948ea76177b433a9ab56f9e5f62866a9e8065a2c061aad54bc962515aa0ff77cce8f38ec799c07cda53f8d23acabf62bd218e4ffe3bda41b270e1 SHA512 a95c1c786ccaa4aac5d1cabc3831775a10b69e806031ddd495d271fafab54c54c3013f2193b4dabedde05047bb18f7d8491e7dee44afcb9a045c049df7ade5ee |
43 |
DIST php-patches-7.1.31bp.tar.bz2 37219 BLAKE2B 4f3ead2f69adf00ac1317371172c8adbb823f597cd8e3cafe7044d6a46671437fd2e5eaef4309a6fd5825123394044543284d3cbe892c918353a5b07c12b7401 SHA512 eb52679d035ceb4124c8e9175024f4f753e20d139479af4a57e01de941991716b2ce37f6190242c1bec46fd5305bad1f91613b04ee849a0d94f4a33ce013781e |
44 |
|
45 |
diff --git a/dev-lang/php/php-7.1.31.ebuild b/dev-lang/php/php-7.1.31.ebuild |
46 |
deleted file mode 100644 |
47 |
index d6b54b2cba3..00000000000 |
48 |
--- a/dev-lang/php/php-7.1.31.ebuild |
49 |
+++ /dev/null |
50 |
@@ -1,736 +0,0 @@ |
51 |
-# Copyright 1999-2019 Gentoo Authors |
52 |
-# Distributed under the terms of the GNU General Public License v2 |
53 |
- |
54 |
-EAPI="7" |
55 |
- |
56 |
-inherit flag-o-matic systemd autotools |
57 |
- |
58 |
-DESCRIPTION="The PHP language runtime engine" |
59 |
-HOMEPAGE="https://php.net/" |
60 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
61 |
- |
62 |
-LICENSE="PHP-3.01 |
63 |
- BSD |
64 |
- Zend-2.0 |
65 |
- bcmath? ( LGPL-2.1+ ) |
66 |
- fpm? ( BSD-2 ) |
67 |
- gd? ( gd ) |
68 |
- unicode? ( BSD-2 LGPL-2.1 )" |
69 |
- |
70 |
-SLOT="$(ver_cut 1-2)" |
71 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
72 |
- |
73 |
-# We can build the following SAPIs in the given order |
74 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
75 |
- |
76 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
77 |
-IUSE="${IUSE} |
78 |
- ${SAPIS/cli/+cli} |
79 |
- threads" |
80 |
- |
81 |
-IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk |
82 |
- coverage crypt +ctype curl debug |
83 |
- enchant exif +fileinfo +filter firebird |
84 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
85 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl |
86 |
- mhash mssql mysql mysqli nls |
87 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
88 |
- readline recode selinux +session session-mm sharedmem |
89 |
- +simplexml snmp soap sockets spell sqlite ssl |
90 |
- sysvipc systemd test tidy +tokenizer truetype unicode wddx webp |
91 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
92 |
- |
93 |
-# The supported (that is, autodetected) versions of BDB are listed in |
94 |
-# the ./configure script. Other versions *work*, but we need to stick to |
95 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
96 |
-COMMON_DEPEND=" |
97 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
98 |
- >=dev-libs/libpcre-8.32[unicode] |
99 |
- fpm? ( acl? ( sys-apps/acl ) ) |
100 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
101 |
- berkdb? ( || ( sys-libs/db:5.3 |
102 |
- sys-libs/db:5.1 |
103 |
- sys-libs/db:4.8 |
104 |
- sys-libs/db:4.7 |
105 |
- sys-libs/db:4.6 |
106 |
- sys-libs/db:4.5 ) ) |
107 |
- bzip2? ( app-arch/bzip2:0= ) |
108 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
109 |
- coverage? ( dev-util/lcov ) |
110 |
- crypt? ( >=dev-libs/libmcrypt-2.4 ) |
111 |
- curl? ( >=net-misc/curl-7.10.5 ) |
112 |
- enchant? ( <app-text/enchant-2.0:0 ) |
113 |
- firebird? ( dev-db/firebird ) |
114 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
115 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
116 |
- gmp? ( dev-libs/gmp:0= ) |
117 |
- iconv? ( virtual/libiconv ) |
118 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
119 |
- intl? ( dev-libs/icu:= ) |
120 |
- iodbc? ( dev-db/libiodbc ) |
121 |
- kerberos? ( virtual/krb5 ) |
122 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
123 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
124 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
125 |
- mssql? ( dev-db/freetds[mssql] ) |
126 |
- nls? ( sys-devel/gettext ) |
127 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
128 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
129 |
- postgres? ( dev-db/postgresql:* ) |
130 |
- qdbm? ( dev-db/qdbm ) |
131 |
- readline? ( sys-libs/readline:0= ) |
132 |
- recode? ( app-text/recode ) |
133 |
- session-mm? ( dev-libs/mm ) |
134 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
135 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
136 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
137 |
- spell? ( >=app-text/aspell-0.50 ) |
138 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
139 |
- ssl? ( |
140 |
- !libressl? ( dev-libs/openssl:0= ) |
141 |
- libressl? ( dev-libs/libressl:0= ) |
142 |
- ) |
143 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
144 |
- truetype? ( =media-libs/freetype-2* ) |
145 |
- unicode? ( dev-libs/oniguruma:= ) |
146 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
147 |
- webp? ( media-libs/libwebp:0= ) |
148 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
149 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
150 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
151 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
152 |
- xpm? ( x11-libs/libXpm ) |
153 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
154 |
- zip? ( sys-libs/zlib:0= ) |
155 |
- zlib? ( sys-libs/zlib:0= ) |
156 |
-" |
157 |
- |
158 |
-RDEPEND="${COMMON_DEPEND} |
159 |
- virtual/mta |
160 |
- fpm? ( |
161 |
- selinux? ( sec-policy/selinux-phpfpm ) |
162 |
- systemd? ( sys-apps/systemd ) )" |
163 |
- |
164 |
-# Bison isn't actually needed when building from a release tarball |
165 |
-# However, the configure script will warn if it's absent or if you |
166 |
-# have an incompatible version installed. See bug 593278. |
167 |
-DEPEND="${COMMON_DEPEND} |
168 |
- app-arch/xz-utils |
169 |
- >=sys-devel/bison-3.0.1" |
170 |
- |
171 |
-BDEPEND="virtual/pkgconfig" |
172 |
- |
173 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
174 |
-REQUIRED_USE=" |
175 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
176 |
- cli? ( ^^ ( readline libedit ) ) |
177 |
- truetype? ( gd zlib ) |
178 |
- webp? ( gd zlib ) |
179 |
- cjk? ( gd zlib ) |
180 |
- exif? ( gd zlib ) |
181 |
- xpm? ( gd zlib ) |
182 |
- gd? ( zlib ) |
183 |
- simplexml? ( xml ) |
184 |
- soap? ( xml ) |
185 |
- wddx? ( xml ) |
186 |
- xmlrpc? ( || ( xml iconv ) ) |
187 |
- xmlreader? ( xml ) |
188 |
- xslt? ( xml ) |
189 |
- ldap-sasl? ( ldap ) |
190 |
- mhash? ( hash ) |
191 |
- phar? ( hash ) |
192 |
- qdbm? ( !gdbm ) |
193 |
- readline? ( !libedit ) |
194 |
- recode? ( !imap !mysqli !mysql ) |
195 |
- session-mm? ( session !threads ) |
196 |
- mysql? ( hash || ( mysqli pdo ) ) |
197 |
- mysqli? ( hash ) |
198 |
-" |
199 |
-PATCHES=( |
200 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
201 |
- "${FILESDIR}/php-7.1.25-intl-use-icu-namespace.patch" |
202 |
-) |
203 |
- |
204 |
-PHP_MV="$(ver_cut 1)" |
205 |
- |
206 |
-php_install_ini() { |
207 |
- local phpsapi="${1}" |
208 |
- |
209 |
- # work out where we are installing the ini file |
210 |
- php_set_ini_dir "${phpsapi}" |
211 |
- |
212 |
- # Always install the production INI file, bug 611214. |
213 |
- local phpinisrc="php.ini-production-${phpsapi}" |
214 |
- cp php.ini-production "${phpinisrc}" || die |
215 |
- |
216 |
- # default to /tmp for save_path, bug #282768 |
217 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
218 |
- |
219 |
- # Set the extension dir |
220 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
221 |
- -i "${phpinisrc}" || die |
222 |
- |
223 |
- # Set the include path to point to where we want to find PEAR packages |
224 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
225 |
- |
226 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
227 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
228 |
- newins "${phpinisrc}" php.ini |
229 |
- |
230 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
231 |
- elog |
232 |
- |
233 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
234 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
235 |
- |
236 |
- if use opcache; then |
237 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
238 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
239 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
240 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
241 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
242 |
- fi |
243 |
- |
244 |
- # SAPI-specific handling |
245 |
- if [[ "${sapi}" == "fpm" ]] ; then |
246 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
247 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
248 |
- doins sapi/fpm/php-fpm.conf |
249 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
250 |
- doins sapi/fpm/www.conf |
251 |
- fi |
252 |
- |
253 |
- dodoc php.ini-{development,production} |
254 |
-} |
255 |
- |
256 |
-php_set_ini_dir() { |
257 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
258 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
259 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
260 |
-} |
261 |
- |
262 |
-src_prepare() { |
263 |
- default |
264 |
- |
265 |
- # In php-7.x, the FPM pool configuration files have been split off |
266 |
- # of the main config. By default the pool config files go in |
267 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
268 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
269 |
- # we'll install the pool configuration file "www.conf" there. |
270 |
- php_set_ini_dir fpm |
271 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
272 |
- sapi/fpm/php-fpm.conf.in \ |
273 |
- || die 'failed to move the include directory in php-fpm.conf' |
274 |
- |
275 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
276 |
- # Force rebuilding aclocal.m4 |
277 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
278 |
- eautoreconf |
279 |
-} |
280 |
- |
281 |
-src_configure() { |
282 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
283 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
284 |
- |
285 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
286 |
- |
287 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
288 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
289 |
- local our_conf=( |
290 |
- --prefix="${PHP_DESTDIR}" |
291 |
- --mandir="${PHP_DESTDIR}/man" |
292 |
- --infodir="${PHP_DESTDIR}/info" |
293 |
- --libdir="${PHP_DESTDIR}/lib" |
294 |
- --with-libdir="$(get_libdir)" |
295 |
- --localstatedir="${EPREFIX}/var" |
296 |
- --without-pear |
297 |
- $(use_enable threads maintainer-zts) |
298 |
- ) |
299 |
- |
300 |
- our_conf+=( |
301 |
- $(use_enable bcmath bcmath) |
302 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
303 |
- $(use_enable calendar calendar) |
304 |
- $(use_enable coverage gcov) |
305 |
- $(use_enable ctype ctype) |
306 |
- $(use_with curl curl "${EPREFIX}/usr") |
307 |
- $(use_enable xml dom) |
308 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
309 |
- $(use_enable exif exif) |
310 |
- $(use_enable fileinfo fileinfo) |
311 |
- $(use_enable filter filter) |
312 |
- $(use_enable ftp ftp) |
313 |
- $(use_with nls gettext "${EPREFIX}/usr") |
314 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
315 |
- $(use_enable hash hash) |
316 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
317 |
- $(use_with iconv iconv \ |
318 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
319 |
- $(use_enable intl intl) |
320 |
- $(use_enable ipv6 ipv6) |
321 |
- $(use_enable json json) |
322 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
323 |
- $(use_enable xml libxml) |
324 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
325 |
- $(use_enable unicode mbstring) |
326 |
- $(use_with crypt mcrypt "${EPREFIX}/usr") |
327 |
- $(use_with unicode onig "${EPREFIX}/usr") |
328 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
329 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
330 |
- $(use_enable pcntl pcntl) |
331 |
- $(use_enable phar phar) |
332 |
- $(use_enable pdo pdo) |
333 |
- $(use_enable opcache opcache) |
334 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
335 |
- $(use_enable posix posix) |
336 |
- $(use_with spell pspell "${EPREFIX}/usr") |
337 |
- $(use_with recode recode "${EPREFIX}/usr") |
338 |
- $(use_enable simplexml simplexml) |
339 |
- $(use_enable sharedmem shmop) |
340 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
341 |
- $(use_enable soap soap) |
342 |
- $(use_enable sockets sockets) |
343 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
344 |
- $(use_enable sysvipc sysvmsg) |
345 |
- $(use_enable sysvipc sysvsem) |
346 |
- $(use_enable sysvipc sysvshm) |
347 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
348 |
- $(use_enable tokenizer tokenizer) |
349 |
- $(use_enable wddx wddx) |
350 |
- $(use_enable xml xml) |
351 |
- $(use_enable xmlreader xmlreader) |
352 |
- $(use_enable xmlwriter xmlwriter) |
353 |
- $(use_with xmlrpc xmlrpc) |
354 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
355 |
- $(use_enable zip zip) |
356 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
357 |
- $(use_enable debug debug) |
358 |
- ) |
359 |
- |
360 |
- # DBA support |
361 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
362 |
- || use qdbm ; then |
363 |
- our_conf+=( "--enable-dba${shared}" ) |
364 |
- fi |
365 |
- |
366 |
- # DBA drivers support |
367 |
- our_conf+=( |
368 |
- $(use_with cdb cdb) |
369 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
370 |
- $(use_enable flatfile flatfile) |
371 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
372 |
- $(use_enable inifile inifile) |
373 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
374 |
- ) |
375 |
- |
376 |
- # Support for the GD graphics library |
377 |
- our_conf+=( |
378 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
379 |
- $(use_enable cjk gd-jis-conv) |
380 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
381 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
382 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
383 |
- ) |
384 |
- if use webp; then |
385 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
386 |
- fi |
387 |
- # enable gd last, so configure can pick up the previous settings |
388 |
- our_conf+=( $(use_with gd gd) ) |
389 |
- |
390 |
- # IMAP support |
391 |
- if use imap ; then |
392 |
- our_conf+=( |
393 |
- $(use_with imap imap "${EPREFIX}/usr") |
394 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
395 |
- ) |
396 |
- fi |
397 |
- |
398 |
- # Interbase/firebird support |
399 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
400 |
- |
401 |
- # LDAP support |
402 |
- if use ldap ; then |
403 |
- our_conf+=( |
404 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
405 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
406 |
- ) |
407 |
- fi |
408 |
- |
409 |
- # MySQL support |
410 |
- local mysqllib="mysqlnd" |
411 |
- local mysqlilib="mysqlnd" |
412 |
- |
413 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
414 |
- |
415 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
416 |
- if use mysql || use mysqli ; then |
417 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
418 |
- fi |
419 |
- |
420 |
- # ODBC support |
421 |
- our_conf+=( |
422 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
423 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
424 |
- ) |
425 |
- |
426 |
- # Oracle support |
427 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
428 |
- |
429 |
- # PDO support |
430 |
- if use pdo ; then |
431 |
- our_conf+=( |
432 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
433 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
434 |
- $(use_with postgres pdo-pgsql) |
435 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
436 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
437 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
438 |
- $(use_with oci8-instant-client pdo-oci) |
439 |
- ) |
440 |
- fi |
441 |
- |
442 |
- # readline/libedit support |
443 |
- our_conf+=( |
444 |
- $(use_with readline readline "${EPREFIX}/usr") |
445 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
446 |
- ) |
447 |
- |
448 |
- # Session support |
449 |
- if use session ; then |
450 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
451 |
- else |
452 |
- our_conf+=( $(use_enable session session) ) |
453 |
- fi |
454 |
- |
455 |
- # Use pic for shared modules such as apache2's mod_php |
456 |
- our_conf+=( --with-pic ) |
457 |
- |
458 |
- # we use the system copy of pcre |
459 |
- # --with-pcre-regex affects ext/pcre |
460 |
- # --with-pcre-dir affects ext/filter and ext/zip |
461 |
- our_conf+=( |
462 |
- --with-pcre-regex="${EPREFIX}/usr" |
463 |
- --with-pcre-dir="${EPREFIX}/usr" |
464 |
- ) |
465 |
- |
466 |
- # Catch CFLAGS problems |
467 |
- # Fixes bug #14067. |
468 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
469 |
- replace-cpu-flags "k6*" "i586" |
470 |
- |
471 |
- # Cache the ./configure test results between SAPIs. |
472 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
473 |
- |
474 |
- # Support user-passed configuration parameters |
475 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
476 |
- |
477 |
- # Support the Apache2 extras, they must be set globally for all |
478 |
- # SAPIs to work correctly, especially for external PHP extensions |
479 |
- |
480 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
481 |
- for one_sapi in $SAPIS ; do |
482 |
- use "${one_sapi}" || continue |
483 |
- php_set_ini_dir "${one_sapi}" |
484 |
- |
485 |
- # The BUILD_DIR variable is used to determine where to output |
486 |
- # the files that autotools creates. This was all originally |
487 |
- # based on the autotools-utils eclass. |
488 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
489 |
- cp -a "${S}" "${BUILD_DIR}" || die |
490 |
- cd "${BUILD_DIR}" || die |
491 |
- |
492 |
- local sapi_conf=( |
493 |
- --with-config-file-path="${PHP_INI_DIR}" |
494 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
495 |
- ) |
496 |
- |
497 |
- for sapi in $SAPIS ; do |
498 |
- case "$sapi" in |
499 |
- cli|cgi|embed|fpm|phpdbg) |
500 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
501 |
- sapi_conf+=( "--enable-${sapi}" ) |
502 |
- if [[ "fpm" == "${sapi}" ]] ; then |
503 |
- sapi_conf+=( |
504 |
- $(use_with acl fpm-acl) |
505 |
- $(use_with systemd fpm-systemd) |
506 |
- ) |
507 |
- fi |
508 |
- else |
509 |
- sapi_conf+=( "--disable-${sapi}" ) |
510 |
- fi |
511 |
- ;; |
512 |
- |
513 |
- apache2) |
514 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
515 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
516 |
- else |
517 |
- sapi_conf+=( --without-apxs2 ) |
518 |
- fi |
519 |
- ;; |
520 |
- esac |
521 |
- done |
522 |
- |
523 |
- # Construct the $myeconfargs array by concatenating $our_conf |
524 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
525 |
- local myeconfargs=( "${our_conf[@]}" ) |
526 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
527 |
- |
528 |
- pushd "${BUILD_DIR}" > /dev/null || die |
529 |
- econf "${myeconfargs[@]}" |
530 |
- popd > /dev/null || die |
531 |
- done |
532 |
-} |
533 |
- |
534 |
-src_compile() { |
535 |
- # snmp seems to run during src_compile, too (bug #324739) |
536 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
537 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
538 |
- |
539 |
- for sapi in ${SAPIS} ; do |
540 |
- if use "${sapi}"; then |
541 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
542 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
543 |
- emake |
544 |
- fi |
545 |
- done |
546 |
-} |
547 |
- |
548 |
-src_install() { |
549 |
- # see bug #324739 for what happens when we don't have that |
550 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
551 |
- |
552 |
- # grab the first SAPI that got built and install common files from there |
553 |
- local first_sapi="" |
554 |
- for sapi in $SAPIS ; do |
555 |
- if use $sapi ; then |
556 |
- first_sapi=$sapi |
557 |
- break |
558 |
- fi |
559 |
- done |
560 |
- |
561 |
- # Makefile forgets to create this before trying to write to it... |
562 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
563 |
- |
564 |
- # Install php environment (without any sapis) |
565 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
566 |
- emake INSTALL_ROOT="${D}" \ |
567 |
- install-build install-headers install-programs |
568 |
- |
569 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
570 |
- |
571 |
- # Create the directory where we'll put version-specific php scripts |
572 |
- keepdir "/usr/share/php${PHP_MV}" |
573 |
- |
574 |
- local sapi="", file="" |
575 |
- local sapi_list="" |
576 |
- |
577 |
- for sapi in ${SAPIS}; do |
578 |
- if use "${sapi}" ; then |
579 |
- einfo "Installing SAPI: ${sapi}" |
580 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
581 |
- |
582 |
- if [[ "${sapi}" == "apache2" ]] ; then |
583 |
- # We're specifically not using emake install-sapi as libtool |
584 |
- # may cause unnecessary relink failures (see bug #351266) |
585 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
586 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
587 |
- "libphp${PHP_MV}$(get_libname)" |
588 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
589 |
- else |
590 |
- # needed each time, php_install_ini would reset it |
591 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
592 |
- into "${dest}" |
593 |
- case "$sapi" in |
594 |
- cli) |
595 |
- source="sapi/cli/php" |
596 |
- ;; |
597 |
- cgi) |
598 |
- source="sapi/cgi/php-cgi" |
599 |
- ;; |
600 |
- fpm) |
601 |
- source="sapi/fpm/php-fpm" |
602 |
- ;; |
603 |
- embed) |
604 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
605 |
- ;; |
606 |
- phpdbg) |
607 |
- source="sapi/phpdbg/phpdbg" |
608 |
- ;; |
609 |
- *) |
610 |
- die "unhandled sapi in src_install" |
611 |
- ;; |
612 |
- esac |
613 |
- |
614 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
615 |
- dolib.so "${source}" |
616 |
- else |
617 |
- dobin "${source}" |
618 |
- local name="$(basename ${source})" |
619 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
620 |
- fi |
621 |
- fi |
622 |
- |
623 |
- php_install_ini "${sapi}" |
624 |
- |
625 |
- # construct correct SAPI string for php-config |
626 |
- # thanks to ferringb for the bash voodoo |
627 |
- if [[ "${sapi}" == "apache2" ]]; then |
628 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
629 |
- else |
630 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
631 |
- fi |
632 |
- fi |
633 |
- done |
634 |
- |
635 |
- # Installing opcache module |
636 |
- if use opcache ; then |
637 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
638 |
- dolib.so "modules/opcache$(get_libname)" |
639 |
- fi |
640 |
- |
641 |
- # Install env.d files |
642 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
643 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
644 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
645 |
- |
646 |
- # set php-config variable correctly (bug #278439) |
647 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
648 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
649 |
- |
650 |
- if use fpm ; then |
651 |
- if use systemd; then |
652 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
653 |
- "php-fpm@${SLOT}.service" |
654 |
- else |
655 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
656 |
- "php-fpm@${SLOT}.service" |
657 |
- fi |
658 |
- fi |
659 |
-} |
660 |
- |
661 |
-src_test() { |
662 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
663 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
664 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
665 |
- ewarn "Test phase requires USE=cli, skipping" |
666 |
- return |
667 |
- else |
668 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
669 |
- fi |
670 |
- |
671 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
672 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
673 |
- fi |
674 |
- |
675 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
676 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
677 |
- fi |
678 |
- |
679 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
680 |
- "session.save_path=${T}" \ |
681 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
682 |
- "session.save_path=${T}" |
683 |
- |
684 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
685 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
686 |
- done |
687 |
- |
688 |
- local failed="$(find -name '*.out')" |
689 |
- if [[ ${failed} != "" ]] ; then |
690 |
- ewarn "The following test cases failed unexpectedly:" |
691 |
- for name in ${failed}; do |
692 |
- ewarn " ${name/.out/}" |
693 |
- done |
694 |
- else |
695 |
- einfo "No unexpected test failures, all fine" |
696 |
- fi |
697 |
- |
698 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
699 |
- local passed="" |
700 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
701 |
- [[ -f "${name}.diff" ]] && continue |
702 |
- passed="${passed} ${name}" |
703 |
- done |
704 |
- if [[ ${passed} != "" ]] ; then |
705 |
- einfo "The following test cases passed unexpectedly:" |
706 |
- for name in ${passed}; do |
707 |
- ewarn " ${passed}" |
708 |
- done |
709 |
- else |
710 |
- einfo "None of the known-to-fail tests passed, all fine" |
711 |
- fi |
712 |
- fi |
713 |
-} |
714 |
- |
715 |
-pkg_postinst() { |
716 |
- # Output some general info to the user |
717 |
- if use apache2 ; then |
718 |
- elog |
719 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
720 |
- elog "your apache2 command. OpenRC users can append that string to" |
721 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
722 |
- elog |
723 |
- elog "The apache module configuration file 70_mod_php.conf is" |
724 |
- elog "provided (and maintained) by eselect-php." |
725 |
- elog |
726 |
- fi |
727 |
- |
728 |
- # Create the symlinks for php |
729 |
- for m in ${SAPIS}; do |
730 |
- [[ ${m} == 'embed' ]] && continue; |
731 |
- if use $m ; then |
732 |
- local ci=$(eselect php show $m) |
733 |
- if [[ -z $ci ]]; then |
734 |
- eselect php set $m php${SLOT} || die |
735 |
- einfo "Switched ${m} to use php:${SLOT}" |
736 |
- einfo |
737 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
738 |
- elog "To switch $m to use php:${SLOT}, run" |
739 |
- elog " eselect php set $m php${SLOT}" |
740 |
- elog |
741 |
- fi |
742 |
- fi |
743 |
- done |
744 |
- |
745 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
746 |
- # example, if the user has the cgi SAPI enabled, then he has an |
747 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
748 |
- # USE="-cgi", that symlink will break. This call to eselect is |
749 |
- # supposed to remove that dead link per bug 572436. |
750 |
- eselect php cleanup || die |
751 |
- |
752 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
753 |
- elog "To build extensions for this version of PHP, you will need to" |
754 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
755 |
- elog |
756 |
- fi |
757 |
- |
758 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
759 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
760 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
761 |
- ewarn 'remove it from your configuration at your convenience. See' |
762 |
- ewarn |
763 |
- ewarn ' https://bugs.gentoo.org/611214' |
764 |
- ewarn |
765 |
- ewarn 'for more information.' |
766 |
- fi |
767 |
- |
768 |
- elog "For details on how version slotting works, please see" |
769 |
- elog "the wiki:" |
770 |
- elog |
771 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
772 |
- elog |
773 |
-} |
774 |
- |
775 |
-pkg_postrm() { |
776 |
- # This serves two purposes. First, if we have just removed the last |
777 |
- # installed version of PHP, then this will remove any dead symlinks |
778 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
779 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
780 |
- # his existing symlinks to point to the new 7.0 installation. The |
781 |
- # latter is bug 432962. |
782 |
- # |
783 |
- # Note: the eselect-php package may not be installed at this point, |
784 |
- # so we can't die() if this command fails. |
785 |
- eselect php cleanup |
786 |
-} |
787 |
|
788 |
diff --git a/dev-lang/php/php-7.2.21.ebuild b/dev-lang/php/php-7.2.21.ebuild |
789 |
deleted file mode 100644 |
790 |
index cad93b34758..00000000000 |
791 |
--- a/dev-lang/php/php-7.2.21.ebuild |
792 |
+++ /dev/null |
793 |
@@ -1,748 +0,0 @@ |
794 |
-# Copyright 1999-2019 Gentoo Authors |
795 |
-# Distributed under the terms of the GNU General Public License v2 |
796 |
- |
797 |
-EAPI="7" |
798 |
- |
799 |
-inherit flag-o-matic systemd autotools |
800 |
- |
801 |
-DESCRIPTION="The PHP language runtime engine" |
802 |
-HOMEPAGE="https://php.net/" |
803 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
804 |
- |
805 |
-LICENSE="PHP-3.01 |
806 |
- BSD |
807 |
- Zend-2.0 |
808 |
- bcmath? ( LGPL-2.1+ ) |
809 |
- fpm? ( BSD-2 ) |
810 |
- gd? ( gd ) |
811 |
- unicode? ( BSD-2 LGPL-2.1 )" |
812 |
- |
813 |
-SLOT="$(ver_cut 1-2)" |
814 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
815 |
- |
816 |
-# We can build the following SAPIs in the given order |
817 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
818 |
- |
819 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
820 |
-IUSE="${IUSE} |
821 |
- ${SAPIS/cli/+cli} |
822 |
- threads" |
823 |
- |
824 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
825 |
- coverage +ctype curl debug |
826 |
- enchant exif +fileinfo +filter firebird |
827 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
828 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
829 |
- mhash mssql mysql mysqli nls |
830 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
831 |
- readline recode selinux +session session-mm sharedmem |
832 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
833 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp |
834 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib" |
835 |
- |
836 |
-# The supported (that is, autodetected) versions of BDB are listed in |
837 |
-# the ./configure script. Other versions *work*, but we need to stick to |
838 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
839 |
-COMMON_DEPEND=" |
840 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
841 |
- >=dev-libs/libpcre-8.32[unicode] |
842 |
- fpm? ( acl? ( sys-apps/acl ) ) |
843 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
844 |
- argon2? ( app-crypt/argon2:= ) |
845 |
- berkdb? ( || ( sys-libs/db:5.3 |
846 |
- sys-libs/db:5.1 |
847 |
- sys-libs/db:4.8 |
848 |
- sys-libs/db:4.7 |
849 |
- sys-libs/db:4.6 |
850 |
- sys-libs/db:4.5 ) ) |
851 |
- bzip2? ( app-arch/bzip2:0= ) |
852 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
853 |
- coverage? ( dev-util/lcov ) |
854 |
- curl? ( >=net-misc/curl-7.10.5 ) |
855 |
- enchant? ( <app-text/enchant-2.0:0 ) |
856 |
- firebird? ( dev-db/firebird ) |
857 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
858 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
859 |
- gmp? ( dev-libs/gmp:0= ) |
860 |
- iconv? ( virtual/libiconv ) |
861 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
862 |
- intl? ( dev-libs/icu:= ) |
863 |
- iodbc? ( dev-db/libiodbc ) |
864 |
- kerberos? ( virtual/krb5 ) |
865 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
866 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
867 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
868 |
- lmdb? ( dev-db/lmdb:= ) |
869 |
- mssql? ( dev-db/freetds[mssql] ) |
870 |
- nls? ( sys-devel/gettext ) |
871 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
872 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
873 |
- postgres? ( dev-db/postgresql:* ) |
874 |
- qdbm? ( dev-db/qdbm ) |
875 |
- readline? ( sys-libs/readline:0= ) |
876 |
- recode? ( app-text/recode ) |
877 |
- session-mm? ( dev-libs/mm ) |
878 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
879 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
880 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
881 |
- sodium? ( dev-libs/libsodium:= ) |
882 |
- spell? ( >=app-text/aspell-0.50 ) |
883 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
884 |
- ssl? ( |
885 |
- !libressl? ( dev-libs/openssl:0= ) |
886 |
- libressl? ( dev-libs/libressl:0= ) |
887 |
- ) |
888 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
889 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
890 |
- truetype? ( =media-libs/freetype-2* ) |
891 |
- unicode? ( dev-libs/oniguruma:= ) |
892 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
893 |
- webp? ( media-libs/libwebp:0= ) |
894 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
895 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
896 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
897 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
898 |
- xpm? ( x11-libs/libXpm ) |
899 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
900 |
- zip? ( sys-libs/zlib:0= ) |
901 |
- zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) |
902 |
- zlib? ( sys-libs/zlib:0= ) |
903 |
-" |
904 |
- |
905 |
-RDEPEND="${COMMON_DEPEND} |
906 |
- virtual/mta |
907 |
- fpm? ( |
908 |
- selinux? ( sec-policy/selinux-phpfpm ) |
909 |
- systemd? ( sys-apps/systemd ) )" |
910 |
- |
911 |
-# Bison isn't actually needed when building from a release tarball |
912 |
-# However, the configure script will warn if it's absent or if you |
913 |
-# have an incompatible version installed. See bug 593278. |
914 |
-DEPEND="${COMMON_DEPEND} |
915 |
- app-arch/xz-utils |
916 |
- >=sys-devel/bison-3.0.1" |
917 |
- |
918 |
-BDEPEND="virtual/pkgconfig" |
919 |
- |
920 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
921 |
-REQUIRED_USE=" |
922 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
923 |
- cli? ( ^^ ( readline libedit ) ) |
924 |
- truetype? ( gd zlib ) |
925 |
- webp? ( gd zlib ) |
926 |
- cjk? ( gd zlib ) |
927 |
- exif? ( gd zlib ) |
928 |
- xpm? ( gd zlib ) |
929 |
- gd? ( zlib ) |
930 |
- simplexml? ( xml ) |
931 |
- soap? ( xml ) |
932 |
- wddx? ( xml ) |
933 |
- xmlrpc? ( || ( xml iconv ) ) |
934 |
- xmlreader? ( xml ) |
935 |
- xslt? ( xml ) |
936 |
- ldap-sasl? ( ldap ) |
937 |
- mhash? ( hash ) |
938 |
- phar? ( hash ) |
939 |
- qdbm? ( !gdbm ) |
940 |
- readline? ( !libedit ) |
941 |
- recode? ( !imap !mysqli !mysql ) |
942 |
- session-mm? ( session !threads ) |
943 |
- mysql? ( hash || ( mysqli pdo ) ) |
944 |
- mysqli? ( hash ) |
945 |
- zip-encryption? ( zip ) |
946 |
-" |
947 |
-PATCHES=( |
948 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
949 |
- "${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch" |
950 |
-) |
951 |
- |
952 |
-PHP_MV="$(ver_cut 1)" |
953 |
- |
954 |
-php_install_ini() { |
955 |
- local phpsapi="${1}" |
956 |
- |
957 |
- # work out where we are installing the ini file |
958 |
- php_set_ini_dir "${phpsapi}" |
959 |
- |
960 |
- # Always install the production INI file, bug 611214. |
961 |
- local phpinisrc="php.ini-production-${phpsapi}" |
962 |
- cp php.ini-production "${phpinisrc}" || die |
963 |
- |
964 |
- # default to /tmp for save_path, bug #282768 |
965 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
966 |
- |
967 |
- # Set the extension dir |
968 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
969 |
- -i "${phpinisrc}" || die |
970 |
- |
971 |
- # Set the include path to point to where we want to find PEAR packages |
972 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
973 |
- |
974 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
975 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
976 |
- newins "${phpinisrc}" php.ini |
977 |
- |
978 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
979 |
- elog |
980 |
- |
981 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
982 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
983 |
- |
984 |
- if use opcache; then |
985 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
986 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
987 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
988 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
989 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
990 |
- fi |
991 |
- |
992 |
- # SAPI-specific handling |
993 |
- if [[ "${sapi}" == "fpm" ]] ; then |
994 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
995 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
996 |
- doins sapi/fpm/php-fpm.conf |
997 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
998 |
- doins sapi/fpm/www.conf |
999 |
- fi |
1000 |
- |
1001 |
- dodoc php.ini-{development,production} |
1002 |
-} |
1003 |
- |
1004 |
-php_set_ini_dir() { |
1005 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
1006 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
1007 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
1008 |
-} |
1009 |
- |
1010 |
-src_prepare() { |
1011 |
- default |
1012 |
- |
1013 |
- # In php-7.x, the FPM pool configuration files have been split off |
1014 |
- # of the main config. By default the pool config files go in |
1015 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
1016 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
1017 |
- # we'll install the pool configuration file "www.conf" there. |
1018 |
- php_set_ini_dir fpm |
1019 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
1020 |
- sapi/fpm/php-fpm.conf.in \ |
1021 |
- || die 'failed to move the include directory in php-fpm.conf' |
1022 |
- |
1023 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
1024 |
- # Force rebuilding aclocal.m4 |
1025 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
1026 |
- eautoreconf |
1027 |
-} |
1028 |
- |
1029 |
-src_configure() { |
1030 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
1031 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
1032 |
- |
1033 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
1034 |
- |
1035 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
1036 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
1037 |
- local our_conf=( |
1038 |
- --prefix="${PHP_DESTDIR}" |
1039 |
- --mandir="${PHP_DESTDIR}/man" |
1040 |
- --infodir="${PHP_DESTDIR}/info" |
1041 |
- --libdir="${PHP_DESTDIR}/lib" |
1042 |
- --with-libdir="$(get_libdir)" |
1043 |
- --localstatedir="${EPREFIX}/var" |
1044 |
- --without-pear |
1045 |
- $(use_enable threads maintainer-zts) |
1046 |
- ) |
1047 |
- |
1048 |
- our_conf+=( |
1049 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
1050 |
- $(use_enable bcmath bcmath) |
1051 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
1052 |
- $(use_enable calendar calendar) |
1053 |
- $(use_enable coverage gcov) |
1054 |
- $(use_enable ctype ctype) |
1055 |
- $(use_with curl curl "${EPREFIX}/usr") |
1056 |
- $(use_enable xml dom) |
1057 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
1058 |
- $(use_enable exif exif) |
1059 |
- $(use_enable fileinfo fileinfo) |
1060 |
- $(use_enable filter filter) |
1061 |
- $(use_enable ftp ftp) |
1062 |
- $(use_with nls gettext "${EPREFIX}/usr") |
1063 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
1064 |
- $(use_enable hash hash) |
1065 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
1066 |
- $(use_with iconv iconv \ |
1067 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
1068 |
- $(use_enable intl intl) |
1069 |
- $(use_enable ipv6 ipv6) |
1070 |
- $(use_enable json json) |
1071 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
1072 |
- $(use_enable xml libxml) |
1073 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
1074 |
- $(use_enable unicode mbstring) |
1075 |
- $(use_with unicode onig "${EPREFIX}/usr") |
1076 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
1077 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
1078 |
- $(use_enable pcntl pcntl) |
1079 |
- $(use_enable phar phar) |
1080 |
- $(use_enable pdo pdo) |
1081 |
- $(use_enable opcache opcache) |
1082 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
1083 |
- $(use_enable posix posix) |
1084 |
- $(use_with spell pspell "${EPREFIX}/usr") |
1085 |
- $(use_with recode recode "${EPREFIX}/usr") |
1086 |
- $(use_enable simplexml simplexml) |
1087 |
- $(use_enable sharedmem shmop) |
1088 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
1089 |
- $(use_enable soap soap) |
1090 |
- $(use_enable sockets sockets) |
1091 |
- $(use_with sodium sodium "${EPREFIX}/usr") |
1092 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
1093 |
- $(use_enable sysvipc sysvmsg) |
1094 |
- $(use_enable sysvipc sysvsem) |
1095 |
- $(use_enable sysvipc sysvshm) |
1096 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
1097 |
- $(use_enable tokenizer tokenizer) |
1098 |
- $(use_enable wddx wddx) |
1099 |
- $(use_enable xml xml) |
1100 |
- $(use_enable xmlreader xmlreader) |
1101 |
- $(use_enable xmlwriter xmlwriter) |
1102 |
- $(use_with xmlrpc xmlrpc) |
1103 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
1104 |
- $(use_enable zip zip) |
1105 |
- $(use_with zip-encryption libzip "${EPREFIX}/usr") |
1106 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
1107 |
- $(use_enable debug debug) |
1108 |
- ) |
1109 |
- |
1110 |
- # DBA support |
1111 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
1112 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
1113 |
- our_conf+=( "--enable-dba${shared}" ) |
1114 |
- fi |
1115 |
- |
1116 |
- # DBA drivers support |
1117 |
- our_conf+=( |
1118 |
- $(use_with cdb cdb) |
1119 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
1120 |
- $(use_enable flatfile flatfile) |
1121 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
1122 |
- $(use_enable inifile inifile) |
1123 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
1124 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
1125 |
- ) |
1126 |
- |
1127 |
- # Support for the GD graphics library |
1128 |
- our_conf+=( |
1129 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
1130 |
- $(use_enable cjk gd-jis-conv) |
1131 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
1132 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
1133 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
1134 |
- ) |
1135 |
- if use webp; then |
1136 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
1137 |
- fi |
1138 |
- # enable gd last, so configure can pick up the previous settings |
1139 |
- our_conf+=( $(use_with gd gd) ) |
1140 |
- |
1141 |
- # IMAP support |
1142 |
- if use imap ; then |
1143 |
- our_conf+=( |
1144 |
- $(use_with imap imap "${EPREFIX}/usr") |
1145 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
1146 |
- ) |
1147 |
- fi |
1148 |
- |
1149 |
- # Interbase/firebird support |
1150 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
1151 |
- |
1152 |
- # LDAP support |
1153 |
- if use ldap ; then |
1154 |
- our_conf+=( |
1155 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
1156 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
1157 |
- ) |
1158 |
- fi |
1159 |
- |
1160 |
- # MySQL support |
1161 |
- local mysqllib="mysqlnd" |
1162 |
- local mysqlilib="mysqlnd" |
1163 |
- |
1164 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
1165 |
- |
1166 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
1167 |
- if use mysql || use mysqli ; then |
1168 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
1169 |
- fi |
1170 |
- |
1171 |
- # ODBC support |
1172 |
- our_conf+=( |
1173 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
1174 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
1175 |
- ) |
1176 |
- |
1177 |
- # Oracle support |
1178 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
1179 |
- |
1180 |
- # PDO support |
1181 |
- if use pdo ; then |
1182 |
- our_conf+=( |
1183 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
1184 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
1185 |
- $(use_with postgres pdo-pgsql) |
1186 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
1187 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
1188 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
1189 |
- $(use_with oci8-instant-client pdo-oci) |
1190 |
- ) |
1191 |
- fi |
1192 |
- |
1193 |
- # readline/libedit support |
1194 |
- our_conf+=( |
1195 |
- $(use_with readline readline "${EPREFIX}/usr") |
1196 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
1197 |
- ) |
1198 |
- |
1199 |
- # Session support |
1200 |
- if use session ; then |
1201 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
1202 |
- else |
1203 |
- our_conf+=( $(use_enable session session) ) |
1204 |
- fi |
1205 |
- |
1206 |
- # Use pic for shared modules such as apache2's mod_php |
1207 |
- our_conf+=( --with-pic ) |
1208 |
- |
1209 |
- # we use the system copy of pcre |
1210 |
- # --with-pcre-regex affects ext/pcre |
1211 |
- # --with-pcre-dir affects ext/filter and ext/zip |
1212 |
- # --with-pcre-valgrind cannot be enabled with system pcre |
1213 |
- # Many arches don't support pcre-jit |
1214 |
- our_conf+=( |
1215 |
- --with-pcre-regex="${EPREFIX}/usr" |
1216 |
- --with-pcre-dir="${EPREFIX}/usr" |
1217 |
- --without-pcre-valgrind |
1218 |
- --without-pcre-jit |
1219 |
- ) |
1220 |
- |
1221 |
- # Catch CFLAGS problems |
1222 |
- # Fixes bug #14067. |
1223 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
1224 |
- replace-cpu-flags "k6*" "i586" |
1225 |
- |
1226 |
- # Cache the ./configure test results between SAPIs. |
1227 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
1228 |
- |
1229 |
- # Support user-passed configuration parameters |
1230 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
1231 |
- |
1232 |
- # Support the Apache2 extras, they must be set globally for all |
1233 |
- # SAPIs to work correctly, especially for external PHP extensions |
1234 |
- |
1235 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
1236 |
- for one_sapi in $SAPIS ; do |
1237 |
- use "${one_sapi}" || continue |
1238 |
- php_set_ini_dir "${one_sapi}" |
1239 |
- |
1240 |
- # The BUILD_DIR variable is used to determine where to output |
1241 |
- # the files that autotools creates. This was all originally |
1242 |
- # based on the autotools-utils eclass. |
1243 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
1244 |
- cp -a "${S}" "${BUILD_DIR}" || die |
1245 |
- cd "${BUILD_DIR}" || die |
1246 |
- |
1247 |
- local sapi_conf=( |
1248 |
- --with-config-file-path="${PHP_INI_DIR}" |
1249 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
1250 |
- ) |
1251 |
- |
1252 |
- for sapi in $SAPIS ; do |
1253 |
- case "$sapi" in |
1254 |
- cli|cgi|embed|fpm|phpdbg) |
1255 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
1256 |
- sapi_conf+=( "--enable-${sapi}" ) |
1257 |
- if [[ "fpm" == "${sapi}" ]] ; then |
1258 |
- sapi_conf+=( |
1259 |
- $(use_with acl fpm-acl) |
1260 |
- $(use_with systemd fpm-systemd) |
1261 |
- ) |
1262 |
- fi |
1263 |
- else |
1264 |
- sapi_conf+=( "--disable-${sapi}" ) |
1265 |
- fi |
1266 |
- ;; |
1267 |
- |
1268 |
- apache2) |
1269 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
1270 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
1271 |
- else |
1272 |
- sapi_conf+=( --without-apxs2 ) |
1273 |
- fi |
1274 |
- ;; |
1275 |
- esac |
1276 |
- done |
1277 |
- |
1278 |
- # Construct the $myeconfargs array by concatenating $our_conf |
1279 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
1280 |
- local myeconfargs=( "${our_conf[@]}" ) |
1281 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
1282 |
- |
1283 |
- pushd "${BUILD_DIR}" > /dev/null || die |
1284 |
- econf "${myeconfargs[@]}" |
1285 |
- popd > /dev/null || die |
1286 |
- done |
1287 |
-} |
1288 |
- |
1289 |
-src_compile() { |
1290 |
- # snmp seems to run during src_compile, too (bug #324739) |
1291 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
1292 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
1293 |
- |
1294 |
- for sapi in ${SAPIS} ; do |
1295 |
- if use "${sapi}"; then |
1296 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
1297 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
1298 |
- emake |
1299 |
- fi |
1300 |
- done |
1301 |
-} |
1302 |
- |
1303 |
-src_install() { |
1304 |
- # see bug #324739 for what happens when we don't have that |
1305 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
1306 |
- |
1307 |
- # grab the first SAPI that got built and install common files from there |
1308 |
- local first_sapi="" |
1309 |
- for sapi in $SAPIS ; do |
1310 |
- if use $sapi ; then |
1311 |
- first_sapi=$sapi |
1312 |
- break |
1313 |
- fi |
1314 |
- done |
1315 |
- |
1316 |
- # Makefile forgets to create this before trying to write to it... |
1317 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
1318 |
- |
1319 |
- # Install php environment (without any sapis) |
1320 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
1321 |
- emake INSTALL_ROOT="${D}" \ |
1322 |
- install-build install-headers install-programs |
1323 |
- |
1324 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
1325 |
- |
1326 |
- # Create the directory where we'll put version-specific php scripts |
1327 |
- keepdir "/usr/share/php${PHP_MV}" |
1328 |
- |
1329 |
- local sapi="", file="" |
1330 |
- local sapi_list="" |
1331 |
- |
1332 |
- for sapi in ${SAPIS}; do |
1333 |
- if use "${sapi}" ; then |
1334 |
- einfo "Installing SAPI: ${sapi}" |
1335 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
1336 |
- |
1337 |
- if [[ "${sapi}" == "apache2" ]] ; then |
1338 |
- # We're specifically not using emake install-sapi as libtool |
1339 |
- # may cause unnecessary relink failures (see bug #351266) |
1340 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
1341 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
1342 |
- "libphp${PHP_MV}$(get_libname)" |
1343 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
1344 |
- else |
1345 |
- # needed each time, php_install_ini would reset it |
1346 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
1347 |
- into "${dest}" |
1348 |
- case "$sapi" in |
1349 |
- cli) |
1350 |
- source="sapi/cli/php" |
1351 |
- ;; |
1352 |
- cgi) |
1353 |
- source="sapi/cgi/php-cgi" |
1354 |
- ;; |
1355 |
- fpm) |
1356 |
- source="sapi/fpm/php-fpm" |
1357 |
- ;; |
1358 |
- embed) |
1359 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
1360 |
- ;; |
1361 |
- phpdbg) |
1362 |
- source="sapi/phpdbg/phpdbg" |
1363 |
- ;; |
1364 |
- *) |
1365 |
- die "unhandled sapi in src_install" |
1366 |
- ;; |
1367 |
- esac |
1368 |
- |
1369 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
1370 |
- dolib.so "${source}" |
1371 |
- else |
1372 |
- dobin "${source}" |
1373 |
- local name="$(basename ${source})" |
1374 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
1375 |
- fi |
1376 |
- fi |
1377 |
- |
1378 |
- php_install_ini "${sapi}" |
1379 |
- |
1380 |
- # construct correct SAPI string for php-config |
1381 |
- # thanks to ferringb for the bash voodoo |
1382 |
- if [[ "${sapi}" == "apache2" ]]; then |
1383 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
1384 |
- else |
1385 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
1386 |
- fi |
1387 |
- fi |
1388 |
- done |
1389 |
- |
1390 |
- # Installing opcache module |
1391 |
- if use opcache ; then |
1392 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
1393 |
- dolib.so "modules/opcache$(get_libname)" |
1394 |
- fi |
1395 |
- |
1396 |
- # Install env.d files |
1397 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
1398 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
1399 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
1400 |
- |
1401 |
- # set php-config variable correctly (bug #278439) |
1402 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
1403 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
1404 |
- |
1405 |
- if use fpm ; then |
1406 |
- if use systemd; then |
1407 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
1408 |
- "php-fpm@${SLOT}.service" |
1409 |
- else |
1410 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
1411 |
- "php-fpm@${SLOT}.service" |
1412 |
- fi |
1413 |
- fi |
1414 |
-} |
1415 |
- |
1416 |
-src_test() { |
1417 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
1418 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
1419 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
1420 |
- ewarn "Test phase requires USE=cli, skipping" |
1421 |
- return |
1422 |
- else |
1423 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
1424 |
- fi |
1425 |
- |
1426 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
1427 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
1428 |
- fi |
1429 |
- |
1430 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
1431 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
1432 |
- fi |
1433 |
- |
1434 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
1435 |
- "session.save_path=${T}" \ |
1436 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
1437 |
- "session.save_path=${T}" |
1438 |
- |
1439 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
1440 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
1441 |
- done |
1442 |
- |
1443 |
- local failed="$(find -name '*.out')" |
1444 |
- if [[ ${failed} != "" ]] ; then |
1445 |
- ewarn "The following test cases failed unexpectedly:" |
1446 |
- for name in ${failed}; do |
1447 |
- ewarn " ${name/.out/}" |
1448 |
- done |
1449 |
- else |
1450 |
- einfo "No unexpected test failures, all fine" |
1451 |
- fi |
1452 |
- |
1453 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
1454 |
- local passed="" |
1455 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
1456 |
- [[ -f "${name}.diff" ]] && continue |
1457 |
- passed="${passed} ${name}" |
1458 |
- done |
1459 |
- if [[ ${passed} != "" ]] ; then |
1460 |
- einfo "The following test cases passed unexpectedly:" |
1461 |
- for name in ${passed}; do |
1462 |
- ewarn " ${passed}" |
1463 |
- done |
1464 |
- else |
1465 |
- einfo "None of the known-to-fail tests passed, all fine" |
1466 |
- fi |
1467 |
- fi |
1468 |
-} |
1469 |
- |
1470 |
-pkg_postinst() { |
1471 |
- # Output some general info to the user |
1472 |
- if use apache2 ; then |
1473 |
- elog |
1474 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
1475 |
- elog "your apache2 command. OpenRC users can append that string to" |
1476 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
1477 |
- elog |
1478 |
- elog "The apache module configuration file 70_mod_php.conf is" |
1479 |
- elog "provided (and maintained) by eselect-php." |
1480 |
- elog |
1481 |
- fi |
1482 |
- |
1483 |
- # Create the symlinks for php |
1484 |
- for m in ${SAPIS}; do |
1485 |
- [[ ${m} == 'embed' ]] && continue; |
1486 |
- if use $m ; then |
1487 |
- local ci=$(eselect php show $m) |
1488 |
- if [[ -z $ci ]]; then |
1489 |
- eselect php set $m php${SLOT} || die |
1490 |
- einfo "Switched ${m} to use php:${SLOT}" |
1491 |
- einfo |
1492 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
1493 |
- elog "To switch $m to use php:${SLOT}, run" |
1494 |
- elog " eselect php set $m php${SLOT}" |
1495 |
- elog |
1496 |
- fi |
1497 |
- fi |
1498 |
- done |
1499 |
- |
1500 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
1501 |
- # example, if the user has the cgi SAPI enabled, then he has an |
1502 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
1503 |
- # USE="-cgi", that symlink will break. This call to eselect is |
1504 |
- # supposed to remove that dead link per bug 572436. |
1505 |
- eselect php cleanup || die |
1506 |
- |
1507 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
1508 |
- elog "To build extensions for this version of PHP, you will need to" |
1509 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
1510 |
- elog |
1511 |
- fi |
1512 |
- |
1513 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
1514 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
1515 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
1516 |
- ewarn 'remove it from your configuration at your convenience. See' |
1517 |
- ewarn |
1518 |
- ewarn ' https://bugs.gentoo.org/611214' |
1519 |
- ewarn |
1520 |
- ewarn 'for more information.' |
1521 |
- fi |
1522 |
- |
1523 |
- elog "For details on how version slotting works, please see" |
1524 |
- elog "the wiki:" |
1525 |
- elog |
1526 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
1527 |
- elog |
1528 |
-} |
1529 |
- |
1530 |
-pkg_postrm() { |
1531 |
- # This serves two purposes. First, if we have just removed the last |
1532 |
- # installed version of PHP, then this will remove any dead symlinks |
1533 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
1534 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
1535 |
- # his existing symlinks to point to the new 7.0 installation. The |
1536 |
- # latter is bug 432962. |
1537 |
- # |
1538 |
- # Note: the eselect-php package may not be installed at this point, |
1539 |
- # so we can't die() if this command fails. |
1540 |
- eselect php cleanup |
1541 |
-} |
1542 |
|
1543 |
diff --git a/dev-lang/php/php-7.2.23.ebuild b/dev-lang/php/php-7.2.23.ebuild |
1544 |
deleted file mode 100644 |
1545 |
index 7a4b01c291e..00000000000 |
1546 |
--- a/dev-lang/php/php-7.2.23.ebuild |
1547 |
+++ /dev/null |
1548 |
@@ -1,748 +0,0 @@ |
1549 |
-# Copyright 1999-2019 Gentoo Authors |
1550 |
-# Distributed under the terms of the GNU General Public License v2 |
1551 |
- |
1552 |
-EAPI="7" |
1553 |
- |
1554 |
-inherit flag-o-matic systemd autotools |
1555 |
- |
1556 |
-DESCRIPTION="The PHP language runtime engine" |
1557 |
-HOMEPAGE="https://php.net/" |
1558 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
1559 |
- |
1560 |
-LICENSE="PHP-3.01 |
1561 |
- BSD |
1562 |
- Zend-2.0 |
1563 |
- bcmath? ( LGPL-2.1+ ) |
1564 |
- fpm? ( BSD-2 ) |
1565 |
- gd? ( gd ) |
1566 |
- unicode? ( BSD-2 LGPL-2.1 )" |
1567 |
- |
1568 |
-SLOT="$(ver_cut 1-2)" |
1569 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
1570 |
- |
1571 |
-# We can build the following SAPIs in the given order |
1572 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
1573 |
- |
1574 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
1575 |
-IUSE="${IUSE} |
1576 |
- ${SAPIS/cli/+cli} |
1577 |
- threads" |
1578 |
- |
1579 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
1580 |
- coverage +ctype curl debug |
1581 |
- enchant exif +fileinfo +filter firebird |
1582 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
1583 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
1584 |
- mhash mssql mysql mysqli nls |
1585 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
1586 |
- readline recode selinux +session session-mm sharedmem |
1587 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
1588 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp |
1589 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib" |
1590 |
- |
1591 |
-# The supported (that is, autodetected) versions of BDB are listed in |
1592 |
-# the ./configure script. Other versions *work*, but we need to stick to |
1593 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
1594 |
-COMMON_DEPEND=" |
1595 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
1596 |
- >=dev-libs/libpcre-8.32[unicode] |
1597 |
- fpm? ( acl? ( sys-apps/acl ) ) |
1598 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
1599 |
- argon2? ( app-crypt/argon2:= ) |
1600 |
- berkdb? ( || ( sys-libs/db:5.3 |
1601 |
- sys-libs/db:5.1 |
1602 |
- sys-libs/db:4.8 |
1603 |
- sys-libs/db:4.7 |
1604 |
- sys-libs/db:4.6 |
1605 |
- sys-libs/db:4.5 ) ) |
1606 |
- bzip2? ( app-arch/bzip2:0= ) |
1607 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
1608 |
- coverage? ( dev-util/lcov ) |
1609 |
- curl? ( >=net-misc/curl-7.10.5 ) |
1610 |
- enchant? ( <app-text/enchant-2.0:0 ) |
1611 |
- firebird? ( dev-db/firebird ) |
1612 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
1613 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
1614 |
- gmp? ( dev-libs/gmp:0= ) |
1615 |
- iconv? ( virtual/libiconv ) |
1616 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
1617 |
- intl? ( dev-libs/icu:= ) |
1618 |
- iodbc? ( dev-db/libiodbc ) |
1619 |
- kerberos? ( virtual/krb5 ) |
1620 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
1621 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
1622 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
1623 |
- lmdb? ( dev-db/lmdb:= ) |
1624 |
- mssql? ( dev-db/freetds[mssql] ) |
1625 |
- nls? ( sys-devel/gettext ) |
1626 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
1627 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
1628 |
- postgres? ( dev-db/postgresql:* ) |
1629 |
- qdbm? ( dev-db/qdbm ) |
1630 |
- readline? ( sys-libs/readline:0= ) |
1631 |
- recode? ( app-text/recode ) |
1632 |
- session-mm? ( dev-libs/mm ) |
1633 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
1634 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
1635 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
1636 |
- sodium? ( dev-libs/libsodium:= ) |
1637 |
- spell? ( >=app-text/aspell-0.50 ) |
1638 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
1639 |
- ssl? ( |
1640 |
- !libressl? ( dev-libs/openssl:0= ) |
1641 |
- libressl? ( dev-libs/libressl:0= ) |
1642 |
- ) |
1643 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
1644 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
1645 |
- truetype? ( =media-libs/freetype-2* ) |
1646 |
- unicode? ( dev-libs/oniguruma:= ) |
1647 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
1648 |
- webp? ( media-libs/libwebp:0= ) |
1649 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
1650 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
1651 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
1652 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
1653 |
- xpm? ( x11-libs/libXpm ) |
1654 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
1655 |
- zip? ( sys-libs/zlib:0= ) |
1656 |
- zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) |
1657 |
- zlib? ( sys-libs/zlib:0= ) |
1658 |
-" |
1659 |
- |
1660 |
-RDEPEND="${COMMON_DEPEND} |
1661 |
- virtual/mta |
1662 |
- fpm? ( |
1663 |
- selinux? ( sec-policy/selinux-phpfpm ) |
1664 |
- systemd? ( sys-apps/systemd ) )" |
1665 |
- |
1666 |
-# Bison isn't actually needed when building from a release tarball |
1667 |
-# However, the configure script will warn if it's absent or if you |
1668 |
-# have an incompatible version installed. See bug 593278. |
1669 |
-DEPEND="${COMMON_DEPEND} |
1670 |
- app-arch/xz-utils |
1671 |
- >=sys-devel/bison-3.0.1" |
1672 |
- |
1673 |
-BDEPEND="virtual/pkgconfig" |
1674 |
- |
1675 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
1676 |
-REQUIRED_USE=" |
1677 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
1678 |
- cli? ( ^^ ( readline libedit ) ) |
1679 |
- truetype? ( gd zlib ) |
1680 |
- webp? ( gd zlib ) |
1681 |
- cjk? ( gd zlib ) |
1682 |
- exif? ( gd zlib ) |
1683 |
- xpm? ( gd zlib ) |
1684 |
- gd? ( zlib ) |
1685 |
- simplexml? ( xml ) |
1686 |
- soap? ( xml ) |
1687 |
- wddx? ( xml ) |
1688 |
- xmlrpc? ( || ( xml iconv ) ) |
1689 |
- xmlreader? ( xml ) |
1690 |
- xslt? ( xml ) |
1691 |
- ldap-sasl? ( ldap ) |
1692 |
- mhash? ( hash ) |
1693 |
- phar? ( hash ) |
1694 |
- qdbm? ( !gdbm ) |
1695 |
- readline? ( !libedit ) |
1696 |
- recode? ( !imap !mysqli !mysql ) |
1697 |
- session-mm? ( session !threads ) |
1698 |
- mysql? ( hash || ( mysqli pdo ) ) |
1699 |
- mysqli? ( hash ) |
1700 |
- zip-encryption? ( zip ) |
1701 |
-" |
1702 |
-PATCHES=( |
1703 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
1704 |
- "${FILESDIR}/php-7.2.13-intl-use-icu-namespace.patch" |
1705 |
-) |
1706 |
-RESTRICT="!test? ( test )" |
1707 |
-PHP_MV="$(ver_cut 1)" |
1708 |
- |
1709 |
-php_install_ini() { |
1710 |
- local phpsapi="${1}" |
1711 |
- |
1712 |
- # work out where we are installing the ini file |
1713 |
- php_set_ini_dir "${phpsapi}" |
1714 |
- |
1715 |
- # Always install the production INI file, bug 611214. |
1716 |
- local phpinisrc="php.ini-production-${phpsapi}" |
1717 |
- cp php.ini-production "${phpinisrc}" || die |
1718 |
- |
1719 |
- # default to /tmp for save_path, bug #282768 |
1720 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
1721 |
- |
1722 |
- # Set the extension dir |
1723 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
1724 |
- -i "${phpinisrc}" || die |
1725 |
- |
1726 |
- # Set the include path to point to where we want to find PEAR packages |
1727 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
1728 |
- |
1729 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
1730 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
1731 |
- newins "${phpinisrc}" php.ini |
1732 |
- |
1733 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
1734 |
- elog |
1735 |
- |
1736 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
1737 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
1738 |
- |
1739 |
- if use opcache; then |
1740 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
1741 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
1742 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
1743 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
1744 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
1745 |
- fi |
1746 |
- |
1747 |
- # SAPI-specific handling |
1748 |
- if [[ "${sapi}" == "fpm" ]] ; then |
1749 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
1750 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
1751 |
- doins sapi/fpm/php-fpm.conf |
1752 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
1753 |
- doins sapi/fpm/www.conf |
1754 |
- fi |
1755 |
- |
1756 |
- dodoc php.ini-{development,production} |
1757 |
-} |
1758 |
- |
1759 |
-php_set_ini_dir() { |
1760 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
1761 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
1762 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
1763 |
-} |
1764 |
- |
1765 |
-src_prepare() { |
1766 |
- default |
1767 |
- |
1768 |
- # In php-7.x, the FPM pool configuration files have been split off |
1769 |
- # of the main config. By default the pool config files go in |
1770 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
1771 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
1772 |
- # we'll install the pool configuration file "www.conf" there. |
1773 |
- php_set_ini_dir fpm |
1774 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
1775 |
- sapi/fpm/php-fpm.conf.in \ |
1776 |
- || die 'failed to move the include directory in php-fpm.conf' |
1777 |
- |
1778 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
1779 |
- # Force rebuilding aclocal.m4 |
1780 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
1781 |
- eautoreconf |
1782 |
-} |
1783 |
- |
1784 |
-src_configure() { |
1785 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
1786 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
1787 |
- |
1788 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
1789 |
- |
1790 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
1791 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
1792 |
- local our_conf=( |
1793 |
- --prefix="${PHP_DESTDIR}" |
1794 |
- --mandir="${PHP_DESTDIR}/man" |
1795 |
- --infodir="${PHP_DESTDIR}/info" |
1796 |
- --libdir="${PHP_DESTDIR}/lib" |
1797 |
- --with-libdir="$(get_libdir)" |
1798 |
- --localstatedir="${EPREFIX}/var" |
1799 |
- --without-pear |
1800 |
- $(use_enable threads maintainer-zts) |
1801 |
- ) |
1802 |
- |
1803 |
- our_conf+=( |
1804 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
1805 |
- $(use_enable bcmath bcmath) |
1806 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
1807 |
- $(use_enable calendar calendar) |
1808 |
- $(use_enable coverage gcov) |
1809 |
- $(use_enable ctype ctype) |
1810 |
- $(use_with curl curl "${EPREFIX}/usr") |
1811 |
- $(use_enable xml dom) |
1812 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
1813 |
- $(use_enable exif exif) |
1814 |
- $(use_enable fileinfo fileinfo) |
1815 |
- $(use_enable filter filter) |
1816 |
- $(use_enable ftp ftp) |
1817 |
- $(use_with nls gettext "${EPREFIX}/usr") |
1818 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
1819 |
- $(use_enable hash hash) |
1820 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
1821 |
- $(use_with iconv iconv \ |
1822 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
1823 |
- $(use_enable intl intl) |
1824 |
- $(use_enable ipv6 ipv6) |
1825 |
- $(use_enable json json) |
1826 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
1827 |
- $(use_enable xml libxml) |
1828 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
1829 |
- $(use_enable unicode mbstring) |
1830 |
- $(use_with unicode onig "${EPREFIX}/usr") |
1831 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
1832 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
1833 |
- $(use_enable pcntl pcntl) |
1834 |
- $(use_enable phar phar) |
1835 |
- $(use_enable pdo pdo) |
1836 |
- $(use_enable opcache opcache) |
1837 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
1838 |
- $(use_enable posix posix) |
1839 |
- $(use_with spell pspell "${EPREFIX}/usr") |
1840 |
- $(use_with recode recode "${EPREFIX}/usr") |
1841 |
- $(use_enable simplexml simplexml) |
1842 |
- $(use_enable sharedmem shmop) |
1843 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
1844 |
- $(use_enable soap soap) |
1845 |
- $(use_enable sockets sockets) |
1846 |
- $(use_with sodium sodium "${EPREFIX}/usr") |
1847 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
1848 |
- $(use_enable sysvipc sysvmsg) |
1849 |
- $(use_enable sysvipc sysvsem) |
1850 |
- $(use_enable sysvipc sysvshm) |
1851 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
1852 |
- $(use_enable tokenizer tokenizer) |
1853 |
- $(use_enable wddx wddx) |
1854 |
- $(use_enable xml xml) |
1855 |
- $(use_enable xmlreader xmlreader) |
1856 |
- $(use_enable xmlwriter xmlwriter) |
1857 |
- $(use_with xmlrpc xmlrpc) |
1858 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
1859 |
- $(use_enable zip zip) |
1860 |
- $(use_with zip-encryption libzip "${EPREFIX}/usr") |
1861 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
1862 |
- $(use_enable debug debug) |
1863 |
- ) |
1864 |
- |
1865 |
- # DBA support |
1866 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
1867 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
1868 |
- our_conf+=( "--enable-dba${shared}" ) |
1869 |
- fi |
1870 |
- |
1871 |
- # DBA drivers support |
1872 |
- our_conf+=( |
1873 |
- $(use_with cdb cdb) |
1874 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
1875 |
- $(use_enable flatfile flatfile) |
1876 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
1877 |
- $(use_enable inifile inifile) |
1878 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
1879 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
1880 |
- ) |
1881 |
- |
1882 |
- # Support for the GD graphics library |
1883 |
- our_conf+=( |
1884 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
1885 |
- $(use_enable cjk gd-jis-conv) |
1886 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
1887 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
1888 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
1889 |
- ) |
1890 |
- if use webp; then |
1891 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
1892 |
- fi |
1893 |
- # enable gd last, so configure can pick up the previous settings |
1894 |
- our_conf+=( $(use_with gd gd) ) |
1895 |
- |
1896 |
- # IMAP support |
1897 |
- if use imap ; then |
1898 |
- our_conf+=( |
1899 |
- $(use_with imap imap "${EPREFIX}/usr") |
1900 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
1901 |
- ) |
1902 |
- fi |
1903 |
- |
1904 |
- # Interbase/firebird support |
1905 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
1906 |
- |
1907 |
- # LDAP support |
1908 |
- if use ldap ; then |
1909 |
- our_conf+=( |
1910 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
1911 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
1912 |
- ) |
1913 |
- fi |
1914 |
- |
1915 |
- # MySQL support |
1916 |
- local mysqllib="mysqlnd" |
1917 |
- local mysqlilib="mysqlnd" |
1918 |
- |
1919 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
1920 |
- |
1921 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
1922 |
- if use mysql || use mysqli ; then |
1923 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
1924 |
- fi |
1925 |
- |
1926 |
- # ODBC support |
1927 |
- our_conf+=( |
1928 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
1929 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
1930 |
- ) |
1931 |
- |
1932 |
- # Oracle support |
1933 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
1934 |
- |
1935 |
- # PDO support |
1936 |
- if use pdo ; then |
1937 |
- our_conf+=( |
1938 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
1939 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
1940 |
- $(use_with postgres pdo-pgsql) |
1941 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
1942 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
1943 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
1944 |
- $(use_with oci8-instant-client pdo-oci) |
1945 |
- ) |
1946 |
- fi |
1947 |
- |
1948 |
- # readline/libedit support |
1949 |
- our_conf+=( |
1950 |
- $(use_with readline readline "${EPREFIX}/usr") |
1951 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
1952 |
- ) |
1953 |
- |
1954 |
- # Session support |
1955 |
- if use session ; then |
1956 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
1957 |
- else |
1958 |
- our_conf+=( $(use_enable session session) ) |
1959 |
- fi |
1960 |
- |
1961 |
- # Use pic for shared modules such as apache2's mod_php |
1962 |
- our_conf+=( --with-pic ) |
1963 |
- |
1964 |
- # we use the system copy of pcre |
1965 |
- # --with-pcre-regex affects ext/pcre |
1966 |
- # --with-pcre-dir affects ext/filter and ext/zip |
1967 |
- # --with-pcre-valgrind cannot be enabled with system pcre |
1968 |
- # Many arches don't support pcre-jit |
1969 |
- our_conf+=( |
1970 |
- --with-pcre-regex="${EPREFIX}/usr" |
1971 |
- --with-pcre-dir="${EPREFIX}/usr" |
1972 |
- --without-pcre-valgrind |
1973 |
- --without-pcre-jit |
1974 |
- ) |
1975 |
- |
1976 |
- # Catch CFLAGS problems |
1977 |
- # Fixes bug #14067. |
1978 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
1979 |
- replace-cpu-flags "k6*" "i586" |
1980 |
- |
1981 |
- # Cache the ./configure test results between SAPIs. |
1982 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
1983 |
- |
1984 |
- # Support user-passed configuration parameters |
1985 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
1986 |
- |
1987 |
- # Support the Apache2 extras, they must be set globally for all |
1988 |
- # SAPIs to work correctly, especially for external PHP extensions |
1989 |
- |
1990 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
1991 |
- for one_sapi in $SAPIS ; do |
1992 |
- use "${one_sapi}" || continue |
1993 |
- php_set_ini_dir "${one_sapi}" |
1994 |
- |
1995 |
- # The BUILD_DIR variable is used to determine where to output |
1996 |
- # the files that autotools creates. This was all originally |
1997 |
- # based on the autotools-utils eclass. |
1998 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
1999 |
- cp -a "${S}" "${BUILD_DIR}" || die |
2000 |
- cd "${BUILD_DIR}" || die |
2001 |
- |
2002 |
- local sapi_conf=( |
2003 |
- --with-config-file-path="${PHP_INI_DIR}" |
2004 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
2005 |
- ) |
2006 |
- |
2007 |
- for sapi in $SAPIS ; do |
2008 |
- case "$sapi" in |
2009 |
- cli|cgi|embed|fpm|phpdbg) |
2010 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
2011 |
- sapi_conf+=( "--enable-${sapi}" ) |
2012 |
- if [[ "fpm" == "${sapi}" ]] ; then |
2013 |
- sapi_conf+=( |
2014 |
- $(use_with acl fpm-acl) |
2015 |
- $(use_with systemd fpm-systemd) |
2016 |
- ) |
2017 |
- fi |
2018 |
- else |
2019 |
- sapi_conf+=( "--disable-${sapi}" ) |
2020 |
- fi |
2021 |
- ;; |
2022 |
- |
2023 |
- apache2) |
2024 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
2025 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
2026 |
- else |
2027 |
- sapi_conf+=( --without-apxs2 ) |
2028 |
- fi |
2029 |
- ;; |
2030 |
- esac |
2031 |
- done |
2032 |
- |
2033 |
- # Construct the $myeconfargs array by concatenating $our_conf |
2034 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
2035 |
- local myeconfargs=( "${our_conf[@]}" ) |
2036 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
2037 |
- |
2038 |
- pushd "${BUILD_DIR}" > /dev/null || die |
2039 |
- econf "${myeconfargs[@]}" |
2040 |
- popd > /dev/null || die |
2041 |
- done |
2042 |
-} |
2043 |
- |
2044 |
-src_compile() { |
2045 |
- # snmp seems to run during src_compile, too (bug #324739) |
2046 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
2047 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
2048 |
- |
2049 |
- for sapi in ${SAPIS} ; do |
2050 |
- if use "${sapi}"; then |
2051 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
2052 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
2053 |
- emake |
2054 |
- fi |
2055 |
- done |
2056 |
-} |
2057 |
- |
2058 |
-src_install() { |
2059 |
- # see bug #324739 for what happens when we don't have that |
2060 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
2061 |
- |
2062 |
- # grab the first SAPI that got built and install common files from there |
2063 |
- local first_sapi="" |
2064 |
- for sapi in $SAPIS ; do |
2065 |
- if use $sapi ; then |
2066 |
- first_sapi=$sapi |
2067 |
- break |
2068 |
- fi |
2069 |
- done |
2070 |
- |
2071 |
- # Makefile forgets to create this before trying to write to it... |
2072 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
2073 |
- |
2074 |
- # Install php environment (without any sapis) |
2075 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
2076 |
- emake INSTALL_ROOT="${D}" \ |
2077 |
- install-build install-headers install-programs |
2078 |
- |
2079 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
2080 |
- |
2081 |
- # Create the directory where we'll put version-specific php scripts |
2082 |
- keepdir "/usr/share/php${PHP_MV}" |
2083 |
- |
2084 |
- local sapi="", file="" |
2085 |
- local sapi_list="" |
2086 |
- |
2087 |
- for sapi in ${SAPIS}; do |
2088 |
- if use "${sapi}" ; then |
2089 |
- einfo "Installing SAPI: ${sapi}" |
2090 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
2091 |
- |
2092 |
- if [[ "${sapi}" == "apache2" ]] ; then |
2093 |
- # We're specifically not using emake install-sapi as libtool |
2094 |
- # may cause unnecessary relink failures (see bug #351266) |
2095 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
2096 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
2097 |
- "libphp${PHP_MV}$(get_libname)" |
2098 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
2099 |
- else |
2100 |
- # needed each time, php_install_ini would reset it |
2101 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
2102 |
- into "${dest}" |
2103 |
- case "$sapi" in |
2104 |
- cli) |
2105 |
- source="sapi/cli/php" |
2106 |
- ;; |
2107 |
- cgi) |
2108 |
- source="sapi/cgi/php-cgi" |
2109 |
- ;; |
2110 |
- fpm) |
2111 |
- source="sapi/fpm/php-fpm" |
2112 |
- ;; |
2113 |
- embed) |
2114 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
2115 |
- ;; |
2116 |
- phpdbg) |
2117 |
- source="sapi/phpdbg/phpdbg" |
2118 |
- ;; |
2119 |
- *) |
2120 |
- die "unhandled sapi in src_install" |
2121 |
- ;; |
2122 |
- esac |
2123 |
- |
2124 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
2125 |
- dolib.so "${source}" |
2126 |
- else |
2127 |
- dobin "${source}" |
2128 |
- local name="$(basename ${source})" |
2129 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
2130 |
- fi |
2131 |
- fi |
2132 |
- |
2133 |
- php_install_ini "${sapi}" |
2134 |
- |
2135 |
- # construct correct SAPI string for php-config |
2136 |
- # thanks to ferringb for the bash voodoo |
2137 |
- if [[ "${sapi}" == "apache2" ]]; then |
2138 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
2139 |
- else |
2140 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
2141 |
- fi |
2142 |
- fi |
2143 |
- done |
2144 |
- |
2145 |
- # Installing opcache module |
2146 |
- if use opcache ; then |
2147 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
2148 |
- dolib.so "modules/opcache$(get_libname)" |
2149 |
- fi |
2150 |
- |
2151 |
- # Install env.d files |
2152 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
2153 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
2154 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
2155 |
- |
2156 |
- # set php-config variable correctly (bug #278439) |
2157 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
2158 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
2159 |
- |
2160 |
- if use fpm ; then |
2161 |
- if use systemd; then |
2162 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
2163 |
- "php-fpm@${SLOT}.service" |
2164 |
- else |
2165 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
2166 |
- "php-fpm@${SLOT}.service" |
2167 |
- fi |
2168 |
- fi |
2169 |
-} |
2170 |
- |
2171 |
-src_test() { |
2172 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
2173 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
2174 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
2175 |
- ewarn "Test phase requires USE=cli, skipping" |
2176 |
- return |
2177 |
- else |
2178 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
2179 |
- fi |
2180 |
- |
2181 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
2182 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
2183 |
- fi |
2184 |
- |
2185 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
2186 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
2187 |
- fi |
2188 |
- |
2189 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
2190 |
- "session.save_path=${T}" \ |
2191 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
2192 |
- "session.save_path=${T}" |
2193 |
- |
2194 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
2195 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
2196 |
- done |
2197 |
- |
2198 |
- local failed="$(find -name '*.out')" |
2199 |
- if [[ ${failed} != "" ]] ; then |
2200 |
- ewarn "The following test cases failed unexpectedly:" |
2201 |
- for name in ${failed}; do |
2202 |
- ewarn " ${name/.out/}" |
2203 |
- done |
2204 |
- else |
2205 |
- einfo "No unexpected test failures, all fine" |
2206 |
- fi |
2207 |
- |
2208 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
2209 |
- local passed="" |
2210 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
2211 |
- [[ -f "${name}.diff" ]] && continue |
2212 |
- passed="${passed} ${name}" |
2213 |
- done |
2214 |
- if [[ ${passed} != "" ]] ; then |
2215 |
- einfo "The following test cases passed unexpectedly:" |
2216 |
- for name in ${passed}; do |
2217 |
- ewarn " ${passed}" |
2218 |
- done |
2219 |
- else |
2220 |
- einfo "None of the known-to-fail tests passed, all fine" |
2221 |
- fi |
2222 |
- fi |
2223 |
-} |
2224 |
- |
2225 |
-pkg_postinst() { |
2226 |
- # Output some general info to the user |
2227 |
- if use apache2 ; then |
2228 |
- elog |
2229 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
2230 |
- elog "your apache2 command. OpenRC users can append that string to" |
2231 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
2232 |
- elog |
2233 |
- elog "The apache module configuration file 70_mod_php.conf is" |
2234 |
- elog "provided (and maintained) by eselect-php." |
2235 |
- elog |
2236 |
- fi |
2237 |
- |
2238 |
- # Create the symlinks for php |
2239 |
- for m in ${SAPIS}; do |
2240 |
- [[ ${m} == 'embed' ]] && continue; |
2241 |
- if use $m ; then |
2242 |
- local ci=$(eselect php show $m) |
2243 |
- if [[ -z $ci ]]; then |
2244 |
- eselect php set $m php${SLOT} || die |
2245 |
- einfo "Switched ${m} to use php:${SLOT}" |
2246 |
- einfo |
2247 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
2248 |
- elog "To switch $m to use php:${SLOT}, run" |
2249 |
- elog " eselect php set $m php${SLOT}" |
2250 |
- elog |
2251 |
- fi |
2252 |
- fi |
2253 |
- done |
2254 |
- |
2255 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
2256 |
- # example, if the user has the cgi SAPI enabled, then he has an |
2257 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
2258 |
- # USE="-cgi", that symlink will break. This call to eselect is |
2259 |
- # supposed to remove that dead link per bug 572436. |
2260 |
- eselect php cleanup || die |
2261 |
- |
2262 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
2263 |
- elog "To build extensions for this version of PHP, you will need to" |
2264 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
2265 |
- elog |
2266 |
- fi |
2267 |
- |
2268 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
2269 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
2270 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
2271 |
- ewarn 'remove it from your configuration at your convenience. See' |
2272 |
- ewarn |
2273 |
- ewarn ' https://bugs.gentoo.org/611214' |
2274 |
- ewarn |
2275 |
- ewarn 'for more information.' |
2276 |
- fi |
2277 |
- |
2278 |
- elog "For details on how version slotting works, please see" |
2279 |
- elog "the wiki:" |
2280 |
- elog |
2281 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
2282 |
- elog |
2283 |
-} |
2284 |
- |
2285 |
-pkg_postrm() { |
2286 |
- # This serves two purposes. First, if we have just removed the last |
2287 |
- # installed version of PHP, then this will remove any dead symlinks |
2288 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
2289 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
2290 |
- # his existing symlinks to point to the new 7.0 installation. The |
2291 |
- # latter is bug 432962. |
2292 |
- # |
2293 |
- # Note: the eselect-php package may not be installed at this point, |
2294 |
- # so we can't die() if this command fails. |
2295 |
- eselect php cleanup |
2296 |
-} |
2297 |
|
2298 |
diff --git a/dev-lang/php/php-7.3.10.ebuild b/dev-lang/php/php-7.3.10.ebuild |
2299 |
deleted file mode 100644 |
2300 |
index e466f57d0e3..00000000000 |
2301 |
--- a/dev-lang/php/php-7.3.10.ebuild |
2302 |
+++ /dev/null |
2303 |
@@ -1,749 +0,0 @@ |
2304 |
-# Copyright 1999-2019 Gentoo Authors |
2305 |
-# Distributed under the terms of the GNU General Public License v2 |
2306 |
- |
2307 |
-EAPI="7" |
2308 |
- |
2309 |
-inherit flag-o-matic systemd autotools |
2310 |
- |
2311 |
-MY_PV=${PV/_rc/RC} |
2312 |
-DESCRIPTION="The PHP language runtime engine" |
2313 |
-HOMEPAGE="https://php.net/" |
2314 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
2315 |
- |
2316 |
-LICENSE="PHP-3.01 |
2317 |
- BSD |
2318 |
- Zend-2.0 |
2319 |
- bcmath? ( LGPL-2.1+ ) |
2320 |
- fpm? ( BSD-2 ) |
2321 |
- gd? ( gd ) |
2322 |
- unicode? ( BSD-2 LGPL-2.1 )" |
2323 |
- |
2324 |
-SLOT="$(ver_cut 1-2)" |
2325 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
2326 |
- |
2327 |
-S="${WORKDIR}/${PN}-${MY_PV}" |
2328 |
- |
2329 |
-# We can build the following SAPIs in the given order |
2330 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
2331 |
- |
2332 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
2333 |
-IUSE="${IUSE} |
2334 |
- ${SAPIS/cli/+cli} |
2335 |
- threads" |
2336 |
- |
2337 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
2338 |
- coverage +ctype curl debug |
2339 |
- enchant exif +fileinfo +filter firebird |
2340 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
2341 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
2342 |
- mhash mssql mysql mysqli nls |
2343 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
2344 |
- readline recode selinux +session session-mm sharedmem |
2345 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
2346 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp |
2347 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib" |
2348 |
- |
2349 |
-# The supported (that is, autodetected) versions of BDB are listed in |
2350 |
-# the ./configure script. Other versions *work*, but we need to stick to |
2351 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
2352 |
-COMMON_DEPEND=" |
2353 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
2354 |
- >=dev-libs/libpcre2-10.30[unicode] |
2355 |
- fpm? ( acl? ( sys-apps/acl ) ) |
2356 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
2357 |
- argon2? ( app-crypt/argon2:= ) |
2358 |
- berkdb? ( || ( sys-libs/db:5.3 |
2359 |
- sys-libs/db:5.1 |
2360 |
- sys-libs/db:4.8 |
2361 |
- sys-libs/db:4.7 |
2362 |
- sys-libs/db:4.6 |
2363 |
- sys-libs/db:4.5 ) ) |
2364 |
- bzip2? ( app-arch/bzip2:0= ) |
2365 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
2366 |
- coverage? ( dev-util/lcov ) |
2367 |
- curl? ( >=net-misc/curl-7.10.5 ) |
2368 |
- enchant? ( <app-text/enchant-2.0:0 ) |
2369 |
- firebird? ( dev-db/firebird ) |
2370 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 ) |
2371 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
2372 |
- gmp? ( dev-libs/gmp:0= ) |
2373 |
- iconv? ( virtual/libiconv ) |
2374 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
2375 |
- intl? ( dev-libs/icu:= ) |
2376 |
- iodbc? ( dev-db/libiodbc ) |
2377 |
- kerberos? ( virtual/krb5 ) |
2378 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
2379 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
2380 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
2381 |
- lmdb? ( dev-db/lmdb:= ) |
2382 |
- mssql? ( dev-db/freetds[mssql] ) |
2383 |
- nls? ( sys-devel/gettext ) |
2384 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
2385 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
2386 |
- postgres? ( dev-db/postgresql:* ) |
2387 |
- qdbm? ( dev-db/qdbm ) |
2388 |
- readline? ( sys-libs/readline:0= ) |
2389 |
- recode? ( app-text/recode ) |
2390 |
- session-mm? ( dev-libs/mm ) |
2391 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
2392 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
2393 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
2394 |
- sodium? ( dev-libs/libsodium:= ) |
2395 |
- spell? ( >=app-text/aspell-0.50 ) |
2396 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
2397 |
- ssl? ( |
2398 |
- !libressl? ( >=dev-libs/openssl-1.0.1:0= ) |
2399 |
- libressl? ( dev-libs/libressl:0= ) |
2400 |
- ) |
2401 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
2402 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
2403 |
- truetype? ( =media-libs/freetype-2* ) |
2404 |
- unicode? ( dev-libs/oniguruma:= ) |
2405 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
2406 |
- webp? ( media-libs/libwebp:0= ) |
2407 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
2408 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
2409 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
2410 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
2411 |
- xpm? ( x11-libs/libXpm ) |
2412 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
2413 |
- zip? ( >=sys-libs/zlib-1.2.0.4:0= ) |
2414 |
- zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) |
2415 |
- zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) |
2416 |
-" |
2417 |
- |
2418 |
-RDEPEND="${COMMON_DEPEND} |
2419 |
- virtual/mta |
2420 |
- fpm? ( |
2421 |
- selinux? ( sec-policy/selinux-phpfpm ) |
2422 |
- systemd? ( sys-apps/systemd ) )" |
2423 |
- |
2424 |
-# Bison isn't actually needed when building from a release tarball |
2425 |
-# However, the configure script will warn if it's absent or if you |
2426 |
-# have an incompatible version installed. See bug 593278. |
2427 |
-DEPEND="${COMMON_DEPEND} |
2428 |
- app-arch/xz-utils |
2429 |
- >=sys-devel/bison-3.0.1" |
2430 |
- |
2431 |
-BDEPEND="virtual/pkgconfig" |
2432 |
- |
2433 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
2434 |
-REQUIRED_USE=" |
2435 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
2436 |
- cli? ( ^^ ( readline libedit ) ) |
2437 |
- truetype? ( gd zlib ) |
2438 |
- webp? ( gd zlib ) |
2439 |
- cjk? ( gd zlib ) |
2440 |
- exif? ( gd zlib ) |
2441 |
- xpm? ( gd zlib ) |
2442 |
- gd? ( zlib ) |
2443 |
- simplexml? ( xml ) |
2444 |
- soap? ( xml ) |
2445 |
- wddx? ( xml ) |
2446 |
- xmlrpc? ( || ( xml iconv ) ) |
2447 |
- xmlreader? ( xml ) |
2448 |
- xslt? ( xml ) |
2449 |
- ldap-sasl? ( ldap ) |
2450 |
- mhash? ( hash ) |
2451 |
- phar? ( hash ) |
2452 |
- qdbm? ( !gdbm ) |
2453 |
- readline? ( !libedit ) |
2454 |
- recode? ( !imap !mysqli !mysql ) |
2455 |
- session-mm? ( session !threads ) |
2456 |
- mysql? ( || ( mysqli pdo ) ) |
2457 |
- zip-encryption? ( zip ) |
2458 |
-" |
2459 |
-PATCHES=( |
2460 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
2461 |
-) |
2462 |
- |
2463 |
-PHP_MV="$(ver_cut 1)" |
2464 |
- |
2465 |
-php_install_ini() { |
2466 |
- local phpsapi="${1}" |
2467 |
- |
2468 |
- # work out where we are installing the ini file |
2469 |
- php_set_ini_dir "${phpsapi}" |
2470 |
- |
2471 |
- # Always install the production INI file, bug 611214. |
2472 |
- local phpinisrc="php.ini-production-${phpsapi}" |
2473 |
- cp php.ini-production "${phpinisrc}" || die |
2474 |
- |
2475 |
- # default to /tmp for save_path, bug #282768 |
2476 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
2477 |
- |
2478 |
- # Set the extension dir |
2479 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
2480 |
- -i "${phpinisrc}" || die |
2481 |
- |
2482 |
- # Set the include path to point to where we want to find PEAR packages |
2483 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
2484 |
- |
2485 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
2486 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
2487 |
- newins "${phpinisrc}" php.ini |
2488 |
- |
2489 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
2490 |
- elog |
2491 |
- |
2492 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
2493 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
2494 |
- |
2495 |
- if use opcache; then |
2496 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
2497 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
2498 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
2499 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
2500 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
2501 |
- fi |
2502 |
- |
2503 |
- # SAPI-specific handling |
2504 |
- if [[ "${sapi}" == "fpm" ]] ; then |
2505 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
2506 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
2507 |
- doins sapi/fpm/php-fpm.conf |
2508 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
2509 |
- doins sapi/fpm/www.conf |
2510 |
- fi |
2511 |
- |
2512 |
- dodoc php.ini-{development,production} |
2513 |
-} |
2514 |
- |
2515 |
-php_set_ini_dir() { |
2516 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
2517 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
2518 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
2519 |
-} |
2520 |
- |
2521 |
-src_prepare() { |
2522 |
- default |
2523 |
- |
2524 |
- # In php-7.x, the FPM pool configuration files have been split off |
2525 |
- # of the main config. By default the pool config files go in |
2526 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
2527 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
2528 |
- # we'll install the pool configuration file "www.conf" there. |
2529 |
- php_set_ini_dir fpm |
2530 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
2531 |
- sapi/fpm/php-fpm.conf.in \ |
2532 |
- || die 'failed to move the include directory in php-fpm.conf' |
2533 |
- |
2534 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
2535 |
- # Force rebuilding aclocal.m4 |
2536 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
2537 |
- eautoreconf |
2538 |
-} |
2539 |
- |
2540 |
-src_configure() { |
2541 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
2542 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
2543 |
- |
2544 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
2545 |
- |
2546 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
2547 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
2548 |
- local our_conf=( |
2549 |
- --prefix="${PHP_DESTDIR}" |
2550 |
- --mandir="${PHP_DESTDIR}/man" |
2551 |
- --infodir="${PHP_DESTDIR}/info" |
2552 |
- --libdir="${PHP_DESTDIR}/lib" |
2553 |
- --with-libdir="$(get_libdir)" |
2554 |
- --localstatedir="${EPREFIX}/var" |
2555 |
- --without-pear |
2556 |
- $(use_enable threads maintainer-zts) |
2557 |
- ) |
2558 |
- |
2559 |
- our_conf+=( |
2560 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
2561 |
- $(use_enable bcmath bcmath) |
2562 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
2563 |
- $(use_enable calendar calendar) |
2564 |
- $(use_enable coverage gcov) |
2565 |
- $(use_enable ctype ctype) |
2566 |
- $(use_with curl curl "${EPREFIX}/usr") |
2567 |
- $(use_enable xml dom) |
2568 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
2569 |
- $(use_enable exif exif) |
2570 |
- $(use_enable fileinfo fileinfo) |
2571 |
- $(use_enable filter filter) |
2572 |
- $(use_enable ftp ftp) |
2573 |
- $(use_with nls gettext "${EPREFIX}/usr") |
2574 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
2575 |
- $(use_enable hash hash) |
2576 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
2577 |
- $(use_with iconv iconv \ |
2578 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
2579 |
- $(use_enable intl intl) |
2580 |
- $(use_enable ipv6 ipv6) |
2581 |
- $(use_enable json json) |
2582 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
2583 |
- $(use_enable xml libxml) |
2584 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
2585 |
- $(use_enable unicode mbstring) |
2586 |
- $(use_with unicode onig "${EPREFIX}/usr") |
2587 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
2588 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
2589 |
- $(use_enable pcntl pcntl) |
2590 |
- $(use_enable phar phar) |
2591 |
- $(use_enable pdo pdo) |
2592 |
- $(use_enable opcache opcache) |
2593 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
2594 |
- $(use_enable posix posix) |
2595 |
- $(use_with spell pspell "${EPREFIX}/usr") |
2596 |
- $(use_with recode recode "${EPREFIX}/usr") |
2597 |
- $(use_enable simplexml simplexml) |
2598 |
- $(use_enable sharedmem shmop) |
2599 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
2600 |
- $(use_enable soap soap) |
2601 |
- $(use_enable sockets sockets) |
2602 |
- $(use_with sodium sodium "${EPREFIX}/usr") |
2603 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
2604 |
- $(use_enable sysvipc sysvmsg) |
2605 |
- $(use_enable sysvipc sysvsem) |
2606 |
- $(use_enable sysvipc sysvshm) |
2607 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
2608 |
- $(use_enable tokenizer tokenizer) |
2609 |
- $(use_enable wddx wddx) |
2610 |
- $(use_enable xml xml) |
2611 |
- $(use_enable xmlreader xmlreader) |
2612 |
- $(use_enable xmlwriter xmlwriter) |
2613 |
- $(use_with xmlrpc xmlrpc) |
2614 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
2615 |
- $(use_enable zip zip) |
2616 |
- $(use_with zip-encryption libzip "${EPREFIX}/usr") |
2617 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
2618 |
- $(use_enable debug debug) |
2619 |
- ) |
2620 |
- |
2621 |
- # DBA support |
2622 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
2623 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
2624 |
- our_conf+=( "--enable-dba${shared}" ) |
2625 |
- fi |
2626 |
- |
2627 |
- # DBA drivers support |
2628 |
- our_conf+=( |
2629 |
- $(use_with cdb cdb) |
2630 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
2631 |
- $(use_enable flatfile flatfile) |
2632 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
2633 |
- $(use_enable inifile inifile) |
2634 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
2635 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
2636 |
- ) |
2637 |
- |
2638 |
- # Support for the GD graphics library |
2639 |
- our_conf+=( |
2640 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
2641 |
- $(use_enable cjk gd-jis-conv) |
2642 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
2643 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
2644 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
2645 |
- ) |
2646 |
- if use webp; then |
2647 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
2648 |
- fi |
2649 |
- # enable gd last, so configure can pick up the previous settings |
2650 |
- our_conf+=( $(use_with gd gd) ) |
2651 |
- |
2652 |
- # IMAP support |
2653 |
- if use imap ; then |
2654 |
- our_conf+=( |
2655 |
- $(use_with imap imap "${EPREFIX}/usr") |
2656 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
2657 |
- ) |
2658 |
- fi |
2659 |
- |
2660 |
- # Interbase/firebird support |
2661 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
2662 |
- |
2663 |
- # LDAP support |
2664 |
- if use ldap ; then |
2665 |
- our_conf+=( |
2666 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
2667 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
2668 |
- ) |
2669 |
- fi |
2670 |
- |
2671 |
- # MySQL support |
2672 |
- local mysqllib="mysqlnd" |
2673 |
- local mysqlilib="mysqlnd" |
2674 |
- |
2675 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
2676 |
- |
2677 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
2678 |
- if use mysql || use mysqli ; then |
2679 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
2680 |
- fi |
2681 |
- |
2682 |
- # ODBC support |
2683 |
- our_conf+=( |
2684 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
2685 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
2686 |
- ) |
2687 |
- |
2688 |
- # Oracle support |
2689 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
2690 |
- |
2691 |
- # PDO support |
2692 |
- if use pdo ; then |
2693 |
- our_conf+=( |
2694 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
2695 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
2696 |
- $(use_with postgres pdo-pgsql) |
2697 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
2698 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
2699 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
2700 |
- $(use_with oci8-instant-client pdo-oci) |
2701 |
- ) |
2702 |
- fi |
2703 |
- |
2704 |
- # readline/libedit support |
2705 |
- our_conf+=( |
2706 |
- $(use_with readline readline "${EPREFIX}/usr") |
2707 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
2708 |
- ) |
2709 |
- |
2710 |
- # Session support |
2711 |
- if use session ; then |
2712 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
2713 |
- else |
2714 |
- our_conf+=( $(use_enable session session) ) |
2715 |
- fi |
2716 |
- |
2717 |
- # Use pic for shared modules such as apache2's mod_php |
2718 |
- our_conf+=( --with-pic ) |
2719 |
- |
2720 |
- # we use the system copy of pcre |
2721 |
- # --with-pcre-regex affects ext/pcre |
2722 |
- # --with-pcre-dir affects ext/filter and ext/zip |
2723 |
- # --with-pcre-valgrind cannot be enabled with system pcre |
2724 |
- # Many arches don't support pcre-jit |
2725 |
- our_conf+=( |
2726 |
- --with-pcre-regex="${EPREFIX}/usr" |
2727 |
- --with-pcre-dir="${EPREFIX}/usr" |
2728 |
- --without-pcre-valgrind |
2729 |
- --without-pcre-jit |
2730 |
- ) |
2731 |
- |
2732 |
- # Catch CFLAGS problems |
2733 |
- # Fixes bug #14067. |
2734 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
2735 |
- replace-cpu-flags "k6*" "i586" |
2736 |
- |
2737 |
- # Cache the ./configure test results between SAPIs. |
2738 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
2739 |
- |
2740 |
- # Support user-passed configuration parameters |
2741 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
2742 |
- |
2743 |
- # Support the Apache2 extras, they must be set globally for all |
2744 |
- # SAPIs to work correctly, especially for external PHP extensions |
2745 |
- |
2746 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
2747 |
- for one_sapi in $SAPIS ; do |
2748 |
- use "${one_sapi}" || continue |
2749 |
- php_set_ini_dir "${one_sapi}" |
2750 |
- |
2751 |
- # The BUILD_DIR variable is used to determine where to output |
2752 |
- # the files that autotools creates. This was all originally |
2753 |
- # based on the autotools-utils eclass. |
2754 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
2755 |
- cp -a "${S}" "${BUILD_DIR}" || die |
2756 |
- cd "${BUILD_DIR}" || die |
2757 |
- |
2758 |
- local sapi_conf=( |
2759 |
- --with-config-file-path="${PHP_INI_DIR}" |
2760 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
2761 |
- ) |
2762 |
- |
2763 |
- for sapi in $SAPIS ; do |
2764 |
- case "$sapi" in |
2765 |
- cli|cgi|embed|fpm|phpdbg) |
2766 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
2767 |
- sapi_conf+=( "--enable-${sapi}" ) |
2768 |
- if [[ "fpm" == "${sapi}" ]] ; then |
2769 |
- sapi_conf+=( |
2770 |
- $(use_with acl fpm-acl) |
2771 |
- $(use_with systemd fpm-systemd) |
2772 |
- ) |
2773 |
- fi |
2774 |
- else |
2775 |
- sapi_conf+=( "--disable-${sapi}" ) |
2776 |
- fi |
2777 |
- ;; |
2778 |
- |
2779 |
- apache2) |
2780 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
2781 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
2782 |
- else |
2783 |
- sapi_conf+=( --without-apxs2 ) |
2784 |
- fi |
2785 |
- ;; |
2786 |
- esac |
2787 |
- done |
2788 |
- |
2789 |
- # Construct the $myeconfargs array by concatenating $our_conf |
2790 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
2791 |
- local myeconfargs=( "${our_conf[@]}" ) |
2792 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
2793 |
- |
2794 |
- pushd "${BUILD_DIR}" > /dev/null || die |
2795 |
- econf "${myeconfargs[@]}" |
2796 |
- popd > /dev/null || die |
2797 |
- done |
2798 |
-} |
2799 |
- |
2800 |
-src_compile() { |
2801 |
- # snmp seems to run during src_compile, too (bug #324739) |
2802 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
2803 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
2804 |
- |
2805 |
- for sapi in ${SAPIS} ; do |
2806 |
- if use "${sapi}"; then |
2807 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
2808 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
2809 |
- emake |
2810 |
- fi |
2811 |
- done |
2812 |
-} |
2813 |
- |
2814 |
-src_install() { |
2815 |
- # see bug #324739 for what happens when we don't have that |
2816 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
2817 |
- |
2818 |
- # grab the first SAPI that got built and install common files from there |
2819 |
- local first_sapi="" |
2820 |
- for sapi in $SAPIS ; do |
2821 |
- if use $sapi ; then |
2822 |
- first_sapi=$sapi |
2823 |
- break |
2824 |
- fi |
2825 |
- done |
2826 |
- |
2827 |
- # Makefile forgets to create this before trying to write to it... |
2828 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
2829 |
- |
2830 |
- # Install php environment (without any sapis) |
2831 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
2832 |
- emake INSTALL_ROOT="${D}" \ |
2833 |
- install-build install-headers install-programs |
2834 |
- |
2835 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
2836 |
- |
2837 |
- # Create the directory where we'll put version-specific php scripts |
2838 |
- keepdir "/usr/share/php${PHP_MV}" |
2839 |
- |
2840 |
- local sapi="", file="" |
2841 |
- local sapi_list="" |
2842 |
- |
2843 |
- for sapi in ${SAPIS}; do |
2844 |
- if use "${sapi}" ; then |
2845 |
- einfo "Installing SAPI: ${sapi}" |
2846 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
2847 |
- |
2848 |
- if [[ "${sapi}" == "apache2" ]] ; then |
2849 |
- # We're specifically not using emake install-sapi as libtool |
2850 |
- # may cause unnecessary relink failures (see bug #351266) |
2851 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
2852 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
2853 |
- "libphp${PHP_MV}$(get_libname)" |
2854 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
2855 |
- else |
2856 |
- # needed each time, php_install_ini would reset it |
2857 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
2858 |
- into "${dest}" |
2859 |
- case "$sapi" in |
2860 |
- cli) |
2861 |
- source="sapi/cli/php" |
2862 |
- ;; |
2863 |
- cgi) |
2864 |
- source="sapi/cgi/php-cgi" |
2865 |
- ;; |
2866 |
- fpm) |
2867 |
- source="sapi/fpm/php-fpm" |
2868 |
- ;; |
2869 |
- embed) |
2870 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
2871 |
- ;; |
2872 |
- phpdbg) |
2873 |
- source="sapi/phpdbg/phpdbg" |
2874 |
- ;; |
2875 |
- *) |
2876 |
- die "unhandled sapi in src_install" |
2877 |
- ;; |
2878 |
- esac |
2879 |
- |
2880 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
2881 |
- dolib.so "${source}" |
2882 |
- else |
2883 |
- dobin "${source}" |
2884 |
- local name="$(basename ${source})" |
2885 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
2886 |
- fi |
2887 |
- fi |
2888 |
- |
2889 |
- php_install_ini "${sapi}" |
2890 |
- |
2891 |
- # construct correct SAPI string for php-config |
2892 |
- # thanks to ferringb for the bash voodoo |
2893 |
- if [[ "${sapi}" == "apache2" ]]; then |
2894 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
2895 |
- else |
2896 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
2897 |
- fi |
2898 |
- fi |
2899 |
- done |
2900 |
- |
2901 |
- # Installing opcache module |
2902 |
- if use opcache ; then |
2903 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
2904 |
- dolib.so "modules/opcache$(get_libname)" |
2905 |
- fi |
2906 |
- |
2907 |
- # Install env.d files |
2908 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
2909 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
2910 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
2911 |
- |
2912 |
- # set php-config variable correctly (bug #278439) |
2913 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
2914 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
2915 |
- |
2916 |
- if use fpm ; then |
2917 |
- if use systemd; then |
2918 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
2919 |
- "php-fpm@${SLOT}.service" |
2920 |
- else |
2921 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
2922 |
- "php-fpm@${SLOT}.service" |
2923 |
- fi |
2924 |
- fi |
2925 |
-} |
2926 |
- |
2927 |
-src_test() { |
2928 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
2929 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
2930 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
2931 |
- ewarn "Test phase requires USE=cli, skipping" |
2932 |
- return |
2933 |
- else |
2934 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
2935 |
- fi |
2936 |
- |
2937 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
2938 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
2939 |
- fi |
2940 |
- |
2941 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
2942 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
2943 |
- fi |
2944 |
- |
2945 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
2946 |
- "session.save_path=${T}" \ |
2947 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
2948 |
- "session.save_path=${T}" |
2949 |
- |
2950 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
2951 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
2952 |
- done |
2953 |
- |
2954 |
- local failed="$(find -name '*.out')" |
2955 |
- if [[ ${failed} != "" ]] ; then |
2956 |
- ewarn "The following test cases failed unexpectedly:" |
2957 |
- for name in ${failed}; do |
2958 |
- ewarn " ${name/.out/}" |
2959 |
- done |
2960 |
- else |
2961 |
- einfo "No unexpected test failures, all fine" |
2962 |
- fi |
2963 |
- |
2964 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
2965 |
- local passed="" |
2966 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
2967 |
- [[ -f "${name}.diff" ]] && continue |
2968 |
- passed="${passed} ${name}" |
2969 |
- done |
2970 |
- if [[ ${passed} != "" ]] ; then |
2971 |
- einfo "The following test cases passed unexpectedly:" |
2972 |
- for name in ${passed}; do |
2973 |
- ewarn " ${passed}" |
2974 |
- done |
2975 |
- else |
2976 |
- einfo "None of the known-to-fail tests passed, all fine" |
2977 |
- fi |
2978 |
- fi |
2979 |
-} |
2980 |
- |
2981 |
-pkg_postinst() { |
2982 |
- # Output some general info to the user |
2983 |
- if use apache2 ; then |
2984 |
- elog |
2985 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
2986 |
- elog "your apache2 command. OpenRC users can append that string to" |
2987 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
2988 |
- elog |
2989 |
- elog "The apache module configuration file 70_mod_php.conf is" |
2990 |
- elog "provided (and maintained) by eselect-php." |
2991 |
- elog |
2992 |
- fi |
2993 |
- |
2994 |
- # Create the symlinks for php |
2995 |
- for m in ${SAPIS}; do |
2996 |
- [[ ${m} == 'embed' ]] && continue; |
2997 |
- if use $m ; then |
2998 |
- local ci=$(eselect php show $m) |
2999 |
- if [[ -z $ci ]]; then |
3000 |
- eselect php set $m php${SLOT} || die |
3001 |
- einfo "Switched ${m} to use php:${SLOT}" |
3002 |
- einfo |
3003 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
3004 |
- elog "To switch $m to use php:${SLOT}, run" |
3005 |
- elog " eselect php set $m php${SLOT}" |
3006 |
- elog |
3007 |
- fi |
3008 |
- fi |
3009 |
- done |
3010 |
- |
3011 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
3012 |
- # example, if the user has the cgi SAPI enabled, then he has an |
3013 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
3014 |
- # USE="-cgi", that symlink will break. This call to eselect is |
3015 |
- # supposed to remove that dead link per bug 572436. |
3016 |
- eselect php cleanup || die |
3017 |
- |
3018 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
3019 |
- elog "To build extensions for this version of PHP, you will need to" |
3020 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
3021 |
- elog |
3022 |
- fi |
3023 |
- |
3024 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
3025 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
3026 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
3027 |
- ewarn 'remove it from your configuration at your convenience. See' |
3028 |
- ewarn |
3029 |
- ewarn ' https://bugs.gentoo.org/611214' |
3030 |
- ewarn |
3031 |
- ewarn 'for more information.' |
3032 |
- fi |
3033 |
- |
3034 |
- elog "For details on how version slotting works, please see" |
3035 |
- elog "the wiki:" |
3036 |
- elog |
3037 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
3038 |
- elog |
3039 |
-} |
3040 |
- |
3041 |
-pkg_postrm() { |
3042 |
- # This serves two purposes. First, if we have just removed the last |
3043 |
- # installed version of PHP, then this will remove any dead symlinks |
3044 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
3045 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
3046 |
- # his existing symlinks to point to the new 7.0 installation. The |
3047 |
- # latter is bug 432962. |
3048 |
- # |
3049 |
- # Note: the eselect-php package may not be installed at this point, |
3050 |
- # so we can't die() if this command fails. |
3051 |
- eselect php cleanup |
3052 |
-} |
3053 |
|
3054 |
diff --git a/dev-lang/php/php-7.3.8.ebuild b/dev-lang/php/php-7.3.8.ebuild |
3055 |
deleted file mode 100644 |
3056 |
index c0862291df3..00000000000 |
3057 |
--- a/dev-lang/php/php-7.3.8.ebuild |
3058 |
+++ /dev/null |
3059 |
@@ -1,749 +0,0 @@ |
3060 |
-# Copyright 1999-2019 Gentoo Authors |
3061 |
-# Distributed under the terms of the GNU General Public License v2 |
3062 |
- |
3063 |
-EAPI="7" |
3064 |
- |
3065 |
-inherit flag-o-matic systemd autotools |
3066 |
- |
3067 |
-MY_PV=${PV/_rc/RC} |
3068 |
-DESCRIPTION="The PHP language runtime engine" |
3069 |
-HOMEPAGE="https://php.net/" |
3070 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
3071 |
- |
3072 |
-LICENSE="PHP-3.01 |
3073 |
- BSD |
3074 |
- Zend-2.0 |
3075 |
- bcmath? ( LGPL-2.1+ ) |
3076 |
- fpm? ( BSD-2 ) |
3077 |
- gd? ( gd ) |
3078 |
- unicode? ( BSD-2 LGPL-2.1 )" |
3079 |
- |
3080 |
-SLOT="$(ver_cut 1-2)" |
3081 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
3082 |
- |
3083 |
-S="${WORKDIR}/${PN}-${MY_PV}" |
3084 |
- |
3085 |
-# We can build the following SAPIs in the given order |
3086 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
3087 |
- |
3088 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
3089 |
-IUSE="${IUSE} |
3090 |
- ${SAPIS/cli/+cli} |
3091 |
- threads" |
3092 |
- |
3093 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
3094 |
- coverage +ctype curl debug |
3095 |
- enchant exif +fileinfo +filter firebird |
3096 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
3097 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
3098 |
- mhash mssql mysql mysqli nls |
3099 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
3100 |
- readline recode selinux +session session-mm sharedmem |
3101 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
3102 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp |
3103 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib" |
3104 |
- |
3105 |
-# The supported (that is, autodetected) versions of BDB are listed in |
3106 |
-# the ./configure script. Other versions *work*, but we need to stick to |
3107 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
3108 |
-COMMON_DEPEND=" |
3109 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
3110 |
- >=dev-libs/libpcre2-10.30[unicode] |
3111 |
- fpm? ( acl? ( sys-apps/acl ) ) |
3112 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
3113 |
- argon2? ( app-crypt/argon2:= ) |
3114 |
- berkdb? ( || ( sys-libs/db:5.3 |
3115 |
- sys-libs/db:5.1 |
3116 |
- sys-libs/db:4.8 |
3117 |
- sys-libs/db:4.7 |
3118 |
- sys-libs/db:4.6 |
3119 |
- sys-libs/db:4.5 ) ) |
3120 |
- bzip2? ( app-arch/bzip2:0= ) |
3121 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
3122 |
- coverage? ( dev-util/lcov ) |
3123 |
- curl? ( >=net-misc/curl-7.10.5 ) |
3124 |
- enchant? ( <app-text/enchant-2.0:0 ) |
3125 |
- firebird? ( dev-db/firebird ) |
3126 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= >=sys-libs/zlib-1.2.0.4 ) |
3127 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
3128 |
- gmp? ( dev-libs/gmp:0= ) |
3129 |
- iconv? ( virtual/libiconv ) |
3130 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
3131 |
- intl? ( dev-libs/icu:= ) |
3132 |
- iodbc? ( dev-db/libiodbc ) |
3133 |
- kerberos? ( virtual/krb5 ) |
3134 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
3135 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
3136 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
3137 |
- lmdb? ( dev-db/lmdb:= ) |
3138 |
- mssql? ( dev-db/freetds[mssql] ) |
3139 |
- nls? ( sys-devel/gettext ) |
3140 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
3141 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
3142 |
- postgres? ( dev-db/postgresql:* ) |
3143 |
- qdbm? ( dev-db/qdbm ) |
3144 |
- readline? ( sys-libs/readline:0= ) |
3145 |
- recode? ( app-text/recode ) |
3146 |
- session-mm? ( dev-libs/mm ) |
3147 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
3148 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
3149 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
3150 |
- sodium? ( dev-libs/libsodium:= ) |
3151 |
- spell? ( >=app-text/aspell-0.50 ) |
3152 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
3153 |
- ssl? ( |
3154 |
- !libressl? ( >=dev-libs/openssl-1.0.1:0= ) |
3155 |
- libressl? ( dev-libs/libressl:0= ) |
3156 |
- ) |
3157 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
3158 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
3159 |
- truetype? ( =media-libs/freetype-2* ) |
3160 |
- unicode? ( dev-libs/oniguruma:= ) |
3161 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
3162 |
- webp? ( media-libs/libwebp:0= ) |
3163 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
3164 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
3165 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
3166 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
3167 |
- xpm? ( x11-libs/libXpm ) |
3168 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
3169 |
- zip? ( >=sys-libs/zlib-1.2.0.4:0= ) |
3170 |
- zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) |
3171 |
- zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) |
3172 |
-" |
3173 |
- |
3174 |
-RDEPEND="${COMMON_DEPEND} |
3175 |
- virtual/mta |
3176 |
- fpm? ( |
3177 |
- selinux? ( sec-policy/selinux-phpfpm ) |
3178 |
- systemd? ( sys-apps/systemd ) )" |
3179 |
- |
3180 |
-# Bison isn't actually needed when building from a release tarball |
3181 |
-# However, the configure script will warn if it's absent or if you |
3182 |
-# have an incompatible version installed. See bug 593278. |
3183 |
-DEPEND="${COMMON_DEPEND} |
3184 |
- app-arch/xz-utils |
3185 |
- >=sys-devel/bison-3.0.1" |
3186 |
- |
3187 |
-BDEPEND="virtual/pkgconfig" |
3188 |
- |
3189 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
3190 |
-REQUIRED_USE=" |
3191 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
3192 |
- cli? ( ^^ ( readline libedit ) ) |
3193 |
- truetype? ( gd zlib ) |
3194 |
- webp? ( gd zlib ) |
3195 |
- cjk? ( gd zlib ) |
3196 |
- exif? ( gd zlib ) |
3197 |
- xpm? ( gd zlib ) |
3198 |
- gd? ( zlib ) |
3199 |
- simplexml? ( xml ) |
3200 |
- soap? ( xml ) |
3201 |
- wddx? ( xml ) |
3202 |
- xmlrpc? ( || ( xml iconv ) ) |
3203 |
- xmlreader? ( xml ) |
3204 |
- xslt? ( xml ) |
3205 |
- ldap-sasl? ( ldap ) |
3206 |
- mhash? ( hash ) |
3207 |
- phar? ( hash ) |
3208 |
- qdbm? ( !gdbm ) |
3209 |
- readline? ( !libedit ) |
3210 |
- recode? ( !imap !mysqli !mysql ) |
3211 |
- session-mm? ( session !threads ) |
3212 |
- mysql? ( || ( mysqli pdo ) ) |
3213 |
- zip-encryption? ( zip ) |
3214 |
-" |
3215 |
-PATCHES=( |
3216 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
3217 |
-) |
3218 |
- |
3219 |
-PHP_MV="$(ver_cut 1)" |
3220 |
- |
3221 |
-php_install_ini() { |
3222 |
- local phpsapi="${1}" |
3223 |
- |
3224 |
- # work out where we are installing the ini file |
3225 |
- php_set_ini_dir "${phpsapi}" |
3226 |
- |
3227 |
- # Always install the production INI file, bug 611214. |
3228 |
- local phpinisrc="php.ini-production-${phpsapi}" |
3229 |
- cp php.ini-production "${phpinisrc}" || die |
3230 |
- |
3231 |
- # default to /tmp for save_path, bug #282768 |
3232 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
3233 |
- |
3234 |
- # Set the extension dir |
3235 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
3236 |
- -i "${phpinisrc}" || die |
3237 |
- |
3238 |
- # Set the include path to point to where we want to find PEAR packages |
3239 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
3240 |
- |
3241 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
3242 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
3243 |
- newins "${phpinisrc}" php.ini |
3244 |
- |
3245 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
3246 |
- elog |
3247 |
- |
3248 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
3249 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
3250 |
- |
3251 |
- if use opcache; then |
3252 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
3253 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
3254 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
3255 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
3256 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
3257 |
- fi |
3258 |
- |
3259 |
- # SAPI-specific handling |
3260 |
- if [[ "${sapi}" == "fpm" ]] ; then |
3261 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
3262 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
3263 |
- doins sapi/fpm/php-fpm.conf |
3264 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
3265 |
- doins sapi/fpm/www.conf |
3266 |
- fi |
3267 |
- |
3268 |
- dodoc php.ini-{development,production} |
3269 |
-} |
3270 |
- |
3271 |
-php_set_ini_dir() { |
3272 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
3273 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
3274 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
3275 |
-} |
3276 |
- |
3277 |
-src_prepare() { |
3278 |
- default |
3279 |
- |
3280 |
- # In php-7.x, the FPM pool configuration files have been split off |
3281 |
- # of the main config. By default the pool config files go in |
3282 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
3283 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
3284 |
- # we'll install the pool configuration file "www.conf" there. |
3285 |
- php_set_ini_dir fpm |
3286 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
3287 |
- sapi/fpm/php-fpm.conf.in \ |
3288 |
- || die 'failed to move the include directory in php-fpm.conf' |
3289 |
- |
3290 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
3291 |
- # Force rebuilding aclocal.m4 |
3292 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
3293 |
- eautoreconf |
3294 |
-} |
3295 |
- |
3296 |
-src_configure() { |
3297 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
3298 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
3299 |
- |
3300 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
3301 |
- |
3302 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
3303 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
3304 |
- local our_conf=( |
3305 |
- --prefix="${PHP_DESTDIR}" |
3306 |
- --mandir="${PHP_DESTDIR}/man" |
3307 |
- --infodir="${PHP_DESTDIR}/info" |
3308 |
- --libdir="${PHP_DESTDIR}/lib" |
3309 |
- --with-libdir="$(get_libdir)" |
3310 |
- --localstatedir="${EPREFIX}/var" |
3311 |
- --without-pear |
3312 |
- $(use_enable threads maintainer-zts) |
3313 |
- ) |
3314 |
- |
3315 |
- our_conf+=( |
3316 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
3317 |
- $(use_enable bcmath bcmath) |
3318 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
3319 |
- $(use_enable calendar calendar) |
3320 |
- $(use_enable coverage gcov) |
3321 |
- $(use_enable ctype ctype) |
3322 |
- $(use_with curl curl "${EPREFIX}/usr") |
3323 |
- $(use_enable xml dom) |
3324 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
3325 |
- $(use_enable exif exif) |
3326 |
- $(use_enable fileinfo fileinfo) |
3327 |
- $(use_enable filter filter) |
3328 |
- $(use_enable ftp ftp) |
3329 |
- $(use_with nls gettext "${EPREFIX}/usr") |
3330 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
3331 |
- $(use_enable hash hash) |
3332 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
3333 |
- $(use_with iconv iconv \ |
3334 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
3335 |
- $(use_enable intl intl) |
3336 |
- $(use_enable ipv6 ipv6) |
3337 |
- $(use_enable json json) |
3338 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
3339 |
- $(use_enable xml libxml) |
3340 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
3341 |
- $(use_enable unicode mbstring) |
3342 |
- $(use_with unicode onig "${EPREFIX}/usr") |
3343 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
3344 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
3345 |
- $(use_enable pcntl pcntl) |
3346 |
- $(use_enable phar phar) |
3347 |
- $(use_enable pdo pdo) |
3348 |
- $(use_enable opcache opcache) |
3349 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
3350 |
- $(use_enable posix posix) |
3351 |
- $(use_with spell pspell "${EPREFIX}/usr") |
3352 |
- $(use_with recode recode "${EPREFIX}/usr") |
3353 |
- $(use_enable simplexml simplexml) |
3354 |
- $(use_enable sharedmem shmop) |
3355 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
3356 |
- $(use_enable soap soap) |
3357 |
- $(use_enable sockets sockets) |
3358 |
- $(use_with sodium sodium "${EPREFIX}/usr") |
3359 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
3360 |
- $(use_enable sysvipc sysvmsg) |
3361 |
- $(use_enable sysvipc sysvsem) |
3362 |
- $(use_enable sysvipc sysvshm) |
3363 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
3364 |
- $(use_enable tokenizer tokenizer) |
3365 |
- $(use_enable wddx wddx) |
3366 |
- $(use_enable xml xml) |
3367 |
- $(use_enable xmlreader xmlreader) |
3368 |
- $(use_enable xmlwriter xmlwriter) |
3369 |
- $(use_with xmlrpc xmlrpc) |
3370 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
3371 |
- $(use_enable zip zip) |
3372 |
- $(use_with zip-encryption libzip "${EPREFIX}/usr") |
3373 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
3374 |
- $(use_enable debug debug) |
3375 |
- ) |
3376 |
- |
3377 |
- # DBA support |
3378 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
3379 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
3380 |
- our_conf+=( "--enable-dba${shared}" ) |
3381 |
- fi |
3382 |
- |
3383 |
- # DBA drivers support |
3384 |
- our_conf+=( |
3385 |
- $(use_with cdb cdb) |
3386 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
3387 |
- $(use_enable flatfile flatfile) |
3388 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
3389 |
- $(use_enable inifile inifile) |
3390 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
3391 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
3392 |
- ) |
3393 |
- |
3394 |
- # Support for the GD graphics library |
3395 |
- our_conf+=( |
3396 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
3397 |
- $(use_enable cjk gd-jis-conv) |
3398 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
3399 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
3400 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
3401 |
- ) |
3402 |
- if use webp; then |
3403 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
3404 |
- fi |
3405 |
- # enable gd last, so configure can pick up the previous settings |
3406 |
- our_conf+=( $(use_with gd gd) ) |
3407 |
- |
3408 |
- # IMAP support |
3409 |
- if use imap ; then |
3410 |
- our_conf+=( |
3411 |
- $(use_with imap imap "${EPREFIX}/usr") |
3412 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
3413 |
- ) |
3414 |
- fi |
3415 |
- |
3416 |
- # Interbase/firebird support |
3417 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
3418 |
- |
3419 |
- # LDAP support |
3420 |
- if use ldap ; then |
3421 |
- our_conf+=( |
3422 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
3423 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
3424 |
- ) |
3425 |
- fi |
3426 |
- |
3427 |
- # MySQL support |
3428 |
- local mysqllib="mysqlnd" |
3429 |
- local mysqlilib="mysqlnd" |
3430 |
- |
3431 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
3432 |
- |
3433 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
3434 |
- if use mysql || use mysqli ; then |
3435 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
3436 |
- fi |
3437 |
- |
3438 |
- # ODBC support |
3439 |
- our_conf+=( |
3440 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
3441 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
3442 |
- ) |
3443 |
- |
3444 |
- # Oracle support |
3445 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
3446 |
- |
3447 |
- # PDO support |
3448 |
- if use pdo ; then |
3449 |
- our_conf+=( |
3450 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
3451 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
3452 |
- $(use_with postgres pdo-pgsql) |
3453 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
3454 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
3455 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
3456 |
- $(use_with oci8-instant-client pdo-oci) |
3457 |
- ) |
3458 |
- fi |
3459 |
- |
3460 |
- # readline/libedit support |
3461 |
- our_conf+=( |
3462 |
- $(use_with readline readline "${EPREFIX}/usr") |
3463 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
3464 |
- ) |
3465 |
- |
3466 |
- # Session support |
3467 |
- if use session ; then |
3468 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
3469 |
- else |
3470 |
- our_conf+=( $(use_enable session session) ) |
3471 |
- fi |
3472 |
- |
3473 |
- # Use pic for shared modules such as apache2's mod_php |
3474 |
- our_conf+=( --with-pic ) |
3475 |
- |
3476 |
- # we use the system copy of pcre |
3477 |
- # --with-pcre-regex affects ext/pcre |
3478 |
- # --with-pcre-dir affects ext/filter and ext/zip |
3479 |
- # --with-pcre-valgrind cannot be enabled with system pcre |
3480 |
- # Many arches don't support pcre-jit |
3481 |
- our_conf+=( |
3482 |
- --with-pcre-regex="${EPREFIX}/usr" |
3483 |
- --with-pcre-dir="${EPREFIX}/usr" |
3484 |
- --without-pcre-valgrind |
3485 |
- --without-pcre-jit |
3486 |
- ) |
3487 |
- |
3488 |
- # Catch CFLAGS problems |
3489 |
- # Fixes bug #14067. |
3490 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
3491 |
- replace-cpu-flags "k6*" "i586" |
3492 |
- |
3493 |
- # Cache the ./configure test results between SAPIs. |
3494 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
3495 |
- |
3496 |
- # Support user-passed configuration parameters |
3497 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
3498 |
- |
3499 |
- # Support the Apache2 extras, they must be set globally for all |
3500 |
- # SAPIs to work correctly, especially for external PHP extensions |
3501 |
- |
3502 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
3503 |
- for one_sapi in $SAPIS ; do |
3504 |
- use "${one_sapi}" || continue |
3505 |
- php_set_ini_dir "${one_sapi}" |
3506 |
- |
3507 |
- # The BUILD_DIR variable is used to determine where to output |
3508 |
- # the files that autotools creates. This was all originally |
3509 |
- # based on the autotools-utils eclass. |
3510 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
3511 |
- cp -a "${S}" "${BUILD_DIR}" || die |
3512 |
- cd "${BUILD_DIR}" || die |
3513 |
- |
3514 |
- local sapi_conf=( |
3515 |
- --with-config-file-path="${PHP_INI_DIR}" |
3516 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
3517 |
- ) |
3518 |
- |
3519 |
- for sapi in $SAPIS ; do |
3520 |
- case "$sapi" in |
3521 |
- cli|cgi|embed|fpm|phpdbg) |
3522 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
3523 |
- sapi_conf+=( "--enable-${sapi}" ) |
3524 |
- if [[ "fpm" == "${sapi}" ]] ; then |
3525 |
- sapi_conf+=( |
3526 |
- $(use_with acl fpm-acl) |
3527 |
- $(use_with systemd fpm-systemd) |
3528 |
- ) |
3529 |
- fi |
3530 |
- else |
3531 |
- sapi_conf+=( "--disable-${sapi}" ) |
3532 |
- fi |
3533 |
- ;; |
3534 |
- |
3535 |
- apache2) |
3536 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
3537 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
3538 |
- else |
3539 |
- sapi_conf+=( --without-apxs2 ) |
3540 |
- fi |
3541 |
- ;; |
3542 |
- esac |
3543 |
- done |
3544 |
- |
3545 |
- # Construct the $myeconfargs array by concatenating $our_conf |
3546 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
3547 |
- local myeconfargs=( "${our_conf[@]}" ) |
3548 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
3549 |
- |
3550 |
- pushd "${BUILD_DIR}" > /dev/null || die |
3551 |
- econf "${myeconfargs[@]}" |
3552 |
- popd > /dev/null || die |
3553 |
- done |
3554 |
-} |
3555 |
- |
3556 |
-src_compile() { |
3557 |
- # snmp seems to run during src_compile, too (bug #324739) |
3558 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
3559 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
3560 |
- |
3561 |
- for sapi in ${SAPIS} ; do |
3562 |
- if use "${sapi}"; then |
3563 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
3564 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
3565 |
- emake |
3566 |
- fi |
3567 |
- done |
3568 |
-} |
3569 |
- |
3570 |
-src_install() { |
3571 |
- # see bug #324739 for what happens when we don't have that |
3572 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
3573 |
- |
3574 |
- # grab the first SAPI that got built and install common files from there |
3575 |
- local first_sapi="" |
3576 |
- for sapi in $SAPIS ; do |
3577 |
- if use $sapi ; then |
3578 |
- first_sapi=$sapi |
3579 |
- break |
3580 |
- fi |
3581 |
- done |
3582 |
- |
3583 |
- # Makefile forgets to create this before trying to write to it... |
3584 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
3585 |
- |
3586 |
- # Install php environment (without any sapis) |
3587 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
3588 |
- emake INSTALL_ROOT="${D}" \ |
3589 |
- install-build install-headers install-programs |
3590 |
- |
3591 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
3592 |
- |
3593 |
- # Create the directory where we'll put version-specific php scripts |
3594 |
- keepdir "/usr/share/php${PHP_MV}" |
3595 |
- |
3596 |
- local sapi="", file="" |
3597 |
- local sapi_list="" |
3598 |
- |
3599 |
- for sapi in ${SAPIS}; do |
3600 |
- if use "${sapi}" ; then |
3601 |
- einfo "Installing SAPI: ${sapi}" |
3602 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
3603 |
- |
3604 |
- if [[ "${sapi}" == "apache2" ]] ; then |
3605 |
- # We're specifically not using emake install-sapi as libtool |
3606 |
- # may cause unnecessary relink failures (see bug #351266) |
3607 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
3608 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
3609 |
- "libphp${PHP_MV}$(get_libname)" |
3610 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
3611 |
- else |
3612 |
- # needed each time, php_install_ini would reset it |
3613 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
3614 |
- into "${dest}" |
3615 |
- case "$sapi" in |
3616 |
- cli) |
3617 |
- source="sapi/cli/php" |
3618 |
- ;; |
3619 |
- cgi) |
3620 |
- source="sapi/cgi/php-cgi" |
3621 |
- ;; |
3622 |
- fpm) |
3623 |
- source="sapi/fpm/php-fpm" |
3624 |
- ;; |
3625 |
- embed) |
3626 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
3627 |
- ;; |
3628 |
- phpdbg) |
3629 |
- source="sapi/phpdbg/phpdbg" |
3630 |
- ;; |
3631 |
- *) |
3632 |
- die "unhandled sapi in src_install" |
3633 |
- ;; |
3634 |
- esac |
3635 |
- |
3636 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
3637 |
- dolib.so "${source}" |
3638 |
- else |
3639 |
- dobin "${source}" |
3640 |
- local name="$(basename ${source})" |
3641 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
3642 |
- fi |
3643 |
- fi |
3644 |
- |
3645 |
- php_install_ini "${sapi}" |
3646 |
- |
3647 |
- # construct correct SAPI string for php-config |
3648 |
- # thanks to ferringb for the bash voodoo |
3649 |
- if [[ "${sapi}" == "apache2" ]]; then |
3650 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
3651 |
- else |
3652 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
3653 |
- fi |
3654 |
- fi |
3655 |
- done |
3656 |
- |
3657 |
- # Installing opcache module |
3658 |
- if use opcache ; then |
3659 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
3660 |
- dolib.so "modules/opcache$(get_libname)" |
3661 |
- fi |
3662 |
- |
3663 |
- # Install env.d files |
3664 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
3665 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
3666 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
3667 |
- |
3668 |
- # set php-config variable correctly (bug #278439) |
3669 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
3670 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
3671 |
- |
3672 |
- if use fpm ; then |
3673 |
- if use systemd; then |
3674 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
3675 |
- "php-fpm@${SLOT}.service" |
3676 |
- else |
3677 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
3678 |
- "php-fpm@${SLOT}.service" |
3679 |
- fi |
3680 |
- fi |
3681 |
-} |
3682 |
- |
3683 |
-src_test() { |
3684 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
3685 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
3686 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
3687 |
- ewarn "Test phase requires USE=cli, skipping" |
3688 |
- return |
3689 |
- else |
3690 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
3691 |
- fi |
3692 |
- |
3693 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
3694 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
3695 |
- fi |
3696 |
- |
3697 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
3698 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
3699 |
- fi |
3700 |
- |
3701 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
3702 |
- "session.save_path=${T}" \ |
3703 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
3704 |
- "session.save_path=${T}" |
3705 |
- |
3706 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
3707 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
3708 |
- done |
3709 |
- |
3710 |
- local failed="$(find -name '*.out')" |
3711 |
- if [[ ${failed} != "" ]] ; then |
3712 |
- ewarn "The following test cases failed unexpectedly:" |
3713 |
- for name in ${failed}; do |
3714 |
- ewarn " ${name/.out/}" |
3715 |
- done |
3716 |
- else |
3717 |
- einfo "No unexpected test failures, all fine" |
3718 |
- fi |
3719 |
- |
3720 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
3721 |
- local passed="" |
3722 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
3723 |
- [[ -f "${name}.diff" ]] && continue |
3724 |
- passed="${passed} ${name}" |
3725 |
- done |
3726 |
- if [[ ${passed} != "" ]] ; then |
3727 |
- einfo "The following test cases passed unexpectedly:" |
3728 |
- for name in ${passed}; do |
3729 |
- ewarn " ${passed}" |
3730 |
- done |
3731 |
- else |
3732 |
- einfo "None of the known-to-fail tests passed, all fine" |
3733 |
- fi |
3734 |
- fi |
3735 |
-} |
3736 |
- |
3737 |
-pkg_postinst() { |
3738 |
- # Output some general info to the user |
3739 |
- if use apache2 ; then |
3740 |
- elog |
3741 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
3742 |
- elog "your apache2 command. OpenRC users can append that string to" |
3743 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
3744 |
- elog |
3745 |
- elog "The apache module configuration file 70_mod_php.conf is" |
3746 |
- elog "provided (and maintained) by eselect-php." |
3747 |
- elog |
3748 |
- fi |
3749 |
- |
3750 |
- # Create the symlinks for php |
3751 |
- for m in ${SAPIS}; do |
3752 |
- [[ ${m} == 'embed' ]] && continue; |
3753 |
- if use $m ; then |
3754 |
- local ci=$(eselect php show $m) |
3755 |
- if [[ -z $ci ]]; then |
3756 |
- eselect php set $m php${SLOT} || die |
3757 |
- einfo "Switched ${m} to use php:${SLOT}" |
3758 |
- einfo |
3759 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
3760 |
- elog "To switch $m to use php:${SLOT}, run" |
3761 |
- elog " eselect php set $m php${SLOT}" |
3762 |
- elog |
3763 |
- fi |
3764 |
- fi |
3765 |
- done |
3766 |
- |
3767 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
3768 |
- # example, if the user has the cgi SAPI enabled, then he has an |
3769 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
3770 |
- # USE="-cgi", that symlink will break. This call to eselect is |
3771 |
- # supposed to remove that dead link per bug 572436. |
3772 |
- eselect php cleanup || die |
3773 |
- |
3774 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
3775 |
- elog "To build extensions for this version of PHP, you will need to" |
3776 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
3777 |
- elog |
3778 |
- fi |
3779 |
- |
3780 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
3781 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
3782 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
3783 |
- ewarn 'remove it from your configuration at your convenience. See' |
3784 |
- ewarn |
3785 |
- ewarn ' https://bugs.gentoo.org/611214' |
3786 |
- ewarn |
3787 |
- ewarn 'for more information.' |
3788 |
- fi |
3789 |
- |
3790 |
- elog "For details on how version slotting works, please see" |
3791 |
- elog "the wiki:" |
3792 |
- elog |
3793 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
3794 |
- elog |
3795 |
-} |
3796 |
- |
3797 |
-pkg_postrm() { |
3798 |
- # This serves two purposes. First, if we have just removed the last |
3799 |
- # installed version of PHP, then this will remove any dead symlinks |
3800 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
3801 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
3802 |
- # his existing symlinks to point to the new 7.0 installation. The |
3803 |
- # latter is bug 432962. |
3804 |
- # |
3805 |
- # Note: the eselect-php package may not be installed at this point, |
3806 |
- # so we can't die() if this command fails. |
3807 |
- eselect php cleanup |
3808 |
-} |
3809 |
|
3810 |
diff --git a/dev-lang/php/php-7.4.0_rc3.ebuild b/dev-lang/php/php-7.4.0_rc3.ebuild |
3811 |
deleted file mode 100644 |
3812 |
index 2e7801342bf..00000000000 |
3813 |
--- a/dev-lang/php/php-7.4.0_rc3.ebuild |
3814 |
+++ /dev/null |
3815 |
@@ -1,724 +0,0 @@ |
3816 |
-# Copyright 1999-2019 Gentoo Authors |
3817 |
-# Distributed under the terms of the GNU General Public License v2 |
3818 |
- |
3819 |
-EAPI="7" |
3820 |
- |
3821 |
-WANT_AUTOMAKE="none" |
3822 |
- |
3823 |
-inherit flag-o-matic systemd autotools |
3824 |
- |
3825 |
-MY_PV=${PV/_rc/RC} |
3826 |
-DESCRIPTION="The PHP language runtime engine" |
3827 |
-HOMEPAGE="https://php.net/" |
3828 |
-SRC_URI="https://downloads.php.net/~derick/${PN}-${MY_PV}.tar.xz" |
3829 |
- |
3830 |
-LICENSE="PHP-3.01 |
3831 |
- BSD |
3832 |
- Zend-2.0 |
3833 |
- bcmath? ( LGPL-2.1+ ) |
3834 |
- fpm? ( BSD-2 ) |
3835 |
- gd? ( gd ) |
3836 |
- unicode? ( BSD-2 LGPL-2.1 )" |
3837 |
- |
3838 |
-SLOT="$(ver_cut 1-2)" |
3839 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
3840 |
- |
3841 |
-S="${WORKDIR}/${PN}-${MY_PV}" |
3842 |
- |
3843 |
-# We can build the following SAPIs in the given order |
3844 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
3845 |
- |
3846 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
3847 |
-IUSE="${IUSE} |
3848 |
- ${SAPIS/cli/+cli} |
3849 |
- threads" |
3850 |
- |
3851 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
3852 |
- coverage +ctype curl debug |
3853 |
- enchant exif ffi +fileinfo +filter firebird |
3854 |
- +flatfile ftp gd gdbm gmp +iconv imap inifile |
3855 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
3856 |
- mhash mssql mysql mysqli nls |
3857 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
3858 |
- readline selinux +session session-mm sharedmem |
3859 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
3860 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp |
3861 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
3862 |
- |
3863 |
-# The supported (that is, autodetected) versions of BDB are listed in |
3864 |
-# the ./configure script. Other versions *work*, but we need to stick to |
3865 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
3866 |
-COMMON_DEPEND=" |
3867 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
3868 |
- >=dev-libs/libpcre2-10.30[unicode] |
3869 |
- fpm? ( acl? ( sys-apps/acl ) ) |
3870 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
3871 |
- argon2? ( app-crypt/argon2:= ) |
3872 |
- berkdb? ( || ( sys-libs/db:5.3 |
3873 |
- sys-libs/db:5.1 |
3874 |
- sys-libs/db:4.8 |
3875 |
- sys-libs/db:4.7 |
3876 |
- sys-libs/db:4.6 |
3877 |
- sys-libs/db:4.5 ) ) |
3878 |
- bzip2? ( app-arch/bzip2:0= ) |
3879 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
3880 |
- coverage? ( dev-util/lcov ) |
3881 |
- curl? ( >=net-misc/curl-7.10.5 ) |
3882 |
- enchant? ( <app-text/enchant-2.0:0 ) |
3883 |
- ffi? ( >=virtual/libffi-3.0.11 ) |
3884 |
- firebird? ( dev-db/firebird ) |
3885 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= ) |
3886 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
3887 |
- gmp? ( dev-libs/gmp:0= ) |
3888 |
- iconv? ( virtual/libiconv ) |
3889 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
3890 |
- intl? ( dev-libs/icu:= ) |
3891 |
- kerberos? ( virtual/krb5 ) |
3892 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
3893 |
- ldap-sasl? ( dev-libs/cyrus-sasl ) |
3894 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
3895 |
- lmdb? ( dev-db/lmdb:= ) |
3896 |
- mssql? ( dev-db/freetds[mssql] ) |
3897 |
- nls? ( sys-devel/gettext ) |
3898 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
3899 |
- odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) ) |
3900 |
- postgres? ( dev-db/postgresql:* ) |
3901 |
- qdbm? ( dev-db/qdbm ) |
3902 |
- readline? ( sys-libs/readline:0= ) |
3903 |
- session-mm? ( dev-libs/mm ) |
3904 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
3905 |
- sodium? ( dev-libs/libsodium:= ) |
3906 |
- spell? ( >=app-text/aspell-0.50 ) |
3907 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
3908 |
- ssl? ( |
3909 |
- !libressl? ( >=dev-libs/openssl-1.0.1:0= ) |
3910 |
- libressl? ( dev-libs/libressl:0= ) |
3911 |
- ) |
3912 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
3913 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
3914 |
- truetype? ( =media-libs/freetype-2* ) |
3915 |
- unicode? ( dev-libs/oniguruma:= ) |
3916 |
- webp? ( media-libs/libwebp:0= ) |
3917 |
- xml? ( >=dev-libs/libxml2-2.7.6 ) |
3918 |
- xpm? ( x11-libs/libXpm ) |
3919 |
- xslt? ( dev-libs/libxslt ) |
3920 |
- zip? ( >=dev-libs/libzip-1.2.0:= ) |
3921 |
- zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) |
3922 |
-" |
3923 |
- |
3924 |
-RDEPEND="${COMMON_DEPEND} |
3925 |
- virtual/mta |
3926 |
- fpm? ( |
3927 |
- selinux? ( sec-policy/selinux-phpfpm ) |
3928 |
- systemd? ( sys-apps/systemd ) )" |
3929 |
- |
3930 |
-# Bison isn't actually needed when building from a release tarball |
3931 |
-# However, the configure script will warn if it's absent or if you |
3932 |
-# have an incompatible version installed. See bug 593278. |
3933 |
-DEPEND="${COMMON_DEPEND} |
3934 |
- app-arch/xz-utils |
3935 |
- >=sys-devel/bison-3.0.1" |
3936 |
- |
3937 |
-BDEPEND="virtual/pkgconfig" |
3938 |
- |
3939 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
3940 |
-REQUIRED_USE=" |
3941 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
3942 |
- cli? ( ^^ ( readline libedit ) ) |
3943 |
- !cli? ( ?? ( readline libedit ) ) |
3944 |
- truetype? ( gd zlib ) |
3945 |
- webp? ( gd zlib ) |
3946 |
- cjk? ( gd zlib ) |
3947 |
- exif? ( gd zlib ) |
3948 |
- xpm? ( gd zlib ) |
3949 |
- gd? ( zlib ) |
3950 |
- simplexml? ( xml ) |
3951 |
- soap? ( xml ) |
3952 |
- xmlrpc? ( xml iconv ) |
3953 |
- xmlreader? ( xml ) |
3954 |
- xmlwriter? ( xml ) |
3955 |
- xslt? ( xml ) |
3956 |
- ldap-sasl? ( ldap ) |
3957 |
- qdbm? ( !gdbm ) |
3958 |
- session-mm? ( session !threads ) |
3959 |
- mysql? ( || ( mysqli pdo ) ) |
3960 |
- firebird? ( pdo ) |
3961 |
- mssql? ( pdo ) |
3962 |
-" |
3963 |
- |
3964 |
-PHP_MV="$(ver_cut 1)" |
3965 |
- |
3966 |
-php_install_ini() { |
3967 |
- local phpsapi="${1}" |
3968 |
- |
3969 |
- # work out where we are installing the ini file |
3970 |
- php_set_ini_dir "${phpsapi}" |
3971 |
- |
3972 |
- # Always install the production INI file, bug 611214. |
3973 |
- local phpinisrc="php.ini-production-${phpsapi}" |
3974 |
- cp php.ini-production "${phpinisrc}" || die |
3975 |
- |
3976 |
- # default to /tmp for save_path, bug #282768 |
3977 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
3978 |
- |
3979 |
- # Set the extension dir |
3980 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
3981 |
- -i "${phpinisrc}" || die |
3982 |
- |
3983 |
- # Set the include path to point to where we want to find PEAR packages |
3984 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
3985 |
- |
3986 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
3987 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
3988 |
- newins "${phpinisrc}" php.ini |
3989 |
- |
3990 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
3991 |
- elog |
3992 |
- |
3993 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
3994 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
3995 |
- |
3996 |
- if use opcache; then |
3997 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
3998 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
3999 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
4000 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
4001 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
4002 |
- fi |
4003 |
- |
4004 |
- # SAPI-specific handling |
4005 |
- if [[ "${sapi}" == "fpm" ]] ; then |
4006 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
4007 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
4008 |
- doins sapi/fpm/php-fpm.conf |
4009 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
4010 |
- doins sapi/fpm/www.conf |
4011 |
- fi |
4012 |
- |
4013 |
- dodoc php.ini-{development,production} |
4014 |
-} |
4015 |
- |
4016 |
-php_set_ini_dir() { |
4017 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
4018 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
4019 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
4020 |
-} |
4021 |
- |
4022 |
-src_prepare() { |
4023 |
- default |
4024 |
- |
4025 |
- # In php-7.x, the FPM pool configuration files have been split off |
4026 |
- # of the main config. By default the pool config files go in |
4027 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
4028 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
4029 |
- # we'll install the pool configuration file "www.conf" there. |
4030 |
- php_set_ini_dir fpm |
4031 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
4032 |
- sapi/fpm/php-fpm.conf.in \ |
4033 |
- || die 'failed to move the include directory in php-fpm.conf' |
4034 |
- |
4035 |
- # Emulate buildconf to support cross-compilation |
4036 |
- rm -fr aclocal.m4 autom4te.cache config.cache \ |
4037 |
- configure main/php_config.h.in || die |
4038 |
- eautoconf --force |
4039 |
- eautoheader |
4040 |
-} |
4041 |
- |
4042 |
-src_configure() { |
4043 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
4044 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
4045 |
- |
4046 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
4047 |
- |
4048 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
4049 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
4050 |
- local our_conf=( |
4051 |
- --prefix="${PHP_DESTDIR}" |
4052 |
- --mandir="${PHP_DESTDIR}/man" |
4053 |
- --infodir="${PHP_DESTDIR}/info" |
4054 |
- --libdir="${PHP_DESTDIR}/lib" |
4055 |
- --with-libdir="$(get_libdir)" |
4056 |
- --localstatedir="${EPREFIX}/var" |
4057 |
- --without-pear |
4058 |
- $(use_enable threads maintainer-zts) |
4059 |
- ) |
4060 |
- |
4061 |
- our_conf+=( |
4062 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
4063 |
- $(use_enable bcmath) |
4064 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
4065 |
- $(use_enable calendar) |
4066 |
- $(use_enable coverage gcov) |
4067 |
- $(use_enable ctype) |
4068 |
- $(use_with curl) |
4069 |
- $(use_enable xml dom) |
4070 |
- $(use_with enchant) |
4071 |
- $(use_enable exif) |
4072 |
- $(use_with ffi) |
4073 |
- $(use_enable fileinfo) |
4074 |
- $(use_enable filter) |
4075 |
- $(use_enable ftp) |
4076 |
- $(use_with nls gettext "${EPREFIX}/usr") |
4077 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
4078 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
4079 |
- $(use_with iconv iconv \ |
4080 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
4081 |
- $(use_enable intl) |
4082 |
- $(use_enable ipv6) |
4083 |
- $(use_enable json) |
4084 |
- $(use_with kerberos) |
4085 |
- $(use_with xml libxml) |
4086 |
- $(use_enable unicode mbstring) |
4087 |
- $(use_with ssl openssl) |
4088 |
- $(use_enable pcntl) |
4089 |
- $(use_enable phar) |
4090 |
- $(use_enable pdo) |
4091 |
- $(use_enable opcache) |
4092 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
4093 |
- $(use_enable posix) |
4094 |
- $(use_with spell pspell "${EPREFIX}/usr") |
4095 |
- $(use_enable simplexml) |
4096 |
- $(use_enable sharedmem shmop) |
4097 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
4098 |
- $(use_enable soap) |
4099 |
- $(use_enable sockets) |
4100 |
- $(use_with sodium) |
4101 |
- $(use_with sqlite sqlite3) |
4102 |
- $(use_enable sysvipc sysvmsg) |
4103 |
- $(use_enable sysvipc sysvsem) |
4104 |
- $(use_enable sysvipc sysvshm) |
4105 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
4106 |
- $(use_enable tokenizer) |
4107 |
- $(use_enable xml) |
4108 |
- $(use_enable xmlreader) |
4109 |
- $(use_enable xmlwriter) |
4110 |
- $(use_with xmlrpc) |
4111 |
- $(use_with xslt xsl) |
4112 |
- $(use_with zip) |
4113 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
4114 |
- $(use_enable debug) |
4115 |
- ) |
4116 |
- |
4117 |
- # DBA support |
4118 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
4119 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
4120 |
- our_conf+=( "--enable-dba" ) |
4121 |
- fi |
4122 |
- |
4123 |
- # DBA drivers support |
4124 |
- our_conf+=( |
4125 |
- $(use_with cdb) |
4126 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
4127 |
- $(use_enable flatfile) |
4128 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
4129 |
- $(use_enable inifile) |
4130 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
4131 |
- $(use_with tokyocabinet tcadb "${EPREFIX}/usr") |
4132 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
4133 |
- ) |
4134 |
- |
4135 |
- # Support for the GD graphics library |
4136 |
- our_conf+=( |
4137 |
- $(use_with truetype freetype) |
4138 |
- $(use_enable cjk gd-jis-conv) |
4139 |
- $(use_with gd jpeg) |
4140 |
- $(use_with xpm) |
4141 |
- $(use_with webp) |
4142 |
- ) |
4143 |
- # enable gd last, so configure can pick up the previous settings |
4144 |
- our_conf+=( $(use_enable gd) ) |
4145 |
- |
4146 |
- # IMAP support |
4147 |
- if use imap ; then |
4148 |
- our_conf+=( |
4149 |
- $(use_with imap imap "${EPREFIX}/usr") |
4150 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
4151 |
- ) |
4152 |
- fi |
4153 |
- |
4154 |
- # LDAP support |
4155 |
- if use ldap ; then |
4156 |
- our_conf+=( |
4157 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
4158 |
- $(use_with ldap-sasl) |
4159 |
- ) |
4160 |
- fi |
4161 |
- |
4162 |
- # MySQL support |
4163 |
- local mysqllib="mysqlnd" |
4164 |
- local mysqlilib="mysqlnd" |
4165 |
- |
4166 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
4167 |
- |
4168 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
4169 |
- if use mysql || use mysqli ; then |
4170 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
4171 |
- fi |
4172 |
- |
4173 |
- # ODBC support |
4174 |
- our_conf+=( |
4175 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
4176 |
- $(use_with iodbc) |
4177 |
- ) |
4178 |
- |
4179 |
- # Oracle support |
4180 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
4181 |
- |
4182 |
- # PDO support |
4183 |
- if use pdo ; then |
4184 |
- our_conf+=( |
4185 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
4186 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
4187 |
- $(use_with postgres pdo-pgsql) |
4188 |
- $(use_with sqlite pdo-sqlite) |
4189 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
4190 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
4191 |
- $(use_with oci8-instant-client pdo-oci) |
4192 |
- ) |
4193 |
- fi |
4194 |
- |
4195 |
- # readline/libedit support |
4196 |
- our_conf+=( |
4197 |
- $(use_with readline readline "${EPREFIX}/usr") |
4198 |
- $(use_with libedit) |
4199 |
- ) |
4200 |
- |
4201 |
- # Session support |
4202 |
- if use session ; then |
4203 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
4204 |
- else |
4205 |
- our_conf+=( $(use_enable session) ) |
4206 |
- fi |
4207 |
- |
4208 |
- # Use pic for shared modules such as apache2's mod_php |
4209 |
- our_conf+=( --with-pic ) |
4210 |
- |
4211 |
- # we use the system copy of pcre |
4212 |
- # --with-external-pcre affects ext/pcre |
4213 |
- # Many arches don't support pcre-jit |
4214 |
- our_conf+=( |
4215 |
- --with-external-pcre |
4216 |
- --without-pcre-jit |
4217 |
- ) |
4218 |
- |
4219 |
- # Catch CFLAGS problems |
4220 |
- # Fixes bug #14067. |
4221 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
4222 |
- replace-cpu-flags "k6*" "i586" |
4223 |
- |
4224 |
- # Cache the ./configure test results between SAPIs. |
4225 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
4226 |
- |
4227 |
- # Support user-passed configuration parameters |
4228 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
4229 |
- |
4230 |
- # Support the Apache2 extras, they must be set globally for all |
4231 |
- # SAPIs to work correctly, especially for external PHP extensions |
4232 |
- |
4233 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
4234 |
- for one_sapi in $SAPIS ; do |
4235 |
- use "${one_sapi}" || continue |
4236 |
- php_set_ini_dir "${one_sapi}" |
4237 |
- |
4238 |
- # The BUILD_DIR variable is used to determine where to output |
4239 |
- # the files that autotools creates. This was all originally |
4240 |
- # based on the autotools-utils eclass. |
4241 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
4242 |
- cp -a "${S}" "${BUILD_DIR}" || die |
4243 |
- cd "${BUILD_DIR}" || die |
4244 |
- |
4245 |
- local sapi_conf=( |
4246 |
- --with-config-file-path="${PHP_INI_DIR}" |
4247 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
4248 |
- ) |
4249 |
- |
4250 |
- for sapi in $SAPIS ; do |
4251 |
- case "$sapi" in |
4252 |
- cli|cgi|embed|fpm|phpdbg) |
4253 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
4254 |
- sapi_conf+=( "--enable-${sapi}" ) |
4255 |
- if [[ "fpm" == "${sapi}" ]] ; then |
4256 |
- sapi_conf+=( |
4257 |
- $(use_with acl fpm-acl) |
4258 |
- $(use_with systemd fpm-systemd) |
4259 |
- ) |
4260 |
- fi |
4261 |
- else |
4262 |
- sapi_conf+=( "--disable-${sapi}" ) |
4263 |
- fi |
4264 |
- ;; |
4265 |
- |
4266 |
- apache2) |
4267 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
4268 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
4269 |
- else |
4270 |
- sapi_conf+=( --without-apxs2 ) |
4271 |
- fi |
4272 |
- ;; |
4273 |
- esac |
4274 |
- done |
4275 |
- |
4276 |
- # Construct the $myeconfargs array by concatenating $our_conf |
4277 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
4278 |
- local myeconfargs=( "${our_conf[@]}" ) |
4279 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
4280 |
- |
4281 |
- pushd "${BUILD_DIR}" > /dev/null || die |
4282 |
- econf "${myeconfargs[@]}" |
4283 |
- popd > /dev/null || die |
4284 |
- done |
4285 |
-} |
4286 |
- |
4287 |
-src_compile() { |
4288 |
- # snmp seems to run during src_compile, too (bug #324739) |
4289 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
4290 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
4291 |
- |
4292 |
- for sapi in ${SAPIS} ; do |
4293 |
- if use "${sapi}"; then |
4294 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
4295 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
4296 |
- emake |
4297 |
- fi |
4298 |
- done |
4299 |
-} |
4300 |
- |
4301 |
-src_install() { |
4302 |
- # see bug #324739 for what happens when we don't have that |
4303 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
4304 |
- |
4305 |
- # grab the first SAPI that got built and install common files from there |
4306 |
- local first_sapi="" |
4307 |
- for sapi in $SAPIS ; do |
4308 |
- if use $sapi ; then |
4309 |
- first_sapi=$sapi |
4310 |
- break |
4311 |
- fi |
4312 |
- done |
4313 |
- |
4314 |
- # Makefile forgets to create this before trying to write to it... |
4315 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
4316 |
- |
4317 |
- # Install php environment (without any sapis) |
4318 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
4319 |
- emake INSTALL_ROOT="${D}" \ |
4320 |
- install-build install-headers install-programs |
4321 |
- |
4322 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
4323 |
- |
4324 |
- # Create the directory where we'll put version-specific php scripts |
4325 |
- keepdir "/usr/share/php${PHP_MV}" |
4326 |
- |
4327 |
- local sapi="", file="" |
4328 |
- local sapi_list="" |
4329 |
- |
4330 |
- for sapi in ${SAPIS}; do |
4331 |
- if use "${sapi}" ; then |
4332 |
- einfo "Installing SAPI: ${sapi}" |
4333 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
4334 |
- |
4335 |
- if [[ "${sapi}" == "apache2" ]] ; then |
4336 |
- # We're specifically not using emake install-sapi as libtool |
4337 |
- # may cause unnecessary relink failures (see bug #351266) |
4338 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
4339 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
4340 |
- "libphp${PHP_MV}$(get_libname)" |
4341 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
4342 |
- else |
4343 |
- # needed each time, php_install_ini would reset it |
4344 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
4345 |
- into "${dest}" |
4346 |
- case "$sapi" in |
4347 |
- cli) |
4348 |
- source="sapi/cli/php" |
4349 |
- ;; |
4350 |
- cgi) |
4351 |
- source="sapi/cgi/php-cgi" |
4352 |
- ;; |
4353 |
- fpm) |
4354 |
- source="sapi/fpm/php-fpm" |
4355 |
- ;; |
4356 |
- embed) |
4357 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
4358 |
- ;; |
4359 |
- phpdbg) |
4360 |
- source="sapi/phpdbg/phpdbg" |
4361 |
- ;; |
4362 |
- *) |
4363 |
- die "unhandled sapi in src_install" |
4364 |
- ;; |
4365 |
- esac |
4366 |
- |
4367 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
4368 |
- dolib.so "${source}" |
4369 |
- else |
4370 |
- dobin "${source}" |
4371 |
- local name="$(basename ${source})" |
4372 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
4373 |
- fi |
4374 |
- fi |
4375 |
- |
4376 |
- php_install_ini "${sapi}" |
4377 |
- |
4378 |
- # construct correct SAPI string for php-config |
4379 |
- # thanks to ferringb for the bash voodoo |
4380 |
- if [[ "${sapi}" == "apache2" ]]; then |
4381 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
4382 |
- else |
4383 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
4384 |
- fi |
4385 |
- fi |
4386 |
- done |
4387 |
- |
4388 |
- # Installing opcache module |
4389 |
- if use opcache ; then |
4390 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
4391 |
- dolib.so "modules/opcache$(get_libname)" |
4392 |
- fi |
4393 |
- |
4394 |
- # Install env.d files |
4395 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
4396 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
4397 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
4398 |
- |
4399 |
- # set php-config variable correctly (bug #278439) |
4400 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
4401 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
4402 |
- |
4403 |
- if use fpm ; then |
4404 |
- if use systemd; then |
4405 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
4406 |
- "php-fpm@${SLOT}.service" |
4407 |
- else |
4408 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
4409 |
- "php-fpm@${SLOT}.service" |
4410 |
- fi |
4411 |
- fi |
4412 |
-} |
4413 |
- |
4414 |
-src_test() { |
4415 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
4416 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
4417 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
4418 |
- ewarn "Test phase requires USE=cli, skipping" |
4419 |
- return |
4420 |
- else |
4421 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
4422 |
- fi |
4423 |
- |
4424 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
4425 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
4426 |
- fi |
4427 |
- |
4428 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
4429 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
4430 |
- fi |
4431 |
- |
4432 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
4433 |
- "session.save_path=${T}" \ |
4434 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
4435 |
- "session.save_path=${T}" |
4436 |
- |
4437 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
4438 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
4439 |
- done |
4440 |
- |
4441 |
- local failed="$(find -name '*.out')" |
4442 |
- if [[ ${failed} != "" ]] ; then |
4443 |
- ewarn "The following test cases failed unexpectedly:" |
4444 |
- for name in ${failed}; do |
4445 |
- ewarn " ${name/.out/}" |
4446 |
- done |
4447 |
- else |
4448 |
- einfo "No unexpected test failures, all fine" |
4449 |
- fi |
4450 |
- |
4451 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
4452 |
- local passed="" |
4453 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
4454 |
- [[ -f "${name}.diff" ]] && continue |
4455 |
- passed="${passed} ${name}" |
4456 |
- done |
4457 |
- if [[ ${passed} != "" ]] ; then |
4458 |
- einfo "The following test cases passed unexpectedly:" |
4459 |
- for name in ${passed}; do |
4460 |
- ewarn " ${passed}" |
4461 |
- done |
4462 |
- else |
4463 |
- einfo "None of the known-to-fail tests passed, all fine" |
4464 |
- fi |
4465 |
- fi |
4466 |
-} |
4467 |
- |
4468 |
-pkg_postinst() { |
4469 |
- # Output some general info to the user |
4470 |
- if use apache2 ; then |
4471 |
- elog |
4472 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
4473 |
- elog "your apache2 command. OpenRC users can append that string to" |
4474 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
4475 |
- elog |
4476 |
- elog "The apache module configuration file 70_mod_php.conf is" |
4477 |
- elog "provided (and maintained) by eselect-php." |
4478 |
- elog |
4479 |
- fi |
4480 |
- |
4481 |
- # Create the symlinks for php |
4482 |
- for m in ${SAPIS}; do |
4483 |
- [[ ${m} == 'embed' ]] && continue; |
4484 |
- if use $m ; then |
4485 |
- local ci=$(eselect php show $m) |
4486 |
- if [[ -z $ci ]]; then |
4487 |
- eselect php set $m php${SLOT} || die |
4488 |
- einfo "Switched ${m} to use php:${SLOT}" |
4489 |
- einfo |
4490 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
4491 |
- elog "To switch $m to use php:${SLOT}, run" |
4492 |
- elog " eselect php set $m php${SLOT}" |
4493 |
- elog |
4494 |
- fi |
4495 |
- fi |
4496 |
- done |
4497 |
- |
4498 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
4499 |
- # example, if the user has the cgi SAPI enabled, then he has an |
4500 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
4501 |
- # USE="-cgi", that symlink will break. This call to eselect is |
4502 |
- # supposed to remove that dead link per bug 572436. |
4503 |
- eselect php cleanup || die |
4504 |
- |
4505 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
4506 |
- elog "To build extensions for this version of PHP, you will need to" |
4507 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
4508 |
- elog |
4509 |
- fi |
4510 |
- |
4511 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
4512 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
4513 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
4514 |
- ewarn 'remove it from your configuration at your convenience. See' |
4515 |
- ewarn |
4516 |
- ewarn ' https://bugs.gentoo.org/611214' |
4517 |
- ewarn |
4518 |
- ewarn 'for more information.' |
4519 |
- fi |
4520 |
- |
4521 |
- elog "For details on how version slotting works, please see" |
4522 |
- elog "the wiki:" |
4523 |
- elog |
4524 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
4525 |
- elog |
4526 |
-} |
4527 |
- |
4528 |
-pkg_postrm() { |
4529 |
- # This serves two purposes. First, if we have just removed the last |
4530 |
- # installed version of PHP, then this will remove any dead symlinks |
4531 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
4532 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
4533 |
- # his existing symlinks to point to the new 7.0 installation. The |
4534 |
- # latter is bug 432962. |
4535 |
- # |
4536 |
- # Note: the eselect-php package may not be installed at this point, |
4537 |
- # so we can't die() if this command fails. |
4538 |
- eselect php cleanup |
4539 |
-} |
4540 |
|
4541 |
diff --git a/dev-lang/php/php-7.4.0_rc4.ebuild b/dev-lang/php/php-7.4.0_rc4.ebuild |
4542 |
deleted file mode 100644 |
4543 |
index 2e7801342bf..00000000000 |
4544 |
--- a/dev-lang/php/php-7.4.0_rc4.ebuild |
4545 |
+++ /dev/null |
4546 |
@@ -1,724 +0,0 @@ |
4547 |
-# Copyright 1999-2019 Gentoo Authors |
4548 |
-# Distributed under the terms of the GNU General Public License v2 |
4549 |
- |
4550 |
-EAPI="7" |
4551 |
- |
4552 |
-WANT_AUTOMAKE="none" |
4553 |
- |
4554 |
-inherit flag-o-matic systemd autotools |
4555 |
- |
4556 |
-MY_PV=${PV/_rc/RC} |
4557 |
-DESCRIPTION="The PHP language runtime engine" |
4558 |
-HOMEPAGE="https://php.net/" |
4559 |
-SRC_URI="https://downloads.php.net/~derick/${PN}-${MY_PV}.tar.xz" |
4560 |
- |
4561 |
-LICENSE="PHP-3.01 |
4562 |
- BSD |
4563 |
- Zend-2.0 |
4564 |
- bcmath? ( LGPL-2.1+ ) |
4565 |
- fpm? ( BSD-2 ) |
4566 |
- gd? ( gd ) |
4567 |
- unicode? ( BSD-2 LGPL-2.1 )" |
4568 |
- |
4569 |
-SLOT="$(ver_cut 1-2)" |
4570 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
4571 |
- |
4572 |
-S="${WORKDIR}/${PN}-${MY_PV}" |
4573 |
- |
4574 |
-# We can build the following SAPIs in the given order |
4575 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
4576 |
- |
4577 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
4578 |
-IUSE="${IUSE} |
4579 |
- ${SAPIS/cli/+cli} |
4580 |
- threads" |
4581 |
- |
4582 |
-IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk |
4583 |
- coverage +ctype curl debug |
4584 |
- enchant exif ffi +fileinfo +filter firebird |
4585 |
- +flatfile ftp gd gdbm gmp +iconv imap inifile |
4586 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb |
4587 |
- mhash mssql mysql mysqli nls |
4588 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
4589 |
- readline selinux +session session-mm sharedmem |
4590 |
- +simplexml snmp soap sockets sodium spell sqlite ssl |
4591 |
- sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode webp |
4592 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
4593 |
- |
4594 |
-# The supported (that is, autodetected) versions of BDB are listed in |
4595 |
-# the ./configure script. Other versions *work*, but we need to stick to |
4596 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
4597 |
-COMMON_DEPEND=" |
4598 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
4599 |
- >=dev-libs/libpcre2-10.30[unicode] |
4600 |
- fpm? ( acl? ( sys-apps/acl ) ) |
4601 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
4602 |
- argon2? ( app-crypt/argon2:= ) |
4603 |
- berkdb? ( || ( sys-libs/db:5.3 |
4604 |
- sys-libs/db:5.1 |
4605 |
- sys-libs/db:4.8 |
4606 |
- sys-libs/db:4.7 |
4607 |
- sys-libs/db:4.6 |
4608 |
- sys-libs/db:4.5 ) ) |
4609 |
- bzip2? ( app-arch/bzip2:0= ) |
4610 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
4611 |
- coverage? ( dev-util/lcov ) |
4612 |
- curl? ( >=net-misc/curl-7.10.5 ) |
4613 |
- enchant? ( <app-text/enchant-2.0:0 ) |
4614 |
- ffi? ( >=virtual/libffi-3.0.11 ) |
4615 |
- firebird? ( dev-db/firebird ) |
4616 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= ) |
4617 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
4618 |
- gmp? ( dev-libs/gmp:0= ) |
4619 |
- iconv? ( virtual/libiconv ) |
4620 |
- imap? ( virtual/imap-c-client[kerberos=,ssl=] ) |
4621 |
- intl? ( dev-libs/icu:= ) |
4622 |
- kerberos? ( virtual/krb5 ) |
4623 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
4624 |
- ldap-sasl? ( dev-libs/cyrus-sasl ) |
4625 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
4626 |
- lmdb? ( dev-db/lmdb:= ) |
4627 |
- mssql? ( dev-db/freetds[mssql] ) |
4628 |
- nls? ( sys-devel/gettext ) |
4629 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
4630 |
- odbc? ( iodbc? ( dev-db/libiodbc ) !iodbc? ( >=dev-db/unixODBC-1.8.13 ) ) |
4631 |
- postgres? ( dev-db/postgresql:* ) |
4632 |
- qdbm? ( dev-db/qdbm ) |
4633 |
- readline? ( sys-libs/readline:0= ) |
4634 |
- session-mm? ( dev-libs/mm ) |
4635 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
4636 |
- sodium? ( dev-libs/libsodium:= ) |
4637 |
- spell? ( >=app-text/aspell-0.50 ) |
4638 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
4639 |
- ssl? ( |
4640 |
- !libressl? ( >=dev-libs/openssl-1.0.1:0= ) |
4641 |
- libressl? ( dev-libs/libressl:0= ) |
4642 |
- ) |
4643 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
4644 |
- tokyocabinet? ( dev-db/tokyocabinet ) |
4645 |
- truetype? ( =media-libs/freetype-2* ) |
4646 |
- unicode? ( dev-libs/oniguruma:= ) |
4647 |
- webp? ( media-libs/libwebp:0= ) |
4648 |
- xml? ( >=dev-libs/libxml2-2.7.6 ) |
4649 |
- xpm? ( x11-libs/libXpm ) |
4650 |
- xslt? ( dev-libs/libxslt ) |
4651 |
- zip? ( >=dev-libs/libzip-1.2.0:= ) |
4652 |
- zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) |
4653 |
-" |
4654 |
- |
4655 |
-RDEPEND="${COMMON_DEPEND} |
4656 |
- virtual/mta |
4657 |
- fpm? ( |
4658 |
- selinux? ( sec-policy/selinux-phpfpm ) |
4659 |
- systemd? ( sys-apps/systemd ) )" |
4660 |
- |
4661 |
-# Bison isn't actually needed when building from a release tarball |
4662 |
-# However, the configure script will warn if it's absent or if you |
4663 |
-# have an incompatible version installed. See bug 593278. |
4664 |
-DEPEND="${COMMON_DEPEND} |
4665 |
- app-arch/xz-utils |
4666 |
- >=sys-devel/bison-3.0.1" |
4667 |
- |
4668 |
-BDEPEND="virtual/pkgconfig" |
4669 |
- |
4670 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
4671 |
-REQUIRED_USE=" |
4672 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
4673 |
- cli? ( ^^ ( readline libedit ) ) |
4674 |
- !cli? ( ?? ( readline libedit ) ) |
4675 |
- truetype? ( gd zlib ) |
4676 |
- webp? ( gd zlib ) |
4677 |
- cjk? ( gd zlib ) |
4678 |
- exif? ( gd zlib ) |
4679 |
- xpm? ( gd zlib ) |
4680 |
- gd? ( zlib ) |
4681 |
- simplexml? ( xml ) |
4682 |
- soap? ( xml ) |
4683 |
- xmlrpc? ( xml iconv ) |
4684 |
- xmlreader? ( xml ) |
4685 |
- xmlwriter? ( xml ) |
4686 |
- xslt? ( xml ) |
4687 |
- ldap-sasl? ( ldap ) |
4688 |
- qdbm? ( !gdbm ) |
4689 |
- session-mm? ( session !threads ) |
4690 |
- mysql? ( || ( mysqli pdo ) ) |
4691 |
- firebird? ( pdo ) |
4692 |
- mssql? ( pdo ) |
4693 |
-" |
4694 |
- |
4695 |
-PHP_MV="$(ver_cut 1)" |
4696 |
- |
4697 |
-php_install_ini() { |
4698 |
- local phpsapi="${1}" |
4699 |
- |
4700 |
- # work out where we are installing the ini file |
4701 |
- php_set_ini_dir "${phpsapi}" |
4702 |
- |
4703 |
- # Always install the production INI file, bug 611214. |
4704 |
- local phpinisrc="php.ini-production-${phpsapi}" |
4705 |
- cp php.ini-production "${phpinisrc}" || die |
4706 |
- |
4707 |
- # default to /tmp for save_path, bug #282768 |
4708 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
4709 |
- |
4710 |
- # Set the extension dir |
4711 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
4712 |
- -i "${phpinisrc}" || die |
4713 |
- |
4714 |
- # Set the include path to point to where we want to find PEAR packages |
4715 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
4716 |
- |
4717 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
4718 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
4719 |
- newins "${phpinisrc}" php.ini |
4720 |
- |
4721 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
4722 |
- elog |
4723 |
- |
4724 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
4725 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
4726 |
- |
4727 |
- if use opcache; then |
4728 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
4729 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
4730 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
4731 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
4732 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
4733 |
- fi |
4734 |
- |
4735 |
- # SAPI-specific handling |
4736 |
- if [[ "${sapi}" == "fpm" ]] ; then |
4737 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
4738 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
4739 |
- doins sapi/fpm/php-fpm.conf |
4740 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
4741 |
- doins sapi/fpm/www.conf |
4742 |
- fi |
4743 |
- |
4744 |
- dodoc php.ini-{development,production} |
4745 |
-} |
4746 |
- |
4747 |
-php_set_ini_dir() { |
4748 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
4749 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
4750 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
4751 |
-} |
4752 |
- |
4753 |
-src_prepare() { |
4754 |
- default |
4755 |
- |
4756 |
- # In php-7.x, the FPM pool configuration files have been split off |
4757 |
- # of the main config. By default the pool config files go in |
4758 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
4759 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
4760 |
- # we'll install the pool configuration file "www.conf" there. |
4761 |
- php_set_ini_dir fpm |
4762 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
4763 |
- sapi/fpm/php-fpm.conf.in \ |
4764 |
- || die 'failed to move the include directory in php-fpm.conf' |
4765 |
- |
4766 |
- # Emulate buildconf to support cross-compilation |
4767 |
- rm -fr aclocal.m4 autom4te.cache config.cache \ |
4768 |
- configure main/php_config.h.in || die |
4769 |
- eautoconf --force |
4770 |
- eautoheader |
4771 |
-} |
4772 |
- |
4773 |
-src_configure() { |
4774 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
4775 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
4776 |
- |
4777 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
4778 |
- |
4779 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
4780 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
4781 |
- local our_conf=( |
4782 |
- --prefix="${PHP_DESTDIR}" |
4783 |
- --mandir="${PHP_DESTDIR}/man" |
4784 |
- --infodir="${PHP_DESTDIR}/info" |
4785 |
- --libdir="${PHP_DESTDIR}/lib" |
4786 |
- --with-libdir="$(get_libdir)" |
4787 |
- --localstatedir="${EPREFIX}/var" |
4788 |
- --without-pear |
4789 |
- $(use_enable threads maintainer-zts) |
4790 |
- ) |
4791 |
- |
4792 |
- our_conf+=( |
4793 |
- $(use_with argon2 password-argon2 "${EPREFIX}/usr") |
4794 |
- $(use_enable bcmath) |
4795 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
4796 |
- $(use_enable calendar) |
4797 |
- $(use_enable coverage gcov) |
4798 |
- $(use_enable ctype) |
4799 |
- $(use_with curl) |
4800 |
- $(use_enable xml dom) |
4801 |
- $(use_with enchant) |
4802 |
- $(use_enable exif) |
4803 |
- $(use_with ffi) |
4804 |
- $(use_enable fileinfo) |
4805 |
- $(use_enable filter) |
4806 |
- $(use_enable ftp) |
4807 |
- $(use_with nls gettext "${EPREFIX}/usr") |
4808 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
4809 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
4810 |
- $(use_with iconv iconv \ |
4811 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
4812 |
- $(use_enable intl) |
4813 |
- $(use_enable ipv6) |
4814 |
- $(use_enable json) |
4815 |
- $(use_with kerberos) |
4816 |
- $(use_with xml libxml) |
4817 |
- $(use_enable unicode mbstring) |
4818 |
- $(use_with ssl openssl) |
4819 |
- $(use_enable pcntl) |
4820 |
- $(use_enable phar) |
4821 |
- $(use_enable pdo) |
4822 |
- $(use_enable opcache) |
4823 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
4824 |
- $(use_enable posix) |
4825 |
- $(use_with spell pspell "${EPREFIX}/usr") |
4826 |
- $(use_enable simplexml) |
4827 |
- $(use_enable sharedmem shmop) |
4828 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
4829 |
- $(use_enable soap) |
4830 |
- $(use_enable sockets) |
4831 |
- $(use_with sodium) |
4832 |
- $(use_with sqlite sqlite3) |
4833 |
- $(use_enable sysvipc sysvmsg) |
4834 |
- $(use_enable sysvipc sysvsem) |
4835 |
- $(use_enable sysvipc sysvshm) |
4836 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
4837 |
- $(use_enable tokenizer) |
4838 |
- $(use_enable xml) |
4839 |
- $(use_enable xmlreader) |
4840 |
- $(use_enable xmlwriter) |
4841 |
- $(use_with xmlrpc) |
4842 |
- $(use_with xslt xsl) |
4843 |
- $(use_with zip) |
4844 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
4845 |
- $(use_enable debug) |
4846 |
- ) |
4847 |
- |
4848 |
- # DBA support |
4849 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
4850 |
- || use qdbm || use lmdb || use tokyocabinet ; then |
4851 |
- our_conf+=( "--enable-dba" ) |
4852 |
- fi |
4853 |
- |
4854 |
- # DBA drivers support |
4855 |
- our_conf+=( |
4856 |
- $(use_with cdb) |
4857 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
4858 |
- $(use_enable flatfile) |
4859 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
4860 |
- $(use_enable inifile) |
4861 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
4862 |
- $(use_with tokyocabinet tcadb "${EPREFIX}/usr") |
4863 |
- $(use_with lmdb lmdb "${EPREFIX}/usr") |
4864 |
- ) |
4865 |
- |
4866 |
- # Support for the GD graphics library |
4867 |
- our_conf+=( |
4868 |
- $(use_with truetype freetype) |
4869 |
- $(use_enable cjk gd-jis-conv) |
4870 |
- $(use_with gd jpeg) |
4871 |
- $(use_with xpm) |
4872 |
- $(use_with webp) |
4873 |
- ) |
4874 |
- # enable gd last, so configure can pick up the previous settings |
4875 |
- our_conf+=( $(use_enable gd) ) |
4876 |
- |
4877 |
- # IMAP support |
4878 |
- if use imap ; then |
4879 |
- our_conf+=( |
4880 |
- $(use_with imap imap "${EPREFIX}/usr") |
4881 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
4882 |
- ) |
4883 |
- fi |
4884 |
- |
4885 |
- # LDAP support |
4886 |
- if use ldap ; then |
4887 |
- our_conf+=( |
4888 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
4889 |
- $(use_with ldap-sasl) |
4890 |
- ) |
4891 |
- fi |
4892 |
- |
4893 |
- # MySQL support |
4894 |
- local mysqllib="mysqlnd" |
4895 |
- local mysqlilib="mysqlnd" |
4896 |
- |
4897 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
4898 |
- |
4899 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
4900 |
- if use mysql || use mysqli ; then |
4901 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
4902 |
- fi |
4903 |
- |
4904 |
- # ODBC support |
4905 |
- our_conf+=( |
4906 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
4907 |
- $(use_with iodbc) |
4908 |
- ) |
4909 |
- |
4910 |
- # Oracle support |
4911 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
4912 |
- |
4913 |
- # PDO support |
4914 |
- if use pdo ; then |
4915 |
- our_conf+=( |
4916 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
4917 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
4918 |
- $(use_with postgres pdo-pgsql) |
4919 |
- $(use_with sqlite pdo-sqlite) |
4920 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
4921 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
4922 |
- $(use_with oci8-instant-client pdo-oci) |
4923 |
- ) |
4924 |
- fi |
4925 |
- |
4926 |
- # readline/libedit support |
4927 |
- our_conf+=( |
4928 |
- $(use_with readline readline "${EPREFIX}/usr") |
4929 |
- $(use_with libedit) |
4930 |
- ) |
4931 |
- |
4932 |
- # Session support |
4933 |
- if use session ; then |
4934 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
4935 |
- else |
4936 |
- our_conf+=( $(use_enable session) ) |
4937 |
- fi |
4938 |
- |
4939 |
- # Use pic for shared modules such as apache2's mod_php |
4940 |
- our_conf+=( --with-pic ) |
4941 |
- |
4942 |
- # we use the system copy of pcre |
4943 |
- # --with-external-pcre affects ext/pcre |
4944 |
- # Many arches don't support pcre-jit |
4945 |
- our_conf+=( |
4946 |
- --with-external-pcre |
4947 |
- --without-pcre-jit |
4948 |
- ) |
4949 |
- |
4950 |
- # Catch CFLAGS problems |
4951 |
- # Fixes bug #14067. |
4952 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
4953 |
- replace-cpu-flags "k6*" "i586" |
4954 |
- |
4955 |
- # Cache the ./configure test results between SAPIs. |
4956 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
4957 |
- |
4958 |
- # Support user-passed configuration parameters |
4959 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
4960 |
- |
4961 |
- # Support the Apache2 extras, they must be set globally for all |
4962 |
- # SAPIs to work correctly, especially for external PHP extensions |
4963 |
- |
4964 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
4965 |
- for one_sapi in $SAPIS ; do |
4966 |
- use "${one_sapi}" || continue |
4967 |
- php_set_ini_dir "${one_sapi}" |
4968 |
- |
4969 |
- # The BUILD_DIR variable is used to determine where to output |
4970 |
- # the files that autotools creates. This was all originally |
4971 |
- # based on the autotools-utils eclass. |
4972 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
4973 |
- cp -a "${S}" "${BUILD_DIR}" || die |
4974 |
- cd "${BUILD_DIR}" || die |
4975 |
- |
4976 |
- local sapi_conf=( |
4977 |
- --with-config-file-path="${PHP_INI_DIR}" |
4978 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
4979 |
- ) |
4980 |
- |
4981 |
- for sapi in $SAPIS ; do |
4982 |
- case "$sapi" in |
4983 |
- cli|cgi|embed|fpm|phpdbg) |
4984 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
4985 |
- sapi_conf+=( "--enable-${sapi}" ) |
4986 |
- if [[ "fpm" == "${sapi}" ]] ; then |
4987 |
- sapi_conf+=( |
4988 |
- $(use_with acl fpm-acl) |
4989 |
- $(use_with systemd fpm-systemd) |
4990 |
- ) |
4991 |
- fi |
4992 |
- else |
4993 |
- sapi_conf+=( "--disable-${sapi}" ) |
4994 |
- fi |
4995 |
- ;; |
4996 |
- |
4997 |
- apache2) |
4998 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
4999 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
5000 |
- else |
5001 |
- sapi_conf+=( --without-apxs2 ) |
5002 |
- fi |
5003 |
- ;; |
5004 |
- esac |
5005 |
- done |
5006 |
- |
5007 |
- # Construct the $myeconfargs array by concatenating $our_conf |
5008 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
5009 |
- local myeconfargs=( "${our_conf[@]}" ) |
5010 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
5011 |
- |
5012 |
- pushd "${BUILD_DIR}" > /dev/null || die |
5013 |
- econf "${myeconfargs[@]}" |
5014 |
- popd > /dev/null || die |
5015 |
- done |
5016 |
-} |
5017 |
- |
5018 |
-src_compile() { |
5019 |
- # snmp seems to run during src_compile, too (bug #324739) |
5020 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
5021 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
5022 |
- |
5023 |
- for sapi in ${SAPIS} ; do |
5024 |
- if use "${sapi}"; then |
5025 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
5026 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
5027 |
- emake |
5028 |
- fi |
5029 |
- done |
5030 |
-} |
5031 |
- |
5032 |
-src_install() { |
5033 |
- # see bug #324739 for what happens when we don't have that |
5034 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
5035 |
- |
5036 |
- # grab the first SAPI that got built and install common files from there |
5037 |
- local first_sapi="" |
5038 |
- for sapi in $SAPIS ; do |
5039 |
- if use $sapi ; then |
5040 |
- first_sapi=$sapi |
5041 |
- break |
5042 |
- fi |
5043 |
- done |
5044 |
- |
5045 |
- # Makefile forgets to create this before trying to write to it... |
5046 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
5047 |
- |
5048 |
- # Install php environment (without any sapis) |
5049 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
5050 |
- emake INSTALL_ROOT="${D}" \ |
5051 |
- install-build install-headers install-programs |
5052 |
- |
5053 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
5054 |
- |
5055 |
- # Create the directory where we'll put version-specific php scripts |
5056 |
- keepdir "/usr/share/php${PHP_MV}" |
5057 |
- |
5058 |
- local sapi="", file="" |
5059 |
- local sapi_list="" |
5060 |
- |
5061 |
- for sapi in ${SAPIS}; do |
5062 |
- if use "${sapi}" ; then |
5063 |
- einfo "Installing SAPI: ${sapi}" |
5064 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
5065 |
- |
5066 |
- if [[ "${sapi}" == "apache2" ]] ; then |
5067 |
- # We're specifically not using emake install-sapi as libtool |
5068 |
- # may cause unnecessary relink failures (see bug #351266) |
5069 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
5070 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
5071 |
- "libphp${PHP_MV}$(get_libname)" |
5072 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
5073 |
- else |
5074 |
- # needed each time, php_install_ini would reset it |
5075 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
5076 |
- into "${dest}" |
5077 |
- case "$sapi" in |
5078 |
- cli) |
5079 |
- source="sapi/cli/php" |
5080 |
- ;; |
5081 |
- cgi) |
5082 |
- source="sapi/cgi/php-cgi" |
5083 |
- ;; |
5084 |
- fpm) |
5085 |
- source="sapi/fpm/php-fpm" |
5086 |
- ;; |
5087 |
- embed) |
5088 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
5089 |
- ;; |
5090 |
- phpdbg) |
5091 |
- source="sapi/phpdbg/phpdbg" |
5092 |
- ;; |
5093 |
- *) |
5094 |
- die "unhandled sapi in src_install" |
5095 |
- ;; |
5096 |
- esac |
5097 |
- |
5098 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
5099 |
- dolib.so "${source}" |
5100 |
- else |
5101 |
- dobin "${source}" |
5102 |
- local name="$(basename ${source})" |
5103 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
5104 |
- fi |
5105 |
- fi |
5106 |
- |
5107 |
- php_install_ini "${sapi}" |
5108 |
- |
5109 |
- # construct correct SAPI string for php-config |
5110 |
- # thanks to ferringb for the bash voodoo |
5111 |
- if [[ "${sapi}" == "apache2" ]]; then |
5112 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
5113 |
- else |
5114 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
5115 |
- fi |
5116 |
- fi |
5117 |
- done |
5118 |
- |
5119 |
- # Installing opcache module |
5120 |
- if use opcache ; then |
5121 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
5122 |
- dolib.so "modules/opcache$(get_libname)" |
5123 |
- fi |
5124 |
- |
5125 |
- # Install env.d files |
5126 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
5127 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
5128 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
5129 |
- |
5130 |
- # set php-config variable correctly (bug #278439) |
5131 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
5132 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
5133 |
- |
5134 |
- if use fpm ; then |
5135 |
- if use systemd; then |
5136 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
5137 |
- "php-fpm@${SLOT}.service" |
5138 |
- else |
5139 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
5140 |
- "php-fpm@${SLOT}.service" |
5141 |
- fi |
5142 |
- fi |
5143 |
-} |
5144 |
- |
5145 |
-src_test() { |
5146 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
5147 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
5148 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
5149 |
- ewarn "Test phase requires USE=cli, skipping" |
5150 |
- return |
5151 |
- else |
5152 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
5153 |
- fi |
5154 |
- |
5155 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
5156 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
5157 |
- fi |
5158 |
- |
5159 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
5160 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
5161 |
- fi |
5162 |
- |
5163 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
5164 |
- "session.save_path=${T}" \ |
5165 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
5166 |
- "session.save_path=${T}" |
5167 |
- |
5168 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
5169 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
5170 |
- done |
5171 |
- |
5172 |
- local failed="$(find -name '*.out')" |
5173 |
- if [[ ${failed} != "" ]] ; then |
5174 |
- ewarn "The following test cases failed unexpectedly:" |
5175 |
- for name in ${failed}; do |
5176 |
- ewarn " ${name/.out/}" |
5177 |
- done |
5178 |
- else |
5179 |
- einfo "No unexpected test failures, all fine" |
5180 |
- fi |
5181 |
- |
5182 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
5183 |
- local passed="" |
5184 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
5185 |
- [[ -f "${name}.diff" ]] && continue |
5186 |
- passed="${passed} ${name}" |
5187 |
- done |
5188 |
- if [[ ${passed} != "" ]] ; then |
5189 |
- einfo "The following test cases passed unexpectedly:" |
5190 |
- for name in ${passed}; do |
5191 |
- ewarn " ${passed}" |
5192 |
- done |
5193 |
- else |
5194 |
- einfo "None of the known-to-fail tests passed, all fine" |
5195 |
- fi |
5196 |
- fi |
5197 |
-} |
5198 |
- |
5199 |
-pkg_postinst() { |
5200 |
- # Output some general info to the user |
5201 |
- if use apache2 ; then |
5202 |
- elog |
5203 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
5204 |
- elog "your apache2 command. OpenRC users can append that string to" |
5205 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
5206 |
- elog |
5207 |
- elog "The apache module configuration file 70_mod_php.conf is" |
5208 |
- elog "provided (and maintained) by eselect-php." |
5209 |
- elog |
5210 |
- fi |
5211 |
- |
5212 |
- # Create the symlinks for php |
5213 |
- for m in ${SAPIS}; do |
5214 |
- [[ ${m} == 'embed' ]] && continue; |
5215 |
- if use $m ; then |
5216 |
- local ci=$(eselect php show $m) |
5217 |
- if [[ -z $ci ]]; then |
5218 |
- eselect php set $m php${SLOT} || die |
5219 |
- einfo "Switched ${m} to use php:${SLOT}" |
5220 |
- einfo |
5221 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
5222 |
- elog "To switch $m to use php:${SLOT}, run" |
5223 |
- elog " eselect php set $m php${SLOT}" |
5224 |
- elog |
5225 |
- fi |
5226 |
- fi |
5227 |
- done |
5228 |
- |
5229 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
5230 |
- # example, if the user has the cgi SAPI enabled, then he has an |
5231 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
5232 |
- # USE="-cgi", that symlink will break. This call to eselect is |
5233 |
- # supposed to remove that dead link per bug 572436. |
5234 |
- eselect php cleanup || die |
5235 |
- |
5236 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
5237 |
- elog "To build extensions for this version of PHP, you will need to" |
5238 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
5239 |
- elog |
5240 |
- fi |
5241 |
- |
5242 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
5243 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
5244 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
5245 |
- ewarn 'remove it from your configuration at your convenience. See' |
5246 |
- ewarn |
5247 |
- ewarn ' https://bugs.gentoo.org/611214' |
5248 |
- ewarn |
5249 |
- ewarn 'for more information.' |
5250 |
- fi |
5251 |
- |
5252 |
- elog "For details on how version slotting works, please see" |
5253 |
- elog "the wiki:" |
5254 |
- elog |
5255 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
5256 |
- elog |
5257 |
-} |
5258 |
- |
5259 |
-pkg_postrm() { |
5260 |
- # This serves two purposes. First, if we have just removed the last |
5261 |
- # installed version of PHP, then this will remove any dead symlinks |
5262 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
5263 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
5264 |
- # his existing symlinks to point to the new 7.0 installation. The |
5265 |
- # latter is bug 432962. |
5266 |
- # |
5267 |
- # Note: the eselect-php package may not be installed at this point, |
5268 |
- # so we can't die() if this command fails. |
5269 |
- eselect php cleanup |
5270 |
-} |