remove attr and libacl from macos

This commit is contained in:
Marc Henderkes 2025-03-11 05:39:38 +01:00
parent c52ab62fa6
commit 878e17ddb4
6 changed files with 11 additions and 39 deletions

View File

@ -8,14 +8,14 @@
"php": {
"type": "root",
"source": "php-src",
"lib-depends-windows": [
"micro",
"lib-base"
"lib-depends": [
"lib-base",
"micro"
],
"lib-depends-unix": [
"lib-depends-linux": [
"lib-base",
"libacl",
"micro",
"lib-base"
"micro"
]
},
"micro": {

View File

@ -113,7 +113,7 @@ abstract class LibraryBase
/*
Rules:
If it is a Windows system, try the following dependencies in order: lib-depends-windows, lib-depends-win, lib-depends.
If it is a macOS system, try the following dependencies in order: lib-depends-darwin, lib-depends-unix, lib-depends.
If it is a macOS system, try the following dependencies in order: lib-depends-macos, lib-depends-unix, lib-depends.
If it is a Linux system, try the following dependencies in order: lib-depends-linux, lib-depends-unix, lib-depends.
*/
foreach (Config::getLib(static::NAME, 'lib-depends', []) as $dep_name) {

View File

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class attr extends MacOSLibraryBase
{
use \SPC\builder\unix\library\attr;
public const NAME = 'attr';
}

View File

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
class libacl extends MacOSLibraryBase
{
use \SPC\builder\unix\library\libacl;
public const NAME = 'libacl';
}

View File

@ -13,12 +13,10 @@ trait attr
*/
protected function build(): void
{
$cflags = PHP_OS_FAMILY !== 'Linux' ? "{$this->builder->arch_c_flags} -Wimplicit-function-declaration -Wno-int-conversion" : '';
$ldflags = PHP_OS_FAMILY !== 'Linux' ? '' : '--static';
shell()->cd($this->source_dir)
->setEnv([
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags() . ' ' . $cflags),
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags() . ' ' . $ldflags),
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags()),
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags()),
'LIBS' => $this->getLibExtraLibs(),
])->execWithEnv('./autogen.sh')
->execWithEnv('./configure --prefix= --enable-static --disable-shared')

View File

@ -29,12 +29,10 @@ trait libacl
*/
protected function build(): void
{
$cflags = PHP_OS_FAMILY !== 'Linux' ? "{$this->builder->arch_c_flags} -Wimplicit-function-declaration -Wno-int-conversion" : '';
$ldflags = '--static';
shell()->cd($this->source_dir)
->setEnv([
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags() . ' ' . $cflags),
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags() . ' ' . $ldflags),
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags()),
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags()),
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv('./autogen.sh')