mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
don't build iconv program, or gettext programs
This commit is contained in:
parent
8e50af3a7e
commit
ef5e664981
@ -31,7 +31,7 @@ trait gettext
|
||||
$autoconf->addConfigureArgs('--disable-threads');
|
||||
}
|
||||
|
||||
$autoconf->configure()->make();
|
||||
$autoconf->configure()->make(dir: $this->getSourceDir() . '/gettext-runtime/intl');
|
||||
$this->patchLaDependencyPrefix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,13 @@ trait libiconv
|
||||
{
|
||||
protected function build(): void
|
||||
{
|
||||
UnixAutoconfExecutor::create($this)->configure('--enable-extra-encodings')->make();
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->configure(
|
||||
'--enable-extra-encodings',
|
||||
'--enable-year2038',
|
||||
)
|
||||
->make('install-lib', with_install: false)
|
||||
->make('install-lib', with_install: false, dir: $this->getSourceDir() . '/libcharset');
|
||||
$this->patchLaDependencyPrefix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,18 +50,22 @@ class UnixAutoconfExecutor extends Executor
|
||||
* @param bool $with_clean Whether to clean before building
|
||||
* @param array $after_env_vars Environment variables postfix
|
||||
*/
|
||||
public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = []): static
|
||||
public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = [], ?string $dir = null): static
|
||||
{
|
||||
return $this->seekLogFileOnException(function () use ($target, $with_install, $with_clean, $after_env_vars) {
|
||||
return $this->seekLogFileOnException(function () use ($target, $with_install, $with_clean, $after_env_vars, $dir) {
|
||||
$shell = $this->shell;
|
||||
if ($dir) {
|
||||
$shell = $shell->cd($dir);
|
||||
}
|
||||
if ($with_clean) {
|
||||
$this->shell->exec('make clean');
|
||||
$shell->exec('make clean');
|
||||
}
|
||||
$after_env_vars_str = $after_env_vars !== [] ? shell()->setEnv($after_env_vars)->getEnvString() : '';
|
||||
$this->shell->exec("make -j{$this->library->getBuilder()->concurrency} {$target} {$after_env_vars_str}");
|
||||
$shell->exec("make -j{$this->library->getBuilder()->concurrency} {$target} {$after_env_vars_str}");
|
||||
if ($with_install !== false) {
|
||||
$this->shell->exec("make {$with_install}");
|
||||
$shell->exec("make {$with_install}");
|
||||
}
|
||||
return $this->shell;
|
||||
return $shell;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ class UnixShell extends Shell
|
||||
|
||||
public function exec(string $cmd): static
|
||||
{
|
||||
$cmd = clean_spaces($cmd);
|
||||
/* @phpstan-ignore-next-line */
|
||||
logger()->info(ConsoleColor::yellow('[EXEC] ') . ConsoleColor::green($cmd));
|
||||
$original_command = $cmd;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user