mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
@@ -292,7 +292,7 @@
|
|||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with",
|
"arg-type": "with",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"sodium"
|
"libsodium"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"sqlite3": {
|
"sqlite3": {
|
||||||
|
|||||||
@@ -454,5 +454,11 @@
|
|||||||
"zstd.h",
|
"zstd.h",
|
||||||
"zstd_errors.h"
|
"zstd_errors.h"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"libsodium": {
|
||||||
|
"source": "libsodium",
|
||||||
|
"static-libs-unix": [
|
||||||
|
"libsodium.a"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,5 +411,13 @@
|
|||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"libsodium": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
12
src/SPC/builder/linux/library/libsodium.php
Normal file
12
src/SPC/builder/linux/library/libsodium.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\linux\library;
|
||||||
|
|
||||||
|
class libsodium extends LinuxLibraryBase
|
||||||
|
{
|
||||||
|
use \SPC\builder\unix\library\libsodium;
|
||||||
|
|
||||||
|
public const NAME = 'libsodium';
|
||||||
|
}
|
||||||
12
src/SPC/builder/macos/library/libsodium.php
Normal file
12
src/SPC/builder/macos/library/libsodium.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\macos\library;
|
||||||
|
|
||||||
|
class libsodium extends MacOSLibraryBase
|
||||||
|
{
|
||||||
|
use \SPC\builder\unix\library\libsodium;
|
||||||
|
|
||||||
|
public const NAME = 'libsodium';
|
||||||
|
}
|
||||||
18
src/SPC/builder/unix/library/libsodium.php
Normal file
18
src/SPC/builder/unix/library/libsodium.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
trait libsodium
|
||||||
|
{
|
||||||
|
protected function build()
|
||||||
|
{
|
||||||
|
$root = BUILD_ROOT_PATH;
|
||||||
|
shell()->cd($this->source_dir)
|
||||||
|
->exec("{$this->builder->configure_env} ./configure --enable-static --disable-shared --prefix={$root}")
|
||||||
|
->exec('make clean')
|
||||||
|
->exec("make -j{$this->builder->concurrency}")
|
||||||
|
->exec('make install');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user