Add sqlite

This commit is contained in:
crazywhalecc 2026-02-06 14:12:06 +08:00
parent fd40b92041
commit d163c3dff6
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
3 changed files with 40 additions and 0 deletions

12
config/pkg/lib/sqlite.yml Normal file
View File

@ -0,0 +1,12 @@
sqlite:
type: library
artifact:
source: 'https://www.sqlite.org/2024/sqlite-autoconf-3450200.tar.gz'
metadata:
license-files: ['@/sqlite.txt']
license: Unlicense
headers:
- sqlite3.h
- sqlite3ext.h
static-libs@unix:
- libsqlite3.a

View File

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Package\Library;
use StaticPHP\Attribute\Package\BuildFor;
use StaticPHP\Attribute\Package\Library;
use StaticPHP\Package\LibraryPackage;
use StaticPHP\Runtime\Executor\UnixAutoconfExecutor;
#[Library('sqlite')]
class sqlite
{
#[BuildFor('Darwin')]
#[BuildFor('Linux')]
public function buildUnix(LibraryPackage $lib): void
{
UnixAutoconfExecutor::create($lib)->configure()->make();
$lib->patchPkgconfPrefix(['sqlite3.pc']);
}
}

View File

@ -0,0 +1,6 @@
The author disclaims copyright to this source code. In place of
a legal notice, here is a blessing:
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.