mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
no idea why our source has that uncommented
This commit is contained in:
parent
2e13be2a7a
commit
4e393886aa
@ -9,22 +9,22 @@ use SPC\util\executor\UnixAutoconfExecutor;
|
||||
|
||||
trait libedit
|
||||
{
|
||||
public function patchBeforeBuild(): bool
|
||||
{
|
||||
FileSystem::replaceFileStr(
|
||||
$this->source_dir . '/src/sys.h',
|
||||
'//#define strl',
|
||||
'#define strl'
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function build(): void
|
||||
{
|
||||
$make = UnixAutoconfExecutor::create($this)
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->appendEnv(['CFLAGS' => '-D__STDC_ISO_10646__=201103L'])
|
||||
->configure();
|
||||
|
||||
foreach (['strlcpy', 'strlcat', 'fgetln'] as $symbol) {
|
||||
$usymbol = strtoupper($symbol);
|
||||
FileSystem::replaceFileLineContainsString(
|
||||
$this->source_dir . '/config.h',
|
||||
"/* #undef HAVE_{$usymbol} */",
|
||||
"/* #undef HAVE_{$usymbol} */\n#define {$symbol} libedit_{$symbol}"
|
||||
);
|
||||
}
|
||||
|
||||
$make->make();
|
||||
->configure()
|
||||
->make();
|
||||
$this->patchPkgconfPrefix(['libedit.pc']);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user