Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/
Date: Thu, 02 May 2019 19:56:52
Message-Id: 1556826997.baf61d5520f00cdcdb4e5946655fec5b63072dfe.grknight@gentoo
1 commit: baf61d5520f00cdcdb4e5946655fec5b63072dfe
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 2 19:56:37 2019 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Thu May 2 19:56:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baf61d55
7
8 dev-lang/php: Drop old 7.1.28
9
10 Package-Manager: Portage-2.3.66, Repoman-2.3.12
11 Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
12
13 dev-lang/php/Manifest | 1 -
14 dev-lang/php/php-7.1.28.ebuild | 737 -----------------------------------------
15 2 files changed, 738 deletions(-)
16
17 diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
18 index fd385020cce..ffb2d58ca51 100644
19 --- a/dev-lang/php/Manifest
20 +++ b/dev-lang/php/Manifest
21 @@ -1,6 +1,5 @@
22 DIST php-5.6.40.tar.xz 12472236 BLAKE2B f41147eaec9b15e965540f9e871691cc88848dd619bae6af85e7bba0130b71ce91bad5cdbbadbb537c42df83369f5c731007339a9d9e21e689e913c135201afc SHA512 997b5a952a60cf9166671cc91fcc34c674dd62bfd5cb0a9cdf3fdf2d088b5d19943d94c1cf193f8ab71fc4957d9a9a4c7c2fb8826f937501c1c0a0858f10e329
23 DIST php-7.1.27.tar.xz 12219868 BLAKE2B 9de4902504e50b53aab28eac2252aa79302541352b1323a17e68cc58e22cd3b6108b3f7d6ba4779a7f87a561442cf3c44c5660418a354d3b48b6df270a761f8b SHA512 a7019788b02f624e19f804cb0c34578443fc2e0a582a32e72d1340f3cd7bb866631497fe61d18f31f92bad5aa7667847e21bd3916fcdd6f04a3b8f88c805f544
24 -DIST php-7.1.28.tar.xz 12222508 BLAKE2B 1e52632f801a717ea7020665da11536ba7ab21ea0e5d5ccf147003cb9a87878053ebabf5f4cdd0810207de1e2ebdd683d7afefd72aa5be521c5690130a72b349 SHA512 fcf983adb7669b83ff3aee33f9d18328f8f36b304bc51bfd1f13a7493365e98204c63214fe4add157dffa44d5407b257dee7247168a14efa36dcfa70d4909a6e
25 DIST php-7.1.29.tar.xz 12221984 BLAKE2B a07e7e5ee58f9a74437d865bb7ee9a4458fde52cf3e678128fb4c2d1cc076da0d37dc16c8908011ed542cc37f492d56a6565e06315630d2a213e2a42accdc4f4 SHA512 97575ec588fd3ab51360525fc02058254b95e89e0a36c74a2890ae7619adda1a5489f3675fa83754f8f693af463cdf17232db071351b6ace9f83d4c3c643f682
26 DIST php-7.2.16.tar.xz 12166372 BLAKE2B c59ac69b717a8ee88f229baa94c43f9ee1d9c7161c767a95c3a9719ee70cdc9b61aaff75504aca09bba10d224d9a717cb7c985060b6912491857a003e6cbc349 SHA512 cd2ea3c68d7ed20317800f4b838b0dd9ae2fde508c79662b296dacdacf6c7e35b6ef30a6564516d7b22e82749a6e9e2ffcfd95b05cd79a9f227fbfaf9e25bc31
27 DIST php-7.2.18.tar.xz 12172696 BLAKE2B c23f4dffe60ad48b53de1c565ecb4f378f5d3daccde98ec8d9bddcfce8bd1a48a75061a72d0094d0db6719a3c0a96cae25ce0ef0fbfadc28fbeff27b332c8107 SHA512 b38034aa13867496009903ba64e4e8bf3216307a9ff1dade60a1477671ecf7bceb5062b349f6997d9af414d58d46ea7bb3f9855e372c230f4a6cff26ad9985d6
28
29 diff --git a/dev-lang/php/php-7.1.28.ebuild b/dev-lang/php/php-7.1.28.ebuild
30 deleted file mode 100644
31 index 21ae6551ee5..00000000000
32 --- a/dev-lang/php/php-7.1.28.ebuild
33 +++ /dev/null
34 @@ -1,737 +0,0 @@
35 -# Copyright 1999-2019 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI="7"
39 -
40 -inherit flag-o-matic systemd autotools
41 -
42 -DESCRIPTION="The PHP language runtime engine"
43 -HOMEPAGE="https://php.net/"
44 -SRC_URI="https://php.net/distributions/${P}.tar.xz"
45 -
46 -LICENSE="PHP-3.01
47 - BSD
48 - Zend-2.0
49 - bcmath? ( LGPL-2.1+ )
50 - fpm? ( BSD-2 )
51 - gd? ( gd )
52 - unicode? ( BSD-2 LGPL-2.1 )"
53 -
54 -SLOT="$(ver_cut 1-2)"
55 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
56 -
57 -# We can build the following SAPIs in the given order
58 -SAPIS="embed cli cgi fpm apache2 phpdbg"
59 -
60 -# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
61 -IUSE="${IUSE}
62 - ${SAPIS/cli/+cli}
63 - threads"
64 -
65 -IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
66 - coverage crypt +ctype curl debug
67 - enchant exif +fileinfo +filter firebird
68 - flatfile ftp gd gdbm gmp +hash +iconv imap inifile
69 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
70 - mhash mssql mysql mysqli nls
71 - oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
72 - readline recode selinux +session session-mm sharedmem
73 - +simplexml snmp soap sockets spell sqlite ssl
74 - sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
75 - +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
76 -
77 -# The supported (that is, autodetected) versions of BDB are listed in
78 -# the ./configure script. Other versions *work*, but we need to stick to
79 -# the ones that can be detected to avoid a repeat of bug #564824.
80 -COMMON_DEPEND="
81 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
82 - >=dev-libs/libpcre-8.32[unicode]
83 - fpm? ( acl? ( sys-apps/acl ) )
84 - apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
85 - <www-servers/apache-2.4[threads=] ) )
86 - berkdb? ( || ( sys-libs/db:5.3
87 - sys-libs/db:5.1
88 - sys-libs/db:4.8
89 - sys-libs/db:4.7
90 - sys-libs/db:4.6
91 - sys-libs/db:4.5 ) )
92 - bzip2? ( app-arch/bzip2:0= )
93 - cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
94 - coverage? ( dev-util/lcov )
95 - crypt? ( >=dev-libs/libmcrypt-2.4 )
96 - curl? ( >=net-misc/curl-7.10.5 )
97 - enchant? ( <app-text/enchant-2.0:0 )
98 - firebird? ( dev-db/firebird )
99 - gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
100 - gdbm? ( >=sys-libs/gdbm-1.8.0:0= )
101 - gmp? ( dev-libs/gmp:0= )
102 - iconv? ( virtual/libiconv )
103 - imap? ( virtual/imap-c-client[kerberos=,ssl=] )
104 - intl? ( dev-libs/icu:= )
105 - iodbc? ( dev-db/libiodbc )
106 - kerberos? ( virtual/krb5 )
107 - ldap? ( >=net-nds/openldap-1.2.11 )
108 - ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
109 - libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
110 - mssql? ( dev-db/freetds[mssql] )
111 - nls? ( sys-devel/gettext )
112 - oci8-instant-client? ( dev-db/oracle-instantclient-basic )
113 - odbc? ( >=dev-db/unixODBC-1.8.13 )
114 - postgres? ( dev-db/postgresql:* )
115 - qdbm? ( dev-db/qdbm )
116 - readline? ( sys-libs/readline:0= )
117 - recode? ( app-text/recode )
118 - session-mm? ( dev-libs/mm )
119 - simplexml? ( >=dev-libs/libxml2-2.6.8 )
120 - snmp? ( >=net-analyzer/net-snmp-5.2 )
121 - soap? ( >=dev-libs/libxml2-2.6.8 )
122 - spell? ( >=app-text/aspell-0.50 )
123 - sqlite? ( >=dev-db/sqlite-3.7.6.3 )
124 - ssl? (
125 - !libressl? ( dev-libs/openssl:0= )
126 - libressl? ( dev-libs/libressl:0= )
127 - )
128 - tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
129 - truetype? ( =media-libs/freetype-2* )
130 - unicode? ( dev-libs/oniguruma:= )
131 - wddx? ( >=dev-libs/libxml2-2.6.8 )
132 - webp? ( media-libs/libwebp:0= )
133 - xml? ( >=dev-libs/libxml2-2.6.8 )
134 - xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
135 - xmlreader? ( >=dev-libs/libxml2-2.6.8 )
136 - xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
137 - xpm? ( x11-libs/libXpm )
138 - xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
139 - zip? ( sys-libs/zlib:0= )
140 - zlib? ( sys-libs/zlib:0= )
141 -"
142 -
143 -RDEPEND="${COMMON_DEPEND}
144 - virtual/mta
145 - fpm? (
146 - selinux? ( sec-policy/selinux-phpfpm )
147 - systemd? ( sys-apps/systemd ) )"
148 -
149 -# Bison isn't actually needed when building from a release tarball
150 -# However, the configure script will warn if it's absent or if you
151 -# have an incompatible version installed. See bug 593278.
152 -DEPEND="${COMMON_DEPEND}
153 - app-arch/xz-utils
154 - >=sys-devel/bison-3.0.1"
155 -
156 -BDEPEND="virtual/pkgconfig"
157 -
158 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
159 -REQUIRED_USE="
160 - || ( cli cgi fpm apache2 embed phpdbg )
161 - cli? ( ^^ ( readline libedit ) )
162 - truetype? ( gd zlib )
163 - webp? ( gd zlib )
164 - cjk? ( gd zlib )
165 - exif? ( gd zlib )
166 - xpm? ( gd zlib )
167 - gd? ( zlib )
168 - simplexml? ( xml )
169 - soap? ( xml )
170 - wddx? ( xml )
171 - xmlrpc? ( || ( xml iconv ) )
172 - xmlreader? ( xml )
173 - xslt? ( xml )
174 - ldap-sasl? ( ldap )
175 - mhash? ( hash )
176 - phar? ( hash )
177 - qdbm? ( !gdbm )
178 - readline? ( !libedit )
179 - recode? ( !imap !mysqli !mysql )
180 - session-mm? ( session !threads )
181 - mysql? ( hash || ( mysqli pdo ) )
182 - mysqli? ( hash )
183 -"
184 -PATCHES=(
185 - "${FILESDIR}/php-freetype-2.9.1.patch"
186 - "${FILESDIR}/php-7.1.25-intl-use-icu-namespace.patch"
187 -)
188 -
189 -PHP_MV="$(ver_cut 1)"
190 -
191 -php_install_ini() {
192 - local phpsapi="${1}"
193 -
194 - # work out where we are installing the ini file
195 - php_set_ini_dir "${phpsapi}"
196 -
197 - # Always install the production INI file, bug 611214.
198 - local phpinisrc="php.ini-production-${phpsapi}"
199 - cp php.ini-production "${phpinisrc}" || die
200 -
201 - # default to /tmp for save_path, bug #282768
202 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
203 -
204 - # Set the extension dir
205 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
206 - -i "${phpinisrc}" || die
207 -
208 - # Set the include path to point to where we want to find PEAR packages
209 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
210 -
211 - dodir "${PHP_INI_DIR#${EPREFIX}}"
212 - insinto "${PHP_INI_DIR#${EPREFIX}}"
213 - newins "${phpinisrc}" php.ini
214 -
215 - elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
216 - elog
217 -
218 - dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
219 - dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
220 -
221 - if use opcache; then
222 - elog "Adding opcache to $PHP_EXT_INI_DIR"
223 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
224 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
225 - dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
226 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
227 - fi
228 -
229 - # SAPI-specific handling
230 - if [[ "${sapi}" == "fpm" ]] ; then
231 - einfo "Installing FPM config files php-fpm.conf and www.conf"
232 - insinto "${PHP_INI_DIR#${EPREFIX}}"
233 - doins sapi/fpm/php-fpm.conf
234 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
235 - doins sapi/fpm/www.conf
236 - fi
237 -
238 - dodoc php.ini-{development,production}
239 -}
240 -
241 -php_set_ini_dir() {
242 - PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
243 - PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
244 - PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
245 -}
246 -
247 -src_prepare() {
248 - default
249 -
250 - # In php-7.x, the FPM pool configuration files have been split off
251 - # of the main config. By default the pool config files go in
252 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
253 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
254 - # we'll install the pool configuration file "www.conf" there.
255 - php_set_ini_dir fpm
256 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
257 - sapi/fpm/php-fpm.conf.in \
258 - || die 'failed to move the include directory in php-fpm.conf'
259 -
260 - # Bug 669566 - necessary so that build tools are updated for commands like pecl
261 - # Force rebuilding aclocal.m4
262 - rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
263 - eautoreconf
264 -}
265 -
266 -src_configure() {
267 - addpredict /usr/share/snmp/mibs/.index #nowarn
268 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
269 -
270 - PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
271 -
272 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
273 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
274 - local our_conf=(
275 - --prefix="${PHP_DESTDIR}"
276 - --mandir="${PHP_DESTDIR}/man"
277 - --infodir="${PHP_DESTDIR}/info"
278 - --libdir="${PHP_DESTDIR}/lib"
279 - --with-libdir="$(get_libdir)"
280 - --localstatedir="${EPREFIX}/var"
281 - --without-pear
282 - $(use_enable threads maintainer-zts)
283 - )
284 -
285 - our_conf+=(
286 - $(use_enable bcmath bcmath)
287 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
288 - $(use_enable calendar calendar)
289 - $(use_enable coverage gcov)
290 - $(use_enable ctype ctype)
291 - $(use_with curl curl "${EPREFIX}/usr")
292 - $(use_enable xml dom)
293 - $(use_with enchant enchant "${EPREFIX}/usr")
294 - $(use_enable exif exif)
295 - $(use_enable fileinfo fileinfo)
296 - $(use_enable filter filter)
297 - $(use_enable ftp ftp)
298 - $(use_with nls gettext "${EPREFIX}/usr")
299 - $(use_with gmp gmp "${EPREFIX}/usr")
300 - $(use_enable hash hash)
301 - $(use_with mhash mhash "${EPREFIX}/usr")
302 - $(use_with iconv iconv \
303 - $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr"))
304 - $(use_enable intl intl)
305 - $(use_enable ipv6 ipv6)
306 - $(use_enable json json)
307 - $(use_with kerberos kerberos "${EPREFIX}/usr")
308 - $(use_enable xml libxml)
309 - $(use_with xml libxml-dir "${EPREFIX}/usr")
310 - $(use_enable unicode mbstring)
311 - $(use_with crypt mcrypt "${EPREFIX}/usr")
312 - $(use_with unicode onig "${EPREFIX}/usr")
313 - $(use_with ssl openssl "${EPREFIX}/usr")
314 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
315 - $(use_enable pcntl pcntl)
316 - $(use_enable phar phar)
317 - $(use_enable pdo pdo)
318 - $(use_enable opcache opcache)
319 - $(use_with postgres pgsql "${EPREFIX}/usr")
320 - $(use_enable posix posix)
321 - $(use_with spell pspell "${EPREFIX}/usr")
322 - $(use_with recode recode "${EPREFIX}/usr")
323 - $(use_enable simplexml simplexml)
324 - $(use_enable sharedmem shmop)
325 - $(use_with snmp snmp "${EPREFIX}/usr")
326 - $(use_enable soap soap)
327 - $(use_enable sockets sockets)
328 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
329 - $(use_enable sysvipc sysvmsg)
330 - $(use_enable sysvipc sysvsem)
331 - $(use_enable sysvipc sysvshm)
332 - $(use_with tidy tidy "${EPREFIX}/usr")
333 - $(use_enable tokenizer tokenizer)
334 - $(use_enable wddx wddx)
335 - $(use_enable xml xml)
336 - $(use_enable xmlreader xmlreader)
337 - $(use_enable xmlwriter xmlwriter)
338 - $(use_with xmlrpc xmlrpc)
339 - $(use_with xslt xsl "${EPREFIX}/usr")
340 - $(use_enable zip zip)
341 - $(use_with zlib zlib "${EPREFIX}/usr")
342 - $(use_enable debug debug)
343 - )
344 -
345 - # DBA support
346 - if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
347 - || use qdbm ; then
348 - our_conf+=( "--enable-dba${shared}" )
349 - fi
350 -
351 - # DBA drivers support
352 - our_conf+=(
353 - $(use_with cdb cdb)
354 - $(use_with berkdb db4 "${EPREFIX}/usr")
355 - $(use_enable flatfile flatfile)
356 - $(use_with gdbm gdbm "${EPREFIX}/usr")
357 - $(use_enable inifile inifile)
358 - $(use_with qdbm qdbm "${EPREFIX}/usr")
359 - )
360 -
361 - # Support for the GD graphics library
362 - our_conf+=(
363 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
364 - $(use_enable cjk gd-jis-conv)
365 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
366 - $(use_with gd png-dir "${EPREFIX}/usr")
367 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
368 - )
369 - if use webp; then
370 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
371 - fi
372 - # enable gd last, so configure can pick up the previous settings
373 - our_conf+=( $(use_with gd gd) )
374 -
375 - # IMAP support
376 - if use imap ; then
377 - our_conf+=(
378 - $(use_with imap imap "${EPREFIX}/usr")
379 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
380 - )
381 - fi
382 -
383 - # Interbase/firebird support
384 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
385 -
386 - # LDAP support
387 - if use ldap ; then
388 - our_conf+=(
389 - $(use_with ldap ldap "${EPREFIX}/usr")
390 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
391 - )
392 - fi
393 -
394 - # MySQL support
395 - local mysqllib="mysqlnd"
396 - local mysqlilib="mysqlnd"
397 -
398 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
399 -
400 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
401 - if use mysql || use mysqli ; then
402 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
403 - fi
404 -
405 - # ODBC support
406 - our_conf+=(
407 - $(use_with odbc unixODBC "${EPREFIX}/usr")
408 - $(use_with iodbc iodbc "${EPREFIX}/usr")
409 - )
410 -
411 - # Oracle support
412 - our_conf+=( $(use_with oci8-instant-client oci8) )
413 -
414 - # PDO support
415 - if use pdo ; then
416 - our_conf+=(
417 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
418 - $(use_with mysql pdo-mysql "${mysqllib}")
419 - $(use_with postgres pdo-pgsql)
420 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
421 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
422 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
423 - $(use_with oci8-instant-client pdo-oci)
424 - )
425 - fi
426 -
427 - # readline/libedit support
428 - our_conf+=(
429 - $(use_with readline readline "${EPREFIX}/usr")
430 - $(use_with libedit libedit "${EPREFIX}/usr")
431 - )
432 -
433 - # Session support
434 - if use session ; then
435 - our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") )
436 - else
437 - our_conf+=( $(use_enable session session) )
438 - fi
439 -
440 - # Use pic for shared modules such as apache2's mod_php
441 - our_conf+=( --with-pic )
442 -
443 - # we use the system copy of pcre
444 - # --with-pcre-regex affects ext/pcre
445 - # --with-pcre-dir affects ext/filter and ext/zip
446 - our_conf+=(
447 - --with-pcre-regex="${EPREFIX}/usr"
448 - --with-pcre-dir="${EPREFIX}/usr"
449 - )
450 -
451 - # Catch CFLAGS problems
452 - # Fixes bug #14067.
453 - # Changed order to run it in reverse for bug #32022 and #12021.
454 - replace-cpu-flags "k6*" "i586"
455 -
456 - # Cache the ./configure test results between SAPIs.
457 - our_conf+=( --cache-file="${T}/config.cache" )
458 -
459 - # Support user-passed configuration parameters
460 - our_conf+=( ${EXTRA_ECONF:-} )
461 -
462 - # Support the Apache2 extras, they must be set globally for all
463 - # SAPIs to work correctly, especially for external PHP extensions
464 -
465 - mkdir -p "${WORKDIR}/sapis-build" || die
466 - for one_sapi in $SAPIS ; do
467 - use "${one_sapi}" || continue
468 - php_set_ini_dir "${one_sapi}"
469 -
470 - # The BUILD_DIR variable is used to determine where to output
471 - # the files that autotools creates. This was all originally
472 - # based on the autotools-utils eclass.
473 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
474 - cp -a "${S}" "${BUILD_DIR}" || die
475 - cd "${BUILD_DIR}" || die
476 -
477 - local sapi_conf=(
478 - --with-config-file-path="${PHP_INI_DIR}"
479 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
480 - )
481 -
482 - for sapi in $SAPIS ; do
483 - case "$sapi" in
484 - cli|cgi|embed|fpm|phpdbg)
485 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
486 - sapi_conf+=( "--enable-${sapi}" )
487 - if [[ "fpm" == "${sapi}" ]] ; then
488 - sapi_conf+=(
489 - $(use_with acl fpm-acl)
490 - $(use_with systemd fpm-systemd)
491 - )
492 - fi
493 - else
494 - sapi_conf+=( "--disable-${sapi}" )
495 - fi
496 - ;;
497 -
498 - apache2)
499 - if [[ "${one_sapi}" == "${sapi}" ]] ; then
500 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
501 - else
502 - sapi_conf+=( --without-apxs2 )
503 - fi
504 - ;;
505 - esac
506 - done
507 -
508 - # Construct the $myeconfargs array by concatenating $our_conf
509 - # (the common args) and $sapi_conf (the SAPI-specific args).
510 - local myeconfargs=( "${our_conf[@]}" )
511 - myeconfargs+=( "${sapi_conf[@]}" )
512 -
513 - pushd "${BUILD_DIR}" > /dev/null || die
514 - econf "${myeconfargs[@]}"
515 - popd > /dev/null || die
516 - done
517 -}
518 -
519 -src_compile() {
520 - # snmp seems to run during src_compile, too (bug #324739)
521 - addpredict /usr/share/snmp/mibs/.index #nowarn
522 - addpredict /var/lib/net-snmp/mib_indexes #nowarn
523 -
524 - for sapi in ${SAPIS} ; do
525 - if use "${sapi}"; then
526 - cd "${WORKDIR}/sapis-build/$sapi" || \
527 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
528 - emake
529 - fi
530 - done
531 -}
532 -
533 -src_install() {
534 - # see bug #324739 for what happens when we don't have that
535 - addpredict /usr/share/snmp/mibs/.index #nowarn
536 -
537 - # grab the first SAPI that got built and install common files from there
538 - local first_sapi=""
539 - for sapi in $SAPIS ; do
540 - if use $sapi ; then
541 - first_sapi=$sapi
542 - break
543 - fi
544 - done
545 -
546 - # Makefile forgets to create this before trying to write to it...
547 - dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
548 -
549 - # Install php environment (without any sapis)
550 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
551 - emake INSTALL_ROOT="${D}" \
552 - install-build install-headers install-programs
553 -
554 - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
555 -
556 - # Create the directory where we'll put version-specific php scripts
557 - keepdir "/usr/share/php${PHP_MV}"
558 -
559 - local sapi="", file=""
560 - local sapi_list=""
561 -
562 - for sapi in ${SAPIS}; do
563 - if use "${sapi}" ; then
564 - einfo "Installing SAPI: ${sapi}"
565 - cd "${WORKDIR}/sapis-build/${sapi}" || die
566 -
567 - if [[ "${sapi}" == "apache2" ]] ; then
568 - # We're specifically not using emake install-sapi as libtool
569 - # may cause unnecessary relink failures (see bug #351266)
570 - insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
571 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
572 - "libphp${PHP_MV}$(get_libname)"
573 - keepdir "/usr/$(get_libdir)/apache2/modules"
574 - else
575 - # needed each time, php_install_ini would reset it
576 - local dest="${PHP_DESTDIR#${EPREFIX}}"
577 - into "${dest}"
578 - case "$sapi" in
579 - cli)
580 - source="sapi/cli/php"
581 - ;;
582 - cgi)
583 - source="sapi/cgi/php-cgi"
584 - ;;
585 - fpm)
586 - source="sapi/fpm/php-fpm"
587 - ;;
588 - embed)
589 - source="libs/libphp${PHP_MV}$(get_libname)"
590 - ;;
591 - phpdbg)
592 - source="sapi/phpdbg/phpdbg"
593 - ;;
594 - *)
595 - die "unhandled sapi in src_install"
596 - ;;
597 - esac
598 -
599 - if [[ "${source}" == *"$(get_libname)" ]]; then
600 - dolib.so "${source}"
601 - else
602 - dobin "${source}"
603 - local name="$(basename ${source})"
604 - dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
605 - fi
606 - fi
607 -
608 - php_install_ini "${sapi}"
609 -
610 - # construct correct SAPI string for php-config
611 - # thanks to ferringb for the bash voodoo
612 - if [[ "${sapi}" == "apache2" ]]; then
613 - sapi_list="${sapi_list:+${sapi_list} }apache2handler"
614 - else
615 - sapi_list="${sapi_list:+${sapi_list} }${sapi}"
616 - fi
617 - fi
618 - done
619 -
620 - # Installing opcache module
621 - if use opcache ; then
622 - into "${PHP_DESTDIR#${EPREFIX}}"
623 - dolib.so "modules/opcache$(get_libname)"
624 - fi
625 -
626 - # Install env.d files
627 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
628 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
629 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
630 -
631 - # set php-config variable correctly (bug #278439)
632 - sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
633 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
634 -
635 - if use fpm ; then
636 - if use systemd; then
637 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
638 - "php-fpm@${SLOT}.service"
639 - else
640 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
641 - "php-fpm@${SLOT}.service"
642 - fi
643 - fi
644 -}
645 -
646 -src_test() {
647 - echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
648 - PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
649 - if [[ ! -x "${PHP_BIN}" ]] ; then
650 - ewarn "Test phase requires USE=cli, skipping"
651 - return
652 - else
653 - export TEST_PHP_EXECUTABLE="${PHP_BIN}"
654 - fi
655 -
656 - if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
657 - export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
658 - fi
659 -
660 - if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
661 - export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
662 - fi
663 -
664 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
665 - "session.save_path=${T}" \
666 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
667 - "session.save_path=${T}"
668 -
669 - for name in ${EXPECTED_TEST_FAILURES}; do
670 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
671 - done
672 -
673 - local failed="$(find -name '*.out')"
674 - if [[ ${failed} != "" ]] ; then
675 - ewarn "The following test cases failed unexpectedly:"
676 - for name in ${failed}; do
677 - ewarn " ${name/.out/}"
678 - done
679 - else
680 - einfo "No unexpected test failures, all fine"
681 - fi
682 -
683 - if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
684 - local passed=""
685 - for name in ${EXPECTED_TEST_FAILURES}; do
686 - [[ -f "${name}.diff" ]] && continue
687 - passed="${passed} ${name}"
688 - done
689 - if [[ ${passed} != "" ]] ; then
690 - einfo "The following test cases passed unexpectedly:"
691 - for name in ${passed}; do
692 - ewarn " ${passed}"
693 - done
694 - else
695 - einfo "None of the known-to-fail tests passed, all fine"
696 - fi
697 - fi
698 -}
699 -
700 -pkg_postinst() {
701 - # Output some general info to the user
702 - if use apache2 ; then
703 - elog
704 - elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
705 - elog "your apache2 command. OpenRC users can append that string to"
706 - elog "APACHE2_OPTS in /etc/conf.d/apache2."
707 - elog
708 - elog "The apache module configuration file 70_mod_php.conf is"
709 - elog "provided (and maintained) by eselect-php."
710 - elog
711 - fi
712 -
713 - # Create the symlinks for php
714 - for m in ${SAPIS}; do
715 - [[ ${m} == 'embed' ]] && continue;
716 - if use $m ; then
717 - local ci=$(eselect php show $m)
718 - if [[ -z $ci ]]; then
719 - eselect php set $m php${SLOT} || die
720 - einfo "Switched ${m} to use php:${SLOT}"
721 - einfo
722 - elif [[ $ci != "php${SLOT}" ]] ; then
723 - elog "To switch $m to use php:${SLOT}, run"
724 - elog " eselect php set $m php${SLOT}"
725 - elog
726 - fi
727 - fi
728 - done
729 -
730 - # Remove dead symlinks for SAPIs that were just disabled. For
731 - # example, if the user has the cgi SAPI enabled, then he has an
732 - # eselect-php symlink for it. If he later reinstalls PHP with
733 - # USE="-cgi", that symlink will break. This call to eselect is
734 - # supposed to remove that dead link per bug 572436.
735 - eselect php cleanup || die
736 -
737 - if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
738 - elog "To build extensions for this version of PHP, you will need to"
739 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
740 - elog
741 - fi
742 -
743 - # Warn about the removal of PHP_INI_VERSION if the user has it set.
744 - if [[ -n "${PHP_INI_VERSION}" ]]; then
745 - ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
746 - ewarn 'remove it from your configuration at your convenience. See'
747 - ewarn
748 - ewarn ' https://bugs.gentoo.org/611214'
749 - ewarn
750 - ewarn 'for more information.'
751 - fi
752 -
753 - elog "For details on how version slotting works, please see"
754 - elog "the wiki:"
755 - elog
756 - elog " https://wiki.gentoo.org/wiki/PHP"
757 - elog
758 -}
759 -
760 -pkg_postrm() {
761 - # This serves two purposes. First, if we have just removed the last
762 - # installed version of PHP, then this will remove any dead symlinks
763 - # belonging to eselect-php. Second, if a user upgrades slots from
764 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
765 - # his existing symlinks to point to the new 7.0 installation. The
766 - # latter is bug 432962.
767 - #
768 - # Note: the eselect-php package may not be installed at this point,
769 - # so we can't die() if this command fails.
770 - eselect php cleanup
771 -}