mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
add pocketmine support
This commit is contained in:
parent
a39cd9a238
commit
ee3be6f374
@ -16,6 +16,14 @@
|
||||
"calendar": {
|
||||
"type": "builtin"
|
||||
},
|
||||
"crypto": {
|
||||
"type": "external",
|
||||
"arg-type": "with",
|
||||
"source": "ext-crypto",
|
||||
"lib-depends": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"ctype": {
|
||||
"type": "builtin"
|
||||
},
|
||||
@ -122,6 +130,10 @@
|
||||
"libiconv"
|
||||
]
|
||||
},
|
||||
"igbinary": {
|
||||
"type": "external",
|
||||
"source": "igbinary"
|
||||
},
|
||||
"imagick": {
|
||||
"type": "external",
|
||||
"source": "ext-imagick",
|
||||
@ -164,6 +176,14 @@
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"leveldb": {
|
||||
"type": "external",
|
||||
"arg-type": "with-prefix",
|
||||
"source": "pmmp-leveldb",
|
||||
"lib-depends": [
|
||||
"leveldb"
|
||||
]
|
||||
},
|
||||
"mbregex": {
|
||||
"type": "builtin",
|
||||
"arg-type": "custom",
|
||||
@ -213,6 +233,10 @@
|
||||
"zlib"
|
||||
]
|
||||
},
|
||||
"morton": {
|
||||
"type": "external",
|
||||
"source": "ext-morton"
|
||||
},
|
||||
"mysqli": {
|
||||
"type": "builtin",
|
||||
"arg-type": "with",
|
||||
@ -299,6 +323,16 @@
|
||||
"zlib"
|
||||
]
|
||||
},
|
||||
"pmmp-chunkutils2": {
|
||||
"type": "external",
|
||||
"source": "pmmp-chunkutils2",
|
||||
"arg-type": "custom",
|
||||
"cpp-extension": true
|
||||
},
|
||||
"pmmpthread": {
|
||||
"type": "external",
|
||||
"source": "pmmpthread"
|
||||
},
|
||||
"posix": {
|
||||
"type": "builtin",
|
||||
"unix-only": true
|
||||
|
||||
@ -163,6 +163,13 @@
|
||||
"libsodium"
|
||||
]
|
||||
},
|
||||
"leveldb": {
|
||||
"source": "leveldb",
|
||||
"static-libs-unix": [
|
||||
"libleveldb.a"
|
||||
],
|
||||
"cpp-library": true
|
||||
},
|
||||
"libargon2": {
|
||||
"source": "libargon2",
|
||||
"static-libs-unix": [
|
||||
|
||||
@ -42,6 +42,16 @@
|
||||
"path": "COPYING"
|
||||
}
|
||||
},
|
||||
"ext-crypto": {
|
||||
"type": "git",
|
||||
"path": "php-src/ext/crypto",
|
||||
"rev": "master",
|
||||
"url": "https://github.com/bukka/php-crypto.git",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"ext-event": {
|
||||
"type": "url",
|
||||
"url": "https://bitbucket.org/osmanov/pecl-event/get/3.0.8.tar.gz",
|
||||
@ -80,6 +90,16 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"ext-morton": {
|
||||
"type": "git",
|
||||
"path": "php-src/ext/morton",
|
||||
"rev": "master",
|
||||
"url": "https://github.com/pmmp/ext-morton.git",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"ext-snappy": {
|
||||
"type": "git",
|
||||
"path": "php-src/ext/snappy",
|
||||
@ -136,6 +156,15 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"igbinary": {
|
||||
"type": "ghtar",
|
||||
"path": "php-src/ext/igbinary",
|
||||
"repo": "igbinary/igbinary",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "COPYING"
|
||||
}
|
||||
},
|
||||
"imagemagick": {
|
||||
"type": "ghtar",
|
||||
"repo": "ImageMagick/ImageMagick",
|
||||
@ -172,6 +201,15 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"leveldb": {
|
||||
"type": "git",
|
||||
"rev": "mojang-compatible",
|
||||
"url": "https://github.com/pmmp/leveldb.git",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"libargon2": {
|
||||
"type": "git",
|
||||
"rev": "master",
|
||||
@ -392,6 +430,34 @@
|
||||
"path": "COPYING"
|
||||
}
|
||||
},
|
||||
"pmmp-chunkutils2": {
|
||||
"type": "ghtar",
|
||||
"path": "php-src/ext/chunkutils2",
|
||||
"repo": "pmmp/ext-chunkutils2",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"pmmp-leveldb": {
|
||||
"type": "git",
|
||||
"path": "php-src/ext/leveldb",
|
||||
"rev": "pmmp-mojang-compatible",
|
||||
"url": "https://github.com/pmmp/php-leveldb.git",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"pmmpthread": {
|
||||
"type": "ghtar",
|
||||
"path": "php-src/ext/pmmpthread",
|
||||
"repo": "pmmp/ext-pmmpthread",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"postgresql": {
|
||||
"type": "url",
|
||||
"url": "https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.gz",
|
||||
|
||||
22
src/SPC/builder/extension/pmmp_chunkutils2.php
Normal file
22
src/SPC/builder/extension/pmmp_chunkutils2.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\util\CustomExt;
|
||||
|
||||
#[CustomExt('pmmp-chunkutils2')]
|
||||
class pmmp_chunkutils2 extends Extension
|
||||
{
|
||||
public function getDistName(): string
|
||||
{
|
||||
return 'chunkutils2';
|
||||
}
|
||||
|
||||
public function getUnixConfigureArg(): string
|
||||
{
|
||||
return '--enable-chunkutils2';
|
||||
}
|
||||
}
|
||||
12
src/SPC/builder/linux/library/leveldb.php
Normal file
12
src/SPC/builder/linux/library/leveldb.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
class leveldb extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\leveldb;
|
||||
|
||||
public const NAME = 'leveldb';
|
||||
}
|
||||
12
src/SPC/builder/macos/library/leveldb.php
Normal file
12
src/SPC/builder/macos/library/leveldb.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\macos\library;
|
||||
|
||||
class leveldb extends MacOSLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\leveldb;
|
||||
|
||||
public const NAME = 'leveldb';
|
||||
}
|
||||
33
src/SPC/builder/unix/library/leveldb.php
Normal file
33
src/SPC/builder/unix/library/leveldb.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\store\FileSystem;
|
||||
|
||||
trait leveldb
|
||||
{
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
// CMake needs a clean build directory
|
||||
FileSystem::resetDir($this->source_dir . '/build');
|
||||
// Start build
|
||||
shell()->cd($this->source_dir . '/build')
|
||||
->exec(
|
||||
"cmake {$this->builder->makeCmakeArgs()} " .
|
||||
'-DBUILD_SHARED_LIBS=OFF ' .
|
||||
'-DLEVELDB_BUILD_TESTS=OFF ' .
|
||||
'-DLEVELDB_BUILD_BENCHMARKS=OFF ' .
|
||||
'..'
|
||||
)
|
||||
->exec("cmake --build . -j {$this->builder->concurrency}")
|
||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user