2023-04-29 18:59:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
|
|
|
|
trait sqlite
|
|
|
|
|
{
|
2023-08-20 19:51:45 +08:00
|
|
|
protected function build(): void
|
2023-04-29 18:59:47 +08:00
|
|
|
{
|
|
|
|
|
shell()->cd($this->source_dir)
|
2025-03-10 00:39:20 +08:00
|
|
|
->setEnv(['CFLAGS' => $this->getLibExtraCFlags(), 'LDFLAGS' => $this->getLibExtraLdFlags(), 'LIBS' => $this->getLibExtraLibs()])
|
|
|
|
|
->execWithEnv('./configure --enable-static --disable-shared --prefix=')
|
|
|
|
|
->execWithEnv('make clean')
|
|
|
|
|
->execWithEnv("make -j{$this->builder->concurrency}")
|
|
|
|
|
->execWithEnv('make install DESTDIR=' . BUILD_ROOT_PATH);
|
2024-07-08 00:07:30 +08:00
|
|
|
$this->patchPkgconfPrefix(['sqlite3.pc']);
|
2023-04-29 18:59:47 +08:00
|
|
|
}
|
|
|
|
|
}
|