diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-10 13:51:40 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-19 16:23:20 +0100 |
commit | c2b1182879bf2785245638945851c241b0859cbb (patch) | |
tree | c4da6ac19d4d8b365eea81ded5f3cbb8977b2aa1 /win32 | |
parent | 99a8ec6e24d2788bb533ab5be8618a958adf24cf (diff) | |
download | php-git-c2b1182879bf2785245638945851c241b0859cbb.tar.gz |
Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION
We must not redefine the version "constants" for phpize builds, because
these have already generated in phpize.js, from where we pass these
variables forward to configure.js.
We also add `PHP_EXTRA_VERSION` and `PHP_VERSION_STRING` to the files
for completeness.
Closes GH-6419.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/confutils.js | 16 | ||||
-rw-r--r-- | win32/build/phpize.js.in | 6 |
2 files changed, 16 insertions, 6 deletions
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2fe2039afe..68894fa076 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -94,12 +94,14 @@ if (typeof(CWD) == "undefined") { CWD = FSO.GetParentFolderName(FSO.GetParentFolderName(FSO.GetAbsolutePathName("main\\php_version.h"))); } -/* defaults; we pick up the precise versions from configure.ac */ -var PHP_VERSION = 7; -var PHP_MINOR_VERSION = 4; -var PHP_RELEASE_VERSION = 0; -var PHP_EXTRA_VERSION = ""; -var PHP_VERSION_STRING = "7.4.0"; +if (!MODE_PHPIZE) { + /* defaults; we pick up the precise versions from configure.ac */ + var PHP_VERSION = 7; + var PHP_MINOR_VERSION = 4; + var PHP_RELEASE_VERSION = 0; + var PHP_EXTRA_VERSION = ""; + var PHP_VERSION_STRING = "7.4.0"; +} /* Get version numbers and DEFINE as a string */ function get_version_numbers() @@ -2340,6 +2342,8 @@ function generate_phpize() MF.WriteLine("var PHP_VERSION=" + PHP_VERSION); MF.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION); MF.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION); + MF.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\""); + MF.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\""); MF.WriteBlankLines(1); MF.WriteLine("/* Genereted extensions list with mode (static/shared) */"); diff --git a/win32/build/phpize.js.in b/win32/build/phpize.js.in index 5a4a973e19..b15e29282e 100644 --- a/win32/build/phpize.js.in +++ b/win32/build/phpize.js.in @@ -217,6 +217,12 @@ C.WriteLine("var PHP_ANALYZER = 'disabled';"); C.WriteLine("var PHP_PGO = 'no';"); C.WriteLine("var PHP_PGI = 'no';"); +C.WriteLine("var PHP_VERSION=" + PHP_VERSION); +C.WriteLine("var PHP_MINOR_VERSION=" + PHP_MINOR_VERSION); +C.WriteLine("var PHP_RELEASE_VERSION=" + PHP_RELEASE_VERSION); +C.WriteLine("var PHP_EXTRA_VERSION=\"" + PHP_EXTRA_VERSION + "\""); +C.WriteLine("var PHP_VERSION_STRING=\"" + PHP_VERSION_STRING + "\""); + C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js")); if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) { C.Write(file_get_contents(PHP_DIR + "//script//ext_pickle.js")); |