1 |
commit: 523dcfa9e646dacf81f8e43bb9f1262bff211473 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 30 14:22:37 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 30 15:05:12 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=523dcfa9 |
7 |
|
8 |
dev-lang/php: new 5.6 and 7.0 revisions with bison dependencies. |
9 |
|
10 |
The PHP build system checks for the presence of bison (even if it will |
11 |
not be needed), and it emits a warning if an appropriate version is |
12 |
not found. In the 7.0.x series, this is easy to address by simply |
13 |
adding a newish version of bison to DEPEND. |
14 |
|
15 |
In the 5.6.x series, however, there is a bug in the bison version |
16 |
check. A warning is emitted even when a suitable version of bison |
17 |
(>= 3.0.1) is present on the system. So in that series, we have added |
18 |
>=sys-devel/bison-3.0.1 to DEPEND, but also added a new patch. The |
19 |
patch disables the buggy bison version check, eliminating the |
20 |
warning. There should be no danger in doing so now that a newer bison |
21 |
is in DEPEND. |
22 |
|
23 |
Gentoo-Bug: 593278 |
24 |
|
25 |
Package-Manager: portage-2.3.0 |
26 |
|
27 |
dev-lang/php/files/php-5.6-no-bison-warnings.patch | 42 ++++++++++++ |
28 |
.../{php-7.0.11.ebuild => php-5.6.26-r1.ebuild} | 76 ++++++++++++---------- |
29 |
.../{php-7.0.11.ebuild => php-7.0.11-r1.ebuild} | 1 + |
30 |
3 files changed, 86 insertions(+), 33 deletions(-) |
31 |
|
32 |
diff --git a/dev-lang/php/files/php-5.6-no-bison-warnings.patch b/dev-lang/php/files/php-5.6-no-bison-warnings.patch |
33 |
new file mode 100644 |
34 |
index 00000000..1896659 |
35 |
--- /dev/null |
36 |
+++ b/dev-lang/php/files/php-5.6-no-bison-warnings.patch |
37 |
@@ -0,0 +1,42 @@ |
38 |
+From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001 |
39 |
+From: Michael Orlitzky <michael@××××××××.com> |
40 |
+Date: Thu, 29 Sep 2016 15:43:06 -0400 |
41 |
+Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1 |
42 |
+ versions. |
43 |
+ |
44 |
+The PHP configure script will emit a warning if it thinks your bison |
45 |
+version is insufficient: |
46 |
+ |
47 |
+ WARNING: This bison version is not supported for regeneration of |
48 |
+ the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0). |
49 |
+ |
50 |
+However, there is an error in the test that causes it to treat all |
51 |
+3.0.x versions as if they were 3.0. The result is that users get |
52 |
+warned about a perfectly acceptable version of bison. |
53 |
+ |
54 |
+This patch is meant only for Gentoo, where we can require a working |
55 |
+version of bison (something newer than 3.0.1). Having done so, this |
56 |
+patch removes the check and the WARNING. |
57 |
+ |
58 |
+Gentoo-Bug: 593278 |
59 |
+PHP-Bug: 69055 |
60 |
+--- |
61 |
+ Zend/acinclude.m4 | 2 +- |
62 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
63 |
+ |
64 |
+diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4 |
65 |
+index 7fa8c99..9d6cb1d 100644 |
66 |
+--- a/Zend/acinclude.m4 |
67 |
++++ b/Zend/acinclude.m4 |
68 |
+@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[ |
69 |
+ # non-working versions, e.g. "3.0 3.2"; |
70 |
+ # remove "none" when introducing the first incompatible bison version an |
71 |
+ # separate any following additions by spaces |
72 |
+- bison_version_exclude="3.0" |
73 |
++ bison_version_exclude="" |
74 |
+ |
75 |
+ # for standalone build of Zend Engine |
76 |
+ test -z "$SED" && SED=sed |
77 |
+-- |
78 |
+2.7.3 |
79 |
+ |
80 |
|
81 |
diff --git a/dev-lang/php/php-7.0.11.ebuild b/dev-lang/php/php-5.6.26-r1.ebuild |
82 |
similarity index 93% |
83 |
copy from dev-lang/php/php-7.0.11.ebuild |
84 |
copy to dev-lang/php/php-5.6.26-r1.ebuild |
85 |
index 71c2ec4..420cbd7 100644 |
86 |
--- a/dev-lang/php/php-7.0.11.ebuild |
87 |
+++ b/dev-lang/php/php-5.6.26-r1.ebuild |
88 |
@@ -14,7 +14,7 @@ SLOT="$(get_version_component_range 1-2)" |
89 |
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" |
90 |
|
91 |
# We can build the following SAPIs in the given order |
92 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
93 |
+SAPIS="embed cli cgi fpm apache2" |
94 |
|
95 |
# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
96 |
IUSE="${IUSE} |
97 |
@@ -26,11 +26,11 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk |
98 |
enchant exif frontbase +fileinfo +filter firebird |
99 |
flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
100 |
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl |
101 |
- mhash mssql mysql mysqli nls |
102 |
+ mhash mssql mysql libmysqlclient mysqli nls |
103 |
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
104 |
readline recode selinux +session sharedmem |
105 |
+simplexml snmp soap sockets spell sqlite ssl |
106 |
- sysvipc systemd tidy +tokenizer truetype unicode wddx webp |
107 |
+ sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx |
108 |
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
109 |
|
110 |
# The supported (that is, autodetected) versions of BDB are listed in |
111 |
@@ -75,6 +75,10 @@ COMMON_DEPEND=" |
112 |
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
113 |
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
114 |
mssql? ( dev-db/freetds[mssql] ) |
115 |
+ libmysqlclient? ( |
116 |
+ mysql? ( virtual/libmysqlclient:= ) |
117 |
+ mysqli? ( virtual/libmysqlclient:= ) |
118 |
+ ) |
119 |
nls? ( sys-devel/gettext ) |
120 |
oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
121 |
odbc? ( >=dev-db/unixODBC-1.8.13 ) |
122 |
@@ -89,18 +93,20 @@ COMMON_DEPEND=" |
123 |
spell? ( >=app-text/aspell-0.50 ) |
124 |
sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
125 |
ssl? ( |
126 |
- !libressl? ( dev-libs/openssl:0 ) |
127 |
+ !libressl? ( dev-libs/openssl:0= ) |
128 |
libressl? ( dev-libs/libressl ) |
129 |
) |
130 |
+ sybase-ct? ( dev-db/freetds ) |
131 |
tidy? ( app-text/htmltidy ) |
132 |
truetype? ( |
133 |
=media-libs/freetype-2* |
134 |
+ >=media-libs/t1lib-5.0.0 |
135 |
!gd? ( |
136 |
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
137 |
) |
138 |
unicode? ( dev-libs/oniguruma ) |
139 |
+ vpx? ( media-libs/libvpx ) |
140 |
wddx? ( >=dev-libs/libxml2-2.6.8 ) |
141 |
- webp? ( media-libs/libwebp ) |
142 |
xml? ( >=dev-libs/libxml2-2.6.8 ) |
143 |
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
144 |
xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
145 |
@@ -123,6 +129,7 @@ RDEPEND="${COMMON_DEPEND} |
146 |
|
147 |
DEPEND="${COMMON_DEPEND} |
148 |
app-arch/xz-utils |
149 |
+ >=sys-devel/bison-3.0.1 |
150 |
sys-devel/flex |
151 |
>=sys-devel/m4-1.4.3 |
152 |
>=sys-devel/libtool-1.5.18" |
153 |
@@ -131,9 +138,10 @@ DEPEND="${COMMON_DEPEND} |
154 |
REQUIRED_USE=" |
155 |
cli? ( ^^ ( readline libedit ) ) |
156 |
truetype? ( gd ) |
157 |
- webp? ( gd ) |
158 |
+ vpx? ( gd ) |
159 |
cjk? ( gd ) |
160 |
exif? ( gd ) |
161 |
+ |
162 |
xpm? ( gd ) |
163 |
gd? ( zlib ) |
164 |
simplexml? ( xml ) |
165 |
@@ -145,12 +153,18 @@ REQUIRED_USE=" |
166 |
ldap-sasl? ( ldap ) |
167 |
mhash? ( hash ) |
168 |
phar? ( hash ) |
169 |
+ libmysqlclient? ( || ( |
170 |
+ mysql |
171 |
+ mysqli |
172 |
+ pdo |
173 |
+ ) ) |
174 |
+ |
175 |
qdbm? ( !gdbm ) |
176 |
readline? ( !libedit ) |
177 |
- recode? ( !imap !mysqli ) |
178 |
+ recode? ( !imap !mysql !mysqli ) |
179 |
sharedmem? ( !threads ) |
180 |
- mysql? ( || ( mysqli pdo ) ) |
181 |
- || ( cli cgi fpm apache2 embed phpdbg )" |
182 |
+ |
183 |
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )" |
184 |
|
185 |
PHP_MV="$(get_major_version)" |
186 |
|
187 |
@@ -199,11 +213,9 @@ php_install_ini() { |
188 |
|
189 |
# SAPI-specific handling |
190 |
if [[ "${sapi}" == "fpm" ]] ; then |
191 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
192 |
+ einfo "Installing FPM config file php-fpm.conf" |
193 |
insinto "${PHP_INI_DIR#${EPREFIX}}" |
194 |
doins sapi/fpm/php-fpm.conf |
195 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
196 |
- doins sapi/fpm/www.conf |
197 |
fi |
198 |
|
199 |
dodoc php.ini-development |
200 |
@@ -217,8 +229,7 @@ php_set_ini_dir() { |
201 |
} |
202 |
|
203 |
src_prepare() { |
204 |
- # Disable some assembly on x86. |
205 |
- eapply "${FILESDIR}/fix-x86-build-bug_571658.patch" |
206 |
+ eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch" |
207 |
|
208 |
# Change PHP branding |
209 |
# Get the alpha/beta/rc version |
210 |
@@ -229,6 +240,14 @@ src_prepare() { |
211 |
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \ |
212 |
-i configure.in || die "Failed to fix server platform name" |
213 |
|
214 |
+ # Prevent PHP from activating the Apache config, |
215 |
+ # as we will do that ourselves |
216 |
+ sed -i \ |
217 |
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
218 |
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \ |
219 |
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \ |
220 |
+ || die |
221 |
+ |
222 |
# Patch PHP to support heimdal instead of mit-krb5 |
223 |
if has_version "app-crypt/heimdal" ; then |
224 |
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \ |
225 |
@@ -247,16 +266,6 @@ src_prepare() { |
226 |
# http://bugs.php.net/bug.php?id=48795, bug #343481 |
227 |
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die |
228 |
fi |
229 |
- |
230 |
- # In php-7.x, the FPM pool configuration files have been split off |
231 |
- # of the main config. By default the pool config files go in |
232 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
233 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
234 |
- # we'll install the pool configuration file "www.conf" there. |
235 |
- php_set_ini_dir fpm |
236 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
237 |
- sapi/fpm/php-fpm.conf.in \ |
238 |
- || die 'failed to move the include directory in php-fpm.conf' |
239 |
} |
240 |
|
241 |
src_configure() { |
242 |
@@ -304,6 +313,7 @@ src_configure() { |
243 |
$(use_with xml libxml-dir "${EPREFIX}/usr") |
244 |
$(use_enable unicode mbstring) |
245 |
$(use_with crypt mcrypt "${EPREFIX}/usr") |
246 |
+ $(use_with mssql mssql "${EPREFIX}/usr") |
247 |
$(use_with unicode onig "${EPREFIX}/usr") |
248 |
$(use_with ssl openssl "${EPREFIX}/usr") |
249 |
$(use_with ssl openssl-dir "${EPREFIX}/usr") |
250 |
@@ -321,6 +331,7 @@ src_configure() { |
251 |
$(use_enable soap soap) |
252 |
$(use_enable sockets sockets) |
253 |
$(use_with sqlite sqlite3 "${EPREFIX}/usr") |
254 |
+ $(use_with sybase-ct sybase-ct "${EPREFIX}/usr") |
255 |
$(use_enable sysvipc sysvmsg) |
256 |
$(use_enable sysvipc sysvsem) |
257 |
$(use_enable sysvipc sysvshm) |
258 |
@@ -357,14 +368,13 @@ src_configure() { |
259 |
# Support for the GD graphics library |
260 |
our_conf+=( |
261 |
$(use_with truetype freetype-dir "${EPREFIX}/usr") |
262 |
+ $(use_with truetype t1lib "${EPREFIX}/usr") |
263 |
$(use_enable cjk gd-jis-conv) |
264 |
$(use_with gd jpeg-dir "${EPREFIX}/usr") |
265 |
$(use_with gd png-dir "${EPREFIX}/usr") |
266 |
$(use_with xpm xpm-dir "${EPREFIX}/usr") |
267 |
+ $(use_with vpx vpx-dir "${EPREFIX}/usr") |
268 |
) |
269 |
- if use webp; then |
270 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
271 |
- fi |
272 |
# enable gd last, so configure can pick up the previous settings |
273 |
our_conf+=( $(use_with gd gd) ) |
274 |
|
275 |
@@ -390,7 +400,10 @@ src_configure() { |
276 |
# MySQL support |
277 |
local mysqllib="mysqlnd" |
278 |
local mysqlilib="mysqlnd" |
279 |
+ use libmysqlclient && mysqllib="${EPREFIX}/usr" |
280 |
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config" |
281 |
|
282 |
+ our_conf+=( $(use_with mysql mysql "${mysqllib}") ) |
283 |
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
284 |
|
285 |
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
286 |
@@ -410,7 +423,7 @@ src_configure() { |
287 |
# PDO support |
288 |
if use pdo ; then |
289 |
our_conf+=( |
290 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
291 |
+ $(use_with mssql pdo-dblib) |
292 |
$(use_with mysql pdo-mysql "${mysqllib}") |
293 |
$(use_with postgres pdo-pgsql) |
294 |
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
295 |
@@ -474,7 +487,7 @@ src_configure() { |
296 |
|
297 |
for sapi in $SAPIS ; do |
298 |
case "$sapi" in |
299 |
- cli|cgi|embed|fpm|phpdbg) |
300 |
+ cli|cgi|embed|fpm) |
301 |
if [[ "${one_sapi}" == "${sapi}" ]] ; then |
302 |
sapi_conf+=( "--enable-${sapi}" ) |
303 |
else |
304 |
@@ -555,7 +568,7 @@ src_install() { |
305 |
# We're specifically not using emake install-sapi as libtool |
306 |
# may cause unnecessary relink failures (see bug #351266) |
307 |
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
308 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
309 |
+ newins ".libs/libphp5$(get_libname)" \ |
310 |
"libphp${PHP_MV}$(get_libname)" |
311 |
keepdir "/usr/$(get_libdir)/apache2/modules" |
312 |
else |
313 |
@@ -575,9 +588,6 @@ src_install() { |
314 |
embed) |
315 |
source="libs/libphp${PHP_MV}$(get_libname)" |
316 |
;; |
317 |
- phpdbg) |
318 |
- source="sapi/phpdbg/phpdbg" |
319 |
- ;; |
320 |
*) |
321 |
die "unhandled sapi in src_install" |
322 |
;; |
323 |
|
324 |
diff --git a/dev-lang/php/php-7.0.11.ebuild b/dev-lang/php/php-7.0.11-r1.ebuild |
325 |
similarity index 99% |
326 |
rename from dev-lang/php/php-7.0.11.ebuild |
327 |
rename to dev-lang/php/php-7.0.11-r1.ebuild |
328 |
index 71c2ec4..7464406 100644 |
329 |
--- a/dev-lang/php/php-7.0.11.ebuild |
330 |
+++ b/dev-lang/php/php-7.0.11-r1.ebuild |
331 |
@@ -123,6 +123,7 @@ RDEPEND="${COMMON_DEPEND} |
332 |
|
333 |
DEPEND="${COMMON_DEPEND} |
334 |
app-arch/xz-utils |
335 |
+ >=sys-devel/bison-3.0.1 |
336 |
sys-devel/flex |
337 |
>=sys-devel/m4-1.4.3 |
338 |
>=sys-devel/libtool-1.5.18" |