1 |
commit: b32803f4f59d2320f7ab29ce495fdea71221cac3 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 2 02:14:44 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 2 02:20:11 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b32803f4 |
7 |
|
8 |
dev-lang/php: preserve timestamps when creating SAPI build directories. |
9 |
|
10 |
We create several copies of ${S} -- one for each SAPI -- during the |
11 |
build. Until now, those copies have been made with "cp -r". I believe |
12 |
this caused unnecessary regeneration of the Zend parsers, opening the |
13 |
door for version mismatches of sys-devel/bison. |
14 |
|
15 |
For example, the file |
16 |
|
17 |
${S}/Zend/zend_language_parser.c |
18 |
|
19 |
is generated from |
20 |
|
21 |
${S}/Zend/zend_language_parser.y, |
22 |
|
23 |
but the ".c" file should already exist in the source tree. In the |
24 |
upstream tarball, the former always exists (pre-generated) and has a |
25 |
timestamp later than the latter. This prevents the build system from |
26 |
attempting to call "yacc" on zend_language_parser.y. When we use |
27 |
"cp -r" to copy the source tree, I find timestamps like the following: |
28 |
|
29 |
2016-08-16 19:08 zend_language_parser.c |
30 |
2016-08-16 19:08 zend_language_parser.y |
31 |
|
32 |
They look identical, but if the copy was performed in alphabetical |
33 |
order, I suspect that the ".y" file looks newer than the ".c" file |
34 |
that it generates. It is therefore my educated guess that the build |
35 |
system is using bison to regenerate those ".c" files when in fact |
36 |
there is no need to do so. By using "cp -a" instead of "cp -r", I |
37 |
hope to preserve the ages of those files, and eliminate bison from |
38 |
normal end-user builds of dev-lang/php. |
39 |
|
40 |
The fix has been applied to the latest 5.6 and 7.0 revisions in-place. |
41 |
|
42 |
Gentoo-Bug: 595792 |
43 |
|
44 |
Package-Manager: portage-2.3.0 |
45 |
|
46 |
dev-lang/php/php-5.6.26-r2.ebuild | 2 +- |
47 |
dev-lang/php/php-7.0.11-r2.ebuild | 2 +- |
48 |
2 files changed, 2 insertions(+), 2 deletions(-) |
49 |
|
50 |
diff --git a/dev-lang/php/php-5.6.26-r2.ebuild b/dev-lang/php/php-5.6.26-r2.ebuild |
51 |
index 90bc6e2..40ada24 100644 |
52 |
--- a/dev-lang/php/php-5.6.26-r2.ebuild |
53 |
+++ b/dev-lang/php/php-5.6.26-r2.ebuild |
54 |
@@ -485,7 +485,7 @@ src_configure() { |
55 |
# the files that autotools creates. This was all originally |
56 |
# based on the autotools-utils eclass. |
57 |
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
58 |
- cp -r "${S}" "${BUILD_DIR}" || die |
59 |
+ cp -a "${S}" "${BUILD_DIR}" || die |
60 |
cd "${BUILD_DIR}" || die |
61 |
|
62 |
local sapi_conf=( |
63 |
|
64 |
diff --git a/dev-lang/php/php-7.0.11-r2.ebuild b/dev-lang/php/php-7.0.11-r2.ebuild |
65 |
index 0729ac3..9a572d6 100644 |
66 |
--- a/dev-lang/php/php-7.0.11-r2.ebuild |
67 |
+++ b/dev-lang/php/php-7.0.11-r2.ebuild |
68 |
@@ -473,7 +473,7 @@ src_configure() { |
69 |
# the files that autotools creates. This was all originally |
70 |
# based on the autotools-utils eclass. |
71 |
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
72 |
- cp -r "${S}" "${BUILD_DIR}" || die |
73 |
+ cp -a "${S}" "${BUILD_DIR}" || die |
74 |
cd "${BUILD_DIR}" || die |
75 |
|
76 |
local sapi_conf=( |