1 |
commit: 44bfa712323f669f42db3b6c41176a0df9155640 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 5 14:16:21 2016 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 5 14:16:21 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44bfa712 |
7 |
|
8 |
dev-lang/php: Drop PHP 5.4 slot which has been EOL for 6 months |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
dev-lang/php/Manifest | 2 - |
13 |
dev-lang/php/php-5.4.45.ebuild | 802 ----------------------------------------- |
14 |
2 files changed, 804 deletions(-) |
15 |
|
16 |
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest |
17 |
index fb54636..9a55cdb 100644 |
18 |
--- a/dev-lang/php/Manifest |
19 |
+++ b/dev-lang/php/Manifest |
20 |
@@ -1,4 +1,3 @@ |
21 |
-DIST php-5.4.45.tar.bz2 12703324 SHA256 4e0d28b1554c95cfaea6fa2b64aac85433f158ce72bb571bcd5574f98f4c6582 SHA512 ba22207da70e5e8ddf9a1f41bbeb54ef4917630006c3412db8f858782baaa3ff49d7e5ca59bed76c37fc11dc518c475b81f33f0f32c533c8f00be338e0b0d9c5 WHIRLPOOL b34e465dd193e9c1f5dedd7c6f279bb10471e31120f2a84246927f160adb1e54ea56563c719e59ed0654e2fd0805cebcc00198d6f6153791edef52fd0f2288a7 |
22 |
DIST php-5.5.33.tar.bz2 13686486 SHA256 c490b1ed4df596b48eb68f630d89ca512945e2650840e7dace1119cc7e600aa9 SHA512 a0ac57adcc4b0caec153265a8d1ded8d4d0f71b44f08158feb0add9c8fdd36826767882e85dd03399cf146800eddcb6b6cc1b21051d4fc4371e3f61b1169132b WHIRLPOOL 373c61677adb89506cc4621d1c7a0732f6454a8679a797807631f2286188bb990dfcaf34b4108edf7b1819424100fa0d7060f0f792a65dc5f1c130cfa00e6b45 |
23 |
DIST php-5.5.34.tar.bz2 13686681 SHA256 af88884416a92619de842ad0fd23f7f7e8140efb0b9194f98a38a78781e5851c SHA512 c4269f79f5acaac64e9d2e20feef4bbd5aa7a84e69445dee64bf068197d611aa8ceb3697ae6461d8c96068be7839f22eeaff61f201f6e7a8749d284eaa68c0f8 WHIRLPOOL f4771f614176242a9a3e27185c98822493ca1b1982b5b11b3ee53d952534c69a73e0625b589723cc153da0978b27a8e55c7f9056b81b7a282dc385d22f4fdf02 |
24 |
DIST php-5.5.35.tar.bz2 13690152 SHA256 2d648dd648e820fd64693ce72f9bf07064d147220e594e39fb9f6310238258d7 SHA512 cfa62f83cd79b678c55ffdb1325906962bb7dae23fdbe963d57c3b24d13223229448f4c45727df1ab042bbd2db85804051c66993c28c68c0c873481cfe7e6834 WHIRLPOOL e7b765b6d99e7f9c0e18cae64577d0e7e7eb136debf565f49ab02a962046437064f810d1a407546e2f83d69cfb3104244424ae5a34bc83c3778aaff95984a9f7 |
25 |
@@ -6,4 +5,3 @@ DIST php-5.6.19.tar.bz2 14100438 SHA256 2a24a3f84971680ac0a4c71050067de4f76ee235 |
26 |
DIST php-5.6.20.tar.bz2 14162188 SHA256 5ac7bf7caec7a79b18cf458e786fd1609ad2da771224b80bc15cc6f01b22bf1f SHA512 9e26f2564ee7329ab50d4d8d27f029c4f88317ea761888138e60d13a3cf51e49676ded406a3ec18433be2ec5d2a49c904eaa9f32d473b99d11550025e026a61c WHIRLPOOL 679c8ee4b3ddf18d94598982969fd12d053493fbe70d4b9f8d3eda4ed9ab0bb6f83d912bb7f8ebd99264beea992cce7c1083d257576551fadf537b5655d23d57 |
27 |
DIST php-5.6.21.tar.bz2 14165919 SHA256 b4ed7ab574b689fd6d6494fde954826c06efc85c505e017b8d776c7c7f479590 SHA512 028d62434e7932b4a07fa7d404b8ad938f0ca7968ae2b23386038f77482984d2b6145523e11f37b9e72621c8bf40f08e38a6db1d209493770ac99e13e2fac0d0 WHIRLPOOL e5e606f0a3df1af12c9c0148a29336de0d00a8d7cedbb42727a3e1b6a700e0dcda63c7086e59f175ec060cbf910c2b12815ae3c08bb73d43a84b4f3aaa5d2ed6 |
28 |
DIST php-7.0.6.tar.bz2 14102594 SHA256 14ddf192a9965c858c1e742a61456be2f34a4db87556172c0d76f08de96329b7 SHA512 7f44cc5df3b9bb4394ac39069fdc2993086dd8e159e97275bf5fa4dd399d416e9ea1b057cdf855bae1c0f9c2129af1914495d9d2512ce90a7dd3ce4206aa9286 WHIRLPOOL dfb19b2bee5ea79fc08039544c350e58b329f439fb21b0b75d3b83ae151f449678614fad76829b5d86b885423fe6e1b21622f58aa598c6450732f164ae596b1b |
29 |
-DIST php-patchset-5.4-r2.tar.bz2 5824 SHA256 4a47f4d31f50a244f85349486cdb3474cf315562e097ed4c116c2b9b5730ecef SHA512 3c2523458a627373da7acb93fb2cd621f50b19fe2ba1d30beb62eeaaa39045262b917cfd0b631046fec9c8027cfa99bd0426a079ab45eb172b21d25d6e085dde WHIRLPOOL fe4f015e2f0dc66cc23ef16fb5bb33117952593ae0770d4bcd37ecc1c431cbcc7874189d265696305c60b4e395e7ce902667e38203db46867304868271affdea |
30 |
|
31 |
diff --git a/dev-lang/php/php-5.4.45.ebuild b/dev-lang/php/php-5.4.45.ebuild |
32 |
deleted file mode 100644 |
33 |
index 1f6f585..0000000 |
34 |
--- a/dev-lang/php/php-5.4.45.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,802 +0,0 @@ |
37 |
-# Copyright 1999-2015 Gentoo Foundation |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
-# $Id$ |
40 |
- |
41 |
-EAPI=5 |
42 |
- |
43 |
-inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd |
44 |
- |
45 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
46 |
- |
47 |
-function php_get_uri () |
48 |
-{ |
49 |
- case "${1}" in |
50 |
- "php-pre") |
51 |
- echo "http://downloads.php.net/stas/${2}" |
52 |
- ;; |
53 |
- "php") |
54 |
- echo "http://www.php.net/distributions/${2}" |
55 |
- ;; |
56 |
- "olemarkus") |
57 |
- echo "https://dev.gentoo.org/~olemarkus/php/${2}" |
58 |
- ;; |
59 |
- "gentoo") |
60 |
- echo "mirror://gentoo/${2}" |
61 |
- ;; |
62 |
- *) |
63 |
- die "unhandled case in php_get_uri" |
64 |
- ;; |
65 |
- esac |
66 |
-} |
67 |
- |
68 |
-PHP_MV="$(get_major_version)" |
69 |
-SLOT="$(get_version_component_range 1-2)" |
70 |
- |
71 |
-# alias, so we can handle different types of releases (finals, rcs, alphas, |
72 |
-# betas, ...) w/o changing the whole ebuild |
73 |
-PHP_PV="${PV/_rc/RC}" |
74 |
-PHP_PV="${PHP_PV/_alpha/alpha}" |
75 |
-PHP_PV="${PHP_PV/_beta/beta}" |
76 |
-PHP_RELEASE="php" |
77 |
-[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre" |
78 |
-[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre" |
79 |
-[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre" |
80 |
-PHP_P="${PN}-${PHP_PV}" |
81 |
- |
82 |
-PHP_PATCHSET_LOC="olemarkus" |
83 |
- |
84 |
-PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")" |
85 |
- |
86 |
-PHP_PATCHSET="2" |
87 |
-PHP_PATCHSET_URI=" |
88 |
- $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${SLOT}-r${PHP_PATCHSET}.tar.bz2")" |
89 |
- |
90 |
-PHP_FPM_INIT_VER="4" |
91 |
-PHP_FPM_CONF_VER="1" |
92 |
- |
93 |
-SRC_URI=" |
94 |
- ${PHP_SRC_URI} |
95 |
- ${PHP_PATCHSET_URI}" |
96 |
- |
97 |
-DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs" |
98 |
-HOMEPAGE="http://php.net/" |
99 |
-LICENSE="PHP-3" |
100 |
- |
101 |
-S="${WORKDIR}/${PHP_P}" |
102 |
- |
103 |
-# We can build the following SAPIs in the given order |
104 |
-SAPIS="embed cli cgi fpm apache2" |
105 |
- |
106 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
107 |
-IUSE="${IUSE} |
108 |
- ${SAPIS/cli/+cli} |
109 |
- threads" |
110 |
- |
111 |
-IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk |
112 |
- crypt +ctype curl curlwrappers debug |
113 |
- enchant exif +fileinfo +filter firebird |
114 |
- flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
115 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash |
116 |
- mssql mysql mysqlnd mysqli nls |
117 |
- oci8-instant-client odbc pcntl pdo +phar +posix postgres qdbm |
118 |
- readline recode selinux +session sharedmem |
119 |
- +simplexml snmp soap sockets spell sqlite ssl |
120 |
- sybase-ct sysvipc systemd tidy +tokenizer truetype unicode wddx |
121 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
122 |
- |
123 |
-DEPEND=" |
124 |
- >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?] |
125 |
- >=dev-libs/libpcre-8.32[unicode] |
126 |
- apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=] |
127 |
- <www-servers/apache-2.4[threads=] ) ) |
128 |
- berkdb? ( =sys-libs/db-4* ) |
129 |
- bzip2? ( app-arch/bzip2 ) |
130 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
131 |
- cjk? ( !gd? ( |
132 |
- virtual/jpeg:0 |
133 |
- media-libs/libpng:0= |
134 |
- sys-libs/zlib |
135 |
- ) ) |
136 |
- crypt? ( >=dev-libs/libmcrypt-2.4 ) |
137 |
- curl? ( >=net-misc/curl-7.10.5 ) |
138 |
- enchant? ( app-text/enchant ) |
139 |
- exif? ( !gd? ( |
140 |
- virtual/jpeg:0 |
141 |
- media-libs/libpng:0= |
142 |
- sys-libs/zlib |
143 |
- ) ) |
144 |
- firebird? ( dev-db/firebird ) |
145 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
146 |
- gdbm? ( >=sys-libs/gdbm-1.8.0 ) |
147 |
- gmp? ( >=dev-libs/gmp-4.1.2 ) |
148 |
- iconv? ( virtual/libiconv ) |
149 |
- imap? ( virtual/imap-c-client[ssl=] ) |
150 |
- intl? ( dev-libs/icu:= ) |
151 |
- iodbc? ( dev-db/libiodbc ) |
152 |
- kerberos? ( virtual/krb5 ) |
153 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
154 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
155 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
156 |
- mssql? ( dev-db/freetds[mssql] ) |
157 |
- !mysqlnd? ( |
158 |
- mysql? ( virtual/mysql ) |
159 |
- mysqli? ( >=virtual/mysql-4.1 ) |
160 |
- ) |
161 |
- nls? ( sys-devel/gettext ) |
162 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
163 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
164 |
- postgres? ( dev-db/postgresql ) |
165 |
- qdbm? ( dev-db/qdbm ) |
166 |
- readline? ( sys-libs/readline ) |
167 |
- recode? ( app-text/recode ) |
168 |
- sharedmem? ( dev-libs/mm ) |
169 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
170 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
171 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
172 |
- spell? ( >=app-text/aspell-0.50 ) |
173 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
174 |
- ssl? ( >=dev-libs/openssl-0.9.7 ) |
175 |
- sybase-ct? ( dev-db/freetds ) |
176 |
- tidy? ( app-text/htmltidy ) |
177 |
- truetype? ( |
178 |
- =media-libs/freetype-2* |
179 |
- >=media-libs/t1lib-5.0.0 |
180 |
- !gd? ( |
181 |
- virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
182 |
- ) |
183 |
- unicode? ( dev-libs/oniguruma ) |
184 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
185 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
186 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
187 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
188 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
189 |
- xpm? ( |
190 |
- x11-libs/libXpm |
191 |
- virtual/jpeg:0 |
192 |
- media-libs/libpng:0= sys-libs/zlib |
193 |
- ) |
194 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
195 |
- zip? ( sys-libs/zlib ) |
196 |
- zlib? ( sys-libs/zlib ) |
197 |
- virtual/mta |
198 |
-" |
199 |
- |
200 |
-php="=${CATEGORY}/${PF}" |
201 |
- |
202 |
-REQUIRED_USE=" |
203 |
- truetype? ( gd ) |
204 |
- cjk? ( gd ) |
205 |
- exif? ( gd ) |
206 |
- |
207 |
- xpm? ( gd ) |
208 |
- gd? ( zlib ) |
209 |
- simplexml? ( xml ) |
210 |
- soap? ( xml ) |
211 |
- wddx? ( xml ) |
212 |
- xmlrpc? ( || ( xml iconv ) ) |
213 |
- xmlreader? ( xml ) |
214 |
- xslt? ( xml ) |
215 |
- ldap-sasl? ( ldap ) |
216 |
- mhash? ( hash ) |
217 |
- phar? ( hash ) |
218 |
- mysqlnd? ( || ( |
219 |
- mysql |
220 |
- mysqli |
221 |
- pdo |
222 |
- ) ) |
223 |
- |
224 |
- qdbm? ( !gdbm ) |
225 |
- readline? ( !libedit ) |
226 |
- recode? ( !imap !mysql !mysqli ) |
227 |
- sharedmem? ( !threads ) |
228 |
- |
229 |
- !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )" |
230 |
- |
231 |
-RDEPEND="${DEPEND}" |
232 |
- |
233 |
-RDEPEND="${RDEPEND} |
234 |
- fpm? ( |
235 |
- selinux? ( sec-policy/selinux-phpfpm ) |
236 |
- systemd? ( sys-apps/systemd ) )" |
237 |
- |
238 |
-DEPEND="${DEPEND} |
239 |
- sys-devel/flex |
240 |
- >=sys-devel/m4-1.4.3 |
241 |
- >=sys-devel/libtool-1.5.18" |
242 |
- |
243 |
-# Allow users to install production version if they want to |
244 |
- |
245 |
-case "${PHP_INI_VERSION}" in |
246 |
- production|development) |
247 |
- ;; |
248 |
- *) |
249 |
- PHP_INI_VERSION="development" |
250 |
- ;; |
251 |
-esac |
252 |
- |
253 |
-PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}" |
254 |
-PHP_INI_FILE="php.ini" |
255 |
- |
256 |
-want_apache |
257 |
- |
258 |
-pkg_setup() { |
259 |
- depend.apache_pkg_setup |
260 |
-} |
261 |
- |
262 |
-php_install_ini() { |
263 |
- local phpsapi="${1}" |
264 |
- |
265 |
- # work out where we are installing the ini file |
266 |
- php_set_ini_dir "${phpsapi}" |
267 |
- |
268 |
- local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}" |
269 |
- cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" |
270 |
- |
271 |
- # default to /tmp for save_path, bug #282768 |
272 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" |
273 |
- |
274 |
- # Set the extension dir |
275 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" |
276 |
- |
277 |
- # Set the include path to point to where we want to find PEAR packages |
278 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" |
279 |
- |
280 |
- if use_if_iuse opcache; then |
281 |
- elog "Adding opcache to ${phpinisrc}" |
282 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> ${phpinisrc} |
283 |
- fi |
284 |
- |
285 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
286 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
287 |
- newins "${phpinisrc}" "${PHP_INI_FILE}" |
288 |
- |
289 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
290 |
- elog |
291 |
- |
292 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
293 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
294 |
- |
295 |
- # SAPI-specific handling |
296 |
- |
297 |
- if [[ "${sapi}" == "fpm" ]] ; then |
298 |
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0 |
299 |
- einfo "Installing FPM CGI config file php-fpm.conf" |
300 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
301 |
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf |
302 |
- |
303 |
- # Remove bogus /etc/php-fpm.conf.default (bug 359906) |
304 |
- [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default" |
305 |
- fi |
306 |
- |
307 |
- # Install PHP ini files into /usr/share/php |
308 |
- |
309 |
- dodoc php.ini-development |
310 |
- dodoc php.ini-production |
311 |
- |
312 |
-} |
313 |
- |
314 |
-php_set_ini_dir() { |
315 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
316 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
317 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
318 |
-} |
319 |
- |
320 |
-src_prepare() { |
321 |
- # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path |
322 |
- # ([empty session.save_path]/session_mm_[sapi][gid].sem) |
323 |
- # there is no easy way to circumvent that, all php calls during |
324 |
- # install use -n, so no php.ini file will be used. |
325 |
- # As such, this is the easiest way to get around |
326 |
- addpredict /session_mm_cli250.sem |
327 |
- addpredict /session_mm_cli0.sem |
328 |
- |
329 |
- # Change PHP branding |
330 |
- # Get the alpha/beta/rc version |
331 |
- sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \ |
332 |
- -i configure.in || die "Unable to change PHP branding" |
333 |
- |
334 |
- # Patch PHP to show Gentoo as the server platform |
335 |
- sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \ |
336 |
- -i configure.in || die "Failed to fix server platform name" |
337 |
- |
338 |
- # Prevent PHP from activating the Apache config, |
339 |
- # as we will do that ourselves |
340 |
- sed -i \ |
341 |
- -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
342 |
- -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
343 |
- configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 |
344 |
- |
345 |
- # Patch PHP to support heimdal instead of mit-krb5 |
346 |
- if has_version "app-crypt/heimdal" ; then |
347 |
- sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \ |
348 |
- || die "Failed to fix heimdal libname" |
349 |
- sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \ |
350 |
- || die "Failed to fix heimdal crypt library reference" |
351 |
- fi |
352 |
- |
353 |
- #Add user patches #357637 |
354 |
- epatch_user |
355 |
- |
356 |
- #force rebuilding aclocal.m4 |
357 |
- rm aclocal.m4 |
358 |
- eautoreconf |
359 |
- |
360 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
361 |
- # http://bugs.php.net/bug.php?id=48795, bug #343481 |
362 |
- sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die |
363 |
- fi |
364 |
-} |
365 |
- |
366 |
-src_configure() { |
367 |
- addpredict /usr/share/snmp/mibs/.index |
368 |
- addpredict /var/lib/net-snmp/mib_indexes |
369 |
- |
370 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
371 |
- |
372 |
- # This is a global variable and should be in caps. It isn't because the |
373 |
- # phpconfutils eclass relies on exactly this name... |
374 |
- # for --with-libdir see bug #327025 |
375 |
- my_conf=" |
376 |
- --prefix="${PHP_DESTDIR}" |
377 |
- --mandir="${PHP_DESTDIR}"/man |
378 |
- --infodir="${PHP_DESTDIR}"/info |
379 |
- --libdir="${PHP_DESTDIR}"/lib |
380 |
- --with-libdir=$(get_libdir) |
381 |
- --without-pear |
382 |
- $(use_enable threads maintainer-zts)" |
383 |
- |
384 |
- # extension USE flag shared |
385 |
- my_conf+=" |
386 |
- $(use_enable bcmath bcmath ) |
387 |
- $(use_with bzip2 bz2 "${EPREFIX}"/usr) |
388 |
- $(use_enable calendar calendar ) |
389 |
- $(use_enable ctype ctype ) |
390 |
- $(use_with curl curl "${EPREFIX}"/usr) |
391 |
- $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr) |
392 |
- $(use_enable xml dom ) |
393 |
- $(use_with enchant enchant "${EPREFIX}"/usr) |
394 |
- $(use_enable exif exif ) |
395 |
- $(use_enable fileinfo fileinfo ) |
396 |
- $(use_enable filter filter ) |
397 |
- $(use_enable ftp ftp ) |
398 |
- $(use_with nls gettext "${EPREFIX}"/usr) |
399 |
- $(use_with gmp gmp "${EPREFIX}"/usr) |
400 |
- $(use_enable hash hash ) |
401 |
- $(use_with mhash mhash "${EPREFIX}"/usr) |
402 |
- $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr)) |
403 |
- $(use_enable intl intl ) |
404 |
- $(use_enable ipv6 ipv6 ) |
405 |
- $(use_enable json json ) |
406 |
- $(use_with kerberos kerberos "${EPREFIX}"/usr) |
407 |
- $(use_enable xml libxml ) |
408 |
- $(use_with xml libxml-dir "${EPREFIX}"/usr) |
409 |
- $(use_enable unicode mbstring ) |
410 |
- $(use_with crypt mcrypt "${EPREFIX}"/usr) |
411 |
- $(use_with mssql mssql "${EPREFIX}"/usr) |
412 |
- $(use_with unicode onig "${EPREFIX}"/usr) |
413 |
- $(use_with ssl openssl "${EPREFIX}"/usr) |
414 |
- $(use_with ssl openssl-dir "${EPREFIX}"/usr) |
415 |
- $(use_enable pcntl pcntl ) |
416 |
- $(use_enable phar phar ) |
417 |
- $(use_enable pdo pdo ) |
418 |
- $(use_with postgres pgsql "${EPREFIX}"/usr) |
419 |
- $(use_enable posix posix ) |
420 |
- $(use_with spell pspell "${EPREFIX}"/usr) |
421 |
- $(use_with recode recode "${EPREFIX}"/usr) |
422 |
- $(use_enable simplexml simplexml ) |
423 |
- $(use_enable sharedmem shmop ) |
424 |
- $(use_with snmp snmp "${EPREFIX}"/usr) |
425 |
- $(use_enable soap soap ) |
426 |
- $(use_enable sockets sockets ) |
427 |
- $(use_with sqlite sqlite3 "${EPREFIX}"/usr) |
428 |
- $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr) |
429 |
- $(use_enable sysvipc sysvmsg ) |
430 |
- $(use_enable sysvipc sysvsem ) |
431 |
- $(use_enable sysvipc sysvshm ) |
432 |
- $(use_with systemd fpm-systemd) |
433 |
- $(use_with tidy tidy "${EPREFIX}"/usr) |
434 |
- $(use_enable tokenizer tokenizer ) |
435 |
- $(use_enable wddx wddx ) |
436 |
- $(use_enable xml xml ) |
437 |
- $(use_enable xmlreader xmlreader ) |
438 |
- $(use_enable xmlwriter xmlwriter ) |
439 |
- $(use_with xmlrpc xmlrpc) |
440 |
- $(use_with xslt xsl "${EPREFIX}"/usr) |
441 |
- $(use_enable zip zip ) |
442 |
- $(use_with zlib zlib "${EPREFIX}"/usr) |
443 |
- $(use_enable debug debug )" |
444 |
- |
445 |
- # DBA support |
446 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
447 |
- || use qdbm ; then |
448 |
- my_conf="${my_conf} --enable-dba${shared}" |
449 |
- fi |
450 |
- |
451 |
- # DBA drivers support |
452 |
- my_conf+=" |
453 |
- $(use_with cdb cdb) |
454 |
- $(use_with berkdb db4 ${EPREFIX}/usr) |
455 |
- $(use_enable flatfile flatfile ) |
456 |
- $(use_with gdbm gdbm ${EPREFIX}/usr) |
457 |
- $(use_enable inifile inifile ) |
458 |
- $(use_with qdbm qdbm ${EPREFIX}/usr)" |
459 |
- |
460 |
- # Support for the GD graphics library |
461 |
- my_conf+=" |
462 |
- $(use_with truetype freetype-dir ${EPREFIX}/usr) |
463 |
- $(use_with truetype t1lib ${EPREFIX}/usr) |
464 |
- $(use_enable cjk gd-jis-conv ) |
465 |
- $(use_with gd jpeg-dir ${EPREFIX}/usr) |
466 |
- $(use_with gd png-dir ${EPREFIX}/usr) |
467 |
- $(use_with xpm xpm-dir ${EPREFIX}/usr)" |
468 |
- # enable gd last, so configure can pick up the previous settings |
469 |
- my_conf+=" |
470 |
- $(use_with gd gd)" |
471 |
- |
472 |
- # IMAP support |
473 |
- if use imap ; then |
474 |
- my_conf+=" |
475 |
- $(use_with imap imap ${EPREFIX}/usr) |
476 |
- $(use_with ssl imap-ssl ${EPREFIX}/usr)" |
477 |
- fi |
478 |
- |
479 |
- # Interbase/firebird support |
480 |
- |
481 |
- if use firebird ; then |
482 |
- my_conf+=" |
483 |
- $(use_with firebird interbase ${EPREFIX}/usr)" |
484 |
- fi |
485 |
- |
486 |
- # LDAP support |
487 |
- if use ldap ; then |
488 |
- my_conf+=" |
489 |
- $(use_with ldap ldap ${EPREFIX}/usr) |
490 |
- $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)" |
491 |
- fi |
492 |
- |
493 |
- # MySQL support |
494 |
- if use mysql ; then |
495 |
- if use mysqlnd ; then |
496 |
- my_conf+=" |
497 |
- $(use_with mysql mysql mysqlnd)" |
498 |
- else |
499 |
- my_conf+=" |
500 |
- $(use_with mysql mysql ${EPREFIX}/usr)" |
501 |
- fi |
502 |
- my_conf+=" |
503 |
- $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)" |
504 |
- fi |
505 |
- |
506 |
- # MySQLi support |
507 |
- if use mysqlnd ; then |
508 |
- my_conf+=" |
509 |
- $(use_with mysqli mysqli mysqlnd)" |
510 |
- else |
511 |
- my_conf+=" |
512 |
- $(use_with mysqli mysqli ${EPREFIX}/usr/bin/mysql_config)" |
513 |
- fi |
514 |
- |
515 |
- # ODBC support |
516 |
- if use odbc ; then |
517 |
- my_conf+=" |
518 |
- $(use_with odbc unixODBC ${EPREFIX}/usr)" |
519 |
- fi |
520 |
- |
521 |
- if use iodbc ; then |
522 |
- my_conf+=" |
523 |
- $(use_with iodbc iodbc ${EPREFIX}/usr)" |
524 |
- fi |
525 |
- |
526 |
- # Oracle support |
527 |
- if use oci8-instant-client ; then |
528 |
- my_conf+=" |
529 |
- $(use_with oci8-instant-client oci8)" |
530 |
- fi |
531 |
- |
532 |
- # PDO support |
533 |
- if use pdo ; then |
534 |
- my_conf+=" |
535 |
- $(use_with mssql pdo-dblib )" |
536 |
- if use mysqlnd ; then |
537 |
- my_conf+=" |
538 |
- $(use_with mysqlnd pdo-mysql mysqlnd)" |
539 |
- else |
540 |
- my_conf+=" |
541 |
- $(use_with mysql pdo-mysql ${EPREFIX}/usr)" |
542 |
- fi |
543 |
- my_conf+=" |
544 |
- $(use_with postgres pdo-pgsql ) |
545 |
- $(use_with sqlite pdo-sqlite ${EPREFIX}/usr) |
546 |
- $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)" |
547 |
- if use oci8-instant-client ; then |
548 |
- my_conf+=" |
549 |
- $(use_with oci8-instant-client pdo-oci)" |
550 |
- fi |
551 |
- fi |
552 |
- |
553 |
- # readline/libedit support |
554 |
- my_conf+=" |
555 |
- $(use_with readline readline ${EPREFIX}/usr) |
556 |
- $(use_with libedit libedit ${EPREFIX}/usr)" |
557 |
- |
558 |
- # Session support |
559 |
- if use session ; then |
560 |
- my_conf+=" |
561 |
- $(use_with sharedmem mm ${EPREFIX}/usr)" |
562 |
- else |
563 |
- my_conf+=" |
564 |
- $(use_enable session session )" |
565 |
- fi |
566 |
- |
567 |
- # Use pic for shared modules such as apache2's mod_php |
568 |
- my_conf="${my_conf} --with-pic" |
569 |
- |
570 |
- # we use the system copy of pcre |
571 |
- # --with-pcre-regex affects ext/pcre |
572 |
- # --with-pcre-dir affects ext/filter and ext/zip |
573 |
- my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr" |
574 |
- |
575 |
- # Catch CFLAGS problems |
576 |
- # Fixes bug #14067. |
577 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
578 |
- replace-cpu-flags "k6*" "i586" |
579 |
- |
580 |
- # Support user-passed configuration parameters |
581 |
- my_conf="${my_conf} ${EXTRA_ECONF:-}" |
582 |
- |
583 |
- # Support the Apache2 extras, they must be set globally for all |
584 |
- # SAPIs to work correctly, especially for external PHP extensions |
585 |
- |
586 |
- mkdir -p "${WORKDIR}/sapis-build" |
587 |
- for one_sapi in $SAPIS ; do |
588 |
- use "${one_sapi}" || continue |
589 |
- php_set_ini_dir "${one_sapi}" |
590 |
- |
591 |
- cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" |
592 |
- cd "${WORKDIR}/sapis-build/${one_sapi}" |
593 |
- |
594 |
- sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} |
595 |
- --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" |
596 |
- |
597 |
- for sapi in $SAPIS ; do |
598 |
- case "$sapi" in |
599 |
- cli|cgi|embed|fpm) |
600 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
601 |
- sapi_conf="${sapi_conf} --enable-${sapi}" |
602 |
- else |
603 |
- sapi_conf="${sapi_conf} --disable-${sapi}" |
604 |
- fi |
605 |
- ;; |
606 |
- |
607 |
- apache2) |
608 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
609 |
- sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs" |
610 |
- else |
611 |
- sapi_conf="${sapi_conf} --without-apxs2" |
612 |
- fi |
613 |
- ;; |
614 |
- esac |
615 |
- done |
616 |
- |
617 |
- econf ${sapi_conf} |
618 |
- done |
619 |
-} |
620 |
- |
621 |
-src_compile() { |
622 |
- # snmp seems to run during src_compile, too (bug #324739) |
623 |
- addpredict /usr/share/snmp/mibs/.index |
624 |
- addpredict /var/lib/net-snmp/mib_indexes |
625 |
- |
626 |
- for sapi in ${SAPIS} ; do |
627 |
- if use "${sapi}"; then |
628 |
- cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
629 |
- emake || die "emake failed" |
630 |
- fi |
631 |
- done |
632 |
-} |
633 |
- |
634 |
-src_install() { |
635 |
- # see bug #324739 for what happens when we don't have that |
636 |
- addpredict /usr/share/snmp/mibs/.index |
637 |
- |
638 |
- # grab the first SAPI that got built and install common files from there |
639 |
- local first_sapi="" |
640 |
- for sapi in $SAPIS ; do |
641 |
- if use $sapi ; then |
642 |
- first_sapi=$sapi |
643 |
- break |
644 |
- fi |
645 |
- done |
646 |
- |
647 |
- # Makefile forgets to create this before trying to write to it... |
648 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
649 |
- |
650 |
- # Install php environment (without any sapis) |
651 |
- cd "${WORKDIR}/sapis-build/$first_sapi" |
652 |
- emake INSTALL_ROOT="${D}" \ |
653 |
- install-build install-headers install-programs \ |
654 |
- || die "emake install failed" |
655 |
- |
656 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
657 |
- |
658 |
- # Create the directory where we'll put version-specific php scripts |
659 |
- keepdir /usr/share/php${PHP_MV} |
660 |
- |
661 |
- local sapi="", file="" |
662 |
- local sapi_list="" |
663 |
- |
664 |
- for sapi in ${SAPIS}; do |
665 |
- if use "${sapi}" ; then |
666 |
- einfo "Installing SAPI: ${sapi}" |
667 |
- cd "${WORKDIR}/sapis-build/${sapi}" |
668 |
- |
669 |
- if [[ "${sapi}" == "apache2" ]] ; then |
670 |
- # We're specifically not using emake install-sapi as libtool |
671 |
- # may cause unnecessary relink failures (see bug #351266) |
672 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
673 |
- newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)" |
674 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
675 |
- else |
676 |
- # needed each time, php_install_ini would reset it |
677 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
678 |
- into "${dest}" |
679 |
- case "$sapi" in |
680 |
- cli) |
681 |
- source="sapi/cli/php" |
682 |
- ;; |
683 |
- cgi) |
684 |
- source="sapi/cgi/php-cgi" |
685 |
- ;; |
686 |
- fpm) |
687 |
- source="sapi/fpm/php-fpm" |
688 |
- ;; |
689 |
- embed) |
690 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
691 |
- ;; |
692 |
- *) |
693 |
- die "unhandled sapi in src_install" |
694 |
- ;; |
695 |
- esac |
696 |
- |
697 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
698 |
- dolib.so "${source}" || die "Unable to install ${sapi} sapi" |
699 |
- else |
700 |
- dobin "${source}" || die "Unable to install ${sapi} sapi" |
701 |
- local name="$(basename ${source})" |
702 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
703 |
- fi |
704 |
- fi |
705 |
- |
706 |
- php_install_ini "${sapi}" |
707 |
- |
708 |
- # construct correct SAPI string for php-config |
709 |
- # thanks to ferringb for the bash voodoo |
710 |
- if [[ "${sapi}" == "apache2" ]]; then |
711 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
712 |
- else |
713 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
714 |
- fi |
715 |
- fi |
716 |
- done |
717 |
- |
718 |
- # Installing opcache module |
719 |
- if use_if_iuse opcache ; then |
720 |
- dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module" |
721 |
- fi |
722 |
- |
723 |
- # Install env.d files |
724 |
- newenvd "${FILESDIR}/20php5-envd" \ |
725 |
- "20php${SLOT}" |
726 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i \ |
727 |
- "${ED}/etc/env.d/20php${SLOT}" |
728 |
- sed -e "s|php5|php${SLOT}|g" -i \ |
729 |
- "${ED}/etc/env.d/20php${SLOT}" |
730 |
- |
731 |
- # set php-config variable correctly (bug #278439) |
732 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
733 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" |
734 |
- |
735 |
- if use fpm ; then |
736 |
- if use systemd; then |
737 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service" |
738 |
- else |
739 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service" |
740 |
- fi |
741 |
- fi |
742 |
-} |
743 |
- |
744 |
-src_test() { |
745 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
746 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
747 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
748 |
- ewarn "Test phase requires USE=cli, skipping" |
749 |
- return |
750 |
- else |
751 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
752 |
- fi |
753 |
- |
754 |
- if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then |
755 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi" |
756 |
- fi |
757 |
- |
758 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \ |
759 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}" |
760 |
- |
761 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
762 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null |
763 |
- done |
764 |
- |
765 |
- local failed="$(find -name '*.out')" |
766 |
- if [[ ${failed} != "" ]] ; then |
767 |
- ewarn "The following test cases failed unexpectedly:" |
768 |
- for name in ${failed}; do |
769 |
- ewarn " ${name/.out/}" |
770 |
- done |
771 |
- else |
772 |
- einfo "No unexpected test failures, all fine" |
773 |
- fi |
774 |
- |
775 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
776 |
- local passed="" |
777 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
778 |
- [[ -f "${name}.diff" ]] && continue |
779 |
- passed="${passed} ${name}" |
780 |
- done |
781 |
- if [[ ${passed} != "" ]] ; then |
782 |
- einfo "The following test cases passed unexpectedly:" |
783 |
- for name in ${passed}; do |
784 |
- ewarn " ${passed}" |
785 |
- done |
786 |
- else |
787 |
- einfo "None of the known-to-fail tests passed, all fine" |
788 |
- fi |
789 |
- fi |
790 |
-} |
791 |
- |
792 |
-pkg_postinst() { |
793 |
- # Output some general info to the user |
794 |
- if use apache2 ; then |
795 |
- APACHE2_MOD_DEFINE="PHP5" |
796 |
- APACHE2_MOD_CONF="70_mod_php5" # actually provided by app-eselect/eselect-php |
797 |
- apache-module_pkg_postinst |
798 |
- fi |
799 |
- |
800 |
- # Create the symlinks for php |
801 |
- for m in ${SAPIS}; do |
802 |
- [[ ${m} == 'embed' ]] && continue; |
803 |
- if use $m ; then |
804 |
- local ci=$(eselect php show $m) |
805 |
- if [[ -z $ci ]]; then |
806 |
- eselect php set $m php${SLOT} |
807 |
- einfo "Switched ${m} to use php:${SLOT}" |
808 |
- einfo |
809 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
810 |
- elog "To switch $m to use php:${SLOT}, run" |
811 |
- elog " eselect php set $m php${SLOT}" |
812 |
- elog |
813 |
- fi |
814 |
- fi |
815 |
- done |
816 |
- |
817 |
- elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order" |
818 |
- elog "to compile extensions for the ${SLOT} ABI" |
819 |
- elog |
820 |
- if ! use readline && use cli ; then |
821 |
- ewarn "Note that in order to use php interactivly, you need to enable" |
822 |
- ewarn "the readline USE flag or php -a will hang" |
823 |
- fi |
824 |
- elog |
825 |
- elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version." |
826 |
- elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either" |
827 |
- elog "'production' or 'development' in ${EPREFIX}/etc/make.conf" |
828 |
- elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}" |
829 |
- |
830 |
- elog |
831 |
- elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:" |
832 |
- elog "https://www.gentoo.org/proj/en/php/php-upgrading.xml" |
833 |
- elog |
834 |
-} |
835 |
- |
836 |
-pkg_prerm() { |
837 |
- eselect php cleanup |
838 |
-} |