Skip to content

Commit 4e39388

Browse files
committed
no idea why our source has that uncommented
1 parent 2e13be2 commit 4e39388

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99

1010
trait libedit
1111
{
12+
public function patchBeforeBuild(): bool
13+
{
14+
FileSystem::replaceFileStr(
15+
$this->source_dir . '/src/sys.h',
16+
'//#define strl',
17+
'#define strl'
18+
);
19+
return true;
20+
}
21+
1222
protected function build(): void
1323
{
14-
$make = UnixAutoconfExecutor::create($this)
24+
UnixAutoconfExecutor::create($this)
1525
->appendEnv(['CFLAGS' => '-D__STDC_ISO_10646__=201103L'])
16-
->configure();
17-
18-
foreach (['strlcpy', 'strlcat', 'fgetln'] as $symbol) {
19-
$usymbol = strtoupper($symbol);
20-
FileSystem::replaceFileLineContainsString(
21-
$this->source_dir . '/config.h',
22-
"/* #undef HAVE_{$usymbol} */",
23-
"/* #undef HAVE_{$usymbol} */\n#define {$symbol} libedit_{$symbol}"
24-
);
25-
}
26-
27-
$make->make();
26+
->configure()
27+
->make();
2828
$this->patchPkgconfPrefix(['libedit.pc']);
2929
}
3030
}

0 commit comments

Comments
 (0)