File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
src/SPC/builder/unix/library Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 99
1010trait 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}
You can’t perform that action at this time.
0 commit comments