Skip to content

Commit fbd6360

Browse files
committed
rename go-mod-frankenphp to go-xcaddy
1 parent a0047e3 commit fbd6360

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

config/pkg.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@
4343
"upx-*-win64/upx.exe": "{pkg_root_path}/bin/upx.exe"
4444
}
4545
},
46-
"go-mod-frankenphp-x86_64-linux": {
46+
"go-xcaddy-x86_64-linux": {
4747
"type": "custom"
4848
},
49-
"go-mod-frankenphp-aarch64-linux": {
49+
"go-xcaddy-aarch64-linux": {
5050
"type": "custom"
5151
},
52-
"go-mod-frankenphp-x86_64-macos": {
52+
"go-xcaddy-x86_64-macos": {
5353
"type": "custom"
5454
},
55-
"go-mod-frankenphp-aarch64-macos": {
55+
"go-xcaddy-aarch64-macos": {
5656
"type": "custom"
5757
}
5858
}

src/SPC/builder/BuilderBase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,11 @@ public function checkBeforeBuildPHP(int $rule): void
520520
if (!in_array(PHP_OS_FAMILY, ['Linux', 'Darwin'])) {
521521
throw new WrongUsageException('FrankenPHP SAPI is only available on Linux and macOS!');
522522
}
523-
// frankenphp needs package go-mod-frankenphp installed
524-
$pkg_dir = PKG_ROOT_PATH . '/go-mod-frankenphp-' . arch2gnu(php_uname('m')) . '-' . osfamily2shortname();
523+
// frankenphp needs package go-xcaddy installed
524+
$pkg_dir = PKG_ROOT_PATH . '/go-xcaddy-' . arch2gnu(php_uname('m')) . '-' . osfamily2shortname();
525525
if (!file_exists("{$pkg_dir}/bin/go") || !file_exists("{$pkg_dir}/bin/xcaddy")) {
526526
global $argv;
527-
throw new WrongUsageException("FrankenPHP SAPI requires go-mod-frankenphp package, please install it first: {$argv[0]} install-pkg go-mod-frankenphp");
527+
throw new WrongUsageException("FrankenPHP SAPI requires the go-xcaddy package, please install it first: {$argv[0]} install-pkg go-xcaddy");
528528
}
529529
// frankenphp needs libxml2 lib on macos, see: https://github.com/php/frankenphp/blob/main/frankenphp.go#L17
530530
if (PHP_OS_FAMILY === 'Darwin' && !$this->getLib('libxml2')) {

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ protected function buildFrankenphp(): void
311311
$arch = arch2gnu(php_uname('m'));
312312

313313
// define executables for go and xcaddy
314-
$xcaddy_exec = PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}/bin/xcaddy";
314+
$xcaddy_exec = PKG_ROOT_PATH . "/go-xcaddy-{$arch}-{$os}/bin/xcaddy";
315315

316316
$nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';
317317
$nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : '';
@@ -342,9 +342,9 @@ protected function buildFrankenphp(): void
342342
$config = (new SPCConfigUtil($this))->config($this->ext_list, $this->lib_list, with_dependencies: true);
343343

344344
$env = [
345-
'PATH' => PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}/bin:" . getenv('PATH'),
346-
'GOROOT' => PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}",
347-
'GOBIN' => PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}/bin",
345+
'PATH' => PKG_ROOT_PATH . "/go-xcaddy-{$arch}-{$os}/bin:" . getenv('PATH'),
346+
'GOROOT' => PKG_ROOT_PATH . "/go-xcaddy-{$arch}-{$os}",
347+
'GOBIN' => PKG_ROOT_PATH . "/go-xcaddy-{$arch}-{$os}/bin",
348348
'GOPATH' => PKG_ROOT_PATH . '/go',
349349
'CGO_ENABLED' => '1',
350350
'CGO_CFLAGS' => $config['cflags'],

src/SPC/command/CraftCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public function handle(): int
6868
}
6969
// install go and xcaddy for frankenphp
7070
if (in_array('frankenphp', $craft['sapi'])) {
71-
$retcode = $this->runCommand('install-pkg', 'go-mod-frankenphp');
71+
$retcode = $this->runCommand('install-pkg', 'go-xcaddy');
7272
if ($retcode !== 0) {
73-
$this->output->writeln('<error>craft go-mod-frankenphp failed</error>');
74-
$this->log("craft go-mod-frankenphp failed with code: {$retcode}", true);
73+
$this->output->writeln('<error>craft go-xcaddy failed</error>');
74+
$this->log("craft go-xcaddy failed with code: {$retcode}", true);
7575
return static::FAILURE;
7676
}
7777
}

src/SPC/store/pkg/GoModFrankenphp.php renamed to src/SPC/store/pkg/GoXcaddy.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
use SPC\store\LockFile;
1010
use SPC\util\GlobalEnvManager;
1111

12-
class GoModFrankenphp extends CustomPackage
12+
class GoXcaddy extends CustomPackage
1313
{
1414
public function getSupportName(): array
1515
{
1616
return [
17-
'go-mod-frankenphp-x86_64-linux',
18-
'go-mod-frankenphp-x86_64-macos',
19-
'go-mod-frankenphp-aarch64-linux',
20-
'go-mod-frankenphp-aarch64-macos',
17+
'go-xcaddy-x86_64-linux',
18+
'go-xcaddy-x86_64-macos',
19+
'go-xcaddy-aarch64-linux',
20+
'go-xcaddy-aarch64-macos',
2121
];
2222
}
2323

src/globals/test-extensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ function quote2(string $param): string
212212
break;
213213
case 'build_embed_cmd':
214214
if ($frankenphp) {
215-
passthru("{$prefix}install-pkg go-mod-frankenphp --debug", $retcode);
215+
passthru("{$prefix}install-pkg go-xcaddy --debug", $retcode);
216216
if ($retcode !== 0) {
217217
break;
218218
}

0 commit comments

Comments
 (0)