mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 23:35:37 +08:00
Add sqlite
This commit is contained in:
12
config/pkg/lib/sqlite.yml
Normal file
12
config/pkg/lib/sqlite.yml
Normal 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
|
||||||
22
src/Package/Library/sqlite.php
Normal file
22
src/Package/Library/sqlite.php
Normal 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']);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/globals/licenses/sqlite.txt
Normal file
6
src/globals/licenses/sqlite.txt
Normal 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.
|
||||||
Reference in New Issue
Block a user