Skip to content

Commit ef5e664

Browse files
committed
don't build iconv program, or gettext programs
1 parent 8e50af3 commit ef5e664

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

src/SPC/builder/unix/library/gettext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function build(): void
3131
$autoconf->addConfigureArgs('--disable-threads');
3232
}
3333

34-
$autoconf->configure()->make();
34+
$autoconf->configure()->make(dir: $this->getSourceDir() . '/gettext-runtime/intl');
3535
$this->patchLaDependencyPrefix();
3636
}
3737
}

src/SPC/builder/unix/library/libiconv.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ trait libiconv
1010
{
1111
protected function build(): void
1212
{
13-
UnixAutoconfExecutor::create($this)->configure('--enable-extra-encodings')->make();
13+
UnixAutoconfExecutor::create($this)
14+
->configure(
15+
'--enable-extra-encodings',
16+
'--enable-year2038',
17+
)
18+
->make('install-lib', with_install: false)
19+
->make('install-lib', with_install: false, dir: $this->getSourceDir() . '/libcharset');
1420
$this->patchLaDependencyPrefix();
1521
}
1622
}

src/SPC/util/executor/UnixAutoconfExecutor.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,22 @@ public function getConfigureArgsString(): string
5050
* @param bool $with_clean Whether to clean before building
5151
* @param array $after_env_vars Environment variables postfix
5252
*/
53-
public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = []): static
53+
public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = [], ?string $dir = null): static
5454
{
55-
return $this->seekLogFileOnException(function () use ($target, $with_install, $with_clean, $after_env_vars) {
55+
return $this->seekLogFileOnException(function () use ($target, $with_install, $with_clean, $after_env_vars, $dir) {
56+
$shell = $this->shell;
57+
if ($dir) {
58+
$shell = $shell->cd($dir);
59+
}
5660
if ($with_clean) {
57-
$this->shell->exec('make clean');
61+
$shell->exec('make clean');
5862
}
5963
$after_env_vars_str = $after_env_vars !== [] ? shell()->setEnv($after_env_vars)->getEnvString() : '';
60-
$this->shell->exec("make -j{$this->library->getBuilder()->concurrency} {$target} {$after_env_vars_str}");
64+
$shell->exec("make -j{$this->library->getBuilder()->concurrency} {$target} {$after_env_vars_str}");
6165
if ($with_install !== false) {
62-
$this->shell->exec("make {$with_install}");
66+
$shell->exec("make {$with_install}");
6367
}
64-
return $this->shell;
68+
return $shell;
6569
});
6670
}
6771

src/SPC/util/shell/UnixShell.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function __construct(?bool $debug = null)
2929

3030
public function exec(string $cmd): static
3131
{
32+
$cmd = clean_spaces($cmd);
3233
/* @phpstan-ignore-next-line */
3334
logger()->info(ConsoleColor::yellow('[EXEC] ') . ConsoleColor::green($cmd));
3435
$original_command = $cmd;

0 commit comments

Comments
 (0)