24 lines
701 B
PHP

<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
trait sqlite
{
protected function build(): void
{
shell()->cd($this->source_dir)
->setEnv([
'CFLAGS' => $this->getLibExtraCFlags(),
'LDFLAGS' => $this->getLibExtraLdFlags(),
'LIBS' => $this->getLibExtraLibs(),
])
->execWithEnv('./configure --enable-static --disable-shared --with-pic --prefix=')
->execWithEnv('make clean')
->execWithEnv("make -j{$this->builder->concurrency}")
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);
$this->patchPkgconfPrefix(['sqlite3.pc']);
}
}