mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
add lerc
This commit is contained in:
parent
9af3b745a2
commit
5586f627d3
@ -265,6 +265,13 @@
|
||||
"libsodium"
|
||||
]
|
||||
},
|
||||
"lerc": {
|
||||
"source": "lerc",
|
||||
"static-libs-unix": [
|
||||
"libLerc.a"
|
||||
],
|
||||
"cpp-library": true
|
||||
},
|
||||
"libacl": {
|
||||
"source": "libacl",
|
||||
"static-libs-unix": [
|
||||
@ -498,6 +505,9 @@
|
||||
"lib-depends": [
|
||||
"zlib",
|
||||
"libjpeg"
|
||||
],
|
||||
"lib-suggests-unix": [
|
||||
"lerc"
|
||||
]
|
||||
},
|
||||
"libuuid": {
|
||||
|
||||
@ -465,6 +465,16 @@
|
||||
"path": "COPYING"
|
||||
}
|
||||
},
|
||||
"lerc": {
|
||||
"type": "ghtar",
|
||||
"repo": "Esri/lerc",
|
||||
"prefer-stable": true,
|
||||
"provide-pre-built": true,
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"libevent": {
|
||||
"type": "ghrel",
|
||||
"repo": "libevent/libevent",
|
||||
|
||||
12
src/SPC/builder/linux/library/lerc.php
Normal file
12
src/SPC/builder/linux/library/lerc.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
class lerc extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\lerc;
|
||||
|
||||
public const NAME = 'lerc';
|
||||
}
|
||||
12
src/SPC/builder/macos/library/lerc.php
Normal file
12
src/SPC/builder/macos/library/lerc.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\macos\library;
|
||||
|
||||
class lerc extends MacOSLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\lerc;
|
||||
|
||||
public const NAME = 'lerc';
|
||||
}
|
||||
22
src/SPC/builder/unix/library/lerc.php
Normal file
22
src/SPC/builder/unix/library/lerc.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\util\executor\UnixCMakeExecutor;
|
||||
|
||||
trait lerc
|
||||
{
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
UnixCMakeExecutor::create($this)
|
||||
->build();
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\store\FileSystem;
|
||||
use SPC\util\executor\UnixAutoconfExecutor;
|
||||
|
||||
trait libtiff
|
||||
@ -16,6 +17,7 @@ trait libtiff
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
FileSystem::replaceFileStr($this->source_dir . '/configure', '-lwebp', '-lwebp -lsharpyuv');
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->configure(
|
||||
// zlib deps
|
||||
@ -24,17 +26,18 @@ trait libtiff
|
||||
"--with-zlib-lib-dir={$this->getLibDir()}",
|
||||
// libjpeg deps
|
||||
'--enable-jpeg',
|
||||
'--disable-old-jpeg',
|
||||
'--disable-jpeg12',
|
||||
"--with-jpeg-include-dir={$this->getIncludeDir()}",
|
||||
"--with-jpeg-lib-dir={$this->getLibDir()}",
|
||||
// We disabled lzma, zstd, webp, libdeflate by default to reduce the size of the binary
|
||||
'--disable-lzma',
|
||||
'--disable-zstd',
|
||||
'--disable-webp',
|
||||
'--disable-old-jpeg',
|
||||
'--disable-jpeg12',
|
||||
'--disable-libdeflate',
|
||||
'--disable-cxx',
|
||||
'--without-x',
|
||||
)
|
||||
->optionalLib('lerc', '--enable-lerc', '--disable-lerc')
|
||||
->optionalLib('zstd', '--enable-zstd', '--disable-zstd')
|
||||
->optionalLib('webp', '--enable-webp', '--disable-webp')
|
||||
->optionalLib('xz', '--enable-lzma', '--disable-lzma')
|
||||
->make();
|
||||
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user