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 ./configure')
->exec('chmod +x ./install-sh') ->exec('chmod +x ./install-sh')
->setEnv([ ->setEnv([
'CFLAGS' => trim($this->getLibExtraCFlags() . ' ' . $this->builder->arch_c_flags), 'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags() . ' -L' . BUILD_LIB_PATH,
'LIBS' => $this->getLibExtraLibs(), 'LIBS' => $this->getLibExtraLibs(),
]) ])
->execWithEnv( ->execWithEnv(
'LDFLAGS="-L' . BUILD_LIB_PATH . '" ' .
'./configure ' . './configure ' .
'--disable-shared ' . '--disable-shared ' .
'--enable-static ' . '--enable-static ' .

View File

@@ -18,11 +18,17 @@ trait zstd
{ {
FileSystem::resetDir($this->source_dir . '/build/cmake/build'); FileSystem::resetDir($this->source_dir . '/build/cmake/build');
shell()->cd($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( ->exec(
'cmake ' . 'cmake ' .
"{$this->builder->makeCmakeArgs()} " . "{$this->builder->makeCmakeArgs()} " .
'-DZSTD_BUILD_STATIC=ON ' . '-DZSTD_BUILD_STATIC=ON ' .
'-DZSTD_BUILD_SHARED=OFF ' . '-DZSTD_BUILD_SHARED=OFF ' .
'-DPOSITION_INDEPENDENT_CODE=ON ' .
'..' '..'
) )
->exec("cmake --build . -j {$this->builder->concurrency}") ->exec("cmake --build . -j {$this->builder->concurrency}")