Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@
"spx": {
"type": "git",
"rev": "master",
"url": "https://github.com/static-php/php-spx.git",
"url": "https://github.com/NoiseByNorthwest/php-spx.git",
"path": "php-src/ext/spx",
"license": {
"type": "file",
Expand Down
11 changes: 0 additions & 11 deletions src/SPC/builder/extension/spx.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,11 @@
namespace SPC\builder\extension;

use SPC\builder\Extension;
use SPC\exception\WrongUsageException;
use SPC\util\CustomExt;

#[CustomExt('spx')]
class spx extends Extension
{
/**
* @throws WrongUsageException
*/
public function validate(): void
{
if ($this->builder->getOption('enable-zts')) {
throw new WrongUsageException('ext-spx is not thread safe, do not build it with ZTS builds');
}
}

public function getUnixConfigureArg(bool $shared = false): string
{
$arg = '--enable-spx';
Expand Down
6 changes: 3 additions & 3 deletions src/SPC/command/BuildPHPCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function handle(): int
}
$static_and_shared = array_intersect($static_extensions, $shared_extensions);
if (!empty($static_and_shared)) {
$this->output->writeln('<comment>Building extensions [' . implode(',', $static_and_shared) . '] as both static and shared\, tests may not be accurate or fail.</comment>');
$this->output->writeln('<comment>Building extensions [' . implode(',', $static_and_shared) . '] as both static and shared, tests may not be accurate or fail.</comment>');
}

if ($rule === BUILD_TARGET_NONE) {
Expand Down Expand Up @@ -128,7 +128,6 @@ public function handle(): int
$include_suggest_lib = $this->getOption('with-suggested-libs');
[$extensions, $libraries, $not_included] = DependencyUtil::getExtsAndLibs(array_merge($static_extensions, $shared_extensions), $libraries, $include_suggest_ext, $include_suggest_lib);
$display_libs = array_filter($libraries, fn ($lib) => in_array(Config::getLib($lib, 'type', 'lib'), ['lib', 'package']));
$display_extensions = array_map(fn ($ext) => in_array($ext, $shared_extensions) ? "*{$ext}" : $ext, $extensions);

// separate static and shared extensions from $extensions
// filter rule: including shared extensions if they are in $static_extensions or $shared_extensions
Expand All @@ -138,7 +137,8 @@ public function handle(): int
$indent_texts = [
'Build OS' => PHP_OS_FAMILY . ' (' . php_uname('m') . ')',
'Build SAPI' => $builder->getBuildTypeName($rule),
'Extensions (' . count($extensions) . ')' => implode(',', $display_extensions),
'Extensions (' . count($extensions) . ')' => implode(',', $extensions),
'Shared Extensions (' . count($shared_extensions) . ')' => implode(',', $shared_extensions),
'Libraries (' . count($libraries) . ')' => implode(',', $display_libs),
'Strip Binaries' => $builder->getOption('no-strip') ? 'no' : 'yes',
'Enable ZTS' => $builder->getOption('enable-zts') ? 'yes' : 'no',
Expand Down