mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-12 03:15:35 +08:00
add lerc
This commit is contained in:
@@ -265,6 +265,13 @@
|
|||||||
"libsodium"
|
"libsodium"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"lerc": {
|
||||||
|
"source": "lerc",
|
||||||
|
"static-libs-unix": [
|
||||||
|
"libLerc.a"
|
||||||
|
],
|
||||||
|
"cpp-library": true
|
||||||
|
},
|
||||||
"libacl": {
|
"libacl": {
|
||||||
"source": "libacl",
|
"source": "libacl",
|
||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
@@ -498,6 +505,9 @@
|
|||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"zlib",
|
"zlib",
|
||||||
"libjpeg"
|
"libjpeg"
|
||||||
|
],
|
||||||
|
"lib-suggests-unix": [
|
||||||
|
"lerc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"libuuid": {
|
"libuuid": {
|
||||||
|
|||||||
@@ -465,6 +465,16 @@
|
|||||||
"path": "COPYING"
|
"path": "COPYING"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lerc": {
|
||||||
|
"type": "ghtar",
|
||||||
|
"repo": "Esri/lerc",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"provide-pre-built": true,
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"libevent": {
|
"libevent": {
|
||||||
"type": "ghrel",
|
"type": "ghrel",
|
||||||
"repo": "libevent/libevent",
|
"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\FileSystemException;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
use SPC\util\executor\UnixAutoconfExecutor;
|
use SPC\util\executor\UnixAutoconfExecutor;
|
||||||
|
|
||||||
trait libtiff
|
trait libtiff
|
||||||
@@ -16,6 +17,7 @@ trait libtiff
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
|
FileSystem::replaceFileStr($this->source_dir . '/configure', '-lwebp', '-lwebp -lsharpyuv');
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
->configure(
|
->configure(
|
||||||
// zlib deps
|
// zlib deps
|
||||||
@@ -24,17 +26,18 @@ trait libtiff
|
|||||||
"--with-zlib-lib-dir={$this->getLibDir()}",
|
"--with-zlib-lib-dir={$this->getLibDir()}",
|
||||||
// libjpeg deps
|
// libjpeg deps
|
||||||
'--enable-jpeg',
|
'--enable-jpeg',
|
||||||
'--disable-old-jpeg',
|
|
||||||
'--disable-jpeg12',
|
|
||||||
"--with-jpeg-include-dir={$this->getIncludeDir()}",
|
"--with-jpeg-include-dir={$this->getIncludeDir()}",
|
||||||
"--with-jpeg-lib-dir={$this->getLibDir()}",
|
"--with-jpeg-lib-dir={$this->getLibDir()}",
|
||||||
// We disabled lzma, zstd, webp, libdeflate by default to reduce the size of the binary
|
'--disable-old-jpeg',
|
||||||
'--disable-lzma',
|
'--disable-jpeg12',
|
||||||
'--disable-zstd',
|
|
||||||
'--disable-webp',
|
|
||||||
'--disable-libdeflate',
|
'--disable-libdeflate',
|
||||||
'--disable-cxx',
|
'--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();
|
->make();
|
||||||
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user