⬆️ Upgrading dependencies

This commit is contained in:
bruno DA SILVA
2019-12-17 17:41:56 +01:00
parent 691acb45e6
commit 705d941979
55 changed files with 668 additions and 3310 deletions

View File

@@ -195,9 +195,22 @@ class OS_Guess
}
$major = $minor = 0;
include_once "System.php";
if (@is_link('/lib64/libc.so.6')) {
// Let's try reading the libc.so.6 symlink
if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib64/libc.so.6')), $matches)) {
list($major, $minor) = explode('.', $matches[1]);
}
} else if (@is_link('/lib/libc.so.6')) {
// Let's try reading the libc.so.6 symlink
if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
list($major, $minor) = explode('.', $matches[1]);
}
}
// Use glibc's <features.h> header file to
// get major and minor version number:
if (@file_exists('/usr/include/features.h') &&
if (!($major && $minor) &&
@file_exists('/usr/include/features.h') &&
@is_readable('/usr/include/features.h')) {
if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
$features_file = fopen('/usr/include/features.h', 'rb');
@@ -240,7 +253,7 @@ class OS_Guess
fclose($fp);
$cpp = popen("/usr/bin/cpp $tmpfile", "r");
while ($line = fgets($cpp, 1024)) {
if ($line{0} == '#' || trim($line) == '') {
if ($line[0] == '#' || trim($line) == '') {
continue;
}
@@ -252,13 +265,6 @@ class OS_Guess
unlink($tmpfile);
} // features.h
if (!($major && $minor) && @is_link('/lib/libc.so.6')) {
// Let's try reading the libc.so.6 symlink
if (preg_match('/^libc-(.*)\.so$/', basename(readlink('/lib/libc.so.6')), $matches)) {
list($major, $minor) = explode('.', $matches[1]);
}
}
if (!($major && $minor)) {
return $glibc = '';
}

View File

@@ -766,6 +766,28 @@ class PEAR
return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
}
/**
* Get SOURCE_DATE_EPOCH environment variable
* See https://reproducible-builds.org/specs/source-date-epoch/
*
* @return int
* @access public
*/
static function getSourceDateEpoch()
{
if ($source_date_epoch = getenv('SOURCE_DATE_EPOCH')) {
if (preg_match('/^\d+$/', $source_date_epoch)) {
return (int) $source_date_epoch;
} else {
// "If the value is malformed, the build process SHOULD exit with a non-zero error code."
self::raiseError("Invalid SOURCE_DATE_EPOCH: $source_date_epoch");
exit(1);
}
} else {
return time();
}
}
}
function _PEAR_call_destructors()

View File

@@ -74,7 +74,7 @@ class System
$offset = 0;
foreach ($av as $a) {
$b = trim($a[0]);
if ($b{0} == '"' || $b{0} == "'") {
if ($b[0] == '"' || $b[0] == "'") {
continue;
}
@@ -265,7 +265,7 @@ class System
} elseif ($opt[0] == 'm') {
// if the mode is clearly an octal number (starts with 0)
// convert it to decimal
if (strlen($opt[1]) && $opt[1]{0} == '0') {
if (strlen($opt[1]) && $opt[1][0] == '0') {
$opt[1] = octdec($opt[1]);
} else {
// convert to int
@@ -480,7 +480,7 @@ class System
if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {
return $var;
}
return realpath('/tmp');
return realpath(function_exists('sys_get_temp_dir') ? sys_get_temp_dir() : '/tmp');
}
/**