fix libsodium with -fPIC too

This commit is contained in:
henderkes 2025-05-15 15:29:12 +07:00
parent 2897fdda04
commit 03b634b961

View File

@ -9,10 +9,15 @@ trait libsodium
protected function build(): void
{
shell()->cd($this->source_dir)
->exec('./configure --enable-static --disable-shared --prefix=')
->exec('make clean')
->exec("make -j{$this->builder->concurrency}")
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
->setEnv([
'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv('./configure --with-pic --enable-static --disable-shared --prefix=')
->execWithEnv('make clean')
->execWithEnv("make -j{$this->builder->concurrency}")
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['libsodium.pc'], PKGCONF_PATCH_PREFIX);
}