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: Mon, 11 Jul 2016 02:04:06
Message-Id: 1468200361.7cd30f93ff9444fe97fe6ed2f44979c8598cf26a.mjo@gentoo
1 commit: 7cd30f93ff9444fe97fe6ed2f44979c8598cf26a
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 11 01:25:46 2016 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 11 01:26:01 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cd30f93
7
8 dev-lang/php: new edit/revision to hide some elog messages when possible.
9
10 Two of the elog messages that we show only need to be dealt with
11 once. If the user has the recently-emerged slot of PHP in his
12 PHP_TARGETS already, then we don't need to bug him about that. And if
13 he has PHP_INI_VERSION set to a legal value, then we don't need to
14 inform him about that either.
15
16 A new revision is made for the php-5.6.x series. The 7.x series is not
17 stable, so an in-place edit was made.
18
19 Gentoo-Bug: 440574
20
21 Package-Manager: portage-2.2.28
22
23 .../php/{php-7.0.8.ebuild => php-5.6.23-r1.ebuild} | 117 ++++++++++++---------
24 dev-lang/php/php-7.0.8.ebuild | 47 +++++----
25 2 files changed, 92 insertions(+), 72 deletions(-)
26
27 diff --git a/dev-lang/php/php-7.0.8.ebuild b/dev-lang/php/php-5.6.23-r1.ebuild
28 similarity index 90%
29 copy from dev-lang/php/php-7.0.8.ebuild
30 copy to dev-lang/php/php-5.6.23-r1.ebuild
31 index fbc800d..0696638 100644
32 --- a/dev-lang/php/php-7.0.8.ebuild
33 +++ b/dev-lang/php/php-5.6.23-r1.ebuild
34 @@ -12,7 +12,7 @@ function php_get_uri ()
35 {
36 case "${1}" in
37 "php-pre")
38 - echo "http://downloads.php.net/ab/${2}"
39 + echo "http://downloads.php.net/dsp/${2}"
40 ;;
41 "php")
42 echo "http://www.php.net/distributions/${2}"
43 @@ -56,7 +56,7 @@ LICENSE="PHP-3"
44 S="${WORKDIR}/${PHP_P}"
45
46 # We can build the following SAPIs in the given order
47 -SAPIS="embed cli cgi fpm apache2 phpdbg"
48 +SAPIS="embed cli cgi fpm apache2"
49
50 # SAPIs and SAPI-specific USE flags (cli SAPI is default on):
51 IUSE="${IUSE}
52 @@ -68,11 +68,11 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
53 enchant exif frontbase +fileinfo +filter firebird
54 flatfile ftp gd gdbm gmp +hash +iconv imap inifile
55 intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
56 - mhash mssql mysql mysqli nls
57 + mhash mssql mysql libmysqlclient mysqli nls
58 oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
59 readline recode selinux +session sharedmem
60 +simplexml snmp soap sockets spell sqlite ssl
61 - sysvipc systemd tidy +tokenizer truetype unicode wddx webp
62 + sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
63 +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
64
65 DEPEND="
66 @@ -119,6 +119,10 @@ DEPEND="${DEPEND}
67 ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
68 libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
69 mssql? ( dev-db/freetds[mssql] )
70 + libmysqlclient? (
71 + mysql? ( virtual/mysql )
72 + mysqli? ( >=virtual/mysql-4.1 )
73 + )
74 nls? ( sys-devel/gettext )
75 oci8-instant-client? ( dev-db/oracle-instantclient-basic )
76 odbc? ( >=dev-db/unixODBC-1.8.13 )
77 @@ -136,15 +140,17 @@ DEPEND="${DEPEND}
78 !libressl? ( dev-libs/openssl:0 )
79 libressl? ( dev-libs/libressl )
80 )
81 + sybase-ct? ( dev-db/freetds )
82 tidy? ( app-text/htmltidy )
83 truetype? (
84 =media-libs/freetype-2*
85 + >=media-libs/t1lib-5.0.0
86 !gd? (
87 virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
88 )
89 unicode? ( dev-libs/oniguruma )
90 + vpx? ( media-libs/libvpx )
91 wddx? ( >=dev-libs/libxml2-2.6.8 )
92 - webp? ( media-libs/libwebp )
93 xml? ( >=dev-libs/libxml2-2.6.8 )
94 xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
95 xmlreader? ( >=dev-libs/libxml2-2.6.8 )
96 @@ -166,7 +172,7 @@ php="=${CATEGORY}/${PF}"
97 REQUIRED_USE="
98 cli? ( ^^ ( readline libedit ) )
99 truetype? ( gd )
100 - webp? ( gd )
101 + vpx? ( gd )
102 cjk? ( gd )
103 exif? ( gd )
104
105 @@ -181,15 +187,18 @@ REQUIRED_USE="
106 ldap-sasl? ( ldap )
107 mhash? ( hash )
108 phar? ( hash )
109 + libmysqlclient? ( || (
110 + mysql
111 + mysqli
112 + pdo
113 + ) )
114
115 qdbm? ( !gdbm )
116 readline? ( !libedit )
117 - recode? ( !imap !mysqli )
118 + recode? ( !imap !mysql !mysqli )
119 sharedmem? ( !threads )
120
121 - mysql? ( || ( mysqli pdo ) )
122 -
123 - || ( cli cgi fpm apache2 embed phpdbg )"
124 + !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
125
126 RDEPEND="${DEPEND}"
127
128 @@ -204,16 +213,12 @@ DEPEND="${DEPEND}
129 >=sys-devel/libtool-1.5.18"
130
131 # Allow users to install production version if they want to
132 +if [[ "${PHP_INI_VERSION}" == "production" ]]; then
133 + PHP_INI_UPSTREAM="php.ini-production"
134 +else
135 + PHP_INI_UPSTREAM="php.ini-development"
136 +fi
137
138 -case "${PHP_INI_VERSION}" in
139 - production|development)
140 - ;;
141 - *)
142 - PHP_INI_VERSION="development"
143 - ;;
144 -esac
145 -
146 -PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
147 PHP_INI_FILE="php.ini"
148
149 want_apache
150 @@ -260,11 +265,9 @@ php_install_ini() {
151
152 # SAPI-specific handling
153 if [[ "${sapi}" == "fpm" ]] ; then
154 - einfo "Installing FPM config files php-fpm.conf and www.conf"
155 + einfo "Installing FPM config file php-fpm.conf"
156 insinto "${PHP_INI_DIR#${EPREFIX}}"
157 doins sapi/fpm/php-fpm.conf
158 - insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
159 - doins sapi/fpm/www.conf
160 fi
161
162 dodoc php.ini-development
163 @@ -287,6 +290,14 @@ src_prepare() {
164 sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
165 -i configure.in || die "Failed to fix server platform name"
166
167 + # Prevent PHP from activating the Apache config,
168 + # as we will do that ourselves
169 + sed -i \
170 + -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
171 + -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
172 + configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
173 + || die
174 +
175 # Patch PHP to support heimdal instead of mit-krb5
176 if has_version "app-crypt/heimdal" ; then
177 sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
178 @@ -306,16 +317,6 @@ src_prepare() {
179 # http://bugs.php.net/bug.php?id=48795, bug #343481
180 sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
181 fi
182 -
183 - # In php-7.x, the FPM pool configuration files have been split off
184 - # of the main config. By default the pool config files go in
185 - # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
186 - # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
187 - # we'll install the pool configuration file "www.conf" there.
188 - php_set_ini_dir fpm
189 - sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
190 - sapi/fpm/php-fpm.conf.in \
191 - || die 'failed to move the include directory in php-fpm.conf'
192 }
193
194 src_configure() {
195 @@ -363,6 +364,7 @@ src_configure() {
196 $(use_with xml libxml-dir "${EPREFIX}/usr")
197 $(use_enable unicode mbstring)
198 $(use_with crypt mcrypt "${EPREFIX}/usr")
199 + $(use_with mssql mssql "${EPREFIX}/usr")
200 $(use_with unicode onig "${EPREFIX}/usr")
201 $(use_with ssl openssl "${EPREFIX}/usr")
202 $(use_with ssl openssl-dir "${EPREFIX}/usr")
203 @@ -380,6 +382,7 @@ src_configure() {
204 $(use_enable soap soap)
205 $(use_enable sockets sockets)
206 $(use_with sqlite sqlite3 "${EPREFIX}/usr")
207 + $(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
208 $(use_enable sysvipc sysvmsg)
209 $(use_enable sysvipc sysvsem)
210 $(use_enable sysvipc sysvshm)
211 @@ -416,14 +419,13 @@ src_configure() {
212 # Support for the GD graphics library
213 our_conf+=(
214 $(use_with truetype freetype-dir "${EPREFIX}/usr")
215 + $(use_with truetype t1lib "${EPREFIX}/usr")
216 $(use_enable cjk gd-jis-conv)
217 $(use_with gd jpeg-dir "${EPREFIX}/usr")
218 $(use_with gd png-dir "${EPREFIX}/usr")
219 $(use_with xpm xpm-dir "${EPREFIX}/usr")
220 + $(use_with vpx vpx-dir "${EPREFIX}/usr")
221 )
222 - if use webp; then
223 - our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
224 - fi
225 # enable gd last, so configure can pick up the previous settings
226 our_conf+=( $(use_with gd gd) )
227
228 @@ -449,7 +451,10 @@ src_configure() {
229 # MySQL support
230 local mysqllib="mysqlnd"
231 local mysqlilib="mysqlnd"
232 + use libmysqlclient && mysqllib="${EPREFIX}/usr"
233 + use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
234
235 + our_conf+=( $(use_with mysql mysql "${mysqllib}") )
236 our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
237
238 local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
239 @@ -469,7 +474,7 @@ src_configure() {
240 # PDO support
241 if use pdo ; then
242 our_conf+=(
243 - $(use_with mssql pdo-dblib "${EPREFIX}/usr")
244 + $(use_with mssql pdo-dblib)
245 $(use_with mysql pdo-mysql "${mysqllib}")
246 $(use_with postgres pdo-pgsql)
247 $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
248 @@ -533,7 +538,7 @@ src_configure() {
249
250 for sapi in $SAPIS ; do
251 case "$sapi" in
252 - cli|cgi|embed|fpm|phpdbg)
253 + cli|cgi|embed|fpm)
254 if [[ "${one_sapi}" == "${sapi}" ]] ; then
255 sapi_conf+=( "--enable-${sapi}" )
256 else
257 @@ -614,7 +619,7 @@ src_install() {
258 # We're specifically not using emake install-sapi as libtool
259 # may cause unnecessary relink failures (see bug #351266)
260 insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
261 - newins ".libs/libphp${PHP_MV}$(get_libname)" \
262 + newins ".libs/libphp5$(get_libname)" \
263 "libphp${PHP_MV}$(get_libname)"
264 keepdir "/usr/$(get_libdir)/apache2/modules"
265 else
266 @@ -634,9 +639,6 @@ src_install() {
267 embed)
268 source="libs/libphp${PHP_MV}$(get_libname)"
269 ;;
270 - phpdbg)
271 - source="sapi/phpdbg/phpdbg"
272 - ;;
273 *)
274 die "unhandled sapi in src_install"
275 ;;
276 @@ -770,17 +772,28 @@ pkg_postinst() {
277 # supposed to remove that dead link per bug 572436.
278 eselect php cleanup || die
279
280 - elog "To build extensions for this version of PHP, you will need to"
281 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
282 - elog
283 - elog "This ebuild installed a version of php.ini based on"
284 - elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
285 - elog "php.ini to install by default by setting PHP_INI_VERSION"
286 - elog "to either 'production' or 'development' in your make.conf."
287 - elog "Both versions of php.ini can be found with the PHP docs in"
288 - elog "${EPREFIX}/usr/share/doc/${PF}"
289 - elog
290 - elog "For more details on how version slotting works, please see"
291 + if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
292 + elog "To build extensions for this version of PHP, you will need to"
293 + elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
294 + elog
295 + fi
296 +
297 + # Only mention PHP_INI_VERSION if the user doesn't have it set.
298 + case "${PHP_INI_VERSION}" in
299 + production|development)
300 + ;;
301 + *)
302 + elog "This ebuild installed a version of php.ini based on"
303 + elog "${PHP_INI_UPSTREAM}. You can choose which version of"
304 + elog "php.ini to install by default by setting PHP_INI_VERSION"
305 + elog "to either 'production' or 'development' in your make.conf."
306 + elog "Both versions of php.ini can be found with the PHP docs in"
307 + elog "${EPREFIX}/usr/share/doc/${PF}"
308 + elog
309 + ;;
310 + esac
311 +
312 + elog "For details on how version slotting works, please see"
313 elog "the wiki:"
314 elog
315 elog " https://wiki.gentoo.org/wiki/PHP"
316
317 diff --git a/dev-lang/php/php-7.0.8.ebuild b/dev-lang/php/php-7.0.8.ebuild
318 index fbc800d..5925bb3 100644
319 --- a/dev-lang/php/php-7.0.8.ebuild
320 +++ b/dev-lang/php/php-7.0.8.ebuild
321 @@ -204,16 +204,12 @@ DEPEND="${DEPEND}
322 >=sys-devel/libtool-1.5.18"
323
324 # Allow users to install production version if they want to
325 +if [[ "${PHP_INI_VERSION}" == "production" ]]; then
326 + PHP_INI_UPSTREAM="php.ini-production"
327 +else
328 + PHP_INI_UPSTREAM="php.ini-development"
329 +fi
330
331 -case "${PHP_INI_VERSION}" in
332 - production|development)
333 - ;;
334 - *)
335 - PHP_INI_VERSION="development"
336 - ;;
337 -esac
338 -
339 -PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
340 PHP_INI_FILE="php.ini"
341
342 want_apache
343 @@ -770,17 +766,28 @@ pkg_postinst() {
344 # supposed to remove that dead link per bug 572436.
345 eselect php cleanup || die
346
347 - elog "To build extensions for this version of PHP, you will need to"
348 - elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
349 - elog
350 - elog "This ebuild installed a version of php.ini based on"
351 - elog "php.ini-${PHP_INI_VERSION}. You can choose which version of"
352 - elog "php.ini to install by default by setting PHP_INI_VERSION"
353 - elog "to either 'production' or 'development' in your make.conf."
354 - elog "Both versions of php.ini can be found with the PHP docs in"
355 - elog "${EPREFIX}/usr/share/doc/${PF}"
356 - elog
357 - elog "For more details on how version slotting works, please see"
358 + if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
359 + elog "To build extensions for this version of PHP, you will need to"
360 + elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
361 + elog
362 + fi
363 +
364 + # Only mention PHP_INI_VERSION if the user doesn't have it set.
365 + case "${PHP_INI_VERSION}" in
366 + production|development)
367 + ;;
368 + *)
369 + elog "This ebuild installed a version of php.ini based on"
370 + elog "${PHP_INI_UPSTREAM}. You can choose which version of"
371 + elog "php.ini to install by default by setting PHP_INI_VERSION"
372 + elog "to either 'production' or 'development' in your make.conf."
373 + elog "Both versions of php.ini can be found with the PHP docs in"
374 + elog "${EPREFIX}/usr/share/doc/${PF}"
375 + elog
376 + ;;
377 + esac
378 +
379 + elog "For details on how version slotting works, please see"
380 elog "the wiki:"
381 elog
382 elog " https://wiki.gentoo.org/wiki/PHP"