This commit is contained in:
henderkes 2025-05-18 17:59:02 +07:00
parent 117923791a
commit f708907d99
2 changed files with 8 additions and 3 deletions

View File

@ -45,12 +45,11 @@ class libpng extends LinuxLibraryBase
->exec('chmod +x ./configure')
->exec('chmod +x ./install-sh')
->setEnv([
'CFLAGS' => trim($this->getLibExtraCFlags() . ' ' . $this->builder->arch_c_flags),
'LDFLAGS' => $this->getLibExtraLdFlags(),
'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH,
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv(
'LDFLAGS="-L' . BUILD_LIB_PATH . '" ' .
'./configure ' .
'--disable-shared ' .
'--enable-static ' .

View File

@ -18,11 +18,17 @@ trait zstd
{
FileSystem::resetDir($this->source_dir . '/build/cmake/build');
shell()->cd($this->source_dir . '/build/cmake/build')
->setEnv([
'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs(),
])
->exec(
'cmake ' .
"{$this->builder->makeCmakeArgs()} " .
'-DZSTD_BUILD_STATIC=ON ' .
'-DZSTD_BUILD_SHARED=OFF ' .
'-DPOSITION_INDEPENDENT_CODE=ON ' .
'..'
)
->exec("cmake --build . -j {$this->builder->concurrency}")