diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-10-01 22:14:44 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2016-10-01 22:20:11 -0400 |
commit | b32803f4f59d2320f7ab29ce495fdea71221cac3 (patch) | |
tree | 75ee14023d1d609ddbf9365af0b2ff911a0a8a6a /dev-lang | |
parent | net-misc/unison: version bumps, remove outdated changelogs. (diff) | |
download | gentoo-b32803f4f59d2320f7ab29ce495fdea71221cac3.tar.gz gentoo-b32803f4f59d2320f7ab29ce495fdea71221cac3.tar.bz2 gentoo-b32803f4f59d2320f7ab29ce495fdea71221cac3.zip |
dev-lang/php: preserve timestamps when creating SAPI build directories.
We create several copies of ${S} -- one for each SAPI -- during the
build. Until now, those copies have been made with "cp -r". I believe
this caused unnecessary regeneration of the Zend parsers, opening the
door for version mismatches of sys-devel/bison.
For example, the file
${S}/Zend/zend_language_parser.c
is generated from
${S}/Zend/zend_language_parser.y,
but the ".c" file should already exist in the source tree. In the
upstream tarball, the former always exists (pre-generated) and has a
timestamp later than the latter. This prevents the build system from
attempting to call "yacc" on zend_language_parser.y. When we use
"cp -r" to copy the source tree, I find timestamps like the following:
2016-08-16 19:08 zend_language_parser.c
2016-08-16 19:08 zend_language_parser.y
They look identical, but if the copy was performed in alphabetical
order, I suspect that the ".y" file looks newer than the ".c" file
that it generates. It is therefore my educated guess that the build
system is using bison to regenerate those ".c" files when in fact
there is no need to do so. By using "cp -a" instead of "cp -r", I
hope to preserve the ages of those files, and eliminate bison from
normal end-user builds of dev-lang/php.
The fix has been applied to the latest 5.6 and 7.0 revisions in-place.
Gentoo-Bug: 595792
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/php/php-5.6.26-r2.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/php/php-7.0.11-r2.ebuild | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dev-lang/php/php-5.6.26-r2.ebuild b/dev-lang/php/php-5.6.26-r2.ebuild index 90bc6e291716..40ada24416a5 100644 --- a/dev-lang/php/php-5.6.26-r2.ebuild +++ b/dev-lang/php/php-5.6.26-r2.ebuild @@ -485,7 +485,7 @@ src_configure() { # the files that autotools creates. This was all originally # based on the autotools-utils eclass. BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" - cp -r "${S}" "${BUILD_DIR}" || die + cp -a "${S}" "${BUILD_DIR}" || die cd "${BUILD_DIR}" || die local sapi_conf=( diff --git a/dev-lang/php/php-7.0.11-r2.ebuild b/dev-lang/php/php-7.0.11-r2.ebuild index 0729ac3b199b..9a572d658484 100644 --- a/dev-lang/php/php-7.0.11-r2.ebuild +++ b/dev-lang/php/php-7.0.11-r2.ebuild @@ -473,7 +473,7 @@ src_configure() { # the files that autotools creates. This was all originally # based on the autotools-utils eclass. BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" - cp -r "${S}" "${BUILD_DIR}" || die + cp -a "${S}" "${BUILD_DIR}" || die cd "${BUILD_DIR}" || die local sapi_conf=( |