Gentoo Archives: gentoo-commits

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