From 861c49c9bc30278c6621ce7df96bfe842cd96c1a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:24:57 +0700 Subject: [PATCH 1/6] make sure -fpic -fpie from CFLAGS bleeds through to libxslt compilation --- src/SPC/builder/unix/library/libxslt.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/SPC/builder/unix/library/libxslt.php b/src/SPC/builder/unix/library/libxslt.php index 17fb2f1e..4026b533 100644 --- a/src/SPC/builder/unix/library/libxslt.php +++ b/src/SPC/builder/unix/library/libxslt.php @@ -25,12 +25,14 @@ trait libxslt } } shell()->cd($this->source_dir) - ->exec( - 'CFLAGS="-I' . BUILD_INCLUDE_PATH . '" ' . + ->setEnv([ + 'CFLAGS' => trim($this->getLibExtraCFlags() . ' -I' . BUILD_INCLUDE_PATH), + 'LDFLAGS' => trim($this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH), + 'LIBS' => trim($this->getLibExtraLibs() . "{$required_libs} -lstdc++") + ]) + ->execWithEnv( "{$this->builder->getOption('library_path')} " . "{$this->builder->getOption('ld_library_path')} " . - 'LDFLAGS="-L' . BUILD_LIB_PATH . '" ' . - "LIBS='{$required_libs} -lstdc++' " . './configure ' . '--enable-static --disable-shared ' . '--without-python ' . @@ -41,9 +43,9 @@ trait libxslt '--with-libxml-prefix=' . escapeshellarg(BUILD_ROOT_PATH) . ' ' . '--prefix=' ) - ->exec('make clean') - ->exec("make -j{$this->builder->concurrency}") - ->exec('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH)); + ->execWithEnv('make clean') + ->execWithEnv("make -j{$this->builder->concurrency}") + ->execWithEnv('make install DESTDIR=' . escapeshellarg(BUILD_ROOT_PATH)); $this->patchPkgconfPrefix(['libexslt.pc']); } } From 16a36b8315015c770c2fb30798aee7245475c9f6 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:39:02 +0700 Subject: [PATCH 2/6] damn comma --- src/SPC/builder/unix/library/libxslt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/libxslt.php b/src/SPC/builder/unix/library/libxslt.php index 4026b533..799c87c2 100644 --- a/src/SPC/builder/unix/library/libxslt.php +++ b/src/SPC/builder/unix/library/libxslt.php @@ -28,7 +28,7 @@ trait libxslt ->setEnv([ 'CFLAGS' => trim($this->getLibExtraCFlags() . ' -I' . BUILD_INCLUDE_PATH), 'LDFLAGS' => trim($this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH), - 'LIBS' => trim($this->getLibExtraLibs() . "{$required_libs} -lstdc++") + 'LIBS' => trim($this->getLibExtraLibs() . "{$required_libs} -lstdc++"), ]) ->execWithEnv( "{$this->builder->getOption('library_path')} " . From a3ee3e5a24be0c2a944db9cdcc97ebc633a01a4a Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:41:35 +0700 Subject: [PATCH 3/6] add to tests --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index ef2b6fa6..7915aef1 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -45,7 +45,7 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'pgsql', + 'Linux', 'Darwin' => 'xsl,simplexml,xslwriter', 'Windows' => 'xlswriter,openssl', }; From 14563417a767ad41528a120615992c82edcaf8fd Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:53:33 +0700 Subject: [PATCH 4/6] don't test on windows x) --- src/globals/test-extensions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 7915aef1..7abe1aa0 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -21,15 +21,15 @@ $test_php_version = [ // test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available) $test_os = [ - // 'macos-13', + 'macos-13', // 'macos-14', - // 'macos-15', - // 'ubuntu-latest', - // 'ubuntu-22.04', + 'macos-15', + 'ubuntu-latest', + 'ubuntu-22.04', // 'ubuntu-24.04', // 'ubuntu-22.04-arm', // 'ubuntu-24.04-arm', - 'windows-latest', + // 'windows-latest', ]; // whether enable thread safe From a65bc950916021e5ead0936d506c3c66f9c89553 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:54:20 +0700 Subject: [PATCH 5/6] test arm64 too --- src/globals/test-extensions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 7abe1aa0..ef3d0cc1 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -27,8 +27,8 @@ $test_os = [ 'ubuntu-latest', 'ubuntu-22.04', // 'ubuntu-24.04', - // 'ubuntu-22.04-arm', - // 'ubuntu-24.04-arm', + 'ubuntu-22.04-arm', + 'ubuntu-24.04-arm', // 'windows-latest', ]; From e4028da886752d940df0296683861caeb8290e91 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 6 May 2025 16:56:06 +0700 Subject: [PATCH 6/6] typo --- src/globals/test-extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index ef3d0cc1..2739d3ac 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -45,7 +45,7 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'xsl,simplexml,xslwriter', + 'Linux', 'Darwin' => 'xsl,simplexml,xlswriter', 'Windows' => 'xlswriter,openssl', };