File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 44
55namespace SPC \builder \unix \library ;
66
7+ use SPC \store \FileSystem ;
78use SPC \util \executor \UnixAutoconfExecutor ;
89
910trait libedit
1011{
1112 protected function build (): void
1213 {
13- UnixAutoconfExecutor::create ($ this )
14+ $ make = UnixAutoconfExecutor::create ($ this )
1415 ->appendEnv (['CFLAGS ' => '-D__STDC_ISO_10646__=201103L ' ])
15- ->configure ()
16- ->make ();
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 ();
1728 $ this ->patchPkgconfPrefix (['libedit.pc ' ]);
1829 }
1930}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public static function patchBeforeBuildconf(BuilderBase $builder): void
4444 }
4545 foreach ($ builder ->getLibs () as $ lib ) {
4646 if ($ lib ->patchBeforeBuildconf () === true ) {
47- logger ()->info ("Library [ {$ lib ->getName ()}]patched before buildconf " );
47+ logger ()->info ("Library [ {$ lib ->getName ()}] patched before buildconf " );
4848 }
4949 }
5050 // patch windows php 8.1 bug
You can’t perform that action at this time.
0 commit comments