Gentoo Archives: gentoo-commits

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