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: Sat, 04 Jun 2016 03:27:15
Message-Id: 1465010804.a1a3a1755c2eac7cf75a2995e6bd9e019a7f30dd.mjo@gentoo
1 commit: a1a3a1755c2eac7cf75a2995e6bd9e019a7f30dd
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 23:28:47 2016 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 4 03:26:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1a3a175
7
8 dev-lang/php: new security releases for all three supported series.
9
10 Gentoo-Bug: 584204
11
12 Package-Manager: portage-2.2.28
13
14 dev-lang/php/Manifest | 4 +-
15 .../php/{php-7.0.6.ebuild => php-5.5.36.ebuild} | 519 ++++++++++-----------
16 .../php/{php-7.0.6.ebuild => php-5.6.22.ebuild} | 66 +--
17 .../php/{php-7.0.6.ebuild => php-7.0.7.ebuild} | 0
18 4 files changed, 290 insertions(+), 299 deletions(-)
19
20 diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
21 index 9a55cdb..578c4f6 100644
22 --- a/dev-lang/php/Manifest
23 +++ b/dev-lang/php/Manifest
24 @@ -1,7 +1,9 @@
25 DIST php-5.5.33.tar.bz2 13686486 SHA256 c490b1ed4df596b48eb68f630d89ca512945e2650840e7dace1119cc7e600aa9 SHA512 a0ac57adcc4b0caec153265a8d1ded8d4d0f71b44f08158feb0add9c8fdd36826767882e85dd03399cf146800eddcb6b6cc1b21051d4fc4371e3f61b1169132b WHIRLPOOL 373c61677adb89506cc4621d1c7a0732f6454a8679a797807631f2286188bb990dfcaf34b4108edf7b1819424100fa0d7060f0f792a65dc5f1c130cfa00e6b45
26 DIST php-5.5.34.tar.bz2 13686681 SHA256 af88884416a92619de842ad0fd23f7f7e8140efb0b9194f98a38a78781e5851c SHA512 c4269f79f5acaac64e9d2e20feef4bbd5aa7a84e69445dee64bf068197d611aa8ceb3697ae6461d8c96068be7839f22eeaff61f201f6e7a8749d284eaa68c0f8 WHIRLPOOL f4771f614176242a9a3e27185c98822493ca1b1982b5b11b3ee53d952534c69a73e0625b589723cc153da0978b27a8e55c7f9056b81b7a282dc385d22f4fdf02
27 DIST php-5.5.35.tar.bz2 13690152 SHA256 2d648dd648e820fd64693ce72f9bf07064d147220e594e39fb9f6310238258d7 SHA512 cfa62f83cd79b678c55ffdb1325906962bb7dae23fdbe963d57c3b24d13223229448f4c45727df1ab042bbd2db85804051c66993c28c68c0c873481cfe7e6834 WHIRLPOOL e7b765b6d99e7f9c0e18cae64577d0e7e7eb136debf565f49ab02a962046437064f810d1a407546e2f83d69cfb3104244424ae5a34bc83c3778aaff95984a9f7
28 +DIST php-5.5.36.tar.bz2 13686345 SHA256 2484edfaa3de606d74f927b55c5206f51b1ae24ea8e428aa9fc15474c7bb71bb SHA512 5521ef8bec1720e3df49f5b002c93726d1b52a7b551acf414e32dfd8ca88f8d661b9f011408d7f9f451fb29b06385365d2975bb14ed6d3c10cdc5546543af485 WHIRLPOOL 687818ee021cb473a92ff7c5b67c6b110360227aaecbb6832f0f8383d0a4878f038d45c49518aa38e2b99d96e2eaa6e5de7f535c1fcce05f41024ca7423e2783
29 DIST php-5.6.19.tar.bz2 14100438 SHA256 2a24a3f84971680ac0a4c71050067de4f76ee235aa4a041fae21bfa69975c168 SHA512 c8c2b3bdfc1a8abe834612c33123b4f103e841c230b53934fb7bafe11af7f1175f02ca54c92f33e8e603485e6283897bebb51acc55d1213b7433024684215c14 WHIRLPOOL f026e8779c531f887b1e292e5f1d6eafd0e3ae46f83ae8efb830ad8e0f91d86e5b002dda9e6a02987db6230557ff773d8c52dd2db423d792aed1aca292e5b92b
30 DIST php-5.6.20.tar.bz2 14162188 SHA256 5ac7bf7caec7a79b18cf458e786fd1609ad2da771224b80bc15cc6f01b22bf1f SHA512 9e26f2564ee7329ab50d4d8d27f029c4f88317ea761888138e60d13a3cf51e49676ded406a3ec18433be2ec5d2a49c904eaa9f32d473b99d11550025e026a61c WHIRLPOOL 679c8ee4b3ddf18d94598982969fd12d053493fbe70d4b9f8d3eda4ed9ab0bb6f83d912bb7f8ebd99264beea992cce7c1083d257576551fadf537b5655d23d57
31 DIST php-5.6.21.tar.bz2 14165919 SHA256 b4ed7ab574b689fd6d6494fde954826c06efc85c505e017b8d776c7c7f479590 SHA512 028d62434e7932b4a07fa7d404b8ad938f0ca7968ae2b23386038f77482984d2b6145523e11f37b9e72621c8bf40f08e38a6db1d209493770ac99e13e2fac0d0 WHIRLPOOL e5e606f0a3df1af12c9c0148a29336de0d00a8d7cedbb42727a3e1b6a700e0dcda63c7086e59f175ec060cbf910c2b12815ae3c08bb73d43a84b4f3aaa5d2ed6
32 -DIST php-7.0.6.tar.bz2 14102594 SHA256 14ddf192a9965c858c1e742a61456be2f34a4db87556172c0d76f08de96329b7 SHA512 7f44cc5df3b9bb4394ac39069fdc2993086dd8e159e97275bf5fa4dd399d416e9ea1b057cdf855bae1c0f9c2129af1914495d9d2512ce90a7dd3ce4206aa9286 WHIRLPOOL dfb19b2bee5ea79fc08039544c350e58b329f439fb21b0b75d3b83ae151f449678614fad76829b5d86b885423fe6e1b21622f58aa598c6450732f164ae596b1b
33 +DIST php-5.6.22.tar.bz2 14170522 SHA256 90da8a80cc52fa699cf2bfa4c6fa737c772df7c92b81ef483460aa3b1e9f88c6 SHA512 9d21104832a1053a350ff31196e2c41cef713a9dfe207491236219954cf2eea216049b2f40313fb2a8e9ef641aad0af3f69456bbcebdf8fee312b0dd4a7df320 WHIRLPOOL 2163f683c2e572ddd9a7368e070b172f6b2f2fcb0128ac7db0b8639e0b14b0b1fa7050cb6082b627006e700099c1ca4144b20a2c5cd637ecad697e99a125e284
34 +DIST php-7.0.7.tar.bz2 14106181 SHA256 474f2925c4782b94016e3afbb17b14ff9cc6f4fdb6f6e231b36a378bb18a3d1a SHA512 e6d5ce0eb665aa9beb13f5a3e6fa074ff92ccdd5112c4f2a7dfb1220f55624f2284a0bcfec45b92572762905ab2ac7890e98803860378fdb06752e22f363dbcf WHIRLPOOL edf2fc8fdcb3630c2b417d459b52e1f78cbfbc5b8a9c3191b9401356dfb48d6b7767a98b8f904acb4e96849d54c53ef7f6d91772f2d39a18a26a7540b40857d9
35
36 diff --git a/dev-lang/php/php-7.0.6.ebuild b/dev-lang/php/php-5.5.36.ebuild
37 similarity index 55%
38 copy from dev-lang/php/php-7.0.6.ebuild
39 copy to dev-lang/php/php-5.5.36.ebuild
40 index 92b6507..6c0c143 100644
41 --- a/dev-lang/php/php-7.0.6.ebuild
42 +++ b/dev-lang/php/php-5.5.36.ebuild
43 @@ -4,7 +4,7 @@
44
45 EAPI=5
46
47 -inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd
48 +inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool systemd
49
50 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"
51
52 @@ -12,7 +12,7 @@ function php_get_uri ()
53 {
54 case "${1}" in
55 "php-pre")
56 - echo "http://downloads.php.net/ab/${2}"
57 + echo "http://downloads.php.net/dsp/${2}"
58 ;;
59 "php")
60 echo "http://www.php.net/distributions/${2}"
61 @@ -56,7 +56,7 @@ LICENSE="PHP-3"
62 S="${WORKDIR}/${PHP_P}"
63
64 # We can build the following SAPIs in the given order
65 -SAPIS="embed cli cgi fpm apache2 phpdbg"
66 +SAPIS="embed cli cgi fpm apache2"
67
68 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
69 IUSE="${IUSE}
70 @@ -67,30 +67,20 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
71 crypt +ctype curl debug
72 enchant exif frontbase +fileinfo +filter firebird
73 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
74 - intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
75 - mhash mssql mysql mysqli nls
76 + intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
77 + mssql mysql libmysqlclient mysqli nls
78 oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
79 readline recode selinux +session sharedmem
80 +simplexml snmp soap sockets spell sqlite ssl
81 - sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
82 + sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
83 +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
84
85 DEPEND="
86 - >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
87 + >=app-eselect/eselect-php-0.7.1-r3[apache2?,fpm?]
88 >=dev-libs/libpcre-8.32[unicode]
89 apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
90 - <www-servers/apache-2.4[threads=] ) )"
91 -
92 -# The supported (that is, autodetected) versions of BDB are listed in
93 -# the ./configure script. Other versions *work*, but we need to stick to
94 -# the ones that can be detected to avoid a repeat of bug #564824.
95 -DEPEND="${DEPEND}
96 - berkdb? ( || ( sys-libs/db:5.3
97 - sys-libs/db:5.1
98 - sys-libs/db:4.8
99 - sys-libs/db:4.7
100 - sys-libs/db:4.6
101 - sys-libs/db:4.5 ) )
102 + <www-servers/apache-2.4[threads=] ) )
103 + berkdb? ( =sys-libs/db-4* )
104 bzip2? ( app-arch/bzip2 )
105 cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
106 cjk? ( !gd? (
107 @@ -109,7 +99,7 @@ DEPEND="${DEPEND}
108 firebird? ( dev-db/firebird )
109 gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
110 gdbm? ( >=sys-libs/gdbm-1.8.0 )
111 - gmp? ( dev-libs/gmp:0 )
112 + gmp? ( >=dev-libs/gmp-4.1.2 )
113 iconv? ( virtual/libiconv )
114 imap? ( virtual/imap-c-client[ssl=] )
115 intl? ( dev-libs/icu:= )
116 @@ -119,12 +109,16 @@ DEPEND="${DEPEND}
117 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
118 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
119 mssql? ( dev-db/freetds[mssql] )
120 + libmysqlclient? (
121 + mysql? ( virtual/mysql )
122 + mysqli? ( >=virtual/mysql-4.1 )
123 + )
124 nls? ( sys-devel/gettext )
125 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
126 odbc? ( >=dev-db/unixODBC-1.8.13 )
127 - postgres? ( dev-db/postgresql:* )
128 + postgres? ( dev-db/postgresql )
129 qdbm? ( dev-db/qdbm )
130 - readline? ( sys-libs/readline:0 )
131 + readline? ( sys-libs/readline )
132 recode? ( app-text/recode )
133 sharedmem? ( dev-libs/mm )
134 simplexml? ( >=dev-libs/libxml2-2.6.8 )
135 @@ -132,13 +126,12 @@ DEPEND="${DEPEND}
136 soap? ( >=dev-libs/libxml2-2.6.8 )
137 spell? ( >=app-text/aspell-0.50 )
138 sqlite? ( >=dev-db/sqlite-3.7.6.3 )
139 - ssl? (
140 - !libressl? ( dev-libs/openssl:0 )
141 - libressl? ( dev-libs/libressl )
142 - )
143 + ssl? ( >=dev-libs/openssl-0.9.7 )
144 + sybase-ct? ( dev-db/freetds )
145 tidy? ( app-text/htmltidy )
146 truetype? (
147 =media-libs/freetype-2*
148 + >=media-libs/t1lib-5.0.0
149 !gd? (
150 virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
151 )
152 @@ -162,9 +155,7 @@ DEPEND="${DEPEND}
153
154 php="=${CATEGORY}/${PF}"
155
156 -# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
157 REQUIRED_USE="
158 - cli? ( ^^ ( readline libedit ) )
159 truetype? ( gd )
160 vpx? ( gd )
161 cjk? ( gd )
162 @@ -181,15 +172,18 @@ REQUIRED_USE="
163 ldap-sasl? ( ldap )
164 mhash? ( hash )
165 phar? ( hash )
166 + libmysqlclient? ( || (
167 + mysql
168 + mysqli
169 + pdo
170 + ) )
171
172 qdbm? ( !gdbm )
173 readline? ( !libedit )
174 - recode? ( !imap !mysqli )
175 + recode? ( !imap !mysql !mysqli )
176 sharedmem? ( !threads )
177
178 - mysql? ( || ( mysqli pdo ) )
179 -
180 - || ( cli cgi fpm apache2 embed phpdbg )"
181 + !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
182
183 RDEPEND="${DEPEND}"
184
185 @@ -229,16 +223,16 @@ php_install_ini() {
186 php_set_ini_dir "${phpsapi}"
187
188 local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
189 - cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" || die
190 + cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
191
192 # default to /tmp for save_path, bug #282768
193 - sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
194 + sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}"
195
196 # Set the extension dir
197 - sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" || die
198 + sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
199
200 # Set the include path to point to where we want to find PEAR packages
201 - sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
202 + sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
203
204 dodir "${PHP_INI_DIR#${EPREFIX}}"
205 insinto "${PHP_INI_DIR#${EPREFIX}}"
206 @@ -252,23 +246,27 @@ php_install_ini() {
207
208 if use_if_iuse opcache; then
209 elog "Adding opcache to $PHP_EXT_INI_DIR"
210 - echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
211 - "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
212 - dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
213 - "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
214 + echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
215 + dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
216 fi
217
218 # SAPI-specific handling
219 +
220 if [[ "${sapi}" == "fpm" ]] ; then
221 - einfo "Installing FPM config files php-fpm.conf and www.conf"
222 + [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
223 + einfo "Installing FPM CGI config file php-fpm.conf"
224 insinto "${PHP_INI_DIR#${EPREFIX}}"
225 - doins sapi/fpm/php-fpm.conf
226 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
227 - doins sapi/fpm/www.conf
228 + newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
229 +
230 + # Remove bogus /etc/php-fpm.conf.default (bug 359906)
231 + [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
232 fi
233
234 + # Install PHP ini files into /usr/share/php
235 +
236 dodoc php.ini-development
237 dodoc php.ini-production
238 +
239 }
240
241 php_set_ini_dir() {
242 @@ -278,6 +276,14 @@ php_set_ini_dir() {
243 }
244
245 src_prepare() {
246 + # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path
247 + # ([empty session.save_path]/session_mm_[sapi][gid].sem)
248 + # there is no easy way to circumvent that, all php calls during
249 + # install use -n, so no php.ini file will be used.
250 + # As such, this is the easiest way to get around
251 + addpredict /session_mm_cli250.sem
252 + addpredict /session_mm_cli0.sem
253 +
254 # Change PHP branding
255 # Get the alpha/beta/rc version
256 sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
257 @@ -287,6 +293,13 @@ src_prepare() {
258 sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
259 -i configure.in || die "Failed to fix server platform name"
260
261 + # Prevent PHP from activating the Apache config,
262 + # as we will do that ourselves
263 + sed -i \
264 + -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
265 + -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
266 + configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4
267 +
268 # Patch PHP to support heimdal instead of mit-krb5
269 if has_version "app-crypt/heimdal" ; then
270 sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
271 @@ -295,27 +308,17 @@ src_prepare() {
272 || die "Failed to fix heimdal crypt library reference"
273 fi
274
275 - # Add user patches #357637
276 + #Add user patches #357637
277 epatch_user
278
279 - # Force rebuilding aclocal.m4
280 - rm -f aclocal.m4 || die
281 + #force rebuilding aclocal.m4
282 + rm aclocal.m4
283 eautoreconf
284
285 if [[ ${CHOST} == *-darwin* ]] ; then
286 # http://bugs.php.net/bug.php?id=48795, bug #343481
287 sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
288 fi
289 -
290 - # In php-7.x, the FPM pool configuration files have been split off
291 - # of the main config. By default the pool config files go in
292 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
293 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
294 - # we'll install the pool configuration file "www.conf" there.
295 - php_set_ini_dir fpm
296 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
297 - sapi/fpm/php-fpm.conf.in \
298 - || die 'failed to move the include directory in php-fpm.conf'
299 }
300
301 src_configure() {
302 @@ -324,184 +327,196 @@ src_configure() {
303
304 PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
305
306 - # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
307 - # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
308 - local our_conf=(
309 + # This is a global variable and should be in caps. It isn't because the
310 + # phpconfutils eclass relies on exactly this name...
311 + # for --with-libdir see bug #327025
312 + my_conf="
313 --prefix="${PHP_DESTDIR}"
314 - --mandir="${PHP_DESTDIR}/man"
315 - --infodir="${PHP_DESTDIR}/info"
316 - --libdir="${PHP_DESTDIR}/lib"
317 - --with-libdir="$(get_libdir)"
318 - --localstatedir="${EPREFIX}/var"
319 + --mandir="${PHP_DESTDIR}"/man
320 + --infodir="${PHP_DESTDIR}"/info
321 + --libdir="${PHP_DESTDIR}"/lib
322 + --with-libdir=$(get_libdir)
323 --without-pear
324 - $(use_enable threads maintainer-zts)
325 - )
326 -
327 - our_conf+=(
328 - $(use_enable bcmath bcmath)
329 - $(use_with bzip2 bz2 "${EPREFIX}/usr")
330 - $(use_enable calendar calendar)
331 - $(use_enable ctype ctype)
332 - $(use_with curl curl "${EPREFIX}/usr")
333 - $(use_enable xml dom)
334 - $(use_with enchant enchant "${EPREFIX}/usr")
335 - $(use_enable exif exif)
336 - $(use_enable fileinfo fileinfo)
337 - $(use_enable filter filter)
338 - $(use_enable ftp ftp)
339 - $(use_with nls gettext "${EPREFIX}/usr")
340 - $(use_with gmp gmp "${EPREFIX}/usr")
341 - $(use_enable hash hash)
342 - $(use_with mhash mhash "${EPREFIX}/usr")
343 - $(use_with iconv iconv \
344 - $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
345 - $(use_enable intl intl)
346 - $(use_enable ipv6 ipv6)
347 - $(use_enable json json)
348 - $(use_with kerberos kerberos "${EPREFIX}/usr")
349 - $(use_enable xml libxml)
350 - $(use_with xml libxml-dir "${EPREFIX}/usr")
351 - $(use_enable unicode mbstring)
352 - $(use_with crypt mcrypt "${EPREFIX}/usr")
353 - $(use_with unicode onig "${EPREFIX}/usr")
354 - $(use_with ssl openssl "${EPREFIX}/usr")
355 - $(use_with ssl openssl-dir "${EPREFIX}/usr")
356 - $(use_enable pcntl pcntl)
357 - $(use_enable phar phar)
358 - $(use_enable pdo pdo)
359 - $(use_enable opcache opcache)
360 - $(use_with postgres pgsql "${EPREFIX}/usr")
361 - $(use_enable posix posix)
362 - $(use_with spell pspell "${EPREFIX}/usr")
363 - $(use_with recode recode "${EPREFIX}/usr")
364 - $(use_enable simplexml simplexml)
365 - $(use_enable sharedmem shmop)
366 - $(use_with snmp snmp "${EPREFIX}/usr")
367 - $(use_enable soap soap)
368 - $(use_enable sockets sockets)
369 - $(use_with sqlite sqlite3 "${EPREFIX}/usr")
370 - $(use_enable sysvipc sysvmsg)
371 - $(use_enable sysvipc sysvsem)
372 - $(use_enable sysvipc sysvshm)
373 - $(use_with systemd fpm-systemd)
374 - $(use_with tidy tidy "${EPREFIX}/usr")
375 - $(use_enable tokenizer tokenizer)
376 - $(use_enable wddx wddx)
377 - $(use_enable xml xml)
378 - $(use_enable xmlreader xmlreader)
379 - $(use_enable xmlwriter xmlwriter)
380 - $(use_with xmlrpc xmlrpc)
381 - $(use_with xslt xsl "${EPREFIX}/usr")
382 - $(use_enable zip zip)
383 - $(use_with zlib zlib "${EPREFIX}/usr")
384 - $(use_enable debug debug)
385 - )
386 + $(use_enable threads maintainer-zts)"
387 +
388 + # extension USE flag shared
389 + my_conf+="
390 + $(use_enable bcmath bcmath )
391 + $(use_with bzip2 bz2 "${EPREFIX}"/usr)
392 + $(use_enable calendar calendar )
393 + $(use_enable ctype ctype )
394 + $(use_with curl curl "${EPREFIX}"/usr)
395 + $(use_enable xml dom )
396 + $(use_with enchant enchant "${EPREFIX}"/usr)
397 + $(use_enable exif exif )
398 + $(use_enable fileinfo fileinfo )
399 + $(use_enable filter filter )
400 + $(use_enable ftp ftp )
401 + $(use_with nls gettext "${EPREFIX}"/usr)
402 + $(use_with gmp gmp "${EPREFIX}"/usr)
403 + $(use_enable hash hash )
404 + $(use_with mhash mhash "${EPREFIX}"/usr)
405 + $(use_with iconv iconv $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}"/usr))
406 + $(use_enable intl intl )
407 + $(use_enable ipv6 ipv6 )
408 + $(use_enable json json )
409 + $(use_with kerberos kerberos "${EPREFIX}"/usr)
410 + $(use_enable xml libxml )
411 + $(use_with xml libxml-dir "${EPREFIX}"/usr)
412 + $(use_enable unicode mbstring )
413 + $(use_with crypt mcrypt "${EPREFIX}"/usr)
414 + $(use_with mssql mssql "${EPREFIX}"/usr)
415 + $(use_with unicode onig "${EPREFIX}"/usr)
416 + $(use_with ssl openssl "${EPREFIX}"/usr)
417 + $(use_with ssl openssl-dir "${EPREFIX}"/usr)
418 + $(use_enable pcntl pcntl )
419 + $(use_enable phar phar )
420 + $(use_enable pdo pdo )
421 + $(use_enable opcache opcache )
422 + $(use_with postgres pgsql "${EPREFIX}"/usr)
423 + $(use_enable posix posix )
424 + $(use_with spell pspell "${EPREFIX}"/usr)
425 + $(use_with recode recode "${EPREFIX}"/usr)
426 + $(use_enable simplexml simplexml )
427 + $(use_enable sharedmem shmop )
428 + $(use_with snmp snmp "${EPREFIX}"/usr)
429 + $(use_enable soap soap )
430 + $(use_enable sockets sockets )
431 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
432 + $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
433 + $(use_enable sysvipc sysvmsg )
434 + $(use_enable sysvipc sysvsem )
435 + $(use_enable sysvipc sysvshm )
436 + $(use_with systemd fpm-systemd)
437 + $(use_with tidy tidy "${EPREFIX}"/usr)
438 + $(use_enable tokenizer tokenizer )
439 + $(use_enable wddx wddx )
440 + $(use_enable xml xml )
441 + $(use_enable xmlreader xmlreader )
442 + $(use_enable xmlwriter xmlwriter )
443 + $(use_with xmlrpc xmlrpc)
444 + $(use_with xslt xsl "${EPREFIX}"/usr)
445 + $(use_enable zip zip )
446 + $(use_with zlib zlib "${EPREFIX}"/usr)
447 + $(use_enable debug debug )"
448
449 # DBA support
450 if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
451 || use qdbm ; then
452 - our_conf+=( "--enable-dba${shared}" )
453 + my_conf="${my_conf} --enable-dba${shared}"
454 fi
455
456 # DBA drivers support
457 - our_conf+=(
458 - $(use_with cdb cdb)
459 - $(use_with berkdb db4 "${EPREFIX}/usr")
460 - $(use_enable flatfile flatfile)
461 - $(use_with gdbm gdbm "${EPREFIX}/usr")
462 - $(use_enable inifile inifile)
463 - $(use_with qdbm qdbm "${EPREFIX}/usr")
464 - )
465 + my_conf+="
466 + $(use_with cdb cdb)
467 + $(use_with berkdb db4 ${EPREFIX}/usr)
468 + $(use_enable flatfile flatfile )
469 + $(use_with gdbm gdbm ${EPREFIX}/usr)
470 + $(use_enable inifile inifile )
471 + $(use_with qdbm qdbm ${EPREFIX}/usr)"
472
473 # Support for the GD graphics library
474 - our_conf+=(
475 - $(use_with truetype freetype-dir "${EPREFIX}/usr")
476 - $(use_enable cjk gd-jis-conv)
477 - $(use_with gd jpeg-dir "${EPREFIX}/usr")
478 - $(use_with gd png-dir "${EPREFIX}/usr")
479 - $(use_with xpm xpm-dir "${EPREFIX}/usr")
480 - )
481 - if use vpx; then
482 - our_conf+=( --with-vpx-dir="${EPREFIX}/usr" )
483 - fi
484 + my_conf+="
485 + $(use_with truetype freetype-dir ${EPREFIX}/usr)
486 + $(use_with truetype t1lib ${EPREFIX}/usr)
487 + $(use_enable cjk gd-jis-conv )
488 + $(use_with gd jpeg-dir ${EPREFIX}/usr)
489 + $(use_with gd png-dir ${EPREFIX}/usr)
490 + $(use_with xpm xpm-dir ${EPREFIX}/usr)
491 + $(use_with vpx vpx-dir ${EPREFIX}/usr)"
492 # enable gd last, so configure can pick up the previous settings
493 - our_conf+=( $(use_with gd gd) )
494 + my_conf+="
495 + $(use_with gd gd)"
496
497 # IMAP support
498 if use imap ; then
499 - our_conf+=(
500 - $(use_with imap imap "${EPREFIX}/usr")
501 - $(use_with ssl imap-ssl "${EPREFIX}/usr")
502 - )
503 + my_conf+="
504 + $(use_with imap imap ${EPREFIX}/usr)
505 + $(use_with ssl imap-ssl ${EPREFIX}/usr)"
506 fi
507
508 # Interbase/firebird support
509 - our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
510 +
511 + if use firebird ; then
512 + my_conf+="
513 + $(use_with firebird interbase ${EPREFIX}/usr)"
514 + fi
515
516 # LDAP support
517 if use ldap ; then
518 - our_conf+=(
519 - $(use_with ldap ldap "${EPREFIX}/usr")
520 - $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
521 - )
522 + my_conf+="
523 + $(use_with ldap ldap ${EPREFIX}/usr)
524 + $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
525 fi
526
527 # MySQL support
528 local mysqllib="mysqlnd"
529 local mysqlilib="mysqlnd"
530 + use libmysqlclient && mysqllib="${EPREFIX}/usr"
531 + use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
532
533 - our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
534 + my_conf+=" $(use_with mysql mysql $mysqllib)"
535 + my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
536
537 - local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
538 - if use mysql || use mysqli ; then
539 - our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
540 + local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
541 + if use mysql ; then
542 + my_conf+="${mysqlsock}"
543 + elif use mysqli ; then
544 + my_conf+="${mysqlsock}"
545 fi
546
547 # ODBC support
548 - our_conf+=(
549 - $(use_with odbc unixODBC "${EPREFIX}/usr")
550 - $(use_with iodbc iodbc "${EPREFIX}/usr")
551 - )
552 + if use odbc ; then
553 + my_conf+="
554 + $(use_with odbc unixODBC ${EPREFIX}/usr)"
555 + fi
556 +
557 + if use iodbc ; then
558 + my_conf+="
559 + $(use_with iodbc iodbc ${EPREFIX}/usr)"
560 + fi
561
562 # Oracle support
563 - our_conf+=( $(use_with oci8-instant-client oci8) )
564 + if use oci8-instant-client ; then
565 + my_conf+="
566 + $(use_with oci8-instant-client oci8)"
567 + fi
568
569 # PDO support
570 if use pdo ; then
571 - our_conf+=(
572 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
573 - $(use_with mysql pdo-mysql "${mysqllib}")
574 - $(use_with postgres pdo-pgsql)
575 - $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
576 - $(use_with firebird pdo-firebird "${EPREFIX}/usr")
577 - $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
578 - $(use_with oci8-instant-client pdo-oci)
579 - )
580 + my_conf+="
581 + $(use_with mssql pdo-dblib )
582 + $(use_with mysql pdo-mysql ${mysqllib})
583 + $(use_with postgres pdo-pgsql )
584 + $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
585 + $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
586 + if use oci8-instant-client ; then
587 + my_conf+="
588 + $(use_with oci8-instant-client pdo-oci)"
589 + fi
590 fi
591
592 # readline/libedit support
593 - our_conf+=(
594 - $(use_with readline readline "${EPREFIX}/usr")
595 - $(use_with libedit libedit "${EPREFIX}/usr")
596 - )
597 + my_conf+="
598 + $(use_with readline readline ${EPREFIX}/usr)
599 + $(use_with libedit libedit ${EPREFIX}/usr)"
600
601 # Session support
602 if use session ; then
603 - our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
604 + my_conf+="
605 + $(use_with sharedmem mm ${EPREFIX}/usr)"
606 else
607 - our_conf+=( $(use_enable session session) )
608 + my_conf+="
609 + $(use_enable session session )"
610 fi
611
612 # Use pic for shared modules such as apache2's mod_php
613 - our_conf+=( --with-pic )
614 + my_conf="${my_conf} --with-pic"
615
616 # we use the system copy of pcre
617 # --with-pcre-regex affects ext/pcre
618 # --with-pcre-dir affects ext/filter and ext/zip
619 - our_conf+=(
620 - --with-pcre-regex="${EPREFIX}/usr"
621 - --with-pcre-dir="${EPREFIX}/usr"
622 - )
623 + my_conf="${my_conf} --with-pcre-regex=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
624
625 # Catch CFLAGS problems
626 # Fixes bug #14067.
627 @@ -509,56 +524,43 @@ src_configure() {
628 replace-cpu-flags "k6*" "i586"
629
630 # Support user-passed configuration parameters
631 - our_conf+=( ${EXTRA_ECONF:-} )
632 + my_conf="${my_conf} ${EXTRA_ECONF:-}"
633
634 # Support the Apache2 extras, they must be set globally for all
635 # SAPIs to work correctly, especially for external PHP extensions
636
637 - mkdir -p "${WORKDIR}/sapis-build" || die
638 + mkdir -p "${WORKDIR}/sapis-build"
639 for one_sapi in $SAPIS ; do
640 use "${one_sapi}" || continue
641 php_set_ini_dir "${one_sapi}"
642
643 - # The BUILD_DIR variable is used to determine where to output
644 - # the files that autotools creates. This was all originally
645 - # based on the autotools-utils eclass.
646 - BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
647 - cp -r "${S}" "${BUILD_DIR}" || die
648 - cd "${BUILD_DIR}" || die
649 + cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}"
650 + cd "${WORKDIR}/sapis-build/${one_sapi}"
651
652 - local sapi_conf=(
653 - --with-config-file-path="${PHP_INI_DIR}"
654 - --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
655 - )
656 + sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}
657 + --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}"
658
659 for sapi in $SAPIS ; do
660 case "$sapi" in
661 - cli|cgi|embed|fpm|phpdbg)
662 + cli|cgi|embed|fpm)
663 if [[ "${one_sapi}" == "${sapi}" ]] ; then
664 - sapi_conf+=( "--enable-${sapi}" )
665 + sapi_conf="${sapi_conf} --enable-${sapi}"
666 else
667 - sapi_conf+=( "--disable-${sapi}" )
668 + sapi_conf="${sapi_conf} --disable-${sapi}"
669 fi
670 ;;
671
672 apache2)
673 if [[ "${one_sapi}" == "${sapi}" ]] ; then
674 - sapi_conf+=( --with-apxs2="${EPREFIX}/usr/sbin/apxs" )
675 + sapi_conf="${sapi_conf} --with-apxs2=${EPREFIX}/usr/sbin/apxs"
676 else
677 - sapi_conf+=( --without-apxs2 )
678 + sapi_conf="${sapi_conf} --without-apxs2"
679 fi
680 ;;
681 esac
682 done
683
684 - # Construct the $myeconfargs array by concatenating $our_conf
685 - # (the common args) and $sapi_conf (the SAPI-specific args).
686 - local myeconfargs=( "${our_conf[@]}" )
687 - myeconfargs+=( "${sapi_conf[@]}" )
688 -
689 - pushd "${BUILD_DIR}" > /dev/null || die
690 - econf "${myeconfargs[@]}"
691 - popd > /dev/null || die
692 + econf ${sapi_conf}
693 done
694 }
695
696 @@ -569,9 +571,8 @@ src_compile() {
697
698 for sapi in ${SAPIS} ; do
699 if use "${sapi}"; then
700 - cd "${WORKDIR}/sapis-build/$sapi" || \
701 - die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
702 - emake
703 + cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
704 + emake || die "emake failed"
705 fi
706 done
707 }
708 @@ -593,14 +594,15 @@ src_install() {
709 dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
710
711 # Install php environment (without any sapis)
712 - cd "${WORKDIR}/sapis-build/$first_sapi" || die
713 + cd "${WORKDIR}/sapis-build/$first_sapi"
714 emake INSTALL_ROOT="${D}" \
715 - install-build install-headers install-programs
716 + install-build install-headers install-programs \
717 + || die "emake install failed"
718
719 local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
720
721 # Create the directory where we'll put version-specific php scripts
722 - keepdir "/usr/share/php${PHP_MV}"
723 + keepdir /usr/share/php${PHP_MV}
724
725 local sapi="", file=""
726 local sapi_list=""
727 @@ -608,14 +610,13 @@ src_install() {
728 for sapi in ${SAPIS}; do
729 if use "${sapi}" ; then
730 einfo "Installing SAPI: ${sapi}"
731 - cd "${WORKDIR}/sapis-build/${sapi}" || die
732 + cd "${WORKDIR}/sapis-build/${sapi}"
733
734 if [[ "${sapi}" == "apache2" ]] ; then
735 # We're specifically not using emake install-sapi as libtool
736 # may cause unnecessary relink failures (see bug #351266)
737 insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
738 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
739 - "libphp${PHP_MV}$(get_libname)"
740 + newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
741 keepdir "/usr/$(get_libdir)/apache2/modules"
742 else
743 # needed each time, php_install_ini would reset it
744 @@ -634,18 +635,15 @@ src_install() {
745 embed)
746 source="libs/libphp${PHP_MV}$(get_libname)"
747 ;;
748 - phpdbg)
749 - source="sapi/phpdbg/phpdbg"
750 - ;;
751 *)
752 die "unhandled sapi in src_install"
753 ;;
754 esac
755
756 if [[ "${source}" == *"$(get_libname)" ]]; then
757 - dolib.so "${source}"
758 + dolib.so "${source}" || die "Unable to install ${sapi} sapi"
759 else
760 - dobin "${source}"
761 + dobin "${source}" || die "Unable to install ${sapi} sapi"
762 local name="$(basename ${source})"
763 dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
764 fi
765 @@ -665,25 +663,26 @@ src_install() {
766
767 # Installing opcache module
768 if use_if_iuse opcache ; then
769 - dolib.so "modules/opcache$(get_libname)"
770 + dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
771 fi
772
773 # Install env.d files
774 - newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
775 - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
776 - sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
777 + newenvd "${FILESDIR}/20php5-envd" \
778 + "20php${SLOT}"
779 + sed -e "s|/lib/|/$(get_libdir)/|g" -i \
780 + "${ED}/etc/env.d/20php${SLOT}"
781 + sed -e "s|php5|php${SLOT}|g" -i \
782 + "${ED}/etc/env.d/20php${SLOT}"
783
784 # set php-config variable correctly (bug #278439)
785 sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
786 - "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
787 + "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
788
789 if use fpm ; then
790 if use systemd; then
791 - systemd_newunit "${FILESDIR}/php-fpm_at.service" \
792 - "php-fpm@${SLOT}.service"
793 + systemd_newunit "${FILESDIR}/php-fpm_at.service" "php-fpm@${SLOT}.service"
794 else
795 - systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
796 - "php-fpm@${SLOT}.service"
797 + systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" "php-fpm@${SLOT}.service"
798 fi
799 fi
800 }
801 @@ -702,13 +701,11 @@ src_test() {
802 export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
803 fi
804
805 - REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
806 - "session.save_path=${T}" \
807 - "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
808 - "session.save_path=${T}"
809 + REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
810 + "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
811
812 for name in ${EXPECTED_TEST_FAILURES}; do
813 - mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
814 + mv "${name}.out" "${name}.out.orig" 2>/dev/null
815 done
816
817 local failed="$(find -name '*.out')"
818 @@ -742,7 +739,7 @@ pkg_postinst() {
819 # Output some general info to the user
820 if use apache2 ; then
821 APACHE2_MOD_DEFINE="PHP"
822 - APACHE2_MOD_CONF="70_mod_php" # Provided by app-eselect/eselect-php
823 + APACHE2_MOD_CONF="70_mod_php" # provided by app-eselect/eselect-php
824 apache-module_pkg_postinst
825 fi
826
827 @@ -752,7 +749,7 @@ pkg_postinst() {
828 if use $m ; then
829 local ci=$(eselect php show $m)
830 if [[ -z $ci ]]; then
831 - eselect php set $m php${SLOT} || die
832 + eselect php set $m php${SLOT}
833 einfo "Switched ${m} to use php:${SLOT}"
834 einfo
835 elif [[ $ci != "php${SLOT}" ]] ; then
836 @@ -763,39 +760,25 @@ pkg_postinst() {
837 fi
838 done
839
840 - # Remove dead symlinks for SAPIs that were just disabled. For
841 - # example, if the user has the cgi SAPI enabled, then he has an
842 - # eselect-php symlink for it. If he later reinstalls PHP with
843 - # USE="-cgi", that symlink will break. This call to eselect is
844 - # supposed to remove that dead link per bug 572436.
845 - eselect php cleanup || die
846 -
847 - elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes"
848 - elog "php${SLOT/./-} in order to compile extensions for the ${SLOT} ABI."
849 + elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
850 + elog "to compile extensions for the ${SLOT} ABI"
851 elog
852 - elog "This ebuild installed a version of php.ini based on"
853 - elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
854 - elog "php.ini to install by default by setting PHP_INI_VERSION"
855 - elog "to either 'production' or 'development' in your make.conf."
856 - elog "Both versions of php.ini can be found with the PHP docs in"
857 - elog "${EPREFIX}/usr/share/doc/${PF}"
858 + if ! use readline && use cli ; then
859 + ewarn "Note that in order to use php interactivly, you need to enable"
860 + ewarn "the readline USE flag or php -a will hang"
861 + fi
862 elog
863 - elog "For more details on how version slotting works, please see"
864 - elog "the wiki:"
865 + elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
866 + elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
867 + elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
868 + elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
869 +
870 elog
871 - elog " https://wiki.gentoo.org/wiki/PHP"
872 + elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
873 + elog "https://www.gentoo.org/proj/en/php/php-upgrading.xml"
874 elog
875 }
876
877 -pkg_postrm() {
878 - # This serves two purposes. First, if we have just removed the last
879 - # installed version of PHP, then this will remove any dead symlinks
880 - # belonging to eselect-php. Second, if a user upgrades slots from
881 - # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
882 - # his existing symlinks to point to the new 7.0 installation. The
883 - # latter is bug 432962.
884 - #
885 - # Note: the eselect-php package may not be installed at this point,
886 - # so we can't die() if this command fails.
887 +pkg_prerm() {
888 eselect php cleanup
889 }
890
891 diff --git a/dev-lang/php/php-7.0.6.ebuild b/dev-lang/php/php-5.6.22.ebuild
892 similarity index 94%
893 copy from dev-lang/php/php-7.0.6.ebuild
894 copy to dev-lang/php/php-5.6.22.ebuild
895 index 92b6507..0fb581b 100644
896 --- a/dev-lang/php/php-7.0.6.ebuild
897 +++ b/dev-lang/php/php-5.6.22.ebuild
898 @@ -12,7 +12,7 @@ function php_get_uri ()
899 {
900 case "${1}" in
901 "php-pre")
902 - echo "http://downloads.php.net/ab/${2}"
903 + echo "http://downloads.php.net/dsp/${2}"
904 ;;
905 "php")
906 echo "http://www.php.net/distributions/${2}"
907 @@ -56,7 +56,7 @@ LICENSE="PHP-3"
908 S="${WORKDIR}/${PHP_P}"
909
910 # We can build the following SAPIs in the given order
911 -SAPIS="embed cli cgi fpm apache2 phpdbg"
912 +SAPIS="embed cli cgi fpm apache2"
913
914 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
915 IUSE="${IUSE}
916 @@ -68,11 +68,11 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
917 enchant exif frontbase +fileinfo +filter firebird
918 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
919 intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
920 - mhash mssql mysql mysqli nls
921 + mhash mssql mysql libmysqlclient mysqli nls
922 oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
923 readline recode selinux +session sharedmem
924 +simplexml snmp soap sockets spell sqlite ssl
925 - sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
926 + sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
927 +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
928
929 DEPEND="
930 @@ -119,6 +119,10 @@ DEPEND="${DEPEND}
931 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
932 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
933 mssql? ( dev-db/freetds[mssql] )
934 + libmysqlclient? (
935 + mysql? ( virtual/mysql )
936 + mysqli? ( >=virtual/mysql-4.1 )
937 + )
938 nls? ( sys-devel/gettext )
939 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
940 odbc? ( >=dev-db/unixODBC-1.8.13 )
941 @@ -136,9 +140,11 @@ DEPEND="${DEPEND}
942 !libressl? ( dev-libs/openssl:0 )
943 libressl? ( dev-libs/libressl )
944 )
945 + sybase-ct? ( dev-db/freetds )
946 tidy? ( app-text/htmltidy )
947 truetype? (
948 =media-libs/freetype-2*
949 + >=media-libs/t1lib-5.0.0
950 !gd? (
951 virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
952 )
953 @@ -181,15 +187,18 @@ REQUIRED_USE="
954 ldap-sasl? ( ldap )
955 mhash? ( hash )
956 phar? ( hash )
957 + libmysqlclient? ( || (
958 + mysql
959 + mysqli
960 + pdo
961 + ) )
962
963 qdbm? ( !gdbm )
964 readline? ( !libedit )
965 - recode? ( !imap !mysqli )
966 + recode? ( !imap !mysql !mysqli )
967 sharedmem? ( !threads )
968
969 - mysql? ( || ( mysqli pdo ) )
970 -
971 - || ( cli cgi fpm apache2 embed phpdbg )"
972 + !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
973
974 RDEPEND="${DEPEND}"
975
976 @@ -260,11 +269,9 @@ php_install_ini() {
977
978 # SAPI-specific handling
979 if [[ "${sapi}" == "fpm" ]] ; then
980 - einfo "Installing FPM config files php-fpm.conf and www.conf"
981 + einfo "Installing FPM config file php-fpm.conf"
982 insinto "${PHP_INI_DIR#${EPREFIX}}"
983 doins sapi/fpm/php-fpm.conf
984 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
985 - doins sapi/fpm/www.conf
986 fi
987
988 dodoc php.ini-development
989 @@ -287,6 +294,14 @@ src_prepare() {
990 sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
991 -i configure.in || die "Failed to fix server platform name"
992
993 + # Prevent PHP from activating the Apache config,
994 + # as we will do that ourselves
995 + sed -i \
996 + -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
997 + -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
998 + configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
999 + || die
1000 +
1001 # Patch PHP to support heimdal instead of mit-krb5
1002 if has_version "app-crypt/heimdal" ; then
1003 sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
1004 @@ -306,16 +321,6 @@ src_prepare() {
1005 # http://bugs.php.net/bug.php?id=48795, bug #343481
1006 sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
1007 fi
1008 -
1009 - # In php-7.x, the FPM pool configuration files have been split off
1010 - # of the main config. By default the pool config files go in
1011 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
1012 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
1013 - # we'll install the pool configuration file "www.conf" there.
1014 - php_set_ini_dir fpm
1015 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
1016 - sapi/fpm/php-fpm.conf.in \
1017 - || die 'failed to move the include directory in php-fpm.conf'
1018 }
1019
1020 src_configure() {
1021 @@ -363,6 +368,7 @@ src_configure() {
1022 $(use_with xml libxml-dir "${EPREFIX}/usr")
1023 $(use_enable unicode mbstring)
1024 $(use_with crypt mcrypt "${EPREFIX}/usr")
1025 + $(use_with mssql mssql "${EPREFIX}/usr")
1026 $(use_with unicode onig "${EPREFIX}/usr")
1027 $(use_with ssl openssl "${EPREFIX}/usr")
1028 $(use_with ssl openssl-dir "${EPREFIX}/usr")
1029 @@ -380,6 +386,7 @@ src_configure() {
1030 $(use_enable soap soap)
1031 $(use_enable sockets sockets)
1032 $(use_with sqlite sqlite3 "${EPREFIX}/usr")
1033 + $(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
1034 $(use_enable sysvipc sysvmsg)
1035 $(use_enable sysvipc sysvsem)
1036 $(use_enable sysvipc sysvshm)
1037 @@ -416,14 +423,13 @@ src_configure() {
1038 # Support for the GD graphics library
1039 our_conf+=(
1040 $(use_with truetype freetype-dir "${EPREFIX}/usr")
1041 + $(use_with truetype t1lib "${EPREFIX}/usr")
1042 $(use_enable cjk gd-jis-conv)
1043 $(use_with gd jpeg-dir "${EPREFIX}/usr")
1044 $(use_with gd png-dir "${EPREFIX}/usr")
1045 $(use_with xpm xpm-dir "${EPREFIX}/usr")
1046 + $(use_with vpx vpx-dir "${EPREFIX}/usr")
1047 )
1048 - if use vpx; then
1049 - our_conf+=( --with-vpx-dir="${EPREFIX}/usr" )
1050 - fi
1051 # enable gd last, so configure can pick up the previous settings
1052 our_conf+=( $(use_with gd gd) )
1053
1054 @@ -449,7 +455,10 @@ src_configure() {
1055 # MySQL support
1056 local mysqllib="mysqlnd"
1057 local mysqlilib="mysqlnd"
1058 + use libmysqlclient && mysqllib="${EPREFIX}/usr"
1059 + use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
1060
1061 + our_conf+=( $(use_with mysql mysql "${mysqllib}") )
1062 our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
1063
1064 local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
1065 @@ -469,7 +478,7 @@ src_configure() {
1066 # PDO support
1067 if use pdo ; then
1068 our_conf+=(
1069 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
1070 + $(use_with mssql pdo-dblib)
1071 $(use_with mysql pdo-mysql "${mysqllib}")
1072 $(use_with postgres pdo-pgsql)
1073 $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
1074 @@ -533,7 +542,7 @@ src_configure() {
1075
1076 for sapi in $SAPIS ; do
1077 case "$sapi" in
1078 - cli|cgi|embed|fpm|phpdbg)
1079 + cli|cgi|embed|fpm)
1080 if [[ "${one_sapi}" == "${sapi}" ]] ; then
1081 sapi_conf+=( "--enable-${sapi}" )
1082 else
1083 @@ -614,7 +623,7 @@ src_install() {
1084 # We're specifically not using emake install-sapi as libtool
1085 # may cause unnecessary relink failures (see bug #351266)
1086 insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
1087 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
1088 + newins ".libs/libphp5$(get_libname)" \
1089 "libphp${PHP_MV}$(get_libname)"
1090 keepdir "/usr/$(get_libdir)/apache2/modules"
1091 else
1092 @@ -634,9 +643,6 @@ src_install() {
1093 embed)
1094 source="libs/libphp${PHP_MV}$(get_libname)"
1095 ;;
1096 - phpdbg)
1097 - source="sapi/phpdbg/phpdbg"
1098 - ;;
1099 *)
1100 die "unhandled sapi in src_install"
1101 ;;
1102
1103 diff --git a/dev-lang/php/php-7.0.6.ebuild b/dev-lang/php/php-7.0.7.ebuild
1104 similarity index 100%
1105 rename from dev-lang/php/php-7.0.6.ebuild
1106 rename to dev-lang/php/php-7.0.7.ebuild