mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Do some code quality check and fix #126
This commit is contained in:
@@ -6,20 +6,16 @@ namespace SPC\builder\unix\library;
|
||||
|
||||
trait pkgconfig
|
||||
{
|
||||
protected function build()
|
||||
protected function build(): void
|
||||
{
|
||||
$macos_env = 'PKG_CONFIG_PATH="' . BUILD_LIB_PATH . '/pkgconfig/" ' .
|
||||
"CC='{$this->builder->cc}' " .
|
||||
"CXX='{$this->builder->cxx}' " .
|
||||
"CC='{$this->builder->getOption('cc')}' " .
|
||||
"CXX='{$this->builder->getOption('cxx')}' " .
|
||||
"CFLAGS='{$this->builder->arch_c_flags} -Wimplicit-function-declaration' ";
|
||||
$linux_env = 'PKG_CONFIG_PATH="' . BUILD_LIB_PATH . '/pkgconfig" ' .
|
||||
"CC='{$this->builder->cc}' " .
|
||||
"CXX='{$this->builder->cxx}' ";
|
||||
"CC='{$this->builder->getOption('cc')}' " .
|
||||
"CXX='{$this->builder->getOption('cxx')}' ";
|
||||
|
||||
$extra = match (PHP_OS_FAMILY) {
|
||||
'Darwin' => '',
|
||||
default => '--with-internal-glib ',
|
||||
};
|
||||
shell()->cd($this->source_dir)
|
||||
->exec(
|
||||
match (PHP_OS_FAMILY) {
|
||||
@@ -29,7 +25,7 @@ trait pkgconfig
|
||||
'./configure ' .
|
||||
'--disable-shared ' .
|
||||
'--enable-static ' .
|
||||
$extra .
|
||||
'--with-internal-glib ' .
|
||||
'--prefix=' . BUILD_ROOT_PATH . ' ' .
|
||||
'--without-sysroot ' .
|
||||
'--without-system-include-path ' .
|
||||
|
||||
Reference in New Issue
Block a user