-fPIC for unixodbc

This commit is contained in:
henderkes 2025-05-18 12:19:26 +07:00
parent f88c10d4aa
commit 2ff300970a

View File

@ -16,19 +16,25 @@ trait unixodbc
protected 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 ' .
'--disable-debug ' .
'--with-pic ' .
'--disable-dependency-tracking ' .
'--with-libiconv-prefix=' . BUILD_ROOT_PATH . ' ' .
'--with-included-ltdl ' .
'--enable-gui=no ' .
'--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(['odbc.pc', 'odbccr.pc', 'odbcinst.pc']);
$this->cleanLaFiles();
}