Skip to content

Commit

Permalink
fix pkg-config build for macOS sonoma (#391)
Browse files Browse the repository at this point in the history
* fix pkg-config build for macOS sonoma

* cs fix

* bump version to 2.1.6 [skip ci]
  • Loading branch information
crazywhalecc authored Mar 20, 2024
1 parent 46984b6 commit 32f14e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/SPC/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
final class ConsoleApplication extends Application
{
public const VERSION = '2.1.5';
public const VERSION = '2.1.6';

public function __construct()
{
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/builder/traits/UnixLibraryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getStaticLibFiles(string $style = 'autoconf', bool $recursive =
* @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));
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/builder/unix/library/pkgconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/SPC/command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

abstract class BuildCommand extends BaseCommand
{
public function __construct(string $name = null)
public function __construct(?string $name = null)
{
parent::__construct($name);

Expand Down

0 comments on commit 32f14e1

Please sign in to comment.