mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +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
|
trait libedit
|
||||||
{
|
{
|
||||||
protected function build(): void
|
public function patchBeforeBuild(): bool
|
||||||
{
|
{
|
||||||
$make = UnixAutoconfExecutor::create($this)
|
FileSystem::replaceFileStr(
|
||||||
->appendEnv(['CFLAGS' => '-D__STDC_ISO_10646__=201103L'])
|
$this->source_dir . '/src/sys.h',
|
||||||
->configure();
|
'//#define strl',
|
||||||
|
'#define strl'
|
||||||
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}"
|
|
||||||
);
|
);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$make->make();
|
protected function build(): void
|
||||||
|
{
|
||||||
|
UnixAutoconfExecutor::create($this)
|
||||||
|
->appendEnv(['CFLAGS' => '-D__STDC_ISO_10646__=201103L'])
|
||||||
|
->configure()
|
||||||
|
->make();
|
||||||
$this->patchPkgconfPrefix(['libedit.pc']);
|
$this->patchPkgconfPrefix(['libedit.pc']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user