mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
refactor to pkg-config and add some add-on libs for gd
This commit is contained in:
@@ -20,50 +20,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
use SPC\exception\RuntimeException;
|
||||
|
||||
class nghttp2 extends LinuxLibraryBase
|
||||
{
|
||||
public const NAME = 'nghttp2';
|
||||
|
||||
protected array $static_libs = ['libnghttp2.a'];
|
||||
|
||||
protected array $headers = ['nghttp2'];
|
||||
|
||||
protected array $pkgconfs = [
|
||||
'libnghttp2.pc' => <<<'EOF'
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libnghttp2
|
||||
Description: HTTP/2 C library
|
||||
URL: https://github.com/tatsuhiro-t/nghttp2
|
||||
Version: 1.47.0
|
||||
Libs: -L${libdir} -lnghttp2
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
];
|
||||
|
||||
protected array $dep_names = [
|
||||
'zlib' => false,
|
||||
'openssl' => false,
|
||||
'libxml2' => true,
|
||||
'libev' => true,
|
||||
'libcares' => true,
|
||||
'libngtcp2' => true,
|
||||
'libnghttp3' => true,
|
||||
'libbpf' => true,
|
||||
'libevent-openssl' => true,
|
||||
'jansson' => true,
|
||||
'jemalloc' => true,
|
||||
'systemd' => true,
|
||||
'cunit' => true,
|
||||
];
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$args = $this->builder->makeAutoconfArgs(static::NAME, [
|
||||
@@ -98,5 +58,6 @@ EOF
|
||||
->exec('make clean')
|
||||
->exec("make -j{$this->builder->concurrency}")
|
||||
->exec("make install DESTDIR={$destdir}");
|
||||
$this->patchPkgconfPrefix(['libnghttp2.pc']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user