mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 23:35:37 +08:00
Remove duplicate phar patch for micro
This commit is contained in:
@@ -266,12 +266,6 @@ trait unix
|
|||||||
#[PatchDescription('Patch phar extension for micro SAPI to support compressed phar')]
|
#[PatchDescription('Patch phar extension for micro SAPI to support compressed phar')]
|
||||||
public function makeMicroForUnix(TargetPackage $package, PackageInstaller $installer, PackageBuilder $builder): void
|
public function makeMicroForUnix(TargetPackage $package, PackageInstaller $installer, PackageBuilder $builder): void
|
||||||
{
|
{
|
||||||
$phar_patched = false;
|
|
||||||
try {
|
|
||||||
if ($installer->isPackageResolved('ext-phar')) {
|
|
||||||
$phar_patched = true;
|
|
||||||
SourcePatcher::patchMicroPhar(self::getPHPVersionID());
|
|
||||||
}
|
|
||||||
InteractiveTerm::setMessage('Building php: ' . ConsoleColor::yellow('make micro'));
|
InteractiveTerm::setMessage('Building php: ' . ConsoleColor::yellow('make micro'));
|
||||||
// apply --with-micro-fake-cli option
|
// apply --with-micro-fake-cli option
|
||||||
$vars = $this->makeVars($installer);
|
$vars = $this->makeVars($installer);
|
||||||
@@ -298,11 +292,6 @@ trait unix
|
|||||||
file_put_contents($dst, substr(file_get_contents($dst), 0, $offset));
|
file_put_contents($dst, substr(file_get_contents($dst), 0, $offset));
|
||||||
}
|
}
|
||||||
$package->setOutput('Binary path for micro SAPI', $dst);
|
$package->setOutput('Binary path for micro SAPI', $dst);
|
||||||
} finally {
|
|
||||||
if ($phar_patched) {
|
|
||||||
SourcePatcher::unpatchMicroPhar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Stage]
|
#[Stage]
|
||||||
|
|||||||
@@ -293,21 +293,8 @@ trait windows
|
|||||||
|
|
||||||
$fake_cli = $package->getBuildOption('with-micro-fake-cli', false) ? ' /DPHP_MICRO_FAKE_CLI' : '';
|
$fake_cli = $package->getBuildOption('with-micro-fake-cli', false) ? ' /DPHP_MICRO_FAKE_CLI' : '';
|
||||||
|
|
||||||
// phar patch for micro
|
|
||||||
$phar_patched = false;
|
|
||||||
if ($installer->isPackageResolved('ext-phar')) {
|
|
||||||
$phar_patched = true;
|
|
||||||
SourcePatcher::patchMicroPhar(self::getPHPVersionID());
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
cmd()->cd($package->getSourceDir())
|
cmd()->cd($package->getSourceDir())
|
||||||
->exec("nmake /nologo {$debug_overrides}LIBS_MICRO=\"ws2_32.lib shell32.lib {$extra_libs}\" CFLAGS_MICRO=\"/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1{$fake_cli}\" EXTRA_LD_FLAGS_PROGRAM= micro");
|
->exec("nmake /nologo {$debug_overrides}LIBS_MICRO=\"ws2_32.lib shell32.lib {$extra_libs}\" CFLAGS_MICRO=\"/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1{$fake_cli}\" EXTRA_LD_FLAGS_PROGRAM= micro");
|
||||||
} finally {
|
|
||||||
if ($phar_patched) {
|
|
||||||
SourcePatcher::unpatchMicroPhar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->deployWindowsBinary($builder, $package, 'php-micro');
|
$this->deployWindowsBinary($builder, $package, 'php-micro');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user