mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix libxslt lib compile bug
This commit is contained in:
parent
6cb2cdd5a2
commit
11f21304f9
@ -10,9 +10,9 @@ class curl extends BSDLibraryBase
|
||||
|
||||
public const NAME = 'curl';
|
||||
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true): string
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true, bool $include_self = true): string
|
||||
{
|
||||
$libs = parent::getStaticLibFiles($style, $recursive);
|
||||
$libs = parent::getStaticLibFiles($style, $recursive, $include_self);
|
||||
if ($this->builder->getLib('openssl')) {
|
||||
$this->builder->setOption('extra-libs', $this->builder->getOption('extra-libs') . ' /usr/lib/libpthread.a /usr/lib/libdl.a');
|
||||
}
|
||||
|
||||
@ -10,9 +10,9 @@ class curl extends LinuxLibraryBase
|
||||
|
||||
public const NAME = 'curl';
|
||||
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true): string
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true, bool $include_self = true): string
|
||||
{
|
||||
$libs = parent::getStaticLibFiles($style, $recursive);
|
||||
$libs = parent::getStaticLibFiles($style, $recursive, $include_self);
|
||||
if ($this->builder->getLib('openssl')) {
|
||||
$libs .= ' -ldl -lpthread';
|
||||
}
|
||||
|
||||
@ -92,9 +92,9 @@ class openssl extends LinuxLibraryBase
|
||||
FileSystem::replaceFileRegex(BUILD_LIB_PATH . '/cmake/OpenSSL/OpenSSLConfig.cmake', '/set\(OPENSSL_LIBCRYPTO_DEPENDENCIES .*\)/m', 'set(OPENSSL_LIBCRYPTO_DEPENDENCIES "${OPENSSL_LIBRARY_DIR}/libz.a")');
|
||||
}
|
||||
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true): string
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true, bool $include_self = true): string
|
||||
{
|
||||
$libFiles = parent::getStaticLibFiles($style, $recursive);
|
||||
$libFiles = parent::getStaticLibFiles($style, $recursive, $include_self);
|
||||
if (!str_contains('-ldl -lpthread', $libFiles)) {
|
||||
$libFiles .= ' -ldl -lpthread';
|
||||
}
|
||||
|
||||
@ -17,9 +17,9 @@ trait UnixLibraryTrait
|
||||
* @throws FileSystemException
|
||||
* @throws WrongUsageException
|
||||
*/
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true): string
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true, bool $include_self = true): string
|
||||
{
|
||||
$libs = [$this];
|
||||
$libs = $include_self ? [$this] : [];
|
||||
if ($recursive) {
|
||||
array_unshift($libs, ...array_values($this->getDependencies(recursive: true)));
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ trait libxslt
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
$static_libs = $this instanceof LinuxLibraryBase ? $this->getStaticLibFiles() : '';
|
||||
$static_libs = $this instanceof LinuxLibraryBase ? $this->getStaticLibFiles(include_self: false) : '';
|
||||
$ac = UnixAutoconfExecutor::create($this)
|
||||
->appendEnv([
|
||||
'CFLAGS' => "-I{$this->getIncludeDir()}",
|
||||
@ -28,7 +28,6 @@ trait libxslt
|
||||
])
|
||||
->addConfigureArgs(
|
||||
'--without-python',
|
||||
'--without-mem-debug',
|
||||
'--without-crypto',
|
||||
'--without-debug',
|
||||
'--without-debugger',
|
||||
|
||||
@ -29,9 +29,9 @@ abstract class WindowsLibraryBase extends LibraryBase
|
||||
* @throws FileSystemException
|
||||
* @throws WrongUsageException
|
||||
*/
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true): string
|
||||
public function getStaticLibFiles(string $style = 'autoconf', bool $recursive = true, bool $include_self = true): string
|
||||
{
|
||||
$libs = [$this];
|
||||
$libs = $include_self ? [$this] : [];
|
||||
if ($recursive) {
|
||||
array_unshift($libs, ...array_values($this->getDependencies(recursive: true)));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user