From 878e17ddb4a0426889daa603529851849e04dc87 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 11 Mar 2025 05:39:38 +0100 Subject: [PATCH] remove attr and libacl from macos --- config/lib.json | 12 ++++++------ src/SPC/builder/LibraryBase.php | 2 +- src/SPC/builder/macos/library/attr.php | 12 ------------ src/SPC/builder/macos/library/libacl.php | 12 ------------ src/SPC/builder/unix/library/attr.php | 6 ++---- src/SPC/builder/unix/library/libacl.php | 6 ++---- 6 files changed, 11 insertions(+), 39 deletions(-) delete mode 100644 src/SPC/builder/macos/library/attr.php delete mode 100644 src/SPC/builder/macos/library/libacl.php diff --git a/config/lib.json b/config/lib.json index 4ebe8548..53c26d2c 100644 --- a/config/lib.json +++ b/config/lib.json @@ -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": { diff --git a/src/SPC/builder/LibraryBase.php b/src/SPC/builder/LibraryBase.php index 08ff3d84..deb7c45f 100644 --- a/src/SPC/builder/LibraryBase.php +++ b/src/SPC/builder/LibraryBase.php @@ -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) { diff --git a/src/SPC/builder/macos/library/attr.php b/src/SPC/builder/macos/library/attr.php deleted file mode 100644 index 028deb26..00000000 --- a/src/SPC/builder/macos/library/attr.php +++ /dev/null @@ -1,12 +0,0 @@ -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') diff --git a/src/SPC/builder/unix/library/libacl.php b/src/SPC/builder/unix/library/libacl.php index 7d84d9ec..e43cc2fc 100644 --- a/src/SPC/builder/unix/library/libacl.php +++ b/src/SPC/builder/unix/library/libacl.php @@ -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')