From 0fee62884281a2976d164abc2f766583c0e9f26a Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Mon, 6 May 2024 12:55:38 +0800 Subject: [PATCH] Fix xz build on macOS and Linux (#438) * fix xz build * add xz tests --- src/SPC/builder/macos/library/xz.php | 16 ---------------- src/SPC/builder/unix/library/xz.php | 1 - src/globals/test-extensions.php | 4 ++-- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/SPC/builder/macos/library/xz.php b/src/SPC/builder/macos/library/xz.php index d656e35e7..2719e9c95 100644 --- a/src/SPC/builder/macos/library/xz.php +++ b/src/SPC/builder/macos/library/xz.php @@ -1,20 +1,4 @@ - * - * lwmbs is licensed under Mulan PSL v2. You can use this - * software according to the terms and conditions of the - * Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: - * - * http://license.coscl.org.cn/MulanPSL2 - * - * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, - * WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, - * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - * - * See the Mulan PSL v2 for more details. - */ declare(strict_types=1); diff --git a/src/SPC/builder/unix/library/xz.php b/src/SPC/builder/unix/library/xz.php index 7cd7e74b5..1869f589c 100644 --- a/src/SPC/builder/unix/library/xz.php +++ b/src/SPC/builder/unix/library/xz.php @@ -20,7 +20,6 @@ public function build(): void './configure ' . '--enable-static ' . '--disable-shared ' . - "--host={$this->builder->getOption('gnu-arch')}-unknown-linux " . '--disable-scripts ' . '--disable-doc ' . '--with-libiconv ' . diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index aeed4c94a..2650d7a86 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,13 +13,13 @@ // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'readline', + 'Linux', 'Darwin' => 'curl', 'Windows' => 'mbstring,pdo_sqlite,mbregex', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). $with_libs = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => '', + 'Linux', 'Darwin' => 'xz', 'Windows' => '', };