mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
remove attr and libacl from macos
This commit is contained in:
parent
c52ab62fa6
commit
878e17ddb4
@ -8,14 +8,14 @@
|
|||||||
"php": {
|
"php": {
|
||||||
"type": "root",
|
"type": "root",
|
||||||
"source": "php-src",
|
"source": "php-src",
|
||||||
"lib-depends-windows": [
|
"lib-depends": [
|
||||||
"micro",
|
"lib-base",
|
||||||
"lib-base"
|
"micro"
|
||||||
],
|
],
|
||||||
"lib-depends-unix": [
|
"lib-depends-linux": [
|
||||||
|
"lib-base",
|
||||||
"libacl",
|
"libacl",
|
||||||
"micro",
|
"micro"
|
||||||
"lib-base"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"micro": {
|
"micro": {
|
||||||
|
|||||||
@ -113,7 +113,7 @@ abstract class LibraryBase
|
|||||||
/*
|
/*
|
||||||
Rules:
|
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 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.
|
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) {
|
foreach (Config::getLib(static::NAME, 'lib-depends', []) as $dep_name) {
|
||||||
|
|||||||
@ -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';
|
|
||||||
}
|
|
||||||
@ -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';
|
|
||||||
}
|
|
||||||
@ -13,12 +13,10 @@ trait attr
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
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)
|
shell()->cd($this->source_dir)
|
||||||
->setEnv([
|
->setEnv([
|
||||||
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags() . ' ' . $cflags),
|
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags()),
|
||||||
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags() . ' ' . $ldflags),
|
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags()),
|
||||||
'LIBS' => $this->getLibExtraLibs(),
|
'LIBS' => $this->getLibExtraLibs(),
|
||||||
])->execWithEnv('./autogen.sh')
|
])->execWithEnv('./autogen.sh')
|
||||||
->execWithEnv('./configure --prefix= --enable-static --disable-shared')
|
->execWithEnv('./configure --prefix= --enable-static --disable-shared')
|
||||||
|
|||||||
@ -29,12 +29,10 @@ trait libacl
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
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)
|
shell()->cd($this->source_dir)
|
||||||
->setEnv([
|
->setEnv([
|
||||||
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags() . ' ' . $cflags),
|
'CFLAGS' => trim('-I' . BUILD_INCLUDE_PATH . ' ' . $this->getLibExtraCFlags()),
|
||||||
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags() . ' ' . $ldflags),
|
'LDFLAGS' => trim('-L' . BUILD_LIB_PATH . ' ' . $this->getLibExtraLdFlags()),
|
||||||
'LIBS' => $this->getLibExtraLibs(),
|
'LIBS' => $this->getLibExtraLibs(),
|
||||||
])
|
])
|
||||||
->execWithEnv('./autogen.sh')
|
->execWithEnv('./autogen.sh')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user