merge main

This commit is contained in:
DubbleClick
2023-10-30 22:20:16 +01:00
7 changed files with 233 additions and 143 deletions

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Console\Command\ListCommand;
*/
final class ConsoleApplication extends Application
{
public const VERSION = '2.0-rc7';
public const VERSION = '2.0.0';
public function __construct()
{

View File

@@ -35,5 +35,7 @@ trait libwebp
$this->patchPkgconfPrefix(['libsharpyuv.pc', 'libwebp.pc', 'libwebpdecoder.pc', 'libwebpdemux.pc', 'libwebpmux.pc'], PKGCONF_PATCH_PREFIX | PKGCONF_PATCH_LIBDIR);
$this->patchPkgconfPrefix(['libsharpyuv.pc'], PKGCONF_PATCH_CUSTOM, ['/^includedir=.*$/m', 'includedir=${prefix}/include/webp']);
$this->cleanLaFiles();
// fix imagemagick binary linking issue
$this->patchPkgconfPrefix(['libwebp.pc'], PKGCONF_PATCH_CUSTOM, ['/-lwebp$/m', '-lwebp -lsharpyuv']);
}
}

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\builder\linux\library\LinuxLibraryBase;
use SPC\builder\macos\library\MacOSLibraryBase;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
@@ -46,7 +47,11 @@ trait postgresql
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
if (!empty($output[1][0])) {
$libs = $output[1][0];
$envs .= " LIBS=\"{$libs} -lstdc++\" ";
$libcpp = '';
if ($this->builder->getLib('icu')) {
$libcpp = $this instanceof LinuxLibraryBase ? ' -lstdc++' : ' -lc++';
}
$envs .= " LIBS=\"{$libs}{$libcpp}\" ";
}
FileSystem::resetDir($this->source_dir . '/build');

View File

@@ -8,8 +8,8 @@ use SPC\doctor\CheckListHandler;
use SPC\doctor\CheckResult;
use SPC\exception\RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use function Laravel\Prompts\confirm;
#[AsCommand('doctor', 'Diagnose whether the current environment can compile normally')]
class DoctorCommand extends BaseCommand
@@ -49,9 +49,8 @@ class DoctorCommand extends BaseCommand
throw new RuntimeException('Some check items can not be fixed !');
case FIX_POLICY_PROMPT:
if ($result->getFixItem() !== '') {
$helper = new QuestionHelper();
$question = new ConfirmationQuestion('Do you want to fix it? [Y/n] ', true);
if ($helper->ask($this->input, $this->output, $question)) {
$question = confirm('Do you want to fix it?');
if ($question) {
$checker->emitFix($this->output, $result);
} else {
throw new RuntimeException('You cancelled fix');

View File

@@ -14,6 +14,8 @@ use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Style\SymfonyStyle;
use function Laravel\Prompts\table;
#[AsCommand('dev:extensions', 'Helper command that lists available extension details', ['list-ext'])]
class AllExtCommand extends BaseCommand
{
@@ -62,7 +64,7 @@ class AllExtCommand extends BaseCommand
if ($data === []) {
$style->warning('Unknown extension selected: ' . implode(',', $extensions));
} else {
$style->table(
table(
['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'],
$data
);