add library, extension patches in separate classes

This commit is contained in:
crazywhalecc
2023-07-28 23:47:22 +08:00
committed by Jerry Ma
parent e909dd15b0
commit 51ce2befd8
12 changed files with 316 additions and 12 deletions

View File

@@ -5,6 +5,8 @@ declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\exception\FileSystemException;
use SPC\store\FileSystem;
use SPC\util\CustomExt;
#[CustomExt('event')]
@@ -23,4 +25,18 @@ class event extends Extension
}
return $arg;
}
/**
* @throws FileSystemException
*/
public function patchBeforeConfigure(): bool
{
FileSystem::replaceFile(
SOURCE_PATH . '/php-src/configure',
REPLACE_FILE_PREG,
'/-levent_openssl/',
$this->getLibFilesString()
);
return true;
}
}