mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
feat(build): add patch to Makefile for include order to resolve zip.h conflict
This commit is contained in:
@@ -95,6 +95,17 @@ trait windows
|
||||
cmd()->cd($package->getSourceDir())->exec(".\\configure.bat {$args} {$static_extension_str}");
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [self::class, 'makeCliForWindows'])]
|
||||
#[PatchDescription('Patch Makefile to ensure buildroot/include comes before extension CFLAGS (fixes zip.h conflict with minizip)')]
|
||||
public function patchMakefileIncludeOrder(TargetPackage $package): void
|
||||
{
|
||||
FileSystem::replaceFileStr(
|
||||
"{$package->getSourceDir()}\\Makefile",
|
||||
'$(CFLAGS_PHP_OBJ) $(CFLAGS)',
|
||||
'$(CFLAGS) $(CFLAGS_PHP_OBJ)'
|
||||
);
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [self::class, 'makeCliForWindows'])]
|
||||
#[PatchDescription('Patch Windows Makefile for CLI target')]
|
||||
public function patchCLITarget(TargetPackage $package): void
|
||||
|
||||
Reference in New Issue
Block a user