From 3b9670c202ceeba11f70da8841d155b51abd9c84 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Fri, 6 Jun 2025 09:57:20 +0700 Subject: [PATCH] fpic for liblzma --- src/SPC/builder/unix/library/xz.php | 13 +++++++++---- src/SPC/command/CraftCommand.php | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/SPC/builder/unix/library/xz.php b/src/SPC/builder/unix/library/xz.php index c1c84f1f..e9ce3026 100644 --- a/src/SPC/builder/unix/library/xz.php +++ b/src/SPC/builder/unix/library/xz.php @@ -16,7 +16,12 @@ trait xz public function build(): void { shell()->cd($this->source_dir) - ->exec( + ->setEnv([ + 'CFLAGS' => $this->getLibExtraCFlags(), + 'LDFLAGS' => $this->getLibExtraLdFlags(), + 'LIBS' => $this->getLibExtraLibs(), + ]) + ->execWithEnv( './configure ' . '--enable-static ' . '--disable-shared ' . @@ -26,9 +31,9 @@ trait xz '--with-libiconv ' . '--prefix=' ) - ->exec('make clean') - ->exec("make -j{$this->builder->concurrency}") - ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + ->execWithEnv('make clean') + ->execWithEnv("make -j{$this->builder->concurrency}") + ->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH); $this->patchPkgconfPrefix(['liblzma.pc']); } } diff --git a/src/SPC/command/CraftCommand.php b/src/SPC/command/CraftCommand.php index c5ddfb74..8d3cc2be 100644 --- a/src/SPC/command/CraftCommand.php +++ b/src/SPC/command/CraftCommand.php @@ -75,7 +75,7 @@ class CraftCommand extends BaseCommand } if (isset($craft['php-version'])) { $args[] = '--with-php=' . $craft['php-version']; - if (!array_key_exists('ignore-cache-sources', $craft['download-options']) || $craft['download-options']['ignore-cache-sources'] === false) { + if (!array_key_exists('ignore-cache-sources', $craft['download-options'])) { $craft['download-options']['ignore-cache-sources'] = 'php-src'; } }