-
-
Notifications
You must be signed in to change notification settings - Fork 364
Sapi/frankenphp prerequisites #775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
ae56931
8e2dffc
f709f3b
92284e9
d6858e1
74b1dda
4ecaffd
becee5b
a76f49f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -404,6 +404,9 @@ public function getBuildTypeName(int $type): string | |
| if (($type & BUILD_TARGET_EMBED) === BUILD_TARGET_EMBED) { | ||
| $ls[] = 'embed'; | ||
| } | ||
| if (($type & BUILD_TARGET_FRANKENPHP) === BUILD_TARGET_FRANKENPHP) { | ||
| $ls[] = 'frankenphp'; | ||
| } | ||
| return implode(', ', $ls); | ||
| } | ||
|
|
||
|
|
@@ -510,6 +513,26 @@ public function emitPatchPoint(string $point_name): void | |
| } | ||
| } | ||
|
|
||
| public function checkBeforeBuildPHP(int $rule): void | ||
| { | ||
| if (($rule & BUILD_TARGET_FRANKENPHP) === BUILD_TARGET_FRANKENPHP) { | ||
| // frankenphp only support linux and macOS | ||
| if (!in_array(PHP_OS_FAMILY, ['Linux', 'Darwin'])) { | ||
| throw new WrongUsageException('FrankenPHP SAPI is only available on Linux and macOS!'); | ||
| } | ||
| // frankenphp needs package go-mod-frankenphp installed | ||
| $pkg_dir = PKG_ROOT_PATH . '/go-mod-frankenphp-' . arch2gnu(php_uname('m')) . '-' . osfamily2shortname(); | ||
| if (!file_exists("{$pkg_dir}/bin/go") || !file_exists("{$pkg_dir}/bin/xcaddy")) { | ||
| global $argv; | ||
| throw new WrongUsageException("FrankenPHP SAPI requires go-mod-frankenphp package, please install it first: {$argv[0]} install-pkg go-mod-frankenphp"); | ||
| } | ||
| // frankenphp needs libxml2 libs | ||
| if (!$this->getLib('libxml2')) { | ||
| throw new WrongUsageException('FrankenPHP SAPI requires libxml2 library, please include `xml` extension in your build.'); | ||
| } | ||
|
||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Generate micro extension test php code. | ||
| */ | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.