mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
add jbig
This commit is contained in:
parent
5c44703f53
commit
be0dbcd9eb
@ -272,6 +272,18 @@
|
|||||||
],
|
],
|
||||||
"cpp-library": true
|
"cpp-library": true
|
||||||
},
|
},
|
||||||
|
"jbig": {
|
||||||
|
"source": "jbig",
|
||||||
|
"static-libs-unix": [
|
||||||
|
"libjbig.a",
|
||||||
|
"libjbig85.a"
|
||||||
|
],
|
||||||
|
"headers": [
|
||||||
|
"jbig.h",
|
||||||
|
"jbig85.h",
|
||||||
|
"jbig_ar.h"
|
||||||
|
]
|
||||||
|
},
|
||||||
"libacl": {
|
"libacl": {
|
||||||
"source": "libacl",
|
"source": "libacl",
|
||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
@ -507,7 +519,8 @@
|
|||||||
"libjpeg"
|
"libjpeg"
|
||||||
],
|
],
|
||||||
"lib-suggests-unix": [
|
"lib-suggests-unix": [
|
||||||
"lerc"
|
"lerc",
|
||||||
|
"jbig"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"libuuid": {
|
"libuuid": {
|
||||||
|
|||||||
@ -476,6 +476,15 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"jbig": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-2.1.tar.gz",
|
||||||
|
"provide-pre-built": true,
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "COPYING"
|
||||||
|
}
|
||||||
|
},
|
||||||
"libevent": {
|
"libevent": {
|
||||||
"type": "ghrel",
|
"type": "ghrel",
|
||||||
"repo": "libevent/libevent",
|
"repo": "libevent/libevent",
|
||||||
|
|||||||
12
src/SPC/builder/linux/library/jbig.php
Normal file
12
src/SPC/builder/linux/library/jbig.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\linux\library;
|
||||||
|
|
||||||
|
class jbig extends LinuxLibraryBase
|
||||||
|
{
|
||||||
|
use \SPC\builder\unix\library\jbig;
|
||||||
|
|
||||||
|
public const NAME = 'jbig';
|
||||||
|
}
|
||||||
12
src/SPC/builder/macos/library/jbig.php
Normal file
12
src/SPC/builder/macos/library/jbig.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\macos\library;
|
||||||
|
|
||||||
|
class jbig extends MacOSLibraryBase
|
||||||
|
{
|
||||||
|
use \SPC\builder\unix\library\jbig;
|
||||||
|
|
||||||
|
public const NAME = 'jbig';
|
||||||
|
}
|
||||||
31
src/SPC/builder/unix/library/jbig.php
Normal file
31
src/SPC/builder/unix/library/jbig.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
use SPC\exception\FileSystemException;
|
||||||
|
use SPC\exception\RuntimeException;
|
||||||
|
use SPC\store\FileSystem;
|
||||||
|
|
||||||
|
trait jbig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws FileSystemException
|
||||||
|
* @throws RuntimeException
|
||||||
|
*/
|
||||||
|
protected function build(): void
|
||||||
|
{
|
||||||
|
// Patch Makefile to add -fPIC flag for position-independent code
|
||||||
|
FileSystem::replaceFileStr($this->source_dir . '/Makefile', 'CFLAGS = -O2 -W -Wno-unused-result', 'CFLAGS = -O2 -W -Wno-unused-result -fPIC');
|
||||||
|
|
||||||
|
// Build the library
|
||||||
|
shell()->cd($this->source_dir)->initializeEnv($this)
|
||||||
|
->exec("make -j{$this->builder->concurrency} {$this->builder->getEnvString()} lib")
|
||||||
|
->exec('cp libjbig/libjbig.a ' . BUILD_LIB_PATH)
|
||||||
|
->exec('cp libjbig/libjbig85.a ' . BUILD_LIB_PATH)
|
||||||
|
->exec('cp libjbig/jbig.h ' . BUILD_INCLUDE_PATH)
|
||||||
|
->exec('cp libjbig/jbig85.h ' . BUILD_INCLUDE_PATH)
|
||||||
|
->exec('cp libjbig/jbig_ar.h ' . BUILD_INCLUDE_PATH);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -38,6 +38,7 @@ trait libtiff
|
|||||||
->optionalLib('zstd', '--enable-zstd', '--disable-zstd')
|
->optionalLib('zstd', '--enable-zstd', '--disable-zstd')
|
||||||
->optionalLib('webp', '--enable-webp', '--disable-webp')
|
->optionalLib('webp', '--enable-webp', '--disable-webp')
|
||||||
->optionalLib('xz', '--enable-lzma', '--disable-lzma')
|
->optionalLib('xz', '--enable-lzma', '--disable-lzma')
|
||||||
|
->optionalLib('jbig', '--enable-jbig', '--disable-jbig')
|
||||||
->make();
|
->make();
|
||||||
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user