fix pkg-config build for macOS sonoma (#391)

* fix pkg-config build for macOS sonoma

* cs fix

* bump version to 2.1.6 [skip ci]
This commit is contained in:
Jerry Ma 2024-03-20 21:50:05 +08:00 committed by GitHub
parent 46984b6df1
commit 32f14e16c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View File

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

View File

@ -48,7 +48,7 @@ trait UnixLibraryTrait
* @throws RuntimeException
* @throws WrongUsageException
*/
public function makeAutoconfEnv(string $prefix = null): string
public function makeAutoconfEnv(?string $prefix = null): string
{
if ($prefix === null) {
$prefix = str_replace('-', '_', strtoupper(static::NAME));

View File

@ -8,7 +8,7 @@ trait pkgconfig
{
protected function build(): void
{
$macos_env = "CFLAGS='{$this->builder->arch_c_flags} -Wimplicit-function-declaration' ";
$macos_env = "CFLAGS='{$this->builder->arch_c_flags} -Wimplicit-function-declaration -Wno-int-conversion' ";
$linux_env = 'LDFLAGS=--static ';
shell()->cd($this->source_dir)

View File

@ -25,7 +25,7 @@ abstract class BaseCommand extends Command
protected OutputInterface $output;
public function __construct(string $name = null)
public function __construct(?string $name = null)
{
parent::__construct($name);
$this->addOption('debug', null, null, 'Enable debug mode');

View File

@ -8,7 +8,7 @@ use Symfony\Component\Console\Input\InputOption;
abstract class BuildCommand extends BaseCommand
{
public function __construct(string $name = null)
public function __construct(?string $name = null)
{
parent::__construct($name);