mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
the release option also affects shared extensions, which is unwanted, patchelf their soname back and rename them
This commit is contained in:
parent
5a3a8db772
commit
52f40b7f9f
@ -293,6 +293,24 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
chdir(BUILD_LIB_PATH);
|
chdir(BUILD_LIB_PATH);
|
||||||
symlink($realLibName, 'libphp.so');
|
symlink($realLibName, 'libphp.so');
|
||||||
|
chdir(BUILD_MODULES_PATH);
|
||||||
|
foreach ($this->getExts() as $ext) {
|
||||||
|
if (!$ext->isBuildShared()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$name = $ext->getName();
|
||||||
|
$versioned = "{$name}-{$release}.so";
|
||||||
|
$unversioned = "{$name}.so";
|
||||||
|
if (is_file(BUILD_MODULES_PATH . "/{$versioned}")) {
|
||||||
|
rename(BUILD_MODULES_PATH . "/{$versioned}", BUILD_MODULES_PATH . "/{$unversioned}");
|
||||||
|
shell()->cd(BUILD_MODULES_PATH)
|
||||||
|
->exec(sprintf(
|
||||||
|
'patchelf --set-soname %s %s',
|
||||||
|
escapeshellarg($unversioned),
|
||||||
|
escapeshellarg($unversioned)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
}
|
}
|
||||||
$this->patchPhpScripts();
|
$this->patchPhpScripts();
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class LinuxToolCheckList
|
|||||||
'bzip2', 'cmake', 'gcc',
|
'bzip2', 'cmake', 'gcc',
|
||||||
'g++', 'patch', 'binutils-gold',
|
'g++', 'patch', 'binutils-gold',
|
||||||
'libtoolize', 'which',
|
'libtoolize', 'which',
|
||||||
|
'patchelf',
|
||||||
];
|
];
|
||||||
|
|
||||||
public const TOOLS_DEBIAN = [
|
public const TOOLS_DEBIAN = [
|
||||||
@ -30,6 +31,7 @@ class LinuxToolCheckList
|
|||||||
'tar', 'unzip', 'gzip',
|
'tar', 'unzip', 'gzip',
|
||||||
'bzip2', 'cmake', 'patch',
|
'bzip2', 'cmake', 'patch',
|
||||||
'xz', 'libtoolize', 'which',
|
'xz', 'libtoolize', 'which',
|
||||||
|
'patchelf',
|
||||||
];
|
];
|
||||||
|
|
||||||
public const TOOLS_RHEL = [
|
public const TOOLS_RHEL = [
|
||||||
@ -38,6 +40,7 @@ class LinuxToolCheckList
|
|||||||
'tar', 'unzip', 'gzip', 'gcc',
|
'tar', 'unzip', 'gzip', 'gcc',
|
||||||
'bzip2', 'cmake', 'patch', 'which',
|
'bzip2', 'cmake', 'patch', 'which',
|
||||||
'xz', 'libtool', 'gettext-devel',
|
'xz', 'libtool', 'gettext-devel',
|
||||||
|
'perl', 'patchelf',
|
||||||
];
|
];
|
||||||
|
|
||||||
public const TOOLS_ARCH = [
|
public const TOOLS_ARCH = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user